mirror of
https://github.com/HeyPuter/puter.git
synced 2026-08-26 16:07:13 +00:00
Merge branch 'main' of https://github.com/heyputer/puter
This commit is contained in:
@@ -110,6 +110,9 @@ async function UIWindowSettings(options){
|
||||
const component = tab.factory();
|
||||
component.attach(tab_placeholders[i]);
|
||||
}
|
||||
if ( tab.reinitialize ) {
|
||||
tab.reinitialize();
|
||||
}
|
||||
if ( tab.dom ) {
|
||||
tab_placeholders[i].replaceWith(tab.dom);
|
||||
}
|
||||
|
||||
@@ -93,6 +93,12 @@ export default def(class UIElement extends AdvancedBase {
|
||||
this.make(this);
|
||||
}
|
||||
|
||||
reinitialize () {
|
||||
this.root = document.createElement(this.tagName);
|
||||
this.make(this);
|
||||
return this.root;
|
||||
}
|
||||
|
||||
async open_as_window (options = {}) {
|
||||
const placeholder = Placeholder();
|
||||
console.log('window options?', this.windowOptions);
|
||||
|
||||
@@ -49,7 +49,12 @@ export class SettingsService extends Service {
|
||||
const ui_element = tab;
|
||||
tab = {
|
||||
...ui_element.as(TSettingsTab).get_metadata(),
|
||||
dom: ui_element.root,
|
||||
reinitialize () {
|
||||
ui_element.reinitialize();
|
||||
},
|
||||
get dom () {
|
||||
return ui_element.root;
|
||||
},
|
||||
};
|
||||
}
|
||||
this.#tabs.push(tab);
|
||||
|
||||
Reference in New Issue
Block a user