mirror of
https://github.com/zen-browser/desktop.git
synced 2025-07-10 18:15:30 +02:00
Update subproject commit in l10n and zen-components
This commit is contained in:
parent
68cfdedc45
commit
dd8299d10a
3 changed files with 23 additions and 2 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 53b7f6eecc068a7fab3e9b62250e84cc67422143
|
||||
Subproject commit 028c89611269da6a27df0183b2021e7617788f1b
|
|
@ -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>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue