mirror of
https://github.com/zen-browser/desktop.git
synced 2026-09-18 18:54:43 +00:00
gh-15462: Fixed broken folder animations for library (gh-15467)
This commit is contained in:
@@ -14,6 +14,7 @@ library-footer-donate-button =
|
||||
library-history-section-title = History
|
||||
library-downloads-section-title = Downloads
|
||||
library-boosts-section-title = Boosts
|
||||
library-media-section-title = Media
|
||||
library-spaces-section-title = Spaces
|
||||
|
||||
library-filter-button = Filter
|
||||
@@ -33,6 +34,7 @@ library-history-site-other = Other
|
||||
library-history-search-placeholder =
|
||||
.placeholder = Search History…
|
||||
library-history-empty = No history found
|
||||
library-media-empty = No media found
|
||||
library-history-forget-button =
|
||||
.title = Remove from history
|
||||
library-history-reopen-button =
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# 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 xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="context-fill" fill-opacity="context-fill-opacity" class="zen-library-icon" viewBox="4 4 18 18"><style>@property --zen-triangle-anim { syntax: '<number>'; initial-value: 1; inherits: false; }
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="context-fill" fill-opacity="context-fill-opacity" class="zen-library-icon" viewBox="4 4 24 24"><style>@property --zen-triangle-anim { syntax: '<number>'; initial-value: 1; inherits: false; }
|
||||
@property --zen-circle-anim { syntax: '<number>'; initial-value: 1; inherits: false; }
|
||||
@keyframes StarBackward {
|
||||
0% { transform: rotate(120deg); }
|
||||
|
||||
@@ -143,6 +143,7 @@
|
||||
* skin/classic/browser/zen-icons/tracking-protection.svg (../shared/zen-icons/nucleo/tracking-protection.svg)
|
||||
* skin/classic/browser/zen-icons/translations.svg (../shared/zen-icons/nucleo/translations.svg)
|
||||
* skin/classic/browser/zen-icons/trash.svg (../shared/zen-icons/nucleo/trash.svg)
|
||||
* skin/classic/browser/zen-icons/u-turn-to-left.svg (../shared/zen-icons/nucleo/u-turn-to-left.svg)
|
||||
* skin/classic/browser/zen-icons/unpin.svg (../shared/zen-icons/nucleo/unpin.svg)
|
||||
* skin/classic/browser/zen-icons/video-blocked-fill.svg (../shared/zen-icons/nucleo/video-blocked-fill.svg)
|
||||
* skin/classic/browser/zen-icons/video-fill.svg (../shared/zen-icons/nucleo/video-fill.svg)
|
||||
@@ -294,6 +295,7 @@
|
||||
* skin/classic/browser/zen-icons/tracking-protection.svg (../shared/zen-icons/nucleo/tracking-protection.svg)
|
||||
* skin/classic/browser/zen-icons/translations.svg (../shared/zen-icons/nucleo/translations.svg)
|
||||
* skin/classic/browser/zen-icons/trash.svg (../shared/zen-icons/nucleo/trash.svg)
|
||||
* skin/classic/browser/zen-icons/u-turn-to-left.svg (../shared/zen-icons/nucleo/u-turn-to-left.svg)
|
||||
* skin/classic/browser/zen-icons/unpin.svg (../shared/zen-icons/nucleo/unpin.svg)
|
||||
* skin/classic/browser/zen-icons/video-blocked-fill.svg (../shared/zen-icons/nucleo/video-blocked-fill.svg)
|
||||
* skin/classic/browser/zen-icons/video-fill.svg (../shared/zen-icons/nucleo/video-fill.svg)
|
||||
@@ -445,6 +447,7 @@
|
||||
* skin/classic/browser/zen-icons/tracking-protection.svg (../shared/zen-icons/nucleo/tracking-protection.svg)
|
||||
* skin/classic/browser/zen-icons/translations.svg (../shared/zen-icons/nucleo/translations.svg)
|
||||
* skin/classic/browser/zen-icons/trash.svg (../shared/zen-icons/nucleo/trash.svg)
|
||||
* skin/classic/browser/zen-icons/u-turn-to-left.svg (../shared/zen-icons/nucleo/u-turn-to-left.svg)
|
||||
* skin/classic/browser/zen-icons/unpin.svg (../shared/zen-icons/nucleo/unpin.svg)
|
||||
* skin/classic/browser/zen-icons/video-blocked-fill.svg (../shared/zen-icons/nucleo/video-blocked-fill.svg)
|
||||
* skin/classic/browser/zen-icons/video-fill.svg (../shared/zen-icons/nucleo/video-fill.svg)
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
#filter dumbComments emptyLines substitution
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If applicable, you may obtain one at
|
||||
# http://mozilla.org/MPL/2.0/.
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="context-fill" fill-opacity="context-fill-opacity" viewBox="0 0 18 18"><path d="M5.22 2.22a.75.75 0 1 1 1.06 1.06L4.06 5.5H12a4.5 4.5 0 0 1 0 9H8.25a.75.75 0 0 1 0-1.5H12a3 3 0 0 0 0-6H4.06l2.22 2.22a.75.75 0 0 1-1.06 1.06l-3.5-3.5a.75.75 0 0 1-.165-.812l.004-.01a1 1 0 0 1 .056-.105 1 1 0 0 1 .105-.133z"/></svg>
|
||||
@@ -87,7 +87,7 @@
|
||||
}
|
||||
|
||||
&[downloading] {
|
||||
transform: scale(calc((var(--zen-library-progress) * 0.2 + 0.8) * 100%));
|
||||
transform: scale(calc((var(--zen-library-progress) * 0.2 + 0.81) * 100%));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,8 @@ ChromeUtils.defineESModuleGetters(
|
||||
"moz-src:///zen/library/sections/ZenLibraryDownloadsSection.mjs",
|
||||
ZenLibraryBoostsSection:
|
||||
"moz-src:///zen/library/sections/ZenLibraryBoostsSection.mjs",
|
||||
ZenLibraryMediaSection:
|
||||
"moz-src:///zen/library/sections/ZenLibraryMediaSection.mjs",
|
||||
ZenLibrarySpacesSection:
|
||||
"moz-src:///zen/library/sections/ZenLibrarySpacesSection.mjs",
|
||||
},
|
||||
@@ -69,13 +71,16 @@ export class ZenLibrary extends MozLitElement {
|
||||
constructor() {
|
||||
super();
|
||||
this.zenLibrarySections = {
|
||||
history: lazy.ZenLibraryHistorySection,
|
||||
media: lazy.ZenLibraryMediaSection,
|
||||
downloads: lazy.ZenLibraryDownloadsSection,
|
||||
boosts: lazy.ZenLibraryBoostsSection,
|
||||
...(!window.gZenWorkspaces.privateWindowOrDisabled
|
||||
? {
|
||||
spaces: lazy.ZenLibrarySpacesSection,
|
||||
}
|
||||
: {}),
|
||||
history: lazy.ZenLibraryHistorySection,
|
||||
};
|
||||
if (!window.gZenWorkspaces.privateWindowOrDisabled) {
|
||||
this.zenLibrarySections.spaces = lazy.ZenLibrarySpacesSection;
|
||||
}
|
||||
const lastTab = Services.prefs.getStringPref(LAST_TAB_PREF, "history");
|
||||
this.activeTab = lastTab in this.zenLibrarySections ? lastTab : "history";
|
||||
this.#hijackFirefoxCommands();
|
||||
|
||||
@@ -6,6 +6,7 @@ MOZ_SRC_FILES += [
|
||||
"sections/ZenLibraryBoostsSection.mjs",
|
||||
"sections/ZenLibraryDownloadsSection.mjs",
|
||||
"sections/ZenLibraryHistorySection.mjs",
|
||||
"sections/ZenLibraryMediaSection.mjs",
|
||||
"sections/ZenLibrarySearchSection.mjs",
|
||||
"sections/ZenLibrarySpacesSection.mjs",
|
||||
|
||||
|
||||
@@ -303,7 +303,7 @@ export class ZenLibraryHistorySection extends ZenLibrarySearchSection {
|
||||
>
|
||||
<img
|
||||
class="toolbarbutton-icon"
|
||||
src="chrome://browser/skin/zen-icons/arrow-rotate-anticlockwise.svg"
|
||||
src="chrome://browser/skin/zen-icons/u-turn-to-left.svg"
|
||||
alt=""
|
||||
/>
|
||||
</toolbarbutton>
|
||||
|
||||
29
src/zen/library/sections/ZenLibraryMediaSection.mjs
Normal file
29
src/zen/library/sections/ZenLibraryMediaSection.mjs
Normal file
@@ -0,0 +1,29 @@
|
||||
/* 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 { html } from "chrome://global/content/vendor/lit.all.mjs";
|
||||
import { MozLitElement } from "chrome://global/content/lit-utils.mjs";
|
||||
|
||||
export class ZenLibraryMediaSection extends MozLitElement {
|
||||
static id = "media";
|
||||
static label = "library-media-section-title";
|
||||
|
||||
static render(library) {
|
||||
return html`
|
||||
<zen-library-media-section
|
||||
class="zen-library-section"
|
||||
data-section="media"
|
||||
.library=${library}
|
||||
></zen-library-media-section>
|
||||
`;
|
||||
}
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<div class="zen-library-empty" data-l10n-id="library-media-empty"></div>
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define("zen-library-media-section", ZenLibraryMediaSection);
|
||||
@@ -32,8 +32,6 @@ const STRIP_EVENTS = [
|
||||
"TabGroupCreate",
|
||||
"TabGroupRemoved",
|
||||
"TabGroupMoved",
|
||||
"TabGroupCollapse",
|
||||
"TabGroupExpand",
|
||||
];
|
||||
const SHOWN_ATTRIBUTES = ["label", "image", "pending", "muted", "soundplaying"];
|
||||
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
--toolbox-progress: min(1, calc(var(--library-progress) * 1.5));
|
||||
|
||||
transform: scale(calc(1 - var(--toolbox-progress) * 0.04));
|
||||
opacity: calc(1 - var(--toolbox-progress));
|
||||
opacity: calc(1 - var(--toolbox-progress)) !important;
|
||||
}
|
||||
|
||||
#zen-main-app-wrapper[zen-compact-mode="true"] #navigator-toolbox {
|
||||
@media -moz-pref('zen.view.compact.hide-tabbar') or -moz-pref('zen.view.use-single-toolbar') {
|
||||
transform: translateX(calc(var(--toolbox-progress) * -100%));
|
||||
opacity: 1;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ zen-library[transitioning] {
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-height: 275px) {
|
||||
@media (max-height: 575px) {
|
||||
.zen-library-tab {
|
||||
& label {
|
||||
display: none;
|
||||
|
||||
@@ -454,6 +454,13 @@ zen-library {
|
||||
}
|
||||
}
|
||||
|
||||
@media (-moz-platform: macos) {
|
||||
#zen-sidebar-foot-buttons,
|
||||
#zen-library-footer {
|
||||
--zen-toolbar-button-size: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
#zen-sidebar-foot-buttons {
|
||||
position: relative;
|
||||
background: transparent;
|
||||
|
||||
Reference in New Issue
Block a user