mirror of
https://github.com/zen-browser/desktop.git
synced 2025-07-10 04:25:31 +02:00
This commit adds an `onpopuphidden` event handler to the gradient generator panel, which calls the `gZenThemePicker.handlePanelClose()` function when the panel is hidden. This ensures that the theme picker is properly updated and handles the panel's closing behavior.
218 lines
12 KiB
HTML
218 lines
12 KiB
HTML
<menupopup id="zenWebPanelContextMenu"
|
|
onpopupshowing="if (event.target == this) gZenBrowserManagerSidebar.updateContextMenu(this);"
|
|
onpopuphidden="if (event.target == this) gZenBrowserManagerSidebar.contextTab = null;">
|
|
<menuitem id="context_zenUnloadWebPanel" oncommand="gZenBrowserManagerSidebar.contextUnload();" data-l10n-id="zen-web-side-panel-context-unload"/>
|
|
<menuitem id="context_zenToggleMuteWebPanel" oncommand="gZenBrowserManagerSidebar.contextToggleMuteAudio();"/>
|
|
<menuitem id="context_zenOpenNewTabWebPanel" oncommand="gZenBrowserManagerSidebar.contextOpenNewTab();" data-l10n-id="zen-web-side-panel-open-in-new-tab"/>
|
|
<menuseparator/>
|
|
<menu id="context_zenWebPanelContextInContainer"
|
|
data-l10n-id="zen-web-side-panel-context-open-in-container-tab"
|
|
selection-type="single"
|
|
node-type="link"
|
|
hide-if-private-browsing="true"
|
|
hide-if-usercontext-disabled="true">
|
|
<menupopup oncommand="gZenBrowserManagerSidebar.contextChangeContainerTab(event);"
|
|
onpopupshowing="return gZenBrowserManagerSidebar.createContainerTabMenu(event);" />
|
|
</menu>
|
|
<menuitem id="context_zenToogleUAWebPanel" oncommand="gZenBrowserManagerSidebar.contextToggleUserAgent();"/>
|
|
<menuseparator/>
|
|
<menuitem id="context_zenDeleteWebPanel" oncommand="gZenBrowserManagerSidebar.contextDelete();" data-l10n-id="zen-web-side-panel-context-delete"/>
|
|
</menupopup>
|
|
|
|
<html:template id="template-zen-split-view-modifier">
|
|
<panel id="zenSplitViewModifier"
|
|
class="panel-no-padding"
|
|
orient="vertical"
|
|
role="alertdialog"
|
|
type="arrow"
|
|
onpopupshowing="gZenViewSplitter.disableTabRearrangeView();"
|
|
aria-labelledby="zen-split-view-modifier-header"
|
|
tabspecific="true">
|
|
<panelmultiview id="zenSplitViewModifierMultiview"
|
|
mainViewId="zenSplitViewModifierViewDefault">
|
|
<panelview id="zenSplitViewModifierViewDefault"
|
|
class="PanelUI-subView"
|
|
role="document"
|
|
mainview-with-header="true"
|
|
has-custom-header="true">
|
|
<box id="zenSplitViewModifierHeader"
|
|
class="panel-header panel-header-with-additional-element panel-header-with-info-button">
|
|
<html:h1>
|
|
<html:span data-l10n-id="zen-split-view-modifier-header"></html:span>
|
|
</html:h1>
|
|
<toolbarbutton id="zenSplitViewModifierActivateReallocation"
|
|
class="panel-info-button"
|
|
oncommand="gZenViewSplitter.enableTabRearrangeView();"
|
|
data-l10n-id="zen-split-view-modifier-activate-reallocation">
|
|
<image/>
|
|
</toolbarbutton>
|
|
</box>
|
|
<hbox id="zenSplitViewModifierContent">
|
|
<vbox>
|
|
<box class="zen-split-view-modifier-preview grid">
|
|
<box></box>
|
|
<box></box>
|
|
<box></box>
|
|
</box>
|
|
<p>Grid Layout</p>
|
|
</vbox>
|
|
<vbox>
|
|
<box class="zen-split-view-modifier-preview vsep">
|
|
<box></box>
|
|
<box></box>
|
|
</box>
|
|
<p>Vertical</p>
|
|
</vbox>
|
|
<vbox>
|
|
<box class="zen-split-view-modifier-preview hsep">
|
|
<box></box>
|
|
<box></box>
|
|
</box>
|
|
<p>Horizontal</p>
|
|
</vbox>
|
|
<vbox>
|
|
<box class="zen-split-view-modifier-preview unsplit">
|
|
<box></box>
|
|
</box>
|
|
<p>Unsplit</p>
|
|
</vbox>
|
|
</hbox>
|
|
</panelview>
|
|
</panelmultiview>
|
|
</panel>
|
|
</html:template>
|
|
|
|
<panelview id="PanelUI-zen-profiles" position="bottomleft topleft" mainview="true" side="right">
|
|
<vbox>
|
|
<html:div id="PanelUI-zen-profiles-header">
|
|
<html:div id="PanelUI-zen-profiles-user-picture"></html:div>
|
|
</html:div>
|
|
<vbox id="PanelUI-zen-profiles-current-info">
|
|
<label id="PanelUI-zen-profiles-current-name"></label>
|
|
<p id="PanelUI-zen-profiles-current-profile-current" data-l10n-id="zen-panel-ui-current-profile-text"></p>
|
|
</vbox>
|
|
<hbox id="PanelUI-zen-profiles-actions">
|
|
<toolbarbutton id="PanelUI-zen-profiles-managePrfs" oncommand="switchToTabHavingURI('about:profiles', true);" data-l10n-id="appmenu-manage-profiles" class="subviewbutton"></toolbarbutton>
|
|
<toolbarbutton id="PanelUI-zen-profiles-privateWin" command="Tools:PrivateBrowsing" data-l10n-id="appmenuitem-new-private-window" class="subviewbutton"></toolbarbutton>
|
|
<toolbarbutton id="PanelUI-zen-profiles-newProfile" oncommand="ZenProfileDialogUI.createProfileWizard();" data-l10n-id="appmenu-create-profile" class="subviewbutton"></toolbarbutton>
|
|
</hbox>
|
|
<vbox id="PanelUI-zen-profiles-list">
|
|
</vbox>
|
|
</vbox>
|
|
</panelview>
|
|
|
|
<panel flip="side" type="arrow" orient="vertical" id="PanelUI-zen-gradient-generator" position="bottomright topright" mainview="true" side="left" onpopuphidden="gZenThemePicker.handlePanelClose();">
|
|
<panelmultiview id="PanelUI-zen-gradient-generator-multiview" mainViewId="PanelUI-zen-gradient-generator-view">
|
|
<panelview id="PanelUI-zen-gradient-generator-view" class="PanelUI-subView zen-theme-picker" role="document" mainview-with-header="true" has-custom-header="true">
|
|
<hbox class="zen-theme-picker-gradient"></hbox>
|
|
<hbox id="PanelUI-zen-gradient-generator-controls">
|
|
<vbox id="PanelUI-zen-gradient-generator-options">
|
|
<hbox id="PanelUI-zen-gradient-degrees">
|
|
<box class="dot"></box>
|
|
<box class="text"></box>
|
|
</hbox>
|
|
</vbox>
|
|
<vbox id="PanelUI-zen-gradient-colors-wrapper">
|
|
<vbox>
|
|
<label data-l10n-id="zen-panel-ui-gradient-generator-opacity-text"></label>
|
|
<html:input type="range" min="0" max="1" value="0.5" step="0.05" oninput="gZenThemePicker.onOpacityChange(event);" id="PanelUI-zen-gradient-generator-opacity" />
|
|
</vbox>
|
|
<vbox>
|
|
<label data-l10n-id="zen-panel-ui-gradient-generator-texture-text"></label>
|
|
<html:input type="range" min="0" max="1" value="0.5" step="0.05" oninput="gZenThemePicker.onTextureChange(event);" id="PanelUI-zen-gradient-generator-texture" />
|
|
</vbox>
|
|
</vbox>
|
|
</hbox>
|
|
<vbox id="PanelUI-zen-gradient-generator-custom-colors">
|
|
<vbox id="zen-theme-picker-color">
|
|
<label data-l10n-id="zen-panel-ui-gradient-generator-custom-color"></label>
|
|
<hbox>
|
|
<html:input type="text" placeholder="#000000" id="PanelUI-zen-gradient-generator-custom-input" />
|
|
<toolbarbutton id="PanelUI-zen-gradient-generator-color-custom-add" class="subviewbutton" oncommand="gZenThemePicker.addCustomColor();" data-l10n-id="zen-panel-ui-gradient-generator-custom-color-add">
|
|
<image></image>
|
|
</toolbarbutton>
|
|
</hbox>
|
|
</vbox>
|
|
<vbox id="PanelUI-zen-gradient-generator-custom-list">
|
|
</vbox>
|
|
</vbox>
|
|
</panelview>
|
|
</panelmultiview>
|
|
</panel>
|
|
|
|
<panel flip="slide" type="arrow" orient="vertical" id="PanelUI-zen-workspaces" position="bottomright topright" mainview="true" side="left" onpopuphidden="ZenWorkspaces.handlePanelHidden();">
|
|
<panelmultiview id="PanelUI-zen-workspaces-multiview" mainViewId="PanelUI-zen-workspaces-view">
|
|
<panelview id="PanelUI-zen-workspaces-view" class="PanelUI-subView" role="document" mainview-with-header="true" has-custom-header="true" closemenu="none">
|
|
<vbox>
|
|
<hbox>
|
|
<h3 data-l10n-id="zen-panel-ui-workspaces-text"></h3>
|
|
<hbox class="translations-panel-beta" role="image" aria-label="Beta">
|
|
<image class="translations-panel-beta-icon"></image>
|
|
</hbox>
|
|
<toolbarbutton id="PanelUI-zen-workspaces-reorder-mode" oncommand="ZenWorkspaces.toggleReorderMode();" class="subviewbutton">
|
|
<image></image>
|
|
</toolbarbutton>
|
|
<toolbarbutton id="PanelUI-zen-workspaces-new" oncommand="ZenWorkspaces.openSaveDialog();" class="subviewbutton">
|
|
<image></image>
|
|
</toolbarbutton>
|
|
</hbox>
|
|
</vbox>
|
|
<html:div id="PanelUI-zen-workspaces-list">
|
|
</html:div>
|
|
</panelview>
|
|
<panelview id="PanelUI-zen-workspaces-create" class="PanelUI-subView" role="document" mainview-with-header="true" has-custom-header="true">
|
|
<vbox class="PanelUI-zen-workspaces-user-create">
|
|
<h1 data-l10n-id="zen-panel-ui-workspaces-create-text"></h1>
|
|
<hbox class="PanelUI-zen-workspaces-creation-wraper">
|
|
<hbox class="PanelUI-zen-workspaces-icons-container create" onclick="ZenWorkspaces.onWorkspaceIconContainerClick(event);"></hbox>
|
|
<html:input autofocus="true" id="PanelUI-zen-workspaces-create-input" type="text" placeholder="Enter workspace name" oninput="ZenWorkspaces.onWorkspaceCreationNameChange(this);" />
|
|
</hbox>
|
|
</vbox>
|
|
<html:moz-button-group class="panel-footer" id="PanelUI-zen-workspaces-create-footer">
|
|
<button disabled="true" default="true" slot="primary" id="PanelUI-zen-workspaces-create-save" oncommand="ZenWorkspaces.saveWorkspaceFromCreate();" class="footer-button" data-l10n-id="zen-panel-ui-workspaces-create-save">
|
|
</button>
|
|
<button id="PanelUI-zen-workspaces-create-cancel" oncommand="ZenWorkspaces.closeWorkspacesSubView();" class="footer-button" data-l10n-id="zen-panel-ui-workspaces-create-cancel">
|
|
</button>
|
|
</html:moz-button-group>
|
|
</panelview>
|
|
<panelview id="PanelUI-zen-workspaces-edit" class="PanelUI-subView" role="document" mainview-with-header="true" has-custom-header="true">
|
|
<vbox class="PanelUI-zen-workspaces-user-create">
|
|
<h1 data-l10n-id="zen-panel-ui-workspaces-edit-text"></h1>
|
|
<hbox class="PanelUI-zen-workspaces-creation-wraper">
|
|
<hbox class="PanelUI-zen-workspaces-icons-container edit" onclick="ZenWorkspaces.onWorkspaceIconContainerClick(event);"></hbox>
|
|
<html:input autofocus="true" id="PanelUI-zen-workspaces-edit-input" type="text" placeholder="Enter workspace name" oninput="ZenWorkspaces.onWorkspaceEditChange();" />
|
|
</hbox>
|
|
</vbox>
|
|
<html:moz-button-group class="panel-footer" id="PanelUI-zen-workspaces-edit-footer">
|
|
<button disabled="true" default="true" slot="primary" id="PanelUI-zen-workspaces-edit-save" oncommand="ZenWorkspaces.saveWorkspaceFromEdit();" class="footer-button" data-l10n-id="zen-panel-ui-workspaces-edit-save">
|
|
</button>
|
|
<button id="PanelUI-zen-workspaces-edit-cancel" oncommand="ZenWorkspaces.closeWorkspacesSubView();" class="footer-button" data-l10n-id="zen-panel-ui-workspaces-edit-cancel">
|
|
</button>
|
|
</html:moz-button-group>
|
|
</panelview>
|
|
<panelview id="PanelUI-zen-workspaces-icon-picker" class="PanelUI-subView" role="document" mainview-with-header="true" has-custom-header="true">
|
|
<vbox id="PanelUI-zen-workspaces-icon-picker-wrapper">
|
|
</vbox>
|
|
</panelview>
|
|
</panelmultiview>
|
|
</panel>
|
|
|
|
<menupopup id="zenWorkspaceActionsMenu"
|
|
onpopupshowing="ZenWorkspaces.updateContextMenu(this);"
|
|
onpopuphidden="if (event.target == this) ZenWorkspaces.onContextMenuClose();">
|
|
<menuitem id="context_zenOpenWorkspace" oncommand="ZenWorkspaces.openWorkspace();" data-l10n-id="zen-workspaces-panel-context-open"/>
|
|
<menuseparator/>
|
|
<menuitem id="context_zenSetAsDefaultWorkspace" oncommand="ZenWorkspaces.setDefaultWorkspace();" data-l10n-id="zen-workspaces-panel-context-set-default"/>
|
|
<menuitem id="context_zenEditWorkspace" oncommand="ZenWorkspaces.contextEdit(event);" data-l10n-id="zen-workspaces-panel-context-edit"/>
|
|
<menu id="context_zenWorkspacesOpenInContainerTab"
|
|
data-l10n-id="zen-workspaces-panel-context-open-in-container-tab"
|
|
selection-type="single"
|
|
node-type="link"
|
|
hide-if-private-browsing="true"
|
|
hide-if-usercontext-disabled="true">
|
|
<menupopup oncommand="ZenWorkspaces.contextChangeContainerTab(event);"
|
|
onpopupshowing="return ZenWorkspaces.createContainerTabMenu(event);" />
|
|
</menu>
|
|
<menuseparator/>
|
|
<menuitem id="context_zenDeleteWorkspace" oncommand="ZenWorkspaces.contextDelete(event);" data-l10n-id="zen-workspaces-panel-context-delete"/>
|
|
</menupopup>
|