feat: New site data popup, p=#10651

This commit is contained in:
mr. m
2025-10-05 18:56:41 +02:00
committed by GitHub
parent e340923623
commit 3ac31a96a6
33 changed files with 1393 additions and 681 deletions

View File

@@ -67,6 +67,10 @@ export var ZenCustomizableUI = new (class {
addon-webext-overflowtarget="overflowed-extensions-list"
mode="icons">
<hbox id="zen-sidebar-top-buttons-customization-target" class="customization-target" flex="1">
<toolbarbutton id="zen-toggle-compact-mode"
class="toolbarbutton-1"
command="cmd_toggleCompactModeIgnoreHover"
data-l10n-id="zen-toggle-compact-mode-button" />
<html:div id="zen-sidebar-top-buttons-separator" skipintoolbarset="true" overflows="false"></html:div>
</hbox>
</toolbar>
@@ -106,12 +110,20 @@ export var ZenCustomizableUI = new (class {
_initCreateNewButton(window) {
const button = window.document.getElementById('zen-create-new-button');
button.addEventListener('command', () => {
button.addEventListener('command', (event) => {
if (button.hasAttribute('open')) {
return;
}
const popup = window.document.getElementById('zenCreateNewPopup');
popup.openPopup(button, 'before_start');
popup.openPopup(
button,
'before_start',
0,
0,
true /* isContextMenu */,
false /* attributesOverride */,
event
);
});
}