mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-30 15:08:40 +00:00
Compare commits
16 Commits
window-syn
...
1.16.2b
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2abba4d266 | ||
![]() |
32944f1548 | ||
![]() |
a7f853e0f0 | ||
![]() |
e59c73ae53 | ||
![]() |
d9bc654fc7 | ||
![]() |
bc5e4eb48f | ||
![]() |
028b7d35db | ||
![]() |
a091751e09 | ||
![]() |
cc8dfc693b | ||
![]() |
9a1c466368 | ||
![]() |
88f26d8829 | ||
![]() |
b0d0a79fc5 | ||
![]() |
3146ec1c3b | ||
![]() |
19fbed782d | ||
![]() |
b1d6e0eb21 | ||
![]() |
47181da49e |
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@@ -266,9 +266,11 @@ jobs:
|
||||
|
||||
- name: Compress
|
||||
run: |
|
||||
cd engine
|
||||
tar --use-compress-program=zstd -hcf ../zen.source.tar.zst *
|
||||
cd ..
|
||||
tar \
|
||||
--exclude='./.git' \
|
||||
--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 } 嗎?此操錯無法復原。
|
||||
|
@@ -3,8 +3,7 @@
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
- name: browser.startup.page
|
||||
value: 0
|
||||
locked: true
|
||||
value: 3
|
||||
|
||||
- name: browser.sessionstore.restore_pinned_tabs_on_demand
|
||||
value: true
|
||||
|
@@ -53,9 +53,6 @@
|
||||
- name: browser.formfill.enable
|
||||
value: false
|
||||
|
||||
- name: network.IDN_show_punycode
|
||||
value: true
|
||||
|
||||
- name: browser.urlbar.suggest.topsites
|
||||
value: true
|
||||
locked: true
|
||||
|
@@ -58,4 +58,3 @@
|
||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenDownloadAnimation.mjs"></script>
|
||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenEmojiPicker.mjs"></script>
|
||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenWorkspaceCreation.mjs"></script>
|
||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenWindowSyncing.mjs"></script>
|
||||
|
@@ -42,7 +42,6 @@
|
||||
content/browser/zen-components/ZenWorkspaceIcons.mjs (../../zen/workspaces/ZenWorkspaceIcons.mjs)
|
||||
content/browser/zen-components/ZenWorkspace.mjs (../../zen/workspaces/ZenWorkspace.mjs)
|
||||
content/browser/zen-components/ZenWorkspaces.mjs (../../zen/workspaces/ZenWorkspaces.mjs)
|
||||
content/browser/zen-components/ZenWindowSyncing.mjs (../../zen/workspaces/ZenWindowSyncing.mjs)
|
||||
content/browser/zen-components/ZenWorkspaceCreation.mjs (../../zen/workspaces/ZenWorkspaceCreation.mjs)
|
||||
content/browser/zen-components/ZenWorkspacesStorage.mjs (../../zen/workspaces/ZenWorkspacesStorage.mjs)
|
||||
content/browser/zen-components/ZenWorkspacesSync.mjs (../../zen/workspaces/ZenWorkspacesSync.mjs)
|
||||
|
13
src/browser/components/tabbrowser/TabsList-sys-mjs.patch
Normal file
13
src/browser/components/tabbrowser/TabsList-sys-mjs.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/browser/components/tabbrowser/TabsList.sys.mjs b/browser/components/tabbrowser/TabsList.sys.mjs
|
||||
index 97990af166b63cae4b0343c77da5084850890504..b58d20eb3db82867030292625d45277afce1bbea 100644
|
||||
--- a/browser/components/tabbrowser/TabsList.sys.mjs
|
||||
+++ b/browser/components/tabbrowser/TabsList.sys.mjs
|
||||
@@ -87,7 +87,7 @@ class TabsListBase {
|
||||
/** @type {function(MozTabbrowserTab):boolean} */
|
||||
this.filterFn = onlyHiddenTabs
|
||||
? tab => filterFn(tab) && tab.hidden
|
||||
- : filterFn;
|
||||
+ : tab => !tab.hasAttribute("zen-empty-tab") && filterFn(tab);
|
||||
/** @type {Element} */
|
||||
this.containerNode = containerNode;
|
||||
/** @type {Element|null} */
|
@@ -1,12 +1,12 @@
|
||||
diff --git a/browser/components/urlbar/UrlbarController.sys.mjs b/browser/components/urlbar/UrlbarController.sys.mjs
|
||||
index 36e3ab4a5a153230bb488b66dda7e3e7c763ca23..81f2944b939ac0963c129f86aab0b55817349401 100644
|
||||
index 36e3ab4a5a153230bb488b66dda7e3e7c763ca23..cc4ea61914a316451fa54b01a5c8c6a305e4038a 100644
|
||||
--- a/browser/components/urlbar/UrlbarController.sys.mjs
|
||||
+++ b/browser/components/urlbar/UrlbarController.sys.mjs
|
||||
@@ -434,6 +434,8 @@ export class UrlbarController {
|
||||
});
|
||||
}
|
||||
event.preventDefault();
|
||||
+ } else {
|
||||
+ } else if (!this.input.value && !(event.ctrlKey || event.altKey || event.shiftKey)) {
|
||||
+ this.browserWindow.gZenUIManager.enableCommandsMode(event);
|
||||
}
|
||||
break;
|
||||
|
@@ -0,0 +1,12 @@
|
||||
diff --git a/browser/components/urlbar/UrlbarProvidersManager.sys.mjs b/browser/components/urlbar/UrlbarProvidersManager.sys.mjs
|
||||
index 555273f6ea1efd77aa3062b9910bbfe28568775d..5c4a46c926913ab592f5e12908b8817410abe6b6 100644
|
||||
--- a/browser/components/urlbar/UrlbarProvidersManager.sys.mjs
|
||||
+++ b/browser/components/urlbar/UrlbarProvidersManager.sys.mjs
|
||||
@@ -716,6 +716,7 @@ export class Query {
|
||||
if (
|
||||
result.heuristic &&
|
||||
this.context.searchMode &&
|
||||
+ !(this.context.searchMode.source === lazy.UrlbarUtils.RESULT_SOURCE.ZEN_ACTIONS && result.payload?.zenAction) &&
|
||||
(!this.context.trimmedSearchString ||
|
||||
(!this.context.searchMode.engineName && !result.autofill))
|
||||
) {
|
@@ -215,8 +215,10 @@ var gZenUIManager = {
|
||||
!el.contains(showEvent.explicitOriginalTarget) ||
|
||||
(showEvent.explicitOriginalTarget instanceof Element &&
|
||||
showEvent.explicitOriginalTarget?.closest('panel')) ||
|
||||
// See bug #7590: Ignore menupopup elements opening
|
||||
showEvent.explicitOriginalTarget.tagName === 'menupopup'
|
||||
// See bug #7590: Ignore menupopup elements opening.
|
||||
// Also see #10612 for the exclusion of the zen-appcontent-navbar-wrapper
|
||||
(showEvent.explicitOriginalTarget.tagName === 'menupopup' &&
|
||||
el.id !== 'zen-appcontent-navbar-wrapper')
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
@@ -260,7 +262,7 @@ var gZenUIManager = {
|
||||
gURLBar.removeAttribute('animate-searchmode');
|
||||
delete this._animatingSearchModeTimeout;
|
||||
});
|
||||
}, 700);
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@@ -103,10 +103,15 @@
|
||||
/* Mark: URL Bar */
|
||||
@keyframes zen-urlbar-searchmode {
|
||||
0% {
|
||||
box-shadow: 0 0 20px color-mix(in srgb, var(--zen-primary-color), var(--toolbox-textcolor) 20%);
|
||||
box-shadow: 0 0 20px
|
||||
color-mix(
|
||||
in srgb,
|
||||
color-mix(in srgb, var(--zen-primary-color), var(--toolbox-textcolor) 20%),
|
||||
light-dark(rgba(0, 0, 0, 0.3), transparent) 50%
|
||||
);
|
||||
}
|
||||
|
||||
100% {
|
||||
box-shadow: 0 0 300px color-mix(in srgb, var(--zen-primary-color), transparent 100%);
|
||||
box-shadow: 0 0 250px color-mix(in srgb, var(--zen-primary-color), transparent 100%);
|
||||
}
|
||||
}
|
||||
|
@@ -172,8 +172,8 @@
|
||||
|
||||
& .urlbar-background {
|
||||
--zen-urlbar-background-base: light-dark(
|
||||
white,
|
||||
color-mix(in srgb, hsl(0, 0%, 1%), var(--zen-colors-primary) 25%)
|
||||
#fbfbfb,
|
||||
color-mix(in srgb, hsl(0, 0%, 1%), var(--zen-colors-primary) 30%)
|
||||
);
|
||||
@media -moz-pref('zen.theme.acrylic-elements') {
|
||||
--zen-urlbar-background-transparent: color-mix(
|
||||
@@ -186,7 +186,7 @@
|
||||
--zen-urlbar-background-transparent,
|
||||
var(--zen-urlbar-background-base)
|
||||
) !important;
|
||||
box-shadow: 0px 0px 90px -10px light-dark(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.75)) !important;
|
||||
box-shadow: 0px 30px 140px -15px light-dark(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6)) !important;
|
||||
backdrop-filter: none !important;
|
||||
outline: 0.5px solid light-dark(rgba(0, 0, 0, 0.2), rgba(255, 255, 255, 0.2)) !important;
|
||||
outline-offset: var(--zen-urlbar-outline-offset) !important;
|
||||
@@ -208,7 +208,7 @@
|
||||
height: 100%;
|
||||
border-radius: inherit;
|
||||
pointer-events: none;
|
||||
animation: zen-urlbar-searchmode ease-out 0.7s forwards;
|
||||
animation: zen-urlbar-searchmode ease-out 1s forwards;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -678,4 +678,5 @@
|
||||
|
||||
#urlbar-search-mode-indicator-title {
|
||||
font-weight: 600;
|
||||
padding: 0px;
|
||||
}
|
||||
|
@@ -43,7 +43,8 @@ body > #confetti {
|
||||
}
|
||||
|
||||
/* Firefox View */
|
||||
#firefox-view-button {
|
||||
#firefox-view-button,
|
||||
#wrapper-firefox-view-button {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -1,27 +0,0 @@
|
||||
// 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/.
|
||||
|
||||
const FILE_NAME = 'zen-sessions.jsonlz4';
|
||||
|
||||
export class nsZenSessionFile {
|
||||
#path;
|
||||
|
||||
#windows;
|
||||
|
||||
constructor() {
|
||||
this.#path = PathUtils.join(profileDir, FILE_NAME);
|
||||
}
|
||||
|
||||
async read() {
|
||||
try {
|
||||
return await IOUtils.readJSON(this.#path, { compress: true });
|
||||
} catch (e) {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
async write(data) {
|
||||
await IOUtils.writeJSON(this.#path, data, { compress: true });
|
||||
}
|
||||
}
|
@@ -1,50 +0,0 @@
|
||||
// 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 {
|
||||
cancelIdleCallback,
|
||||
clearTimeout,
|
||||
requestIdleCallback,
|
||||
setTimeout,
|
||||
} from 'resource://gre/modules/Timer.sys.mjs';
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
ZenSessionFile: 'resource://gre/modules/ZenSessionFile.sys.mjs',
|
||||
PrivateBrowsingUtils: 'resource://gre/modules/PrivateBrowsingUtils.sys.mjs',
|
||||
RunState: 'resource:///modules/sessionstore/RunState.sys.mjs',
|
||||
});
|
||||
|
||||
class nsZenSessionManager {
|
||||
#file;
|
||||
|
||||
constructor() {
|
||||
this.#file = null;
|
||||
}
|
||||
|
||||
get file() {
|
||||
if (!this.#file) {
|
||||
this.#file = lazy.ZenSessionFile;
|
||||
}
|
||||
return this.#file;
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the current session state. Collects data and writes to disk.
|
||||
*
|
||||
* @param forceUpdateAllWindows (optional)
|
||||
* Forces us to recollect data for all windows and will bypass and
|
||||
* update the corresponding caches.
|
||||
*/
|
||||
saveState(forceUpdateAllWindows = false) {
|
||||
if (lazy.PrivateBrowsingUtils.permanentPrivateBrowsing) {
|
||||
// Don't save (or even collect) anything in permanent private
|
||||
// browsing mode
|
||||
return Promise.resolve();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const ZenSessionStore = new nsZenSessionManager();
|
@@ -1,35 +0,0 @@
|
||||
// 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/.
|
||||
|
||||
export class ZenSessionWindow {
|
||||
#id;
|
||||
#selectedWorkspace;
|
||||
#selectedTab;
|
||||
|
||||
constructor(id) {
|
||||
this.#id = id;
|
||||
this.#selectedWorkspace = null;
|
||||
this.#selectedTab = null;
|
||||
}
|
||||
|
||||
get id() {
|
||||
return this.#id;
|
||||
}
|
||||
|
||||
get selectedWorkspace() {
|
||||
return this.#selectedWorkspace;
|
||||
}
|
||||
|
||||
set selectedWorkspace(workspace) {
|
||||
this.#selectedWorkspace = workspace;
|
||||
}
|
||||
|
||||
get selectedTab() {
|
||||
return this.#selectedTab;
|
||||
}
|
||||
|
||||
set selectedTab(tab) {
|
||||
this.#selectedTab = tab;
|
||||
}
|
||||
}
|
@@ -97,7 +97,6 @@
|
||||
}
|
||||
|
||||
onTabIconChanged(tab, url = null) {
|
||||
tab.dispatchEvent(new CustomEvent('ZenTabIconChanged', { bubbles: true, detail: { tab } }));
|
||||
const iconUrl = url ?? tab.iconImage.src;
|
||||
if (!iconUrl && tab.hasAttribute('zen-pin-id')) {
|
||||
try {
|
||||
@@ -1512,7 +1511,6 @@
|
||||
}
|
||||
|
||||
async onTabLabelChanged(tab) {
|
||||
tab.dispatchEvent(new CustomEvent('ZenTabLabelChanged', { detail: { tab } }));
|
||||
if (!this._pinsCache) {
|
||||
return;
|
||||
}
|
||||
|
@@ -15,7 +15,7 @@ const DYNAMIC_TYPE_NAME = 'zen-actions';
|
||||
const MAX_RECENT_ACTIONS = 5;
|
||||
|
||||
const MINIMUM_QUERY_SCORE = 92;
|
||||
const MINIMUM_PREFIXED_QUERY_SCORE = 50;
|
||||
const MINIMUM_PREFIXED_QUERY_SCORE = 30;
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
UrlbarResult: 'resource:///modules/UrlbarResult.sys.mjs',
|
||||
@@ -242,15 +242,15 @@ export class ZenUrlbarProviderGlobalActions extends UrlbarProvider {
|
||||
}
|
||||
|
||||
const ownerGlobal = lazy.BrowserWindowTracker.getTopWindow();
|
||||
const finalResults = [];
|
||||
let finalResults = [];
|
||||
for (const action of actionsResults) {
|
||||
const [payload, payloadHighlights] = lazy.UrlbarResult.payloadAndSimpleHighlights([], {
|
||||
suggestion: action.label,
|
||||
title: action.label,
|
||||
query: queryContext.searchString,
|
||||
zenCommand: action.command,
|
||||
dynamicType: DYNAMIC_TYPE_NAME,
|
||||
zenAction: true,
|
||||
query: isPrefixed ? action.label.trimStart() : queryContext.searchString,
|
||||
icon: action.icon,
|
||||
shortcutContent: ownerGlobal.gZenKeyboardShortcutsManager.getShortcutDisplayFromCommand(
|
||||
action.command
|
||||
@@ -265,7 +265,7 @@ export class ZenUrlbarProviderGlobalActions extends UrlbarProvider {
|
||||
payload,
|
||||
payloadHighlights
|
||||
);
|
||||
if (zenUrlbarResultsLearner.shouldPrioritize(action.commandId)) {
|
||||
if (zenUrlbarResultsLearner.shouldPrioritize(action.commandId) && !isPrefixed) {
|
||||
result.heuristic = true;
|
||||
} else {
|
||||
result.suggestedIndex = zenUrlbarResultsLearner.getDeprioritizeIndex(action.commandId);
|
||||
@@ -278,8 +278,14 @@ export class ZenUrlbarProviderGlobalActions extends UrlbarProvider {
|
||||
}
|
||||
finalResults.push(result);
|
||||
}
|
||||
let i = 0;
|
||||
zenUrlbarResultsLearner.sortCommandsByPriority(finalResults).forEach((result) => {
|
||||
if (isPrefixed && i === 0 && query.length > 1) {
|
||||
result.heuristic = true;
|
||||
delete result.suggestedIndex;
|
||||
}
|
||||
addCallback(this, result);
|
||||
i++;
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -37,16 +37,16 @@ const globalActionsTemplate = [
|
||||
command: (window) => window.openPreferences(),
|
||||
icon: 'chrome://browser/skin/zen-icons/settings.svg',
|
||||
},
|
||||
{
|
||||
label: 'Open New Window',
|
||||
command: 'cmd_newNavigator',
|
||||
icon: 'chrome://browser/skin/zen-icons/window.svg',
|
||||
},
|
||||
{
|
||||
label: 'Open Private Window',
|
||||
command: 'Tools:PrivateBrowsing',
|
||||
icon: 'chrome://browser/skin/zen-icons/private-window.svg',
|
||||
},
|
||||
{
|
||||
label: 'Open New Window',
|
||||
command: 'cmd_newNavigator',
|
||||
icon: 'chrome://browser/skin/zen-icons/window.svg',
|
||||
},
|
||||
{
|
||||
label: 'Pin Tab',
|
||||
command: 'cmd_zenTogglePinTab',
|
||||
|
@@ -7,7 +7,7 @@ import { XPCOMUtils } from 'resource://gre/modules/XPCOMUtils.sys.mjs';
|
||||
const lazy = {};
|
||||
|
||||
const DEFAULT_DB_DATA = '{}';
|
||||
const DEPRIORITIZE_MAX = -4;
|
||||
const DEPRIORITIZE_MAX = -5;
|
||||
const PRIORITIZE_MAX = 5;
|
||||
|
||||
function addDataToLazy(data) {
|
||||
|
@@ -1,308 +0,0 @@
|
||||
// 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/.
|
||||
{
|
||||
class nsZenWorkspaceWindowSync extends nsZenMultiWindowFeature {
|
||||
#ignoreNextEvents = false;
|
||||
#waitForPromise = null;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
if (!window.closed) {
|
||||
this.init();
|
||||
}
|
||||
}
|
||||
|
||||
async init() {
|
||||
await gZenWorkspaces.promiseInitialized;
|
||||
this.#makeSureAllTabsHaveIds();
|
||||
this.#setUpEventListeners();
|
||||
}
|
||||
|
||||
#makeSureAllTabsHaveIds() {
|
||||
const allTabs = gZenWorkspaces.allStoredTabs;
|
||||
for (const tab of allTabs) {
|
||||
if (!tab.hasAttribute('zen-sync-id') && !tab.hasAttribute('zen-empty-tab')) {
|
||||
const tabId = gZenUIManager.generateUuidv4();
|
||||
tab.setAttribute('zen-sync-id', tabId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#setUpEventListeners() {
|
||||
const kEvents = [
|
||||
'TabClose',
|
||||
'TabOpen',
|
||||
'TabMove',
|
||||
|
||||
'TabPinned',
|
||||
'TabUnpinned',
|
||||
|
||||
'TabAddedToEssentials',
|
||||
'TabRemovedFromEssentials',
|
||||
|
||||
'TabHide',
|
||||
'TabShow',
|
||||
|
||||
'ZenTabIconChanged',
|
||||
'ZenTabLabelChanged',
|
||||
|
||||
'TabGroupCreate',
|
||||
'TabGroupRemoved',
|
||||
'TabGrouped',
|
||||
'TabUngrouped',
|
||||
'TabGroupMoved',
|
||||
];
|
||||
const eventListener = this.#handleEvent.bind(this);
|
||||
for (const event of kEvents) {
|
||||
window.addEventListener(event, eventListener);
|
||||
}
|
||||
|
||||
window.addEventListener('unload', () => {
|
||||
for (const event of kEvents) {
|
||||
window.removeEventListener(event, eventListener);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
#handleEvent(event) {
|
||||
this.#propagateToOtherWindows(event);
|
||||
}
|
||||
|
||||
async #propagateToOtherWindows(event) {
|
||||
if (this.#ignoreNextEvents) {
|
||||
return;
|
||||
}
|
||||
if (this.#waitForPromise) {
|
||||
await this.#waitForPromise;
|
||||
}
|
||||
this.#waitForPromise = new Promise((resolve) => {
|
||||
this.foreachWindowAsActive(async (browser) => {
|
||||
if (browser.gZenWorkspaceWindowSync && !this.windowIsActive(browser)) {
|
||||
await browser.gZenWorkspaceWindowSync.onExternalTabEvent(event);
|
||||
}
|
||||
}).then(() => {
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async onExternalTabEvent(event) {
|
||||
this.#ignoreNextEvents = true;
|
||||
switch (event.type) {
|
||||
case 'TabClose':
|
||||
this.#onTabClose(event);
|
||||
break;
|
||||
case 'TabOpen':
|
||||
await this.#onTabOpen(event);
|
||||
break;
|
||||
case 'TabPinned':
|
||||
this.#onTabPinned(event);
|
||||
break;
|
||||
case 'TabUnpinned':
|
||||
this.#onTabUnpinned(event);
|
||||
break;
|
||||
case 'TabAddedToEssentials':
|
||||
this.#onTabAddedToEssentials(event);
|
||||
break;
|
||||
case 'TabRemovedFromEssentials':
|
||||
this.#onTabRemovedFromEssentials(event);
|
||||
break;
|
||||
case 'TabHide':
|
||||
this.#onTabHide(event);
|
||||
break;
|
||||
case 'TabShow':
|
||||
this.#onTabShow(event);
|
||||
break;
|
||||
case 'TabMove':
|
||||
case 'TabGroupMoved':
|
||||
this.#onTabMove(event);
|
||||
break;
|
||||
case 'ZenTabIconChanged':
|
||||
this.#onTabIconChanged(event);
|
||||
break;
|
||||
case 'ZenTabLabelChanged':
|
||||
this.#onTabLabelChanged(event);
|
||||
break;
|
||||
case 'TabGroupCreate':
|
||||
this.#onTabGroupCreate(event);
|
||||
break;
|
||||
case 'TabGroupRemoved':
|
||||
case 'TabGrouped':
|
||||
case 'TabUngrouped':
|
||||
// Tab grouping changes are automatically synced by Firefox
|
||||
break;
|
||||
default:
|
||||
console.warn(`Unhandled event type: ${event.type}`);
|
||||
break;
|
||||
}
|
||||
this.#ignoreNextEvents = false;
|
||||
}
|
||||
|
||||
#getTabId(tab) {
|
||||
return tab.getAttribute('zen-sync-id');
|
||||
}
|
||||
|
||||
#getTabWithId(tabId) {
|
||||
for (const tab of gZenWorkspaces.allStoredTabs) {
|
||||
if (this.#getTabId(tab) === tabId) {
|
||||
return tab;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
#onTabClose(event) {
|
||||
const targetTab = event.target;
|
||||
const tabId = this.#getTabId(targetTab);
|
||||
const tabToClose = this.#getTabWithId(tabId);
|
||||
if (tabToClose) {
|
||||
gBrowser.removeTab(tabToClose);
|
||||
}
|
||||
}
|
||||
|
||||
#onTabPinned(event) {
|
||||
const targetTab = event.target;
|
||||
if (targetTab.hasAttribute('zen-essential')) {
|
||||
return this.#onTabAddedToEssentials(event);
|
||||
}
|
||||
const tabId = this.#getTabId(targetTab);
|
||||
const elementIndex = targetTab.elementIndex;
|
||||
const tabToPin = this.#getTabWithId(tabId);
|
||||
if (tabToPin) {
|
||||
gBrowser.pinTab(tabToPin);
|
||||
gBrowser.moveTabTo(tabToPin, { elementIndex, forceUngrouped: !!targetTab.group });
|
||||
}
|
||||
}
|
||||
|
||||
#onTabUnpinned(event) {
|
||||
const targetTab = event.target;
|
||||
const tabId = this.#getTabId(targetTab);
|
||||
const tabToUnpin = this.#getTabWithId(tabId);
|
||||
if (tabToUnpin) {
|
||||
gBrowser.unpinTab(tabToUnpin);
|
||||
}
|
||||
}
|
||||
|
||||
#onTabIconChanged(event) {
|
||||
this.#updateTabIconAndLabel(event);
|
||||
}
|
||||
|
||||
#onTabLabelChanged(event) {
|
||||
this.#updateTabIconAndLabel(event);
|
||||
}
|
||||
|
||||
#updateTabIconAndLabel(event) {
|
||||
const targetTab = event.target;
|
||||
const tabId = this.#getTabId(targetTab);
|
||||
const tabToChange = this.#getTabWithId(tabId);
|
||||
if (tabToChange && tabToChange.hasAttribute('pending')) {
|
||||
gBrowser.setIcon(tabToChange, gBrowser.getIcon(targetTab));
|
||||
gBrowser._setTabLabel(tabToChange, targetTab.label);
|
||||
}
|
||||
}
|
||||
|
||||
#onTabAddedToEssentials(event) {
|
||||
const targetTab = event.target;
|
||||
const tabId = this.#getTabId(targetTab);
|
||||
const tabToAdd = this.#getTabWithId(tabId);
|
||||
if (tabToAdd) {
|
||||
gZenPinnedTabManager.addToEssentials(tabToAdd);
|
||||
}
|
||||
}
|
||||
|
||||
#onTabRemovedFromEssentials(event) {
|
||||
const targetTab = event.target;
|
||||
const tabId = this.#getTabId(targetTab);
|
||||
const tabToRemove = this.#getTabWithId(tabId);
|
||||
if (tabToRemove) {
|
||||
gZenPinnedTabManager.removeFromEssentials(tabToRemove);
|
||||
}
|
||||
}
|
||||
|
||||
#onTabHide(event) {
|
||||
const targetTab = event.target;
|
||||
const tabId = this.#getTabId(targetTab);
|
||||
const tabToHide = this.#getTabWithId(tabId);
|
||||
if (tabToHide) {
|
||||
gBrowser.hideTab(tabToHide);
|
||||
}
|
||||
}
|
||||
|
||||
#onTabShow(event) {
|
||||
const targetTab = event.target;
|
||||
const tabId = this.#getTabId(targetTab);
|
||||
const tabToShow = this.#getTabWithId(tabId);
|
||||
if (tabToShow) {
|
||||
gBrowser.showTab(tabToShow);
|
||||
}
|
||||
}
|
||||
|
||||
#onTabMove(event) {
|
||||
const targetTab = event.target;
|
||||
const tabId = this.#getTabId(targetTab);
|
||||
const tabToMove = this.#getTabWithId(tabId);
|
||||
const workspaceId = targetTab.getAttribute('zen-workspace-id');
|
||||
const isEssential = targetTab.hasAttribute('zen-essential');
|
||||
if (tabToMove) {
|
||||
let tabSibling = targetTab.previousElementSibling;
|
||||
let isFirst = false;
|
||||
if (!tabSibling?.hasAttribute('zen-sync-id')) {
|
||||
isFirst = true;
|
||||
}
|
||||
gBrowser.zenHandleTabMove(tabToMove, () => {
|
||||
if (isFirst) {
|
||||
let container;
|
||||
if (isEssential) {
|
||||
container = gZenWorkspaces.getEssentialsSection(tabToMove);
|
||||
} else {
|
||||
const workspaceElement = gZenWorkspaces.workspaceElement(workspaceId);
|
||||
container = tabToMove.pinned
|
||||
? workspaceElement.pinnedTabsContainer
|
||||
: workspaceElement.tabsContainer;
|
||||
}
|
||||
container.insertBefore(tabToMove, container.firstChild);
|
||||
} else {
|
||||
let relativeTab = gZenWorkspaces.allStoredTabs.find((tab) => {
|
||||
return this.#getTabId(tab) === this.#getTabId(tabSibling);
|
||||
});
|
||||
if (relativeTab) {
|
||||
relativeTab.after(tabToMove);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
async #onTabOpen(event) {
|
||||
const targetTab = event.target;
|
||||
const isPinned = targetTab.pinned;
|
||||
const isEssential = isPinned && targetTab.hasAttribute('zen-essential');
|
||||
if (!this.#getTabId(targetTab) && !targetTab.hasAttribute('zen-empty-tab')) {
|
||||
const tabId = gZenUIManager.generateUuidv4();
|
||||
targetTab.setAttribute('zen-sync-id', tabId);
|
||||
}
|
||||
const duplicatedTab = gBrowser.addTrustedTab(targetTab.linkedBrowser.currentURI.spec, {
|
||||
createLazyBrowser: true,
|
||||
essential: isEssential,
|
||||
pinned: isPinned,
|
||||
});
|
||||
if (!isEssential) {
|
||||
gZenWorkspaces.moveTabToWorkspace(
|
||||
duplicatedTab,
|
||||
targetTab.getAttribute('zen-workspace-id')
|
||||
);
|
||||
}
|
||||
duplicatedTab.setAttribute('zen-pin-id', targetTab.getAttribute('zen-pin-id'));
|
||||
duplicatedTab.setAttribute('zen-sync-id', targetTab.getAttribute('zen-sync-id'));
|
||||
}
|
||||
|
||||
#onTabGroupCreate(event) {
|
||||
const targetGroup = event.target;
|
||||
const isSplitView = targetGroup.classList.contains('zen-split-view');
|
||||
const isFolder = targetGroup.isZenFolder;
|
||||
}
|
||||
}
|
||||
|
||||
window.gZenWorkspaceWindowSync = new nsZenWorkspaceWindowSync();
|
||||
}
|
@@ -3002,6 +3002,7 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
|
||||
|
||||
onWindowResize(event = undefined) {
|
||||
if (!(!event || event.target === window)) return;
|
||||
gZenUIManager.updateTabsToolbar();
|
||||
// Check if workspace icons overflow the parent container
|
||||
const parent = this.workspaceIcons;
|
||||
if (!parent || this._processingResize) {
|
||||
|
@@ -47,7 +47,7 @@
|
||||
line-height: 0;
|
||||
|
||||
&:is(img) {
|
||||
padding: 6px;
|
||||
width: 14px;
|
||||
}
|
||||
|
||||
&[no-icon='true'] {
|
||||
|
Reference in New Issue
Block a user