mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-28 14:08:36 +00:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
cc8dfc693b | ||
![]() |
9a1c466368 | ||
![]() |
88f26d8829 | ||
![]() |
b0d0a79fc5 | ||
![]() |
3146ec1c3b |
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
@@ -265,10 +265,7 @@ jobs:
|
||||
run: npm run import -- --verbose
|
||||
|
||||
- name: Compress
|
||||
run: |
|
||||
cd engine
|
||||
tar --use-compress-program=zstd -hcf ../zen.source.tar.zst *
|
||||
cd ..
|
||||
run: tar --use-compress-program=zstd -hcf zen.source.tar.zst -C engine .
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
|
@@ -48,4 +48,4 @@ zen-icons-picker-emoji =
|
||||
.label = Emojis
|
||||
zen-icons-picker-svg =
|
||||
.label = Icones
|
||||
urlbar-search-mode-zen_actions = Actions
|
||||
urlbar-search-mode-zen_actions = Accions
|
||||
|
@@ -4,7 +4,7 @@ tab-context-zen-reset-pinned-tab =
|
||||
.label = Réinitialiser l’onglet épinglé
|
||||
.accesskey = R
|
||||
tab-context-zen-add-essential =
|
||||
.label = Ajouter aux Essentials ({ $num } / 12 emplacements remplis)
|
||||
.label = Ajouter aux Essentials ({ $num }/12 emplacements occupés)
|
||||
.accesskey = E
|
||||
tab-context-zen-remove-essential =
|
||||
.label = Retirer des Essentials
|
||||
|
@@ -48,4 +48,4 @@ zen-icons-picker-emoji =
|
||||
.label = Emoji
|
||||
zen-icons-picker-svg =
|
||||
.label = Ikon
|
||||
urlbar-search-mode-zen_actions = Actions
|
||||
urlbar-search-mode-zen_actions = Aksi
|
||||
|
@@ -48,4 +48,4 @@ zen-icons-picker-emoji =
|
||||
.label = 이모티콘
|
||||
zen-icons-picker-svg =
|
||||
.label = 아이콘
|
||||
urlbar-search-mode-zen_actions = Actions
|
||||
urlbar-search-mode-zen_actions = 액션
|
||||
|
@@ -48,4 +48,4 @@ zen-icons-picker-emoji =
|
||||
.label = Емоджі
|
||||
zen-icons-picker-svg =
|
||||
.label = Значки
|
||||
urlbar-search-mode-zen_actions = Actions
|
||||
urlbar-search-mode-zen_actions = Дії
|
||||
|
@@ -27,7 +27,7 @@ zen-glance-trigger-shift-click =
|
||||
zen-glance-trigger-meta-click =
|
||||
.label = Meta (Command) + 左鍵
|
||||
zen-glance-trigger-mantain-click =
|
||||
.label = 長按(即將上線!)
|
||||
.label = 長按(即將推出!)
|
||||
zen-look-and-feel-compact-view-header = 在緊湊模式下顯示
|
||||
zen-look-and-feel-compact-view-description = 只顯示你需要用的工具欄!
|
||||
zen-look-and-feel-compact-view-enabled =
|
||||
@@ -92,12 +92,12 @@ zen-vertical-tabs-expand-tabs-header = 如何擴展分頁
|
||||
zen-vertical-tabs-expand-tabs-description = 選擇要如何擴展側邊欄中的分頁
|
||||
zen-theme-marketplace-header = Zen 模組
|
||||
zen-theme-disable-all-enabled =
|
||||
.title = 啟用所有主題
|
||||
.title = 啟用所有模組
|
||||
zen-theme-disable-all-disabled =
|
||||
.title = 停用所有主題
|
||||
zen-theme-marketplace-description = 從商店尋找並安裝主題。
|
||||
.title = 停用所有模組
|
||||
zen-theme-marketplace-description = 從商店尋找並安裝模組。
|
||||
zen-theme-marketplace-remove-button =
|
||||
.label = 移除主題
|
||||
.label = 移除模組
|
||||
zen-theme-marketplace-check-for-updates-button =
|
||||
.label = 檢查更新
|
||||
zen-theme-marketplace-import-button =
|
||||
@@ -114,15 +114,15 @@ zen-theme-marketplace-toggle-enabled-button =
|
||||
.title = 關閉佈景主題
|
||||
zen-theme-marketplace-toggle-disabled-button =
|
||||
.title = 啟用佈景主題
|
||||
zen-theme-marketplace-remove-confirmation = 您確定要移除此模組?
|
||||
zen-theme-marketplace-remove-confirmation = 您確定要移除此模組?
|
||||
zen-theme-marketplace-close-modal = 關閉
|
||||
zen-theme-marketplace-theme-header-title =
|
||||
.title = CSS 選擇器:{ $name }
|
||||
zen-theme-marketplace-dropdown-default-label =
|
||||
.label = 無
|
||||
zen-theme-marketplace-input-default-placeholder =
|
||||
.placeholder = 請輸入
|
||||
pane-zen-marketplace-title = Zen 模式
|
||||
.placeholder = 請輸入...
|
||||
pane-zen-marketplace-title = Zen 模組
|
||||
zen-themes-auto-update =
|
||||
.label = 啟動時自動更新已安裝模組
|
||||
zen-settings-workspaces-force-container-tabs-to-workspace =
|
||||
@@ -150,12 +150,12 @@ pane-zen-CKS-title = 快捷鍵
|
||||
category-zen-CKS =
|
||||
.tooltiptext = { pane-zen-CKS-title }
|
||||
pane-settings-CKS-title = { -brand-short-name } 快捷鍵
|
||||
zen-settings-CKS-header = 自定義你的快捷鍵
|
||||
zen-settings-CKS-description = 依據你的愛好來更改預設的快捷鍵以近一步改善你的瀏覽體驗
|
||||
zen-settings-CKS-header = 自定義您的快捷鍵
|
||||
zen-settings-CKS-description = 依據您的愛好來更改預設的快捷鍵以近一步改善你的瀏覽體驗
|
||||
zen-settings-CKS-disable-firefox =
|
||||
.label = 停用 { -brand-short-name } 的預設快捷鍵
|
||||
zen-settings-CKS-duplicate-shortcut =
|
||||
.label = 重複的快捷鍵
|
||||
.label = 複製快捷鍵
|
||||
zen-settings-CKS-reset-shortcuts =
|
||||
.label = 重設為預設值
|
||||
zenCKSOption-group-other = 其它
|
||||
@@ -173,13 +173,13 @@ zenCKSOption-group-devTools = 開發人員工具
|
||||
zen-key-quick-restart = 快速重啟
|
||||
zen-window-new-shortcut = 開新視窗
|
||||
zen-tab-new-shortcut = 開新分頁
|
||||
zen-key-redo = 重做
|
||||
zen-key-redo = 取消復原
|
||||
zen-restore-last-closed-tab-shortcut = 復原上次關閉的分頁
|
||||
zen-location-open-shortcut = 選取網址列
|
||||
zen-location-open-shortcut-alt = 選取網址列(備用)
|
||||
zen-key-undo-close-window = 還原已關閉視窗
|
||||
zen-text-action-undo-shortcut = 復原
|
||||
zen-text-action-redo-shortcut = 取消「復原」
|
||||
zen-text-action-redo-shortcut = 取消復原
|
||||
zen-text-action-cut-shortcut = 剪下
|
||||
zen-text-action-copy-shortcut = 複製
|
||||
zen-text-action-copy-url-shortcut = 複製目前網址
|
||||
@@ -219,9 +219,9 @@ zen-history-show-all-shortcut = 顯示所有歷史
|
||||
zen-key-enter-full-screen = 進入全畫面模式
|
||||
zen-key-exit-full-screen = 離開全畫面模式
|
||||
zen-ai-chatbot-sidebar-shortcut = 開啟 AI 聊天側邊欄
|
||||
zen-key-inspector-mac = 開啟檢測器(Mac)
|
||||
zen-key-inspector-mac = 開啟檢測器 (Mac)
|
||||
zen-toggle-sidebar-shortcut = 開啟 Firefox 側邊欄
|
||||
zen-toggle-pin-tab-shortcut = Toggle Pin Tab
|
||||
zen-toggle-pin-tab-shortcut = 切換釘選分頁
|
||||
zen-reader-mode-toggle-shortcut-other = 切換閱讀模式
|
||||
zen-picture-in-picture-toggle-shortcut = 切換子母畫面
|
||||
zen-nav-reload-shortcut-2 = 重新整理
|
||||
|
@@ -1,21 +1,21 @@
|
||||
zen-folders-search-placeholder =
|
||||
.placeholder = Search { $folder-name }...
|
||||
.placeholder = 搜尋 { $folder-name }...
|
||||
zen-folders-panel-rename-folder =
|
||||
.label = Rename Folder
|
||||
.label = 重新命名分頁夾
|
||||
zen-folders-panel-unpack-folder =
|
||||
.label = Unpack Folder
|
||||
.label = 解散分頁夾
|
||||
zen-folders-new-subfolder =
|
||||
.label = New Subfolder
|
||||
.label = 新增子分頁夾
|
||||
zen-folders-panel-delete-folder =
|
||||
.label = Delete Folder
|
||||
.label = 刪除分頁夾
|
||||
zen-folders-panel-convert-folder-to-space =
|
||||
.label = Convert folder to Space
|
||||
.label = 將分頁夾轉換為工作區
|
||||
zen-folders-panel-change-folder-space =
|
||||
.label = Change Space...
|
||||
.label = 變更工作區...
|
||||
zen-folders-panel-change-icon-folder =
|
||||
.label = Change Icon
|
||||
.label = 變更圖示
|
||||
zen-folders-unload-all-tooltip =
|
||||
.tooltiptext = Unload active in this folder
|
||||
.tooltiptext = 卸載此分頁夾中所有分頁
|
||||
zen-folders-unload-folder =
|
||||
.label = Unload All Tabs
|
||||
zen-folders-search-no-results = 沒有找到搜尋的分頁 🤔
|
||||
.label = 卸載所有分頁
|
||||
zen-folders-search-no-results = 找不到符合搜尋的分頁 🤔
|
||||
|
@@ -1,5 +1,5 @@
|
||||
zen-panel-ui-current-profile-text = 當前設定檔
|
||||
unified-extensions-description = 擴充功能用於為 { -brand-short-name } 帶來更多功能。
|
||||
unified-extensions-description = 擴充功能可為 { -brand-short-name } 帶來更多額外功能。
|
||||
tab-context-zen-reset-pinned-tab =
|
||||
.label = 重置釘選的分頁
|
||||
.accesskey = R
|
||||
@@ -12,25 +12,25 @@ tab-context-zen-remove-essential =
|
||||
tab-context-zen-replace-pinned-url-with-current =
|
||||
.label = 將釘選的網址換成目前的網址
|
||||
.accesskey = C
|
||||
zen-themes-corrupted = 你的 { -brand-short-name } 模組文件已損壞,它們已重置為預設佈景主題。
|
||||
zen-themes-corrupted = 你的 { -brand-short-name } 模組文件已損壞,它們已重設為預設主題。
|
||||
zen-shortcuts-corrupted = 你的 { -brand-short-name } 快捷文件已損壞。它們已被重設為預設值。
|
||||
# note: Do not translate the "<br/>" tags in the following string
|
||||
zen-new-urlbar-notification = 新的 URL 欄已啟用,你不再需要新增新分頁。<br/><br/>馬上打開新分頁來看看新的 URL 欄!
|
||||
zen-disable = 禁用
|
||||
zen-disable = 停用
|
||||
pictureinpicture-minimize-btn =
|
||||
.aria-label = Minimize
|
||||
.tooltip = Minimize
|
||||
.aria-label = 最小化
|
||||
.tooltip = 最小化
|
||||
zen-panel-ui-gradient-generator-custom-color = 自訂顏色
|
||||
zen-panel-ui-gradient-generator-saved-message = 漸層儲存成功!
|
||||
zen-panel-ui-gradient-generator-saved-message = 已成功儲存漸層!
|
||||
zen-copy-current-url-confirmation = 網址已複製到剪貼簿。
|
||||
zen-general-cancel-label =
|
||||
.label = 取消
|
||||
zen-general-confirm =
|
||||
.label = 確認
|
||||
zen-pinned-tab-replaced = 釘選分頁網址已替換為當前當前網址。
|
||||
zen-tabs-renamed = 分頁重新命名成功!
|
||||
zen-background-tab-opened-toast = New background tab opened!
|
||||
zen-workspace-renamed-toast = Workspace has been successfully renamed!
|
||||
zen-tabs-renamed = 已成功重新命名分頁!
|
||||
zen-background-tab-opened-toast = 已在背景開啟新分頁!
|
||||
zen-workspace-renamed-toast = 已成功重新命名工作區!
|
||||
zen-library-sidebar-workspaces =
|
||||
.label = 工作區
|
||||
zen-library-sidebar-mods =
|
||||
@@ -45,5 +45,5 @@ zen-singletoolbar-urlbar-placeholder-with-name =
|
||||
zen-icons-picker-emoji =
|
||||
.label = 表情符號
|
||||
zen-icons-picker-svg =
|
||||
.label = Icons
|
||||
urlbar-search-mode-zen_actions = Actions
|
||||
.label = 圖示
|
||||
urlbar-search-mode-zen_actions = 操作
|
||||
|
@@ -10,7 +10,7 @@ zen-split-link =
|
||||
.accesskey = S
|
||||
zen-split-view-modifier-header = 分割畫面
|
||||
zen-split-view-modifier-activate-reallocation =
|
||||
.label = 啟用重新分配
|
||||
zen-split-view-modifier-enabled-toast = 分割畫面重新排列已開啟。
|
||||
zen-split-view-modifier-enabled-toast-description = 拖曳畫面以重新排列。按 Esc 鍵退出
|
||||
zen-split-view-modifier-disabled-toast = 分割畫面重新排列已關閉
|
||||
.label = 啟用重新排列
|
||||
zen-split-view-modifier-enabled-toast = 已開啟分割畫面重新排列功能。
|
||||
zen-split-view-modifier-enabled-toast-description = 拖曳畫面以重新排列。按 Esc 鍵退出。
|
||||
zen-split-view-modifier-disabled-toast = 已關閉分割畫面重新排列功能。
|
||||
|
@@ -15,12 +15,12 @@ zen-toolbar-context-compact-mode-hide-both =
|
||||
.label = 兩者皆隱藏
|
||||
.accesskey = H
|
||||
zen-toolbar-context-new-folder =
|
||||
.label = New Folder
|
||||
.label = 新增分頁夾
|
||||
.accesskey = N
|
||||
sidebar-zen-expand =
|
||||
.label = 展開側邊欄
|
||||
sidebar-zen-create-new =
|
||||
.label = Create New...
|
||||
.label = 新增...
|
||||
tabbrowser-unload-tab-button =
|
||||
.tooltiptext =
|
||||
{ $tabCount ->
|
||||
|
@@ -2,26 +2,26 @@
|
||||
# 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-title-line1 = Welcome to
|
||||
zen-welcome-title-line2 = a calmer internet
|
||||
zen-welcome-import-title = A Fresh Start, Same Bookmarks
|
||||
zen-welcome-import-description-1 = Your bookmarks, history, and passwords are like a trail of breadcrumbs through the internet—don’t leave them behind!
|
||||
zen-welcome-title-line1 = 歡迎使用
|
||||
zen-welcome-title-line2 = 更寧靜的網路體驗
|
||||
zen-welcome-import-title = 全新開始,書籤依舊
|
||||
zen-welcome-import-description-1 = 您的書籤、歷史記錄和密碼,是您網路足跡的珍貴紀錄——別把它們遺忘了!
|
||||
zen-welcome-import-description-2 = 輕鬆匯入其他瀏覽器的資料,無縫接續瀏覽體驗。
|
||||
zen-welcome-import-button = Import now
|
||||
zen-welcome-set-default-browser = Set { -brand-short-name } as your default browser
|
||||
zen-welcome-dont-set-default-browser = DON’T set { -brand-short-name } as your default browser
|
||||
zen-welcome-initial-essentials-title = Your Key Tabs, Always Within Reach
|
||||
zen-welcome-initial-essentials-description-1 = Keep your most important tabs easily accessible and always at hand, no matter how many you open.
|
||||
zen-welcome-initial-essentials-description-2 = Essential tabs are always visible, no matter what workspace you are in.
|
||||
zen-welcome-workspace-colors-title = Your Workspaces, Your Colors
|
||||
zen-welcome-workspace-colors-description = Personalize your browser by giving each workspace its own unique color identity.
|
||||
zen-welcome-import-button = 立即匯入
|
||||
zen-welcome-set-default-browser = 將 { -brand-short-name } 設為您的預設瀏覽器
|
||||
zen-welcome-dont-set-default-browser = 不要將 { -brand-short-name } 設為您的預設瀏覽器
|
||||
zen-welcome-initial-essentials-title = 重要分頁,隨手可及
|
||||
zen-welcome-initial-essentials-description-1 = 無論開啟多少分頁,最重要的分頁將永遠顯示,讓您輕鬆存取。
|
||||
zen-welcome-initial-essentials-description-2 = 無論您在哪個工作區,Essential 分頁會永遠顯示。
|
||||
zen-welcome-workspace-colors-title = 您的工作區,您的色彩
|
||||
zen-welcome-workspace-colors-description = 為每個工作區賦予獨特的色彩,打造個人化瀏覽器。
|
||||
zen-welcome-start-browsing-title =
|
||||
All set?<br/>
|
||||
Let’s get rolling!
|
||||
zen-welcome-start-browsing-description-1 = You’re all set up and ready to go. Click the button below to start browsing with { -brand-short-name }.
|
||||
zen-welcome-start-browsing = Dive in!
|
||||
zen-welcome-default-search-title = Your Default Search Engine
|
||||
zen-welcome-default-search-description = Choose your default search engine. You can always change it later!
|
||||
zen-welcome-skip-button = Skip
|
||||
zen-welcome-next-action = Next
|
||||
zen-welcome-finished = Your Zen has been set up correctly!
|
||||
準備好了嗎?<br/>
|
||||
馬上開始體驗吧!
|
||||
zen-welcome-start-browsing-description-1 = 您已完成所有設定並準備就緒。點擊下方按鈕,開始使用 { -brand-short-name } 瀏覽網路吧。
|
||||
zen-welcome-start-browsing = 立即開始!
|
||||
zen-welcome-default-search-title = 您的預設搜尋引擎
|
||||
zen-welcome-default-search-description = 選擇您的預設搜尋引擎,您可以隨時更改它!
|
||||
zen-welcome-skip-button = 跳過
|
||||
zen-welcome-next-action = 下一步
|
||||
zen-welcome-finished = 您的 Zen 瀏覽器已成功設定!
|
||||
|
@@ -1,8 +1,8 @@
|
||||
zen-panel-ui-workspaces-text = 工作區
|
||||
zen-panel-ui-workspaces-create =
|
||||
.label = 創建工作區
|
||||
.label = 建立工作區
|
||||
zen-panel-ui-folder-create =
|
||||
.label = Create Folder
|
||||
.label = 建立分頁夾
|
||||
zen-panel-ui-new-empty-split =
|
||||
.label = New Split
|
||||
zen-workspaces-panel-context-delete =
|
||||
@@ -13,7 +13,7 @@ zen-workspaces-panel-change-name =
|
||||
zen-workspaces-panel-change-icon =
|
||||
.label = 變更圖示
|
||||
zen-workspaces-panel-context-default-profile =
|
||||
.label = Set Profile
|
||||
.label = 設定設定檔
|
||||
zen-workspaces-how-to-reorder-title = 如何排序工作區
|
||||
zen-workspaces-how-to-reorder-desc = 拖曳側邊欄底部工作區圖示以重新排序
|
||||
zen-workspaces-change-theme =
|
||||
@@ -25,7 +25,7 @@ zen-workspaces-panel-context-edit =
|
||||
.label = 編輯工作區
|
||||
.accesskey = E
|
||||
context-zen-change-workspace-tab =
|
||||
.label = 將分頁(含多個)移至工作區
|
||||
.label = 將分頁移至工作區
|
||||
.accesskey = C
|
||||
zen-bookmark-edit-panel-workspace-selector =
|
||||
.value = 選擇工作區
|
||||
@@ -45,9 +45,9 @@ zen-workspace-creation-name =
|
||||
.placeholder = 工作區名稱
|
||||
zen-workspaces-panel-context-reorder =
|
||||
.label = 排序工作區
|
||||
zen-workspace-creation-profile = Profile
|
||||
.tooltiptext = Profiles are used to separate cookies and site data between spaces.
|
||||
zen-workspace-creation-header = 創建工作區
|
||||
zen-workspace-creation-label = Spaces are used to organize your tabs and sessions.
|
||||
zen-workspace-creation-profile = 設定檔
|
||||
.tooltiptext = 設定檔用於隔離不同工作區的 Cookie 和網站資料。
|
||||
zen-workspace-creation-header = 建立工作區
|
||||
zen-workspace-creation-label = 工作區用於組織您的分頁與工作階段。
|
||||
zen-workspaces-delete-workspace-title = 刪除工作區?
|
||||
zen-workspaces-delete-workspace-body = 你確定要刪除 { $name } 嗎?該動作無法物復原。
|
||||
zen-workspaces-delete-workspace-body = 您確定要刪除 { $name } 嗎?此操錯無法復原。
|
||||
|
@@ -1,30 +0,0 @@
|
||||
# nsBrowserGlue.js
|
||||
|
||||
# This component must restrict its registration for the app-startup category
|
||||
# to the specific list of apps that use it so it doesn't get loaded in xpcshell.
|
||||
# Thus we restrict it to these apps:
|
||||
#
|
||||
# browser: {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
#
|
||||
# The first rule of running code during startup is: don't.
|
||||
#
|
||||
# We take performance very seriously and ideally your component/feature should
|
||||
# initialize only when needed.
|
||||
#
|
||||
# If you have established that you really must run code during startup,
|
||||
# available entrypoints are:
|
||||
#
|
||||
# - registering a `browser-idle-startup` category entry for your JS module (or
|
||||
# even a "best effort" user idle task, see `BrowserGlue.sys.mjs`)
|
||||
# - registering a `browser-window-delayed-startup` category entry for your JS
|
||||
# module. **Note that this is invoked for each browser window.**
|
||||
# - registering a `browser-before-ui-startup` category entry if you really really
|
||||
# need to. This will run code before the first browser window appears on the
|
||||
# screen and make Firefox seem slow, so please don't do it unless absolutely
|
||||
# necessary.
|
||||
|
||||
#ifdef XP_UNIX
|
||||
#ifndef XP_MACOSX
|
||||
#define UNIX_BUT_NOT_MAC
|
||||
#endif
|
||||
#endif
|
@@ -2,25 +2,22 @@
|
||||
// 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/.
|
||||
{
|
||||
class ZenStartupManager {
|
||||
var gZenStartup = new (class {
|
||||
#watermarkIgnoreElements = ['zen-toast-container'];
|
||||
#hasInitializedLayout = false;
|
||||
|
||||
isReady = false;
|
||||
|
||||
constructor() {
|
||||
gZenWorkspaces.init();
|
||||
|
||||
window.addEventListener(
|
||||
'MozBeforeInitialXULLayout',
|
||||
() => {
|
||||
this.openWatermark();
|
||||
this.#zenInitBrowserLayout();
|
||||
this.#initBrowserBackground();
|
||||
this.#changeSidebarLocation();
|
||||
},
|
||||
{ once: true }
|
||||
);
|
||||
async init() {
|
||||
// important: We do this to ensure that some firefox components
|
||||
// are initialized before we start our own initialization.
|
||||
// please, do not remove this line and if you do, make sure to
|
||||
// test the startup process.
|
||||
await new Promise((resolve) => setTimeout(resolve, 0));
|
||||
this.openWatermark();
|
||||
this.#initBrowserBackground();
|
||||
this.#changeSidebarLocation();
|
||||
this.#zenInitBrowserLayout();
|
||||
}
|
||||
|
||||
#initBrowserBackground() {
|
||||
@@ -60,6 +57,7 @@
|
||||
document.getElementById('zen-appcontent-wrapper').prepend(deckTemplate);
|
||||
}
|
||||
|
||||
gZenWorkspaces.init();
|
||||
setTimeout(() => {
|
||||
gZenUIManager.init();
|
||||
this.#checkForWelcomePage();
|
||||
@@ -225,7 +223,13 @@
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
||||
window.gZenStartup = new ZenStartupManager();
|
||||
window.addEventListener(
|
||||
'MozBeforeInitialXULLayout',
|
||||
() => {
|
||||
gZenStartup.init();
|
||||
},
|
||||
{ once: true }
|
||||
);
|
||||
}
|
||||
|
@@ -322,6 +322,9 @@
|
||||
}
|
||||
|
||||
& #zen-appcontent-navbar-wrapper {
|
||||
& .zen-toolbar-background {
|
||||
display: flex;
|
||||
}
|
||||
--zen-compact-toolbar-offset: 5px;
|
||||
position: absolute;
|
||||
top: calc(-1 * var(--zen-toolbar-height) + 1px);
|
||||
@@ -360,9 +363,6 @@
|
||||
) {
|
||||
& #zen-appcontent-navbar-container {
|
||||
visibility: visible !important;
|
||||
& .zen-toolbar-background {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
border-top-width: 0px;
|
||||
|
||||
|
@@ -10,7 +10,3 @@ DIRS += [
|
||||
"urlbar",
|
||||
"toolkit",
|
||||
]
|
||||
|
||||
EXTRA_PP_COMPONENTS += [
|
||||
"ZenComponents.manifest",
|
||||
]
|
||||
|
@@ -418,13 +418,13 @@
|
||||
overflow-y: auto;
|
||||
height: 100%;
|
||||
|
||||
:root[zen-sidebar-expanded='true'] & {
|
||||
:root[zen-workspace-id][zen-sidebar-expanded='true'] & {
|
||||
margin-left: calc(-1 * var(--zen-toolbox-padding));
|
||||
width: calc(100% + var(--zen-toolbox-padding) * 2);
|
||||
}
|
||||
}
|
||||
|
||||
#pinned-tabs-container {
|
||||
:root[zen-workspace-id] #pinned-tabs-container {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
@@ -51,7 +51,7 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
|
||||
await Promise.all([this.promiseDBInitialized, this.promisePinnedInitialized]);
|
||||
}
|
||||
|
||||
init() {
|
||||
async init() {
|
||||
// Initialize tab selection state
|
||||
this._tabSelectionState = {
|
||||
inProgress: false,
|
||||
@@ -118,8 +118,12 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
|
||||
this.popupOpenHandler = this._popupOpenHandler.bind(this);
|
||||
|
||||
window.addEventListener('resize', this.onWindowResize.bind(this));
|
||||
this.addPopupListeners();
|
||||
|
||||
this.afterLoadInit();
|
||||
await this.#waitForPromises();
|
||||
await this._workspaces();
|
||||
|
||||
await this.afterLoadInit();
|
||||
}
|
||||
|
||||
log(...args) {
|
||||
@@ -132,13 +136,11 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
|
||||
if (!this._hasInitializedTabsStrip) {
|
||||
await this.delayedStartup();
|
||||
}
|
||||
this.#initializeWorkspaceTabContextMenus();
|
||||
this._initializeWorkspaceTabContextMenus();
|
||||
await this.initializeWorkspaces();
|
||||
await this.promiseSectionsInitialized;
|
||||
|
||||
// Non UI related initializations
|
||||
this.addPopupListeners();
|
||||
|
||||
if (
|
||||
Services.prefs.getBoolPref('zen.workspaces.swipe-actions', false) &&
|
||||
this.workspaceEnabled &&
|
||||
@@ -309,7 +311,6 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
|
||||
}
|
||||
|
||||
async _createDefaultWorkspaceIfNeeded() {
|
||||
await this.#waitForPromises();
|
||||
const workspaces = await this._workspaces();
|
||||
if (!workspaces.workspaces.length) {
|
||||
await this.createAndSaveWorkspace('Space', null, true);
|
||||
@@ -400,42 +401,46 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
|
||||
async initializeTabsStripSections() {
|
||||
await SessionStore.promiseInitialized;
|
||||
await SessionStore.promiseAllWindowsRestored;
|
||||
await gZenSessionStore.promiseInitialized;
|
||||
const perifery = document.getElementById('tabbrowser-arrowscrollbox-periphery');
|
||||
perifery.setAttribute('hidden', 'true');
|
||||
const tabs = gBrowser.tabContainer.allTabs;
|
||||
const workspaces = await this._workspaces();
|
||||
for (const workspace of workspaces.workspaces) {
|
||||
await this._createWorkspaceTabsSection(workspace, tabs);
|
||||
}
|
||||
if (tabs.length) {
|
||||
const defaultSelectedContainer = this.workspaceElement(this.activeWorkspace)?.querySelector(
|
||||
'.zen-workspace-normal-tabs-section'
|
||||
);
|
||||
const pinnedContainer = this.workspaceElement(this.activeWorkspace).querySelector(
|
||||
'.zen-workspace-pinned-tabs-section'
|
||||
);
|
||||
// New profile with no workspaces does not have a default selected container
|
||||
if (defaultSelectedContainer) {
|
||||
for (const tab of tabs) {
|
||||
if (tab.hasAttribute('zen-essential')) {
|
||||
this.getEssentialsSection(tab).appendChild(tab);
|
||||
continue;
|
||||
} else if (tab.pinned) {
|
||||
pinnedContainer.insertBefore(tab, pinnedContainer.lastChild);
|
||||
continue;
|
||||
}
|
||||
// before to the last child (perifery)
|
||||
defaultSelectedContainer.insertBefore(tab, defaultSelectedContainer.lastChild);
|
||||
await new Promise((resolve) => {
|
||||
setTimeout(async () => {
|
||||
const tabs = gBrowser.tabContainer.allTabs;
|
||||
const workspaces = await this._workspaces();
|
||||
for (const workspace of workspaces.workspaces) {
|
||||
await this._createWorkspaceTabsSection(workspace, tabs);
|
||||
}
|
||||
}
|
||||
gBrowser.tabContainer._invalidateCachedTabs();
|
||||
}
|
||||
perifery.setAttribute('hidden', 'true');
|
||||
this._hasInitializedTabsStrip = true;
|
||||
this.registerPinnedResizeObserver();
|
||||
this._fixIndicatorsNames(workspaces);
|
||||
this._resolveSectionsInitialized();
|
||||
if (tabs.length) {
|
||||
const defaultSelectedContainer = this.workspaceElement(
|
||||
this.activeWorkspace
|
||||
)?.querySelector('.zen-workspace-normal-tabs-section');
|
||||
const pinnedContainer = this.workspaceElement(this.activeWorkspace).querySelector(
|
||||
'.zen-workspace-pinned-tabs-section'
|
||||
);
|
||||
// New profile with no workspaces does not have a default selected container
|
||||
if (defaultSelectedContainer) {
|
||||
for (const tab of tabs) {
|
||||
if (tab.hasAttribute('zen-essential')) {
|
||||
this.getEssentialsSection(tab).appendChild(tab);
|
||||
continue;
|
||||
} else if (tab.pinned) {
|
||||
pinnedContainer.insertBefore(tab, pinnedContainer.lastChild);
|
||||
continue;
|
||||
}
|
||||
// before to the last child (perifery)
|
||||
defaultSelectedContainer.insertBefore(tab, defaultSelectedContainer.lastChild);
|
||||
}
|
||||
}
|
||||
gBrowser.tabContainer._invalidateCachedTabs();
|
||||
}
|
||||
perifery.setAttribute('hidden', 'true');
|
||||
this._hasInitializedTabsStrip = true;
|
||||
this.registerPinnedResizeObserver();
|
||||
this._fixIndicatorsNames(workspaces);
|
||||
this._resolveSectionsInitialized();
|
||||
resolve();
|
||||
}, 0);
|
||||
});
|
||||
}
|
||||
|
||||
getEssentialsSection(container = 0) {
|
||||
@@ -915,6 +920,7 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
|
||||
async initializeWorkspaces() {
|
||||
let activeWorkspace = await this.getActiveWorkspace();
|
||||
this.activeWorkspace = activeWorkspace?.uuid;
|
||||
await gZenSessionStore.promiseInitialized;
|
||||
try {
|
||||
if (activeWorkspace) {
|
||||
window.gZenThemePicker = new nsZenThemePicker();
|
||||
@@ -2654,7 +2660,7 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
|
||||
await this.changeWorkspace(nextWorkspace, { whileScrolling });
|
||||
}
|
||||
|
||||
#initializeWorkspaceTabContextMenus() {
|
||||
_initializeWorkspaceTabContextMenus() {
|
||||
if (this.privateWindowOrDisabled) {
|
||||
const commandsToDisable = [
|
||||
'cmd_zenOpenFolderCreation',
|
||||
|
@@ -48,6 +48,10 @@
|
||||
|
||||
&:is(img) {
|
||||
padding: 6px;
|
||||
|
||||
:root:not([zen-sidebar-expanded='true']) & {
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
&[no-icon='true'] {
|
||||
|
Reference in New Issue
Block a user