Merge branch 'zen-browser:dev' into adds-search-to-icons

This commit is contained in:
Studio Movie Girl
2024-12-29 03:15:42 -06:00
committed by GitHub
62 changed files with 1392 additions and 216 deletions

View File

@@ -90,6 +90,13 @@ pref('zen.tabs.show-newtab-vertical', true);
pref('zen.view.show-newtab-button-border-top', true);
pref('zen.view.show-newtab-button-top', false);
#ifdef MOZILLA_OFFICIAL
pref('zen.rice.api.url', "https://share.zen-browser.app");
#else
pref('zen.rice.api.url', "http://localhost:3000");
#endif
pref('zen.rice.share.notice.accepted', false);
#ifdef XP_MACOSX
pref('zen.theme.border-radius', 10); // In pixels
#else
@@ -159,7 +166,7 @@ pref('zen.pinned-tab-manager.close-shortcut-behavior', 'switch');
// Pref to enable the new profiles (TODO: Check this out!)
//pref("browser.profiles.enabled", true);
// Zen Sidebar
// Zen webpanels (calling it sidebar due to legacy reasons)
pref('zen.sidebar.data', "{\"data\":\n {\"p1\":{\n \"url\":\"https://www.wikipedia.org/\"\n },\n\"p2\":{\n \"url\":\"https://m.twitter.com/\",\n\"ua\": true\n },\n\"p3\": {\n \"url\": \"https://www.youtube.com/\",\n\"ua\": true\n},\n\"p4\": {\n \"url\": \"https://translate.google.com/\",\n\"ua\": true\n},\n\"p5\": {\n \"url\": \"https://todoist.com/\",\n\"ua\": true\n}},\n\"index\":[\"p1\",\"p2\",\"p3\",\"p4\",\"p5\"]}");
pref('zen.sidebar.enabled', true);
pref('zen.sidebar.close-on-blur', true);
@@ -379,6 +386,7 @@ pref("browser.formfill.enable", false);
pref("security.insecure_connection_text.enabled", true);
pref("security.insecure_connection_text.pbmode.enabled", true);
pref("network.IDN_show_punycode", true);
pref("signon.rememberSignons", false);
// Telemetry
pref("datareporting.policy.dataSubmissionEnabled", false, locked);

View File

@@ -13,19 +13,14 @@ var gZenUIManager = {
0
);
function throttle(f, delay) {
let timer = 0;
return function (...args) {
clearTimeout(timer);
timer = setTimeout(() => f.apply(this, args), delay);
};
}
new ResizeObserver(throttle(this.updateTabsToolbar.bind(this), this.sidebarHeightThrottle)).observe(
new ResizeObserver(gZenCommonActions.throttle(this.updateTabsToolbar.bind(this), this.sidebarHeightThrottle)).observe(
document.getElementById('tabbrowser-tabs')
);
},
new ResizeObserver(gZenCommonActions.throttle(gZenCompactModeManager.getAndApplySidebarWidth.bind(gZenCompactModeManager), this.sidebarHeightThrottle)).observe(
document.getElementById('navigator-toolbox')
);
},
updateTabsToolbar() {
// Set tabs max-height to the "toolbar-items" height
@@ -280,6 +275,12 @@ var gZenVerticalTabsManager = {
this._isUpdating = true;
try {
this._updateMaxWidth();
window.docShell.treeOwner
.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIAppWindow)
.rollupAllPopups();
const topButtons = document.getElementById('zen-sidebar-top-buttons');
const isCompactMode = this._prefsCompactMode;
const isVerticalTabs = this._prefsVerticalTabs || forceMultipleToolbar;

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

@@ -1,6 +1,6 @@
#include zen-locales.inc.xhtml
<!-- Styles used all over the browser -->
# Styles used all over the browser
<linkset>
<link rel="stylesheet" type="text/css" href="chrome://browser/content/zen-styles/zen-theme.css" />
<link rel="stylesheet" type="text/css" href="chrome://browser/content/zen-styles/zen-animations.css" />
@@ -10,6 +10,7 @@
<link rel="stylesheet" type="text/css" href="chrome://browser/content/zen-styles/zen-tabs.css" />
<link rel="stylesheet" type="text/css" href="chrome://browser/content/zen-styles/zen-browser-ui.css" />
<link rel="stylesheet" type="text/css" href="chrome://browser/content/zen-styles/zen-gradient-generator.css" />
<link rel="stylesheet" type="text/css" href="chrome://browser/content/zen-styles/zen-rices.css" />
<link rel="stylesheet" type="text/css" href="chrome://browser/content/zen-styles/zen-panel-ui.css" />
<link rel="stylesheet" type="text/css" href="chrome://browser/content/zen-styles/zen-single-components.css" />
<link rel="stylesheet" type="text/css" href="chrome://browser/content/zen-styles/zen-browser-container.css" />
@@ -25,7 +26,7 @@
<link rel="stylesheet" type="text/css" href="chrome://browser/skin/zen-icons/icons.css" />
</linkset>
<!-- Scripts used all over the browser -->
# Scripts used all over the browser
<script src="chrome://browser/content/zen-components/ZenThemesCommon.mjs" />
<script src="chrome://browser/content/zen-components/ZenActorsManager.mjs" />
<script src="chrome://browser/content/zen-components/ZenGlanceManager.mjs" />
@@ -40,3 +41,6 @@
<script src="chrome://browser/content/zen-components/ZenGradientGenerator.mjs" />
<script src="chrome://browser/content/zen-components/ZenViewSplitter.mjs"/>
<script src="chrome://browser/content/zen-components/ZenProfileDialogUI.mjs" />
# Unimportant scripts
<script src="chrome://browser/content/zen-components/ZenRices.mjs" />

View File

@@ -22,6 +22,7 @@
content/browser/zen-components/ZenGradientGenerator.mjs (zen-components/ZenGradientGenerator.mjs)
content/browser/zen-components/ZenGlanceManager.mjs (zen-components/ZenGlanceManager.mjs)
content/browser/zen-components/ZenActorsManager.mjs (zen-components/ZenActorsManager.mjs)
content/browser/zen-components/ZenRices.mjs (zen-components/ZenRices.mjs)
content/browser/zen-styles/zen-theme.css (content/zen-styles/zen-theme.css)
content/browser/zen-styles/zen-buttons.css (content/zen-styles/zen-buttons.css)
@@ -43,6 +44,7 @@
content/browser/zen-styles/zen-popup.css (content/zen-styles/zen-popup.css)
content/browser/zen-styles/zen-sidebar-panels.css (content/zen-styles/zen-sidebar-panels.css)
content/browser/zen-styles/zen-gradient-generator.css (content/zen-styles/zen-gradient-generator.css)
content/browser/zen-styles/zen-rices.css (content/zen-styles/zen-rices.css)
content/browser/zen-styles/zen-branding.css (content/zen-styles/zen-branding.css)
content/browser/zen-styles/zen-panels/bookmarks.css (content/zen-styles/zen-panels/bookmarks.css)
@@ -55,6 +57,7 @@
# Images
content/browser/zen-images/gradient.png (content/zen-images/gradient.png)
content/browser/zen-images/gradient-display.png (content/zen-images/gradient-display.png)
content/browser/zen-images/brand-header.svg (content/zen-images/brand-header.svg)
content/browser/zen-images/layouts/collapsed.png (content/zen-images/layouts/collapsed.png)
content/browser/zen-images/layouts/multiple-toolbar.png (content/zen-images/layouts/multiple-toolbar.png)
content/browser/zen-images/layouts/single-toolbar.png (content/zen-images/layouts/single-toolbar.png)
@@ -68,3 +71,6 @@
# Fonts
content/browser/zen-fonts/JunicodeVF-Italic.woff2 (content/zen-fonts/JunicodeVF-Italic.woff2)
content/browser/zen-fonts/JunicodeVF-Roman.woff2 (content/zen-fonts/JunicodeVF-Roman.woff2)
# JS Vendor
content/browser/zen-vendor/tsparticles.confetti.bundle.min.js (content/zen-vendor/tsparticles.confetti.bundle.min.js)

View File

@@ -0,0 +1 @@
<svg width="1920" height="1080" viewBox="0 0 1920 1080" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_23_113)"><rect width="1920" height="1080" fill="url(#paint0_linear_23_113)"/><circle cx="960" cy="1080" r="740" stroke="#F2F0E3" stroke-width="120"/><circle cx="960" cy="1080" r="558.095" stroke="#F2F0E3" stroke-width="80"/><circle cx="960" cy="1080" r="386.19" stroke="#F2F0E3" stroke-width="60"/><circle cx="960" cy="1080" r="214.286" stroke="#F2F0E3" stroke-width="40"/></g><defs><linearGradient id="paint0_linear_23_113" x1="960" y1="0" x2="960" y2="1080" gradientUnits="userSpaceOnUse"><stop stop-color="#EA6E54"/><stop offset="1" stop-color="#D9664E"/></linearGradient><clipPath id="clip0_23_113"><rect width="1920" height="1080" fill="white"/></clipPath></defs></svg>

After

Width:  |  Height:  |  Size: 803 B

View File

@@ -104,7 +104,8 @@
<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 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">

View File

@@ -16,8 +16,8 @@
</toolbar>
<vbox id="zen-sidebar-web-panel-browser-containers">
<vbox id="zen-sidebar-introduction-panel" hidden="true">
<html:h1 data-l10n-id="zen-sidebar-introduction-title"/>
<html:p data-l10n-id="zen-sidebar-introduction-description"/>
<html:h1 data-l10n-id="zen-webpanel-introduction-title"/>
<html:p data-l10n-id="zen-webpanel-introduction-description"/>
</vbox>
</vbox>
<toolbar mode="icons" flex="1" id="zen-sidebar-panels-wrapper" fullscreentoolbar="true">

View File

@@ -1,8 +1,28 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
@keyframes zen-jello-animation {
0% {
transform: scale3d(0.8, 0.8, 0.8);
}
60% {
transform: scale3d(1.01, 1.01, 1.01);
}
to {
opacity: 1;
transform: scale3d(1, 1, 1);
}
}
@keyframes zen-jello-animation-large {
0% {
transform: scale3d(0.8, 0.8, 0.8);
}
60% {
transform: scale3d(1.02, 1.02, 1.02);
}
@@ -71,7 +91,7 @@
@keyframes zen-slide-in {
from {
transform: translateX(-100%);
transform: translateX(-150%);
opacity: 0;
}
to {
@@ -82,7 +102,7 @@
@keyframes zen-slide-in-reverse {
from {
transform: translateX(100%);
transform: translateX(150%);
opacity: 0;
}
to {
@@ -344,3 +364,79 @@
transform: translateX(-100%) translateY(-50%);
}
}
@keyframes zen-rice-form-out {
0% {
transform: translateX(0);
max-height: 350px;
opacity: 1;
position: relative;
}
50% {
transform: translateX(-100%);
opacity: 0;
position: relative;
}
99% {
transform: translateX(-100%);
opacity: 0;
max-height: 15px;
position: relative;
}
100% {
transform: translateX(-100%);
opacity: 0;
pointer-events: none;
position: absolute;
}
}
@keyframes zen-rice-form-in {
0% {
position: absolute;
transform: translateX(100%);
opacity: 0;
}
99% {
position: absolute;
transform: translateX(0);
opacity: 1;
}
100% {
position: relative;
}
}
@keyframes zen-rice-form-in-2 {
from {
opacity: 0;
transform: translateX(100%);
max-height: 50px;
}
to {
opacity: 1;
transform: translateX(0);
max-height: 450px;
}
}
@keyframes zen-rice-submit-animation {
/* Scale and shake the dialog */
0% {
transform: scale(1);
}
50% {
transform: scale(1.1);
}
100% {
transform: scale(1);
}
}

View File

@@ -1,3 +1,8 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
@font-face {
font-family: 'Zen-Junicode';

View File

@@ -1,3 +1,8 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
:root:not([inDOMFullscreen='true']):not([chromehidden~='location']):not([chromehidden~='toolbar']) {
& #tabbrowser-tabbox #tabbrowser-tabpanels .browserSidebarContainer {
width: -moz-available;

View File

@@ -1,3 +1,8 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#tabbrowser-tabpanels {
background: transparent !important;
@@ -25,6 +30,51 @@
width: 100%;
background: var(--zen-main-browser-background);
will-change: background-color;
&::after {
content: '';
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 0;
pointer-events: none;
transition: backdrop-filter var(--inactive-window-transition);
}
@media (-moz-bool-pref: 'zen.theme.gradient') {
&[animating='true']::after {
background: var(--zen-main-browser-background-old);
backdrop-filter: blur(5px);
animation: zen-main-app-wrapper-animation .6s ease forwards;
transition: 0s;
}
}
@media (-moz-windows-accent-color-in-titlebar) {
background-color: var(--toolbox-non-lwt-bgcolor);
transition: background-color var(--inactive-window-transition);
&:-moz-window-inactive {
background-color: var(--toolbox-non-lwt-bgcolor-inactive);
color: var(--toolbox-non-lwt-textcolor-inactive);
}
&::after {
display: none;
}
}
@media (not (-moz-windows-accent-color-in-titlebar)) and (not (-moz-windows-mica)) {
transition: color var(--inactive-window-transition);
color: var(--toolbox-non-lwt-textcolor-inactive);
&:-moz-window-inactive {
&::after {
backdrop-filter: grayscale(0.8);
}
}
}
&::before {
content: '';
position: fixed;
@@ -64,21 +114,6 @@
& > * {
z-index: 1;
}
@media (-moz-bool-pref: 'zen.theme.gradient') {
&[animating='true']::before {
content: '';
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: var(--zen-main-browser-background-old);
backdrop-filter: blur(5px);
animation: zen-main-app-wrapper-animation .5s ease-in-out forwards;
border-radius: env(-moz-gtk-csd-titlebar-radius);
}
}
}
#zen-appcontent-wrapper {

View File

@@ -1,3 +1,8 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* All overrides for compact mode go here */
@media (-moz-bool-pref: 'zen.view.compact') {
@@ -119,7 +124,7 @@
#navigator-toolbox[has-popup-menu],
#navigator-toolbox[movingtab],
#navigator-toolbox:has(.tabbrowser-tab:active),
#navigator-toolbox:has(*:is([open='true'], #nav-bar:focus-within):not(tab):not(.zen-compact-mode-ignore)) {
#navigator-toolbox:has(*:is([panelopen='true'], #nav-bar:focus-within):not(.zen-compact-mode-ignore)) {
&:not([animate='true']) {
transition: left 0.25s ease, right 0.25s ease;
opacity: 1;
@@ -200,7 +205,7 @@
& #zen-appcontent-navbar-container:focus-within,
& #zen-appcontent-navbar-container[zen-user-show],
& #zen-appcontent-navbar-container[has-popup-menu],
& #zen-appcontent-navbar-container:has(*[open='true']) {
& #zen-appcontent-navbar-container:has(*[panelopen='true']) {
opacity: 1;
border-top-width: 1px;

View File

@@ -1,3 +1,8 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
.browserSidebarContainer:has([zen-glance-selected]),
.browserSidebarContainer.zen-glance-overlay {

View File

@@ -1,3 +1,8 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#PanelUI-zen-gradient-generator {
--panel-width: 300px;

View File

@@ -1,5 +1,10 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
panel[type='arrow'][animate][animate='open']::part(content) {
animation: zen-jello-animation 0.3s ease-in-out;
animation: zen-jello-animation .35s ease;
}
panel[type='arrow'][animate]:not([animate='open'])::part(content) {

View File

@@ -1,3 +1,8 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#zenEditBookmarkPanelFaviconContainer {
border: 1px solid var(--input-border-color);
width: 100px;

View File

@@ -1,3 +1,8 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#unified-extensions-manage-extensions {
padding-left: 20px;
}

View File

@@ -1,3 +1,8 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
.printSettingsBrowser {

View File

@@ -1,3 +1,8 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* Zen Welcome idalog override */
.dialogBox:not(.spotlightBox) {
border: 1px solid var(--zen-dialog-border-color);

View File

@@ -1,3 +1,8 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
@import url('chrome://browser/content/zen-styles/zen-panels/bookmarks.css');
@import url('chrome://browser/content/zen-styles/zen-panels/extensions.css');
@import url('chrome://browser/content/zen-styles/zen-panels/print.css');

View File

@@ -1,3 +1,8 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#PanelUI-zen-profiles {
--menu-panel-width: 19em;
position: relative;

View File

@@ -0,0 +1,225 @@
#zen-rice-share-dialog-overlay:not([hidden]) {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 3;
display: flex;
justify-content: center;
align-items: center;
}
#zen-rice-share-dialog,
#zen-rice-share-dialog-notice {
color: var(--panel-color);
background: var(--arrowpanel-background);
border-radius: var(--zen-panel-radius);
box-shadow: 0 0 1px 1px hsla(0,0%,0%,.2);;
border: var(--zen-appcontent-border);
overflow: hidden;
animation: zen-jello-animation-large 0.4s ease;
max-width: 400px;
&[animate="true"] {
animation: zen-rice-submit-animation 1s cubic-bezier(.77,0,.18,1);
}
& .zen-rice-share-content {
padding: 10px 0;
border-top: var(--zen-appcontent-border);
background: var(--arrowpanel-background);
position: relative;
align-items: center;
min-height: 50px;
&:has(#zen-rice-share-first-form:not([fade-out])),
&:has(#zen-rice-share-success) {
padding-top: 20px;
}
& > vbox {
width: 100%;
padding: 0 10px;
}
& #zen-rice-share-first-form input[type="text"] {
width: 100%;
padding: 1px 2px;
border: 0;
border-bottom: 1px solid var(--zen-appcontent-border);
background: transparent;
font-style: italic;
font-weight: 600;
}
& #zen-rice-share-name {
font-style: normal !important;
font-size: 24px;
margin-left: 1px;
}
& .indent {
margin-left: 30px;
}
}
& .zen-rice-share-header {
height: 200px;
margin-bottom: -20px;
}
& #zen-rice-share-options {
padding: 10px 0;
max-height: 30px;
overflow: hidden;
transition: max-height 0.3s ease, height 0.3s ease;
&[zen-collapsed="false"] {
max-height: 350px;
}
& > .options-header {
font-weight: 600;
margin-bottom: 5px;
position: relative;
cursor: pointer;
align-items: center;
color: inherit;
-moz-context-properties: fill, fill-opacity;
fill: var(--toolbarbutton-icon-fill);
& label {
width: fit-content;
cursor: pointer;
}
}
& > .options-header image {
transition: transform 0.3s ease;
width: 15px;
height: 15px;
}
&[zen-collapsed="false"] > .options-header image {
transform: rotate(90deg);
}
& > checkbox {
margin-left: 15px;
}
}
& .panel-footer {
margin: 0;
margin-top: 10px;
& button {
justify-content: center;
}
}
#zen-rice-share-error {
border: 1px solid rgba(255, 0, 0, 0.5);
background: rgba(255, 0, 0, 0.1);
padding: 5px;
transition: opacity 0.3s ease;
border-radius: var(--zen-panel-radius);
@starting-style {
opacity: 0;
}
& button {
margin-left: auto;
margin-top: 2px;
}
}
/* Animations */
#zen-rice-share-first-form[fade-out] {
position: absolute;
transform: translateX(-100%);
pointer-events: none;
animation: zen-rice-form-out 0.5s ease;
}
#zen-rice-share-second-form {
animation: zen-rice-form-in 0.5s ease forwards;
justify-content: center;
& > hbox {
width: 100%;
height: 5px;
border-radius: 100px;
border: 1px solid var(--zen-colors-border);
position: relative;
overflow: hidden;
&::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: var(--zen-primary-color);
transition: width 4s cubic-bezier(1, 0, 0, 1);
@starting-style {
width: 0;
}
}
}
&[fade-out] {
position: absolute !important;
animation: zen-rice-form-out 0.5s ease forwards;
}
}
#zen-rice-share-success {
overflow-y: hidden;
max-height: 0px;
animation: zen-rice-form-in-2 0.5s ease forwards;
& > h1 {
margin: 0;
font-size: 20px;
}
& > p {
color: var(--text-color-deemphasized);
}
& label {
margin: 0;
margin-top: 15px;
font-weight: 600;
margin-bottom: 5px;
}
}
}
#zen-rice-share-dialog-notice {
padding: 15px;
& br {
margin-bottom: 10px;
}
& > p {
color: var(--text-color-deemphasized);
margin-top: 10px;
}
.panel-footer {
margin-top: 10px;
align-items: center;
}
}

View File

@@ -243,7 +243,7 @@
font-size: 1.5em;
font-weight: 600;
margin: 0;
margin-bottom: 5px;
margin-bottom: 2px;
}
#zen-sidebar-introduction-panel p {

View File

@@ -1,3 +1,8 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#zen-profile-button {
& stack {

View File

@@ -1,3 +1,8 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* Screenshots */
#screenshotsPagePanel {
@@ -60,3 +65,8 @@
.private-browsing-indicator-with-label {
display: none !important;
}
body > #confetti {
z-index: 1;
}

View File

@@ -1,3 +1,8 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* Styles for both vertical and horizontal tabs */
@import url('chrome://browser/content/zen-styles/zen-tabs/vertical-tabs.css');
@import url('chrome://browser/content/zen-styles/zen-tabs/horizontal-tabs.css');

View File

@@ -1,3 +1,8 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
@media not (-moz-bool-pref: 'zen.tabs.vertical') {
:root #browser {
display: flex !important;

View File

@@ -1,3 +1,8 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
& #zen-sidebar-top-buttons:has(#zen-sidebar-top-buttons-customization-target:empty) {
max-height: 0 !important;

View File

@@ -1,3 +1,8 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#tabbrowser-tabs,
#TabsToolbar,
@@ -234,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.2s ease;
animation: zen-slide-in 0.3s ease-out;
}
#tabbrowser-tabs[zen-workspace-animation='next'] & {
animation: zen-slide-in-reverse 0.2s ease;
animation: zen-slide-in-reverse 0.3s ease-out;
}
}

View File

@@ -1,3 +1,8 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* Here, we contain all the theme related variables, for example theme
* colors, border radius, etc.
* We have `--zen-border-radius` and `--zen-primary-color` as variables.

View File

@@ -1,3 +1,8 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#nav-bar,
#zen-sidebar-top-buttons {
background: transparent;

View File

@@ -1,3 +1,8 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* URL and tool bars */
#urlbar-container {

View File

@@ -1,3 +1,8 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
@namespace html 'http://www.w3.org/1999/xhtml';
#zen-workspaces-button {

File diff suppressed because one or more lines are too long

View File

@@ -79,5 +79,13 @@ var gZenCommonActions = {
);
ConfirmationHint.show(document.getElementById("PanelUI-menu-button"), "zen-copy-current-url-confirmation");
}
},
throttle(f, delay) {
let timer = 0;
return function (...args) {
clearTimeout(timer);
timer = setTimeout(() => f.apply(this, args), delay);
};
}
};

View File

@@ -117,7 +117,9 @@ var gZenCompactModeManager = {
}
this._isAnimating = true;
// Do this so we can get the correct width ONCE compact mode styled have been applied
this.sidebar.setAttribute("animate", "true");
if (this._canAnimateSidebar) {
this.sidebar.setAttribute("animate", "true");
}
window.requestAnimationFrame(() => {
let sidebarWidth = this.getAndApplySidebarWidth();
if (!this._canAnimateSidebar) {
@@ -310,6 +312,11 @@ var gZenCompactModeManager = {
}
}
// If it's a child element but not the target, ignore the event
if (target.contains(event.explicitOriginalTarget) && event.explicitOriginalTarget !== target) {
return;
}
if (this.hoverableElements[i].keepHoverDuration) {
this.flashElement(target, keepHoverDuration, 'has-hover' + target.id, 'zen-has-hover');
} else {

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
@@ -612,17 +612,20 @@
}
const appWrapper = browser.document.getElementById('zen-main-app-wrapper');
if (!skipUpdate) {
const appWrapper = browser.document.getElementById('browser');
if (!skipUpdate && !this._animatingBackground) {
this._animatingBackground = true;
appWrapper.removeAttribute('animating');
appWrapper.setAttribute('animating', 'true');
browser.document.body.style.setProperty('--zen-main-browser-background-old',
browser.document.body.style.getPropertyValue('--zen-main-browser-background')
browser.document.documentElement.style.setProperty('--zen-main-browser-background-old',
browser.document.documentElement.style.getPropertyValue('--zen-main-browser-background')
);
browser.window.requestAnimationFrame(() => {
appWrapper.setAttribute('animating', 'true');
setTimeout(() => {
this._animatingBackground = false;
appWrapper.removeAttribute('animating');
}, 500);
browser.document.documentElement.style.removeProperty('--zen-main-browser-background-old');
}, 700);
});
}
@@ -671,6 +674,18 @@
});
}
get riceManager() {
if (!this._riceManager) {
this._riceManager = new window.ZenRiceManager();
}
return this._riceManager;
}
shareTheme() {
const manager = this.riceManager;
manager.openShareDialog();
}
getNativeAccentColor() {
return Services.prefs.getStringPref('zen.theme.accent-color');
}

View File

@@ -0,0 +1,419 @@
{
const ZEN_RICE_API = Services.prefs.getStringPref("zen.rice.api.url", '');
class ZenRiceCollector {
constructor() {}
clear() {
this._userChrome = null;
this._userContent = null;
this._enabledMods = null;
this._preferences = null;
this._workspaceThemes = null;
}
async gatherAll({
userUserChrome = true, userContent = true,
enabledMods = true, preferences = true,
modPrefs = true, workspaceThemes = true } = {}) {
this.clear();
// Get the mods first, as they may be needed for the preferences
if (enabledMods) {
await this.gatherEnabledMods();
}
await Promise.all([
userUserChrome && this.gatherUserChrome(),
userContent && this.gatherUserContent(),
preferences && this.gatherPreferences({ modPrefs }),
workspaceThemes && this.gatherWorkspaceThemes(),
]);
}
get profileDir() {
return PathUtils.profileDir;
}
async gatherUserChrome() {
try {
const path = PathUtils.join(this.profileDir, 'chrome', 'userChrome.css');
this._userChrome = await IOUtils.readUTF8(path);
} catch (e) {
console.warn("[ZenRiceCollector]: Error reading userChrome.css: ", e);
return null;
}
}
async gatherUserContent() {
try {
const path = PathUtils.join(this.profileDir, 'chrome', 'userContent.css');
this._userContent = await IOUtils.readUTF8(path);
} catch (e) {
console.warn("[ZenRiceCollector]: Error reading userContent.css: ", e);
return null;
}
}
async gatherEnabledMods() {
const activeThemes = await gZenThemesImporter.getEnabledThemes();
if (activeThemes.length === 0) {
return;
}
this._enabledMods = activeThemes;
}
_getThemePrefValue(theme, pref) {
if (pref.type === 'checkbox') {
return Services.prefs.getBoolPref(pref.property);
}
return Services.prefs.getStringPref(pref.property);
}
async gatherPreferences({ modPrefs = true } = {}) {
this._preferences = {};
if (modPrefs && this._enabledMods) {
for (const theme of this._enabledMods) {
const prefs = await ZenThemesCommon.getThemePreferences(theme);
for (const pref of prefs) {
this._preferences[pref.property] = this._getThemePrefValue(theme, pref);
}
}
}
const boolPrefsToCollect = [
'zen.view.use-single-toolbar',
'zen.view.sidebar-expanded',
'zen.tabs.vertical.right-side',
'zen.view.experimental-no-window-controls',
'zen.view.hide-window-controls',
...(gZenOperatingSystemCommonUtils.currentOperatingSystem === "windows"
? ['widget.windows.mica']
: []
),
];
const stringPrefsToCollect = [
'browser.uiCustomization.state'
];
for (const pref of boolPrefsToCollect) {
this._preferences[pref] = Services.prefs.getBoolPref(pref);
}
for (const pref of stringPrefsToCollect) {
this._preferences[pref] = Services.prefs.getStringPref(pref);
}
}
async gatherWorkspaceThemes() {
const workspaces = (await ZenWorkspaces._workspaces()).workspaces;
this._workspaceThemes = workspaces.map(w => w.theme);
}
async packRice(...args) {
await this.gatherAll(...args);
const rice = {
userChrome: this._userChrome,
userContent: this._userContent,
enabledMods: this._enabledMods?.map(t => t.id),
preferences: this._preferences,
workspaceThemes: this._workspaceThemes,
};
return rice;
}
}
class ZenRiceManager {
constructor() {
this._collector = new ZenRiceCollector();
}
init() {
}
get conffettiWrapper() {
if (!this.confetti) {
Services.scriptloader.loadSubScript("chrome://browser/content/zen-vendor/tsparticles.confetti.bundle.min.js", this);
}
return this.confetti;
}
async packRice() {
return await this._collector.packRice();
}
get shareDialog() {
if (this._shareDialog) {
return this._shareDialog;
}
this._shareDialog = window.MozXULElement.parseXULToFragment(`
<vbox id="zen-rice-share-dialog-overlay" hidden="true">
<vbox id="zen-rice-share-dialog-notice">
<h1 data-l10n-id="zen-rice-share-notice" />
<p data-l10n-id="zen-rice-share-notice-description" />
<html:moz-button-group class="panel-footer">
<html:a href="https://docs.zen-browser.app/guides/" target="_blank" data-l10n-id="zen-learn-more-text" onclick="gZenThemePicker.riceManager.openLink(event)" />
<button onclick="gZenThemePicker.riceManager.acceptNotice()" class="footer-button" data-l10n-id="zen-rice-share-accept" slot="primary" default="true" />
</html:moz-button-group>
</vbox>
<vbox id="zen-rice-share-dialog" hidden="true">
<html:img src="chrome://browser/content/zen-images/brand-header.svg" class="zen-rice-share-header" />
<hbox class="zen-rice-share-content">
<vbox id="zen-rice-share-first-form">
<html:input type="text" data-l10n-id="zen-rice-share-name" id="zen-rice-share-name" oninput="gZenThemePicker.riceManager.validateShareDialog()" />
<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" oninput="gZenThemePicker.riceManager.validateShareDialog();" />
</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>
</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>
<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 id="zen-rice-share-second-form" hidden="true">
<hbox></hbox>
<vbox id="zen-rice-share-error" hidden="true">
<label data-l10n-id="zen-rice-share-error" />
<button onclick="gZenThemePicker.riceManager.resetShareDialog()" data-l10n-id="zen-close-label" class="footer-button" />
</vbox>
</vbox>
<vbox id="zen-rice-share-success" hidden="true">
<h1 data-l10n-id="zen-rice-share-success" />
<p data-l10n-id="zen-rice-share-succes-details" />
<label data-l10n-id="zen-rice-share-success-link" />
<html:input type="text" readonly="true" id="zen-rice-share-success-link" onclick="this.select()" />
<html:moz-button-group class="panel-footer">
<button onclick="gZenThemePicker.riceManager.resetShareDialog()" data-l10n-id="zen-close-label" class="footer-button" slot="primary" default="true" />
</html:moz-button-group>
</vbox>
</hbox>
</vbox>
</vbox>
`);
document.getElementById("zen-main-app-wrapper").appendChild(this._shareDialog);
this._shareDialog = document.getElementById("zen-rice-share-dialog-overlay");
return this._shareDialog;
}
get hasAcceptedNotice() {
return Services.prefs.getBoolPref("zen.rice.share.notice.accepted", false);
}
set hasAcceptedNotice(value) {
Services.prefs.setBoolPref("zen.rice.share.notice.accepted", value);
}
openLink(event) {
event.stopPropagation();
this.cancel();
gZenUIManager.openAndChangeToTab("https://docs.zen-browser.app/guides/");
}
acceptNotice() {
this.hasAcceptedNotice = true;
const notice = document.getElementById("zen-rice-share-dialog-notice");
notice.setAttribute("hidden", "true");
this.openShareDialog();
}
toggleOptions(event) {
if (event.originalTarget.closest(".options-header")) {
const options = document.getElementById("zen-rice-share-options");
options.setAttribute("zen-collapsed", options.getAttribute("zen-collapsed") === "true" ? "false" : "true");
}
this.validateShareDialog();
}
openShareDialog() {
window.docShell.treeOwner
.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIAppWindow)
.rollupAllPopups();
const dialog = this.shareDialog;
dialog.removeAttribute("hidden");
if (!this.hasAcceptedNotice) {
const notice = document.getElementById("zen-rice-share-dialog-notice");
notice.removeAttribute("hidden");
return;
}
document.getElementById("zen-rice-share-dialog").removeAttribute("hidden");
document.getElementById("zen-rice-share-dialog-notice").setAttribute("hidden", "true");
document.getElementById("zen-rice-share-name").focus();
// Initialize the dialog with the current values
this.validateShareDialog();
}
resetShareDialog() {
const dialog = this.shareDialog;
dialog.setAttribute("hidden", "true");
document.getElementById("zen-rice-share-dialog").removeAttribute("animate");
document.getElementById("zen-rice-share-name").value = "";
document.getElementById("zen-rice-share-author").value = "";
document.getElementById("zen-rice-share-save").disabled = true;
document.getElementById("zen-rice-share-first-form").removeAttribute("fade-out");
document.getElementById("zen-rice-share-second-form").setAttribute("hidden", "true");
document.getElementById("zen-rice-share-second-form").removeAttribute("fade-out");
document.getElementById("zen-rice-share-error").setAttribute("hidden", "true");
document.getElementById("zen-rice-share-success").setAttribute("hidden", "true");
document.getElementById("zen-rice-share-options").setAttribute("zen-collapsed", "true");
}
cancel() {
this.resetShareDialog();
}
getAllowedRice() {
return {
userChrome: document.getElementById("zen-rice-share-include-userchrome").checked,
userContent: document.getElementById("zen-rice-share-include-usercontent").checked,
mods: document.getElementById("zen-rice-share-include-mods").checked,
modPrefs: document.getElementById("zen-rice-share-include-mod-prefs").checked,
preferences: document.getElementById("zen-rice-share-include-preferences").checked,
workspaceThemes: document.getElementById("zen-rice-share-include-workspace-themes").checked,
};
}
get userAgent() {
return `ZenBrowser/${Services.appinfo.version} (${gZenOperatingSystemCommonUtils.currentOperatingSystem})`;
}
canShareRice() {
const allowedRice = this.getAllowedRice();
const modsPrefs = document.getElementById("zen-rice-share-include-mod-prefs");
// remove "share mod prefs" if mods are not included
if (!allowedRice.mods) {
allowedRice.modPrefs = false;
modsPrefs.disabled = true;
}
modsPrefs.disabled = !allowedRice.mods;
return Object.values(allowedRice).some(v => v);
}
validateShareDialog() {
const saveButton = document.getElementById("zen-rice-share-save");
const authorInput = document.getElementById("zen-rice-share-author");
const input = document.getElementById("zen-rice-share-name");
saveButton.disabled = !this.canShareRice() || input.value.trim().length < 3 || input.value.trim().length > 30
|| authorInput.value.trim().length < 3 || authorInput.value.trim().length > 15;
}
async submit() {
const firstForm = document.getElementById("zen-rice-share-first-form");
const secondForm = document.getElementById("zen-rice-share-second-form");
firstForm.setAttribute("fade-out", "true");
secondForm.removeAttribute("hidden");
await this._submit();
}
async _submit() {
const allowedRice = this.getAllowedRice();
const rice = await this._collector.packRice(allowedRice);
const name = document.getElementById("zen-rice-share-name").value;
const author = document.getElementById("zen-rice-share-author").value;
const response = await this._sendRice({ name, author, rice });
if (response) {
this.showSuccessDialog(response);
}
}
async _sendRice({ name, author, rice }) {
const headers = new Headers();
headers.append("X-Zen-Rice-Name", name);
headers.append("X-Zen-Rice-Author", author);
headers.append("User-Agent", this.userAgent);
headers.append("Content-Type", "application/json");
headers.append("Accept", "application/json");
let response;
try {
response = await fetch(`${ZEN_RICE_API}/rices`, {
method: "POST",
headers,
body: JSON.stringify(rice),
});
} catch (e) {
this.showErrorMessage("An error occurred while sharing your rice. Please try again later.");
console.error(e);
return null;
}
// Here, response will never be a null object
return await this._verifyResponse(response);
}
async _verifyResponse(response) {
const json = await response.json();
if (!response.ok) {
const message = json.message || "An error occurred while sharing your rice.";
this.showErrorMessage(message);
console.error(json);
return null;
}
return json;
}
showErrorMessage(message) {
const errorBox = document.getElementById("zen-rice-share-error");
errorBox.removeAttribute("hidden");
errorBox.querySelector("label").textContent = message;
}
showSuccessDialog(riceInfo) {
const { slug, token } = riceInfo;
// 'token' is like some sort of password to edit the rice, do NOT expose it
setTimeout(() => {
document.getElementById("zen-rice-share-dialog").setAttribute("animate", "true");
const successBox = document.getElementById("zen-rice-share-success");
document.getElementById("zen-rice-share-second-form").setAttribute("fade-out", "true");
successBox.removeAttribute("hidden");
const link = document.getElementById("zen-rice-share-success-link");
link.value = `${ZEN_RICE_API}/${slug}`;
this.showConffetti();
}, 2000);
}
showConffetti() {
const end = Date.now() + 2500;
function frame() {
this.conffettiWrapper({
angle: 135,
spread: 55,
particleCount: 5,
startVelocity: 55,
origin: { y: 0.6 },
});
this.conffettiWrapper({
angle: 45,
spread: 55,
particleCount: 5,
startVelocity: 55,
origin: { y: 0.6 },
});
this.conffettiWrapper({
angle: 90,
spread: 55,
particleCount: 5,
startVelocity: 55,
origin: { y: 0.6 },
});
if (Date.now() < end) {
requestAnimationFrame(frame.bind(this));
}
}
frame.call(this);
}
}
window.ZenRiceManager = ZenRiceManager;
}

View File

@@ -250,6 +250,7 @@ class ZenBrowserManagerSidebar extends ZenDOMOperatedFeature {
'#zenWebPanelContextMenu',
'#zen-sidebar-web-panel-splitter',
'#contentAreaContextMenu',
'#zen-sidepanel-button',
].join(', ');
if (target.closest(closestSelector)) {
return;

View File

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

View File

@@ -1,13 +1,14 @@
diff --git a/browser/components/customizableui/content/panelUI.js b/browser/components/customizableui/content/panelUI.js
index 1805bad6c58e060533f634ed9e511c05cad3ded1..4eb04f3eb1b9dd1c5d663cca0a7ad903b38c4efd 100644
index 1805bad6c58e060533f634ed9e511c05cad3ded1..07aca3c94b725af8761f0fa7881926da71502d76 100644
--- a/browser/components/customizableui/content/panelUI.js
+++ b/browser/components/customizableui/content/panelUI.js
@@ -545,7 +545,7 @@ const PanelUI = {
@@ -544,8 +544,8 @@ const PanelUI = {
}
if (viewShown) {
CustomizableUI.addPanelCloseListeners(tempPanel);
- tempPanel.addEventListener("popuphidden", panelRemover);
+ tempPanel.addEventListener("popuphidden", panelRemover, { capture: true });
- CustomizableUI.addPanelCloseListeners(tempPanel);
tempPanel.addEventListener("popuphidden", panelRemover);
+ CustomizableUI.addPanelCloseListeners(tempPanel);
} else {
panelRemover();
}

View File

@@ -50,6 +50,16 @@ body {
justify-content: space-between;
align-items: center;
z-index: 2;
& button {
opacity: 0;
animation: fadeIn .5s ease-in-out forwards;
animation-delay: .8s;
}
& button:nth-child(2) {
animation-delay: 1s;
}
}
body:has(#welcome:not([hidden='true'])) {
@@ -88,14 +98,16 @@ button {
border-radius: 999px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
}
button.primary {
background: var(--zen-branding-bg-reverse);
color: var(--zen-branding-bg);
background: var(--zen-branding-bg-reverse) !important;
color: var(--zen-branding-bg) !important;
transition: background 0.2s ease-in-out;
&:hover {
background: var(--zen-branding-bg-reverse);
background: color-mix(in srgb, var(--zen-branding-bg-reverse) 80%, transparent 20%) !important;
}
}
@@ -121,7 +133,7 @@ h2 {
justify-content: start;
}
.page-split:not(#import) > div:first-child {
.page-split:not(#import, #theme) > div:first-child {
margin-bottom: 20px;
}
@@ -130,6 +142,12 @@ h2 {
text-align: center;
}
#theme {
& > div:first-child p {
margin-bottom: 0 !important;
}
}
#theme .card[disabled='true'] {
opacity: 0.7;
cursor: not-allowed;
@@ -149,7 +167,7 @@ h2 {
flex-direction: column;
align-items: center;
align-content: space-between;
border: 2px solid var(--arrowpanel-border-color) !important;
border: 2px solid transparent !important;
transition: all 0.1s ease-in-out !important;
margin: 0 10px;
border-radius: 7px;
@@ -236,9 +254,11 @@ input[type='checkbox'] {
display: flex;
}
.page:not([hidden='true']) > * {
.page:not([hidden='true']) > *:not(:has(.delay-animation)),
.delay-animation,
.delay-animation-2 {
opacity: 0;
animation: fadeInRight 0.3s ease-in-out forwards;
animation: fadeIn .5s ease-in-out forwards;
}
#importBrowser {
@@ -253,6 +273,10 @@ input[type='checkbox'] {
display: flex;
}
#layout {
text-align: center;
}
#layoutList {
display: flex;
gap: 20px;
@@ -281,7 +305,7 @@ input[type='checkbox'] {
}
}
@keyframes fadeInRight {
@keyframes fadeIn {
from {
opacity: 0;
transform: translate3d(0, 40px, 0);
@@ -296,20 +320,34 @@ input[type='checkbox'] {
}
/* There should be no more than 5 elements in a page */
.page:not([hidden='true']) > *:nth-child(2),
#layoutList [layout]:nth-child(2) {
animation-delay: 0.1s;
}
.page:not([hidden='true']) > *:nth-child(3),
#layoutList [layout]:nth-child(3) {
.page:not([hidden='true']) > *:nth-child(2):not(:has(.delay-animation)) {
animation-delay: 0.2s;
}
.page:not([hidden='true']) > *:nth-child(4) {
animation-delay: 0.3s;
}
.page:not([hidden='true']) > *:nth-child(5) {
.page:not([hidden='true']) > *:nth-child(3),
.delay-animation:nth-child(1) {
animation-delay: 0.4s;
}
.page:not([hidden='true']) > *:nth-child(4),
.delay-animation:nth-child(2) {
animation-delay: 0.6s;
}
.page:not([hidden='true']) > *:nth-child(5),
.delay-animation:nth-child(3),
.delay-animation-2:nth-child(1) {
animation-delay: 0.8s;
}
.page:not([hidden='true']) > *:nth-child(6),
.delay-animation:nth-child(4),
.delay-animation-2:nth-child(2) {
animation-delay: 1s;
}
#welcome {
& h1 {
animation-duration: .8s !important;
}
}
.card h3 {
margin-top: 10px;
@@ -382,10 +420,6 @@ input[type='checkbox'] {
height: -moz-available;
}
#themeList > svg:nth-child(1) {
margin-right: 10px;
}
#themeList > svg.selected {
border: 3px solid var(--zen-colors-primary);
}
@@ -412,4 +446,10 @@ input[type='checkbox'] {
&.selected {
transform: scale(1.01);
}
& img {
width: 30px;
height: 30px;
border-radius: 15px;
}
}

View File

@@ -46,7 +46,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
<p data-l10n-id="welcome-dialog-import-subtext"></p>
</div>
<button
class="primary"
id="importBrowser"
data-l10n-id="welcome-dialog-import-action"
></button>
@@ -58,12 +57,12 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
<p data-l10n-id="welcome-dialog-theme-subtext"></p>
</div>
<div>
<h2 data-l10n-id="welcome-dialog-theme-header-1"></h2>
<div id="colorListWrapper">
<h2 data-l10n-id="welcome-dialog-theme-header-1" class="delay-animation"></h2>
<div id="colorListWrapper" class="delay-animation">
</div>
<h2 data-l10n-id="welcome-dialog-theme-header-2"></h2>
<h2 data-l10n-id="welcome-dialog-theme-header-2" class="delay-animation"></h2>
<div id="themeList" class="cardGroup">
<svg viewBox="0 0 700 700" fill="none" xmlns="http://www.w3.org/2000/svg">
<svg viewBox="0 0 700 700" fill="none" xmlns="http://www.w3.org/2000/svg" class="delay-animation-2">
<g clip-path="url(#clip0_404_2706)">
<rect width="700" height="700" fill="#F4F4F4"/>
<g filter="url(#filter0_d_404_2706)">
@@ -92,7 +91,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
</clipPath>
</defs>
</svg>
<svg viewBox="0 0 700 700" fill="none" xmlns="http://www.w3.org/2000/svg">
<svg viewBox="0 0 700 700" fill="none" xmlns="http://www.w3.org/2000/svg" class="delay-animation-2">
<g clip-path="url(#clip0_404_2709)">
<rect width="700" height="700" fill="#515151"/>
<g filter="url(#filter0_d_404_2709)">
@@ -131,15 +130,15 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
<p data-l10n-id="welcome-dialog-layout-subtext"></p>
</div>
<div id="layoutList" class="cardGroup">
<hbox layout="single" class="selected">
<hbox layout="single" class="selected delay-animation">
<img src="chrome://browser/content/zen-images/layouts/single-toolbar.png" />
<p data-l10n-id="welcome-dialog-layout-single-toolbar"></p>
</hbox>
<hbox layout="multiple">
<hbox layout="multiple" class="delay-animation">
<img src="chrome://browser/content/zen-images/layouts/multiple-toolbar.png" />
<p data-l10n-id="welcome-dialog-layout-multiple-toolbar"></p>
</hbox>
<hbox layout="collapsed">
<hbox layout="collapsed" class="delay-animation">
<img src="chrome://browser/content/zen-images/layouts/collapsed.png" />
<p data-l10n-id="welcome-dialog-layout-collapsed-toolbar"></p>
</hbox>

View File

@@ -293,11 +293,20 @@ class Pages {
if (this.pages.currentPage === 1) {
this.prevEl.setAttribute('disabled', 'true');
}
for (const button of document.getElementById('buttons-footer').children) {
button.style.display = 'none';
// Re-animate the buttons
setTimeout(() => {
button.style.removeProperty('display');
});
}
});
}
next() {
this.currentPage++;
document.getElementById('main-view').setAttribute('data-page', this.currentPage);
if (this.currentPage >= this.pages.length) {
// We can use internal js apis to close the window. We also want to set
@@ -309,6 +318,14 @@ class Pages {
return;
}
for (const button of document.getElementById('buttons-footer').children) {
button.style.display = 'none';
// Re-animate the buttons
setTimeout(() => {
button.style.removeProperty('display');
});
}
this._displayCurrentPage();
}

View File

@@ -1,17 +1,20 @@
diff --git a/browser/themes/linux/browser.css b/browser/themes/linux/browser.css
index 963a33af85521914ba0dad973ef94e6a8c2afdd0..f31bd5261631cb9e00ee6b723d6f9a85f0ae3119 100644
index a9276a678f16a67e2a003474203c37cb5c9300ad..892c69950d2a695b890fec9f8ea3f6e64032fe25 100644
--- a/browser/themes/linux/browser.css
+++ b/browser/themes/linux/browser.css
@@ -72,7 +72,7 @@
@@ -42,15 +42,17 @@
-moz-default-appearance: -moz-window-decorations;
appearance: auto;
- #navigator-toolbox,
- dialog::backdrop {
+ #zen-main-app-wrapper,
dialog::backdrop {
+ dialog::backdrop,
+ #browser::after,
+ #browser::before {
border-top-left-radius: env(-moz-gtk-csd-titlebar-radius);
border-top-right-radius: env(-moz-gtk-csd-titlebar-radius);
@@ -80,7 +80,7 @@
}
/* stylelint-disable-next-line media-query-no-invalid */
@media (-moz-bool-pref: "widget.gtk.rounded-bottom-corners.enabled") {

View File

@@ -1,16 +1,8 @@
diff --git a/browser/themes/shared/browser-shared.css b/browser/themes/shared/browser-shared.css
index 08bc078c2572fb218b435e580ef71be2586989c3..e440b6dc3f331785c841e1702887f67a67e00e96 100644
index 08bc078c2572fb218b435e580ef71be2586989c3..3d173cfcfe80e978683df760c132307f97d73ae6 100644
--- a/browser/themes/shared/browser-shared.css
+++ b/browser/themes/shared/browser-shared.css
@@ -144,7 +144,6 @@ body {
transition: background-color var(--inactive-window-transition);
&:-moz-window-inactive {
- background-color: var(--toolbox-non-lwt-bgcolor-inactive);
color: var(--toolbox-non-lwt-textcolor-inactive);
}
@@ -163,6 +162,31 @@ body {
@@ -163,6 +163,31 @@ body {
border-bottom-color: var(--chrome-content-separator-color);
}

View File

@@ -1 +1,6 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<?xml version="1.0" encoding="UTF-8"?><svg id="a" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><defs><style>.b{fill:#8000d7;}.b,.c{stroke-width:0px;}.c{fill:#fff;}</style></defs><circle class="b" cx="10" cy="10" r="9.5"/><path class="c" d="M12.7711,11.1656c-1.1727,0-2.1528.798-2.4543,1.876h-.634c-.3015-1.078-1.2816-1.876-2.4543-1.876-1.4113,0-2.5595,1.1492-2.5595,2.5606s1.1482,2.5596,2.5595,2.5596c1.1727,0,2.1528-.7973,2.4543-1.875h.634c.3015,1.0777,1.2816,1.875,2.4543,1.875,1.4114,0,2.5606-1.1483,2.5606-2.5596s-1.1492-2.5606-2.5606-2.5606ZM7.2284,14.9166c-.6568,0-1.1913-.5334-1.1913-1.1903s.5345-1.1914,1.1913-1.1914c.6564,0,1.1909.5345,1.1909,1.1914s-.5345,1.1903-1.1909,1.1903ZM12.7711,14.9166c-.6569,0-1.1904-.5334-1.1904-1.1903s.5335-1.1914,1.1904-1.1914,1.1914.5345,1.1914,1.1914-.5345,1.1903-1.1914,1.1903ZM16.3154,8.9273h-1.4463l-.6548-4.6247c-.0298-.2092-.1542-.3932-.3382-.498-.184-.1043-.407-.1198-.6003-.038l-3.276,1.3538-3.2761-1.3538c-.1953-.0817-.4178-.0668-.6003.038-.184.1049-.3084.2889-.3382.498l-.6543,4.6247h-1.4468c-.3777,0-.6841.3063-.6841.6841s.3063.6841.6841.6841h12.6313c.3783,0,.6846-.3063.6846-.6841s-.3063-.6841-.6846-.6841ZM7.0167,5.3681l2.722,1.1245c.1665.0699.3557.0699.5222,0l2.722-1.1245.5042,3.5592h-6.9741l.5038-3.5592Z"/></svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.5 6C7.32843 6 8 5.32843 8 4.5C8 3.67157 7.32843 3 6.5 3C5.67157 3 5 3.67157 5 4.5C5 5.32843 5.67157 6 6.5 6ZM6.5 11C7.32843 11 8 10.3284 8 9.5C8 8.67157 7.32843 8 6.5 8C5.67157 8 5 8.67157 5 9.5C5 10.3284 5.67157 11 6.5 11ZM8 14.5C8 15.3284 7.32843 16 6.5 16C5.67157 16 5 15.3284 5 14.5C5 13.6716 5.67157 13 6.5 13C7.32843 13 8 13.6716 8 14.5ZM13.5 6C14.3284 6 15 5.32843 15 4.5C15 3.67157 14.3284 3 13.5 3C12.6716 3 12 3.67157 12 4.5C12 5.32843 12.6716 6 13.5 6ZM15 9.5C15 10.3284 14.3284 11 13.5 11C12.6716 11 12 10.3284 12 9.5C12 8.67157 12.6716 8 13.5 8C14.3284 8 15 8.67157 15 9.5ZM13.5 16C14.3284 16 15 15.3284 15 14.5C15 13.6716 14.3284 13 13.5 13C12.6716 13 12 13.6716 12 14.5C12 15.3284 12.6716 16 13.5 16Z" fill="currentColor"/>
</svg>

Before

Width:  |  Height:  |  Size: 858 B

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1 +1,6 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<?xml version="1.0" encoding="utf-8"?><svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 122.88 109.57" fill="context-fill" fill-opacity="context-fill-opacity" xml:space="preserve"><g><path d="M65.46,19.57c-0.68,0.72-1.36,1.45-2.2,2.32l-2.31,2.41l-2.4-2.33c-0.71-0.69-1.43-1.4-2.13-2.09 c-7.42-7.3-13.01-12.8-24.52-12.95c-0.45-0.01-0.93,0-1.43,0.02c-6.44,0.23-12.38,2.6-16.72,6.65c-4.28,4-7.01,9.67-7.1,16.57 c-0.01,0.43,0,0.88,0.02,1.37c0.69,19.27,19.13,36.08,34.42,50.01c2.95,2.69,5.78,5.27,8.49,7.88l11.26,10.85l14.15-14.04 c2.28-2.26,4.86-4.73,7.62-7.37c4.69-4.5,9.91-9.49,14.77-14.52c3.49-3.61,6.8-7.24,9.61-10.73c2.76-3.42,5.02-6.67,6.47-9.57 c2.38-4.76,3.13-9.52,2.62-13.97c-0.5-4.39-2.23-8.49-4.82-11.99c-2.63-3.55-6.13-6.49-10.14-8.5C96.5,7.29,91.21,6.2,85.8,6.82 C76.47,7.9,71.5,13.17,65.46,19.57L65.46,19.57z M60.77,14.85C67.67,7.54,73.4,1.55,85.04,0.22c6.72-0.77,13.3,0.57,19.03,3.45 c4.95,2.48,9.27,6.1,12.51,10.47c3.27,4.42,5.46,9.61,6.1,15.19c0.65,5.66-0.29,11.69-3.3,17.69c-1.7,3.39-4.22,7.03-7.23,10.76 c-2.95,3.66-6.39,7.44-10,11.17C97.2,74.08,91.94,79.12,87.2,83.66c-2.77,2.65-5.36,5.13-7.54,7.29L63.2,107.28l-2.31,2.29 l-2.34-2.25l-13.6-13.1c-2.49-2.39-5.37-5.02-8.36-7.75C20.38,71.68,0.81,53.85,0.02,31.77C0,31.23,0,30.67,0,30.09 c0.12-8.86,3.66-16.18,9.21-21.36c5.5-5.13,12.97-8.13,21.01-8.42c0.55-0.02,1.13-0.03,1.74-0.02C46,0.48,52.42,6.63,60.77,14.85 L60.77,14.85z"/></g></svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -1 +1,6 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.88 109.57" fill="context-fill" fill-opacity="context-fill-opacity"><defs><style>.cls-1{fill-rule:evenodd;}</style></defs><path class="cls-1" d="M94.26,44.46A26.88,26.88,0,1,1,67.38,71.34,26.88,26.88,0,0,1,94.26,44.46ZM65.45,19.57l-4.52,4.74-4.52-4.43C49,12.58,43.4,7.08,31.89,6.93L30.46,7A25.75,25.75,0,0,0,13.74,13.6,22.58,22.58,0,0,0,6.63,30.17l0,1.37c.69,19.27,19.13,36.08,34.42,50,3,2.69,5.78,5.27,8.49,7.88l11.27,10.85,5.91-5.87c.68.8,1.39,1.58,2.13,2.32l0,0c.82.83,1.69,1.61,2.59,2.36l-10.59,10.5L45,94.22c-2.49-2.39-5.37-5-8.37-7.75C20.37,71.68.81,53.85,0,31.77l0-1.68A29.12,29.12,0,0,1,9.21,8.73a32.42,32.42,0,0,1,21-8.42H32c14,.18,20.45,6.34,28.8,14.55C67.66,7.54,73.39,1.55,85,.21a33.88,33.88,0,0,1,19,3.45,35.14,35.14,0,0,1,12.51,10.48,31.53,31.53,0,0,1,6.1,15.18,31,31,0,0,1-2.86,16.81l-.17-.18a36.18,36.18,0,0,0-5.14-4.27,24.26,24.26,0,0,0,1.57-11.6,25,25,0,0,0-4.83-12,28.62,28.62,0,0,0-10.14-8.5A27.27,27.27,0,0,0,85.79,6.82C76.47,7.89,71.5,13.17,65.45,19.57ZM106.15,68a4,4,0,0,1,1.51.3,3.94,3.94,0,0,1,1.29.86,4,4,0,0,1,.85,1.28l0,.06a4,4,0,0,1,.28,1.38V72a3.82,3.82,0,0,1-.3,1.44,4,4,0,0,1-.86,1.29,3.88,3.88,0,0,1-1.27.85l-.07,0a4.23,4.23,0,0,1-1.43.28H82.37a3.85,3.85,0,0,1-1.51-.31l-.06,0a3.92,3.92,0,0,1-1.23-.83,3.87,3.87,0,0,1-.85-1.28l0-.07A4.23,4.23,0,0,1,78.41,72v0a3.8,3.8,0,0,1,.3-1.51A3.95,3.95,0,0,1,82.34,68Z"/></svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -96,6 +96,10 @@
list-style-image: url('chevron.svg') !important;
}
#zen-rice-share-options .options-header {
list-style-image: url('arrow-right.svg');
}
#PanelUI-menu-button > * {
padding: var(--zen-toolbar-button-inner-padding);
}
@@ -398,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;
}
@@ -634,9 +642,11 @@
fill: currentColor !important;
}
menu > .menu-iconic-text,
menuitem > .menu-iconic-text {
padding-inline-start: var(--fp-contextmenu-menuicon-margin-inline) !important;
@media not (-moz-platform: windows) {
menu > .menu-iconic-text,
menuitem > .menu-iconic-text {
padding-inline-start: var(--fp-contextmenu-menuicon-margin-inline) !important;
}
}
#context-savepage {

View File

@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<svg width="11" height="11" viewBox="0 0 11 11" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_2002_244)">
<path d="M5.20215 0.582397V10.5824" stroke="context-fill"></path>

Before

Width:  |  Height:  |  Size: 479 B

After

Width:  |  Height:  |  Size: 699 B