mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-05 09:26:34 +00:00
Update subproject commit in l10n and zen-components
This commit is contained in:
Submodule src/browser/base/content/zen-components updated: 53b7f6eecc...028c896112
@@ -653,6 +653,8 @@ var zenMissingKeyboardShortcutL10n = {
|
||||
|
||||
var gZenCKSSettings = {
|
||||
async init() {
|
||||
if (this.__hasInitialized) return;
|
||||
this.__hasInitialized = true;
|
||||
this._currentAction = null;
|
||||
this._currentActionID = null;
|
||||
this._initializeEvents();
|
||||
@@ -660,7 +662,23 @@ var gZenCKSSettings = {
|
||||
},
|
||||
|
||||
_initializeEvents() {
|
||||
window.addEventListener('keydown', this._handleKeyDown.bind(this));
|
||||
const resetAllListener = this.resetAllShortcuts.bind(this);
|
||||
const handleKeyDown = this._handleKeyDown.bind(this);
|
||||
window.addEventListener('keydown', handleKeyDown);
|
||||
const button = document.getElementById('zenCKSResetButton');
|
||||
button.addEventListener('click', resetAllListener);
|
||||
window.addEventListener('unload', () => {
|
||||
window.removeEventListener('keydown', handleKeyDown);
|
||||
button.removeEventListener('click', resetAllListener);
|
||||
});
|
||||
},
|
||||
|
||||
async resetAllShortcuts() {
|
||||
let buttonIndex = await confirmRestartPrompt(true, 1, true, false);
|
||||
if (buttonIndex == CONFIRM_RESTART_PROMPT_RESTART_NOW) {
|
||||
await gZenKeyboardShortcutsManager.resetAllShortcuts();
|
||||
Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart);
|
||||
}
|
||||
},
|
||||
|
||||
async _initializeCKS() {
|
||||
|
@@ -10,6 +10,9 @@
|
||||
<groupbox id="zenCKSGroup" data-category="paneZenCKS" hidden="true" class="highlighting-group">
|
||||
<label><html:h2 data-l10n-id="zen-settings-CKS-header"/></label>
|
||||
<description class="description-deemphasized" data-l10n-id="zen-settings-CKS-description" />
|
||||
<hbox>
|
||||
<button id="zenCKSResetButton" data-l10n-id="zen-settings-CKS-reset-shortcuts" class="reset-button"/>
|
||||
</hbox>
|
||||
<vbox id="zenCKSOption-wrapper"></vbox>
|
||||
</groupbox>
|
||||
|
||||
|
Reference in New Issue
Block a user