diff --git a/src/browser/base/content/zen-popupset.inc.xhtml b/src/browser/base/content/zen-popupset.inc.xhtml index 3550803c..ce93e8b1 100644 --- a/src/browser/base/content/zen-popupset.inc.xhtml +++ b/src/browser/base/content/zen-popupset.inc.xhtml @@ -149,7 +149,7 @@ - + diff --git a/src/browser/base/content/zen-styles/zen-popup.css b/src/browser/base/content/zen-styles/zen-popup.css index 8cb65147..49fd937d 100644 --- a/src/browser/base/content/zen-styles/zen-popup.css +++ b/src/browser/base/content/zen-styles/zen-popup.css @@ -365,7 +365,7 @@ menuitem { } & .zen-toast { - padding: 0.9rem 0.8rem; + padding: 0.5rem 0.6rem; border-radius: 12px; background: linear-gradient( 170deg, diff --git a/src/browser/base/content/zen-styles/zen-workspaces.css b/src/browser/base/content/zen-styles/zen-workspaces.css index ab55b1a5..8b0030f0 100644 --- a/src/browser/base/content/zen-styles/zen-workspaces.css +++ b/src/browser/base/content/zen-styles/zen-workspaces.css @@ -489,3 +489,38 @@ #zen-current-workspace-indicator-container[hidden='true'] { display: none !important; } + +#zen-workspace-create-form-wrapper { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + + & .PanelUI-zen-workspaces-creation-wraper { + border-radius: 5px; + border: 1px solid var(--zen-colors-border); + + margin-top: 10px; + background: var(--input-bgcolor, Field); + + & .PanelUI-zen-workspaces-icons-container { + padding: 10px 0; + min-width: 40px; + display: flex; + align-items: center; + justify-content: center; + border-right: 1px solid var(--zen-colors-border); + margin-right: 2px; + } + + & html|input { + border: none; + outline: none !important; + width: 100%; + } + } +} diff --git a/src/browser/base/zen-components/ZenWorkspaces.mjs b/src/browser/base/zen-components/ZenWorkspaces.mjs index cc2d497a..d6009eb4 100644 --- a/src/browser/base/zen-components/ZenWorkspaces.mjs +++ b/src/browser/base/zen-components/ZenWorkspaces.mjs @@ -1913,7 +1913,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { return window; } - async createAndSaveWorkspace(name = 'New Workspace', isDefault = false, icon = undefined, dontChange = false) { + async createAndSaveWorkspace(name = 'Space', isDefault = false, icon = undefined, dontChange = false) { if (!this.workspaceEnabled) { return; } @@ -2395,4 +2395,52 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { this._processingResize = false; }); } + + async openCreateForm() { + window.docShell.treeOwner.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIAppWindow).rollupAllPopups(); + this.selectEmptyTab(); + const sidebarWidth = gNavToolbox.style.getPropertyValue('--actual-zen-sidebar-width'); + let elementsToAnimate = [gNavToolbox]; + if (gZenVerticalTabsManager._hasSetSingleToolbar) { + elementsToAnimate.push(gURLBar.textbox); + } + this._creatingNewWorkspace = true; + gNavToolbox.style.zIndex = -1; + document + .getElementById('zen-sidebar-splitter') + .style.setProperty('min-width', 'var(--zen-element-separation)', 'important'); + await Promise.all([ + gZenUIManager.motion.animate(elementsToAnimate, { + transform: ['scale(1)', 'scale(0.8)'], + opacity: [1, 0], + }), + gZenUIManager.motion.animate( + gBrowser.tabpanels, + { + marginLeft: ['0px', '-' + sidebarWidth], + }, + { + delay: 0.2, + } + ), + this.createAndSaveWorkspace(), + ]); + this._createWorkspcaeForm = window.MozXULElement.parseXULToFragment(` + + + + + + + + + + + + + `); + gBrowser.tabpanels.appendChild(this._createWorkspcaeForm); + } })();