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">
<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">
<box id="zen-rice-share-btn" class="subviewbutton" onclick="gZenThemePicker.shareTheme();">
<image></image>
</box>
</hbox>
<hbox id="PanelUI-zen-gradient-generator-controls">
<vbox id="PanelUI-zen-gradient-generator-options">

View File

@@ -76,7 +76,7 @@
@keyframes zen-slide-in {
from {
transform: translateX(-100%);
transform: translateX(-150%);
opacity: 0;
}
to {
@@ -87,7 +87,7 @@
@keyframes zen-slide-in-reverse {
from {
transform: translateX(100%);
transform: translateX(150%);
opacity: 0;
}
to {
@@ -349,21 +349,3 @@
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;
top: 5px;
right: 5px;
background: var(--zen-dialog-background);
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 1;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
}
#zen-rice-share-dialog {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: var(--panel-color);
background: var(--arrowpanel-background);
border-radius: var(--zen-panel-radius);
@@ -20,7 +20,7 @@
border: var(--zen-appcontent-border);
overflow: hidden;
animation: zen-jello-animation-with-translate 0.3s ease;
animation: zen-jello-animation 0.3s ease;
max-width: 400px;
& .zen-rice-share-content {

View File

@@ -239,11 +239,11 @@
transition: scale 0.07s ease;
&[fadein='true']:not([zen-essential='true']) {
#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'] & {
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;
await this.foreachWindowAsActive(async (browser) => {
if (!browser.gZenThemePicker._hasInitialized) {
if (!browser.gZenThemePicker?._hasInitialized) {
return;
}
// Do not rebuild if the workspace is not the same as the current one

View File

@@ -122,6 +122,9 @@
this._collector = new ZenRiceCollector();
}
init() {
}
async packRice() {
return this._collector.packRice();
}
@@ -131,37 +134,39 @@
return this._shareDialog;
}
this._shareDialog = window.MozXULElement.parseXULToFragment(`
<vbox id="zen-rice-share-dialog" hidden="true">
<html:img src="chrome://browser/content/zen-images/brand-header.svg" class="zen-rice-share-header" />
<vbox class="zen-rice-share-content">
<html:input type="text" data-l10n-id="zen-rice-share-name" id="zen-rice-share-name" oninput="gZenThemePicker.riceManager.validateShareDialog(this)" />
<hbox class="zen-rice-share-author">
<label data-l10n-id="zen-rice-share-author" />
<html:input type="text" data-l10n-id="zen-rice-share-author-input" id="zen-rice-share-author" />
</hbox>
<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>
<vbox id="zen-rice-share-dialog-overlay" hidden="true">
<vbox id="zen-rice-share-dialog">
<html:img src="chrome://browser/content/zen-images/brand-header.svg" class="zen-rice-share-header" />
<vbox class="zen-rice-share-content">
<html:input type="text" data-l10n-id="zen-rice-share-name" id="zen-rice-share-name" oninput="gZenThemePicker.riceManager.validateShareDialog(this)" />
<hbox class="zen-rice-share-author">
<label data-l10n-id="zen-rice-share-author" />
<html:input type="text" data-l10n-id="zen-rice-share-author-input" id="zen-rice-share-author" />
</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 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>
<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>
<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" />
<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>
<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>
`);
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;
}

View File

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

View File

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