mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-29 14:38:37 +00:00
Merge branch 'dev' of https://github.com/zen-browser/desktop into dev
This commit is contained in:
@@ -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))
|
||||||
|
) {
|
@@ -260,7 +260,7 @@ var gZenUIManager = {
|
|||||||
gURLBar.removeAttribute('animate-searchmode');
|
gURLBar.removeAttribute('animate-searchmode');
|
||||||
delete this._animatingSearchModeTimeout;
|
delete this._animatingSearchModeTimeout;
|
||||||
});
|
});
|
||||||
}, 700);
|
}, 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@@ -103,10 +103,15 @@
|
|||||||
/* Mark: URL Bar */
|
/* Mark: URL Bar */
|
||||||
@keyframes zen-urlbar-searchmode {
|
@keyframes zen-urlbar-searchmode {
|
||||||
0% {
|
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% {
|
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 {
|
& .urlbar-background {
|
||||||
--zen-urlbar-background-base: light-dark(
|
--zen-urlbar-background-base: light-dark(
|
||||||
white,
|
#fbfbfb,
|
||||||
color-mix(in srgb, hsl(0, 0%, 1%), var(--zen-colors-primary) 25%)
|
color-mix(in srgb, hsl(0, 0%, 1%), var(--zen-colors-primary) 30%)
|
||||||
);
|
);
|
||||||
@media -moz-pref('zen.theme.acrylic-elements') {
|
@media -moz-pref('zen.theme.acrylic-elements') {
|
||||||
--zen-urlbar-background-transparent: color-mix(
|
--zen-urlbar-background-transparent: color-mix(
|
||||||
@@ -186,7 +186,7 @@
|
|||||||
--zen-urlbar-background-transparent,
|
--zen-urlbar-background-transparent,
|
||||||
var(--zen-urlbar-background-base)
|
var(--zen-urlbar-background-base)
|
||||||
) !important;
|
) !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;
|
backdrop-filter: none !important;
|
||||||
outline: 0.5px solid light-dark(rgba(0, 0, 0, 0.2), rgba(255, 255, 255, 0.2)) !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;
|
outline-offset: var(--zen-urlbar-outline-offset) !important;
|
||||||
@@ -208,7 +208,7 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
border-radius: inherit;
|
border-radius: inherit;
|
||||||
pointer-events: none;
|
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 {
|
#urlbar-search-mode-indicator-title {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
@@ -15,7 +15,7 @@ const DYNAMIC_TYPE_NAME = 'zen-actions';
|
|||||||
const MAX_RECENT_ACTIONS = 5;
|
const MAX_RECENT_ACTIONS = 5;
|
||||||
|
|
||||||
const MINIMUM_QUERY_SCORE = 92;
|
const MINIMUM_QUERY_SCORE = 92;
|
||||||
const MINIMUM_PREFIXED_QUERY_SCORE = 50;
|
const MINIMUM_PREFIXED_QUERY_SCORE = 30;
|
||||||
|
|
||||||
ChromeUtils.defineESModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
UrlbarResult: 'resource:///modules/UrlbarResult.sys.mjs',
|
UrlbarResult: 'resource:///modules/UrlbarResult.sys.mjs',
|
||||||
@@ -242,15 +242,15 @@ export class ZenUrlbarProviderGlobalActions extends UrlbarProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const ownerGlobal = lazy.BrowserWindowTracker.getTopWindow();
|
const ownerGlobal = lazy.BrowserWindowTracker.getTopWindow();
|
||||||
const finalResults = [];
|
let finalResults = [];
|
||||||
for (const action of actionsResults) {
|
for (const action of actionsResults) {
|
||||||
const [payload, payloadHighlights] = lazy.UrlbarResult.payloadAndSimpleHighlights([], {
|
const [payload, payloadHighlights] = lazy.UrlbarResult.payloadAndSimpleHighlights([], {
|
||||||
suggestion: action.label,
|
suggestion: action.label,
|
||||||
title: action.label,
|
title: action.label,
|
||||||
query: queryContext.searchString,
|
|
||||||
zenCommand: action.command,
|
zenCommand: action.command,
|
||||||
dynamicType: DYNAMIC_TYPE_NAME,
|
dynamicType: DYNAMIC_TYPE_NAME,
|
||||||
zenAction: true,
|
zenAction: true,
|
||||||
|
query: isPrefixed ? action.label.trimStart() : queryContext.searchString,
|
||||||
icon: action.icon,
|
icon: action.icon,
|
||||||
shortcutContent: ownerGlobal.gZenKeyboardShortcutsManager.getShortcutDisplayFromCommand(
|
shortcutContent: ownerGlobal.gZenKeyboardShortcutsManager.getShortcutDisplayFromCommand(
|
||||||
action.command
|
action.command
|
||||||
@@ -265,7 +265,7 @@ export class ZenUrlbarProviderGlobalActions extends UrlbarProvider {
|
|||||||
payload,
|
payload,
|
||||||
payloadHighlights
|
payloadHighlights
|
||||||
);
|
);
|
||||||
if (zenUrlbarResultsLearner.shouldPrioritize(action.commandId)) {
|
if (zenUrlbarResultsLearner.shouldPrioritize(action.commandId) && !isPrefixed) {
|
||||||
result.heuristic = true;
|
result.heuristic = true;
|
||||||
} else {
|
} else {
|
||||||
result.suggestedIndex = zenUrlbarResultsLearner.getDeprioritizeIndex(action.commandId);
|
result.suggestedIndex = zenUrlbarResultsLearner.getDeprioritizeIndex(action.commandId);
|
||||||
@@ -278,8 +278,14 @@ export class ZenUrlbarProviderGlobalActions extends UrlbarProvider {
|
|||||||
}
|
}
|
||||||
finalResults.push(result);
|
finalResults.push(result);
|
||||||
}
|
}
|
||||||
|
let i = 0;
|
||||||
zenUrlbarResultsLearner.sortCommandsByPriority(finalResults).forEach((result) => {
|
zenUrlbarResultsLearner.sortCommandsByPriority(finalResults).forEach((result) => {
|
||||||
|
if (isPrefixed && i === 0 && query.length > 1) {
|
||||||
|
result.heuristic = true;
|
||||||
|
delete result.suggestedIndex;
|
||||||
|
}
|
||||||
addCallback(this, result);
|
addCallback(this, result);
|
||||||
|
i++;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -37,16 +37,16 @@ const globalActionsTemplate = [
|
|||||||
command: (window) => window.openPreferences(),
|
command: (window) => window.openPreferences(),
|
||||||
icon: 'chrome://browser/skin/zen-icons/settings.svg',
|
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',
|
label: 'Open Private Window',
|
||||||
command: 'Tools:PrivateBrowsing',
|
command: 'Tools:PrivateBrowsing',
|
||||||
icon: 'chrome://browser/skin/zen-icons/private-window.svg',
|
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',
|
label: 'Pin Tab',
|
||||||
command: 'cmd_zenTogglePinTab',
|
command: 'cmd_zenTogglePinTab',
|
||||||
|
@@ -7,7 +7,7 @@ import { XPCOMUtils } from 'resource://gre/modules/XPCOMUtils.sys.mjs';
|
|||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
const DEFAULT_DB_DATA = '{}';
|
const DEFAULT_DB_DATA = '{}';
|
||||||
const DEPRIORITIZE_MAX = -4;
|
const DEPRIORITIZE_MAX = -5;
|
||||||
const PRIORITIZE_MAX = 5;
|
const PRIORITIZE_MAX = 5;
|
||||||
|
|
||||||
function addDataToLazy(data) {
|
function addDataToLazy(data) {
|
||||||
|
Reference in New Issue
Block a user