Fixed having multiple windows displaying the wrong essentials at startup and worked on rices

This commit is contained in:
mr. M
2024-12-26 23:35:39 +01:00
parent 59a84c3b98
commit 70c0fff557
10 changed files with 65 additions and 65 deletions

2
l10n

Submodule l10n updated: 48e6a3672a...6715d6de22

View File

@@ -0,0 +1,15 @@
diff --git a/browser/base/content/appmenu-viewcache.inc.xhtml b/browser/base/content/appmenu-viewcache.inc.xhtml
index 3c5c4f29b1de25a4ce17089502f2251a27e5c7f5..dfa3260ed3c2bb6067745696fbf103c7e56c639a 100644
--- a/browser/base/content/appmenu-viewcache.inc.xhtml
+++ b/browser/base/content/appmenu-viewcache.inc.xhtml
@@ -421,6 +421,10 @@
class="subviewbutton"
data-l10n-id="appmenu-customizetoolbar"
command="cmd_CustomizeToolbars"/>
+ <toolbarbutton id="appmenu-zen-share-rice"
+ class="subviewbutton"
+ data-l10n-id="appmenu-zen-share-rice"
+ oncommand="gZenThemePicker.shareTheme()" />
<toolbarseparator/>
<html:h2 id="appmenu-developer-tools"
data-l10n-id="appmenu-developer-tools-subheader"

View File

@@ -105,9 +105,6 @@
<panelmultiview id="PanelUI-zen-gradient-generator-multiview" mainViewId="PanelUI-zen-gradient-generator-view"> <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"> <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 class="zen-theme-picker-gradient">
<box id="zen-rice-share-btn" class="subviewbutton" onclick="gZenThemePicker.shareTheme();">
<image></image>
</box>
</hbox> </hbox>
<hbox id="PanelUI-zen-gradient-generator-controls"> <hbox id="PanelUI-zen-gradient-generator-controls">
<vbox id="PanelUI-zen-gradient-generator-options"> <vbox id="PanelUI-zen-gradient-generator-options">

View File

@@ -76,7 +76,7 @@
@keyframes zen-slide-in { @keyframes zen-slide-in {
from { from {
transform: translateX(-100%); transform: translateX(-150%);
opacity: 0; opacity: 0;
} }
to { to {
@@ -87,7 +87,7 @@
@keyframes zen-slide-in-reverse { @keyframes zen-slide-in-reverse {
from { from {
transform: translateX(100%); transform: translateX(150%);
opacity: 0; opacity: 0;
} }
to { to {
@@ -349,21 +349,3 @@
transform: translateX(-100%) translateY(-50%); transform: translateX(-100%) translateY(-50%);
} }
} }
@keyframes zen-jello-animation-with-translate {
0% {
transform: scale3d(0.8, 0.8, 0.8) translate(-50%, -50%);
transform-origin: 50% 50%;
}
60% {
transform: scale3d(1.02, 1.02, 1.02) translate(-50%, -50%);
transform-origin: 50% 50%;
}
to {
opacity: 1;
transform: scale3d(1, 1, 1) translate(-50%, -50%);
transform-origin: 50% 50%;
}
}

View File

@@ -1,18 +1,18 @@
#zen-rice-share-btn { #zen-rice-share-dialog-overlay:not([hidden]) {
position: absolute; position: absolute;
top: 5px; top: 0;
right: 5px; left: 0;
background: var(--zen-dialog-background); width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 1; z-index: 1;
cursor: pointer; display: flex;
justify-content: center;
align-items: center;
} }
#zen-rice-share-dialog { #zen-rice-share-dialog {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: var(--panel-color); color: var(--panel-color);
background: var(--arrowpanel-background); background: var(--arrowpanel-background);
border-radius: var(--zen-panel-radius); border-radius: var(--zen-panel-radius);
@@ -20,7 +20,7 @@
border: var(--zen-appcontent-border); border: var(--zen-appcontent-border);
overflow: hidden; overflow: hidden;
animation: zen-jello-animation-with-translate 0.3s ease; animation: zen-jello-animation 0.3s ease;
max-width: 400px; max-width: 400px;
& .zen-rice-share-content { & .zen-rice-share-content {

View File

@@ -239,11 +239,11 @@
transition: scale 0.07s ease; transition: scale 0.07s ease;
&[fadein='true']:not([zen-essential='true']) { &[fadein='true']:not([zen-essential='true']) {
#tabbrowser-tabs[zen-workspace-animation='previous'] & { #tabbrowser-tabs[zen-workspace-animation='previous'] & {
animation: zen-slide-in 0.3s ease; animation: zen-slide-in 0.3s ease-out;
} }
#tabbrowser-tabs[zen-workspace-animation='next'] & { #tabbrowser-tabs[zen-workspace-animation='next'] & {
animation: zen-slide-in-reverse 0.3s ease; animation: zen-slide-in-reverse 0.3s ease-out;
} }
} }

View File

@@ -593,7 +593,7 @@
let workspaceTheme = theme || workspace.theme; let workspaceTheme = theme || workspace.theme;
await this.foreachWindowAsActive(async (browser) => { await this.foreachWindowAsActive(async (browser) => {
if (!browser.gZenThemePicker._hasInitialized) { if (!browser.gZenThemePicker?._hasInitialized) {
return; return;
} }
// Do not rebuild if the workspace is not the same as the current one // Do not rebuild if the workspace is not the same as the current one

View File

@@ -122,6 +122,9 @@
this._collector = new ZenRiceCollector(); this._collector = new ZenRiceCollector();
} }
init() {
}
async packRice() { async packRice() {
return this._collector.packRice(); return this._collector.packRice();
} }
@@ -131,37 +134,39 @@
return this._shareDialog; return this._shareDialog;
} }
this._shareDialog = window.MozXULElement.parseXULToFragment(` this._shareDialog = window.MozXULElement.parseXULToFragment(`
<vbox id="zen-rice-share-dialog" hidden="true"> <vbox id="zen-rice-share-dialog-overlay" hidden="true">
<html:img src="chrome://browser/content/zen-images/brand-header.svg" class="zen-rice-share-header" /> <vbox id="zen-rice-share-dialog">
<vbox class="zen-rice-share-content"> <html:img src="chrome://browser/content/zen-images/brand-header.svg" class="zen-rice-share-header" />
<html:input type="text" data-l10n-id="zen-rice-share-name" id="zen-rice-share-name" oninput="gZenThemePicker.riceManager.validateShareDialog(this)" /> <vbox class="zen-rice-share-content">
<hbox class="zen-rice-share-author"> <html:input type="text" data-l10n-id="zen-rice-share-name" id="zen-rice-share-name" oninput="gZenThemePicker.riceManager.validateShareDialog(this)" />
<label data-l10n-id="zen-rice-share-author" /> <hbox class="zen-rice-share-author">
<html:input type="text" data-l10n-id="zen-rice-share-author-input" id="zen-rice-share-author" /> <label data-l10n-id="zen-rice-share-author" />
</hbox> <html:input type="text" data-l10n-id="zen-rice-share-author-input" id="zen-rice-share-author" />
<vbox zen-collapsed="true" id="zen-rice-share-options" onclick="gZenThemePicker.riceManager.toggleOptions(event)">
<hbox class="options-header">
<label data-l10n-id="zen-rice-share-include" />
<image></image>
</hbox> </hbox>
<checkbox data-l10n-id="zen-rice-share-include-userchrome" id="zen-rice-share-include-userchrome" /> <vbox zen-collapsed="true" id="zen-rice-share-options" onclick="gZenThemePicker.riceManager.toggleOptions(event)">
<checkbox data-l10n-id="zen-rice-share-include-usercontent" id="zen-rice-share-include-usercontent" /> <hbox class="options-header">
<checkbox data-l10n-id="zen-rice-share-include-mods" id="zen-rice-share-include-mods" /> <label data-l10n-id="zen-rice-share-include" />
<vbox class="indent"> <image></image>
<checkbox data-l10n-id="zen-rice-share-include-mod-prefs" id="zen-rice-share-include-mod-prefs" /> </hbox>
<checkbox data-l10n-id="zen-rice-share-include-userchrome" id="zen-rice-share-include-userchrome" />
<checkbox data-l10n-id="zen-rice-share-include-usercontent" id="zen-rice-share-include-usercontent" />
<checkbox data-l10n-id="zen-rice-share-include-mods" id="zen-rice-share-include-mods" />
<vbox class="indent">
<checkbox data-l10n-id="zen-rice-share-include-mod-prefs" id="zen-rice-share-include-mod-prefs" />
</vbox>
<checkbox data-l10n-id="zen-rice-share-include-preferences" id="zen-rice-share-include-preferences" />
<checkbox data-l10n-id="zen-rice-share-include-workspace-themes" id="zen-rice-share-include-workspace-themes" />
</vbox> </vbox>
<checkbox data-l10n-id="zen-rice-share-include-preferences" id="zen-rice-share-include-preferences" /> <html:moz-button-group class="panel-footer">
<checkbox data-l10n-id="zen-rice-share-include-workspace-themes" id="zen-rice-share-include-workspace-themes" /> <button onclick="gZenThemePicker.riceManager.cancel()" class="footer-button" data-l10n-id="zen-rice-share-cancel" />
<button onclick="gZenThemePicker.riceManager.submit()" class="footer-button" data-l10n-id="zen-rice-share-save" default="true" slot="primary" id="zen-rice-share-save" disabled="true" />
</html:moz-button-group>
</vbox> </vbox>
<html:moz-button-group class="panel-footer">
<button onclick="gZenThemePicker.riceManager.cancel()" class="footer-button" data-l10n-id="zen-rice-share-cancel" />
<button onclick="gZenThemePicker.riceManager.submit()" class="footer-button" data-l10n-id="zen-rice-share-save" default="true" slot="primary" id="zen-rice-share-save" disabled="true" />
</html:moz-button-group>
</vbox> </vbox>
</vbox> </vbox>
`); `);
document.getElementById("zen-main-app-wrapper").appendChild(this._shareDialog); document.getElementById("zen-main-app-wrapper").appendChild(this._shareDialog);
this._shareDialog = document.getElementById("zen-rice-share-dialog"); this._shareDialog = document.getElementById("zen-rice-share-dialog-overlay");
return this._shareDialog; return this._shareDialog;
} }

View File

@@ -1202,6 +1202,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
return; return;
} }
await SessionStore.promiseInitialized;
this._inChangingWorkspace = true; this._inChangingWorkspace = true;
try { try {
await this._performWorkspaceChange(window, onInit); await this._performWorkspaceChange(window, onInit);

View File

@@ -402,6 +402,10 @@
list-style-image: url('customize.svg') !important; list-style-image: url('customize.svg') !important;
} }
#appmenu-zen-share-rice {
list-style-image: url('share.svg');
}
.bookmark-item[container] { .bookmark-item[container] {
list-style-image: url('folder.svg') !important; list-style-image: url('folder.svg') !important;
} }
@@ -504,10 +508,6 @@
list-style-image: url('screen-blocked.svg') !important; list-style-image: url('screen-blocked.svg') !important;
} }
#zen-rice-share-btn {
list-style-image: url('share.svg');
}
.popup-notification-icon[popupid='persistent-storage'], .popup-notification-icon[popupid='persistent-storage'],
.persistent-storage-icon, .persistent-storage-icon,
.indexedDB-icon { .indexedDB-icon {