mirror of
https://github.com/zen-browser/desktop.git
synced 2025-11-19 16:51:07 +00:00
Merge branch 'dev' of https://github.com/zen-browser/desktop into dev
This commit is contained in:
@@ -45,9 +45,9 @@ pane-settings-workspaces-title = Ruang Kerja
|
||||
zen-tabs-unloader-enabled =
|
||||
.label = Aktifkan Pelepas Tab
|
||||
zen-tabs-close-on-back-with-no-history =
|
||||
.label = Close tab and switch to its owner tab (or most recently used tab) when going back with no history
|
||||
.label = Tutup tab dan beralih ke tab pemiliknya (atau tab yang terakhir digunakan) saat kembali tanpa riwayat
|
||||
zen-tabs-cycle-by-attribute =
|
||||
.label = Ctrl+Tab cycles within Essential or Workspace tabs only
|
||||
.label = Ctrl+Tab berputar hanya dalam tab Esensial atau Ruang Kerja
|
||||
zen-tabs-cycle-ignore-pending-tabs =
|
||||
.label = Ignore Pending tabs when cycling with Ctrl+Tab
|
||||
zen-tabs-cycle-by-attribute-warning = Ctrl+Tab will cycle by recently used order, as it is enabled
|
||||
@@ -311,4 +311,4 @@ zen-devtools-toggle-performance-shortcut = Ubah Performance
|
||||
zen-devtools-toggle-storage-shortcut = Ubah Penyimpanan
|
||||
zen-devtools-toggle-dom-shortcut = Ubah DOM
|
||||
zen-devtools-toggle-accessibility-shortcut = Ubah Aksesibilitas
|
||||
zen-close-all-unpinned-tabs-shortcut = Close All Unpinned Tabs
|
||||
zen-close-all-unpinned-tabs-shortcut = Tutup Semua Tab yang Tidak Disematkan
|
||||
|
||||
@@ -8,9 +8,9 @@ tab-context-zen-reset-pinned-tab =
|
||||
.label = Kembalikan ke URL Awal
|
||||
.accesskey = R
|
||||
tab-context-zen-add-essential =
|
||||
.label = Add to Essentials
|
||||
.label = Tambahkan ke Essentials
|
||||
.accesskey = E
|
||||
tab-context-zen-add-essential-badge = { $num } / { $max } slots filled
|
||||
tab-context-zen-add-essential-badge = { $num } / { $max } slot terisi
|
||||
tab-context-zen-remove-essential =
|
||||
.label = Hapus dari Essentials
|
||||
.accesskey = R
|
||||
@@ -96,5 +96,5 @@ zen-site-data-setting-site-protection = Perlindungan Pelacakan
|
||||
zen-site-data-panel-feature-callout-title = Rumah baru untuk add-on, izin, dan lainnya
|
||||
zen-site-data-panel-feature-callout-subtitle = Klik ikon untuk mengelola pengaturan situs, melihat info keamanan, mengakses ekstensi, dan melakukan tindakan umum.
|
||||
zen-open-link-in-glance =
|
||||
.label = Open Link in Glance
|
||||
.label = Buka Tautan di Glance
|
||||
.accesskey = G
|
||||
|
||||
@@ -59,7 +59,7 @@ zen-workspaces-delete-workspace-title = Delete Workspace?
|
||||
zen-workspaces-delete-workspace-body = Apakah Anda yakin ingin menghapus { $name }? Tindakan ini tidak bisa dibatalkan.
|
||||
# Note that the html tag MUST not be changed or removed, as it is used to better
|
||||
# display the shortcut in the toast notification.
|
||||
zen-workspaces-close-all-unpinned-tabs-toast = Tabs Closed! Use <span>{ $shortcut }</span> to undo.
|
||||
zen-workspaces-close-all-unpinned-tabs-toast = Tab Ditutup! Gunakan <span>{ $shortcut }</span> untuk membatalkan.
|
||||
zen-workspaces-close-all-unpinned-tabs-title =
|
||||
.label = Clear
|
||||
.tooltiptext = Close all unpinned tabs
|
||||
.label = Bersihkan
|
||||
.tooltiptext = Tutup semua tab yang tidak disematkan
|
||||
|
||||
@@ -43,11 +43,8 @@
|
||||
- name: zen.view.drag-and-drop.move-over-threshold
|
||||
value: 70
|
||||
|
||||
- name: zen.view.drag-and-drop.drop-inside-upper-threshold
|
||||
value: 80
|
||||
|
||||
- name: zen.view.drag-and-drop.drop-inside-lower-threshold
|
||||
value: 30
|
||||
- name: zen.view.drag-and-drop.edge-zone-threshold
|
||||
value: 25
|
||||
|
||||
- name: zen.view.context-menu.refresh
|
||||
value: false
|
||||
|
||||
@@ -29,9 +29,11 @@
|
||||
return `${month} month${month === 1 ? '' : 's'} ago`;
|
||||
}
|
||||
|
||||
const ZEN_MAX_SUBFOLDERS = Services.prefs.getIntPref('zen.folders.max-subfolders');
|
||||
|
||||
class nsZenFolders extends nsZenDOMOperatedFeature {
|
||||
#ZEN_MAX_SUBFOLDERS = Services.prefs.getIntPref('zen.folders.max-subfolders', 5);
|
||||
#ZEN_EDGE_ZONE_THRESHOLD =
|
||||
Services.prefs.getIntPref('zen.view.drag-and-drop.edge-zone-threshold', 25) / 100;
|
||||
|
||||
#popup = null;
|
||||
#popupTimer = null;
|
||||
#mouseTimer = null;
|
||||
@@ -89,7 +91,7 @@
|
||||
const newSubfolderItem = document.getElementById('context_zenFolderNewSubfolder');
|
||||
newSubfolderItem.setAttribute(
|
||||
'disabled',
|
||||
folder.level >= ZEN_MAX_SUBFOLDERS - 1 ? 'true' : 'false'
|
||||
folder.level >= this.#ZEN_MAX_SUBFOLDERS - 1 ? 'true' : 'false'
|
||||
);
|
||||
|
||||
const changeFolderSpace = document
|
||||
@@ -470,7 +472,7 @@
|
||||
canDropElement(element, targetElement) {
|
||||
const isZenFolder = element?.isZenFolder;
|
||||
const level = targetElement?.group?.level + 1;
|
||||
if (isZenFolder && level >= ZEN_MAX_SUBFOLDERS) {
|
||||
if (isZenFolder && level >= this.#ZEN_MAX_SUBFOLDERS) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -899,7 +901,11 @@
|
||||
const labelContainer = group.querySelector('.tab-group-label-container');
|
||||
// Setup mouseenter/mouseleave events for the folder
|
||||
labelContainer.addEventListener('mouseenter', (event) => {
|
||||
if (!group.collapsed || !Services.prefs.getBoolPref('zen.folders.search.enabled')) {
|
||||
if (
|
||||
!group.collapsed ||
|
||||
!Services.prefs.getBoolPref('zen.folders.search.enabled') ||
|
||||
gBrowser.tabContainer.hasAttribute('movingtab')
|
||||
) {
|
||||
return;
|
||||
}
|
||||
this.#mouseTimer = setTimeout(() => {
|
||||
@@ -1104,7 +1110,8 @@
|
||||
(!folder.hasAttribute('split-view-group') || !folder.hasAttribute('selected')) &&
|
||||
folder !== tab?.group &&
|
||||
!(
|
||||
folder.level >= ZEN_MAX_SUBFOLDERS && movingTabs?.some((t) => gBrowser.isTabGroupLabel(t))
|
||||
folder.level >= this.#ZEN_MAX_SUBFOLDERS &&
|
||||
movingTabs?.some((t) => gBrowser.isTabGroupLabel(t))
|
||||
)
|
||||
) {
|
||||
folder.setAttribute('selected', 'true');
|
||||
@@ -1151,10 +1158,6 @@
|
||||
let dropElement = currentDropElement;
|
||||
let dropBefore = currentDropBefore;
|
||||
let colorCode = currentColorCode;
|
||||
let dragUpThreshold =
|
||||
Services.prefs.getIntPref('zen.view.drag-and-drop.drop-inside-upper-threshold') / 100;
|
||||
let dragDownThreshold =
|
||||
Services.prefs.getIntPref('zen.view.drag-and-drop.drop-inside-lower-threshold') / 100;
|
||||
|
||||
const dropElementGroup = dropElement?.isZenFolder ? dropElement : dropElement?.group;
|
||||
const isSplitGroup = dropElement?.group?.hasAttribute('split-view-group');
|
||||
@@ -1162,26 +1165,17 @@
|
||||
dropElementGroup.querySelector('.zen-tab-group-start').nextElementSibling;
|
||||
if (gBrowser.isTabGroup(firstGroupElem)) firstGroupElem = firstGroupElem.labelElement;
|
||||
|
||||
const isRestrictedGroup = isSplitGroup || dropElementGroup.collapsed;
|
||||
|
||||
const shouldDropInside =
|
||||
!dropBefore &&
|
||||
overlapPercent >= dragDownThreshold &&
|
||||
overlapPercent <= dragUpThreshold &&
|
||||
!isSplitGroup;
|
||||
const shouldDropNear = overlapPercent < dragUpThreshold || overlapPercent > dragDownThreshold;
|
||||
const isInMiddleZone =
|
||||
overlapPercent >= this.#ZEN_EDGE_ZONE_THRESHOLD &&
|
||||
overlapPercent <= 1 - this.#ZEN_EDGE_ZONE_THRESHOLD;
|
||||
const shouldDropInside = isInMiddleZone && !isSplitGroup;
|
||||
|
||||
if (shouldDropInside) {
|
||||
dropElement = firstGroupElem;
|
||||
dropBefore = true;
|
||||
this.highlightGroupOnDragOver(dropElementGroup, movingTabs);
|
||||
} else if (shouldDropNear) {
|
||||
if (dropBefore) {
|
||||
colorCode = undefined;
|
||||
} else if (!isRestrictedGroup) {
|
||||
dropElement = firstGroupElem;
|
||||
dropBefore = true;
|
||||
}
|
||||
} else {
|
||||
colorCode = undefined;
|
||||
this.highlightGroupOnDragOver(null);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user