mirror of
https://github.com/zen-browser/desktop.git
synced 2026-09-18 10:44:46 +00:00
gh-10577: Add various requested url bar actions (gh-15376)
Co-authored-by: mr. m <91018726+mr-cheffy@users.noreply.github.com> Signed-off-by: Alain Stulz <ast3150@gmail.com>
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
zen-action-toggle-compact-mode = Toggle Compact Mode
|
||||
zen-action-open-theme-picker = Open Theme Picker
|
||||
zen-action-new-split-view = New Split View
|
||||
zen-action-unsplit-view = Expand current view
|
||||
zen-action-new-space = New Space
|
||||
zen-action-new-folder = New Folder
|
||||
zen-action-copy-current-url = Copy Current URL
|
||||
zen-action-settings = Settings
|
||||
@@ -18,6 +20,9 @@ zen-action-new-boost = New Boost
|
||||
zen-action-next-space = Next Space
|
||||
zen-action-previous-space = Previous Space
|
||||
zen-action-close-tab = Close Tab
|
||||
zen-action-reopen-closed-tab = Reopen Closed Tab
|
||||
zen-action-duplicate-tab = Duplicate Current Tab
|
||||
zen-action-reset-pinned-tab = Reset Pinned Tab
|
||||
zen-action-reload-tab = Reload Tab
|
||||
zen-action-reload-tab-without-cache = Reload Tab Without Cache
|
||||
zen-action-next-tab = Next Tab
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
[fxastatus='signedin'] #fxa-avatar-image,
|
||||
#profile-icon-image,
|
||||
.appMenu-update-banner-pulse-ring,
|
||||
.urlbarView-favicon,
|
||||
:is(#appMenu-zoomReduce-button2, #appMenu-zoomEnlarge-button2) > .toolbarbutton-icon,
|
||||
.color-swatches .userContext-icon,
|
||||
.reusable-relay-masks > button,
|
||||
|
||||
@@ -3033,8 +3033,7 @@ class nsZenWorkspaces {
|
||||
tabWorkspaceId,
|
||||
containerId,
|
||||
this._workspaceCache
|
||||
) &&
|
||||
!tab.hasAttribute("zen-empty-tab")
|
||||
) && !tab.hasAttribute("zen-empty-tab")
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,11 @@ ChromeUtils.defineLazyGetter(lazy, "l10n", () => {
|
||||
return new Localization(["browser/zen-command-palette.ftl"], true);
|
||||
});
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
SessionStore:
|
||||
"moz-src:///browser/components/sessionstore/SessionStore.sys.mjs",
|
||||
});
|
||||
|
||||
function isNotEmptyTab(window) {
|
||||
return !window.gBrowser.selectedTab.hasAttribute("zen-empty-tab");
|
||||
}
|
||||
@@ -37,6 +42,19 @@ const globalActionsTemplate = [
|
||||
command: "cmd_zenNewEmptySplit",
|
||||
icon: "chrome://browser/skin/zen-icons/split.svg",
|
||||
},
|
||||
{
|
||||
l10nId: "zen-action-unsplit-view",
|
||||
command: "cmd_zenSplitViewUnsplit",
|
||||
icon: "chrome://browser/skin/zen-icons/split.svg",
|
||||
isAvailable: window => {
|
||||
return window.gZenViewSplitter.splitViewActive;
|
||||
},
|
||||
},
|
||||
{
|
||||
l10nId: "zen-action-new-space",
|
||||
command: "cmd_zenOpenWorkspaceCreation",
|
||||
icon: "chrome://browser/skin/zen-icons/plus.svg",
|
||||
},
|
||||
{
|
||||
l10nId: "zen-action-new-folder",
|
||||
command: "cmd_zenOpenFolderCreation",
|
||||
@@ -158,6 +176,31 @@ const globalActionsTemplate = [
|
||||
return isNotEmptyTab(window);
|
||||
},
|
||||
},
|
||||
{
|
||||
l10nId: "zen-action-reopen-closed-tab",
|
||||
command: "History:RestoreLastClosedTabOrWindowOrSession",
|
||||
icon: "chrome://browser/skin/zen-icons/history.svg",
|
||||
isAvailable: window => {
|
||||
return lazy.SessionStore.getClosedTabCount(window) > 0;
|
||||
},
|
||||
},
|
||||
{
|
||||
l10nId: "zen-action-duplicate-tab",
|
||||
command: "cmd_zenDuplicateTab",
|
||||
icon: "chrome://browser/skin/zen-icons/duplicate-tab.svg",
|
||||
isAvailable: window => {
|
||||
return isNotEmptyTab(window);
|
||||
},
|
||||
},
|
||||
{
|
||||
l10nId: "zen-action-reset-pinned-tab",
|
||||
command: "cmd_zenPinnedTabReset",
|
||||
icon: "chrome://browser/skin/zen-icons/arrow-rotate-anticlockwise.svg",
|
||||
isAvailable: window => {
|
||||
const tab = window.gBrowser.selectedTab;
|
||||
return tab.pinned && tab.hasAttribute("zen-pinned-changed");
|
||||
},
|
||||
},
|
||||
{
|
||||
l10nId: "zen-action-reload-tab",
|
||||
command: "Browser:Reload",
|
||||
|
||||
Reference in New Issue
Block a user