From fc3558da0416f9340dfd947daf76c2123e7f4444 Mon Sep 17 00:00:00 2001
From: Anoms12 <117039159+Anoms12@users.noreply.github.com>
Date: Thu, 24 Jul 2025 19:23:47 -0400
Subject: [PATCH 1/4] feat: add settings window to Haven
---
dom/library-settings.css | 34 +++++++++++++++++++++++++++
dom/library-settings.xhtml | 48 ++++++++++++++++++++++++++++++++++++++
style.css | 2 +-
zenhaven.uc.js | 12 +++++++++-
4 files changed, 94 insertions(+), 2 deletions(-)
create mode 100644 dom/library-settings.css
create mode 100644 dom/library-settings.xhtml
diff --git a/dom/library-settings.css b/dom/library-settings.css
new file mode 100644
index 0000000..118514d
--- /dev/null
+++ b/dom/library-settings.css
@@ -0,0 +1,34 @@
+@namespace html 'http://www.w3.org/1999/xhtml';
+@namespace xul 'http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul';
+
+#main-content {
+ background: var(--zen-themed-toolbar-bg-transparent);
+ appearance: -moz-window-titlebar;
+
+ user-select: none;
+ touch-action: none;
+ pointer-events: auto;
+
+ width: 100%;
+ height: 100%;
+
+ overflow-x: hidden;
+ overflow-y: auto;
+
+ gap: 2rem;
+ padding: 1rem;
+}
+
+.section {
+ width: 100%;
+ position: relative;
+ gap: 0.6rem;
+
+ .section-content {
+ width: 100%;
+ background: var(--zen-toolbar-element-bg);
+ border-radius: 6px;
+ padding: 1em;
+ font-size: 1.1em;
+ }
+}
\ No newline at end of file
diff --git a/dom/library-settings.xhtml b/dom/library-settings.xhtml
new file mode 100644
index 0000000..b2a07bd
--- /dev/null
+++ b/dom/library-settings.xhtml
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ General settings go here.
+
+
+
+
+
+
+ Module settings go here.
+
+
+
+
+
+
diff --git a/style.css b/style.css
index 9c8ba65..00a98dd 100644
--- a/style.css
+++ b/style.css
@@ -1338,4 +1338,4 @@ body[library="true"] {
#zen-library {
list-style-image: url("chrome://userscripts/content/zen-library/icons/library.svg") !important;
-}
+}
\ No newline at end of file
diff --git a/zenhaven.uc.js b/zenhaven.uc.js
index 6b42bb3..3db8515 100644
--- a/zenhaven.uc.js
+++ b/zenhaven.uc.js
@@ -312,10 +312,20 @@ import { historySection } from "./sections/history.js";
.addEventListener("click", () => {
window.haven.closeHaven();
});
+
+ function openBlankWindow() {
+ window.openDialog(
+ "chrome://userscripts/content/zen-library/dom/library-settings.xhtml",
+ "Library Settings",
+ "centerscreen,chrome,dialog=no,resizable=no,titlebar"
+ );
+ }
+
toolbarFooterXML
.querySelector("#library-settings-button")
.addEventListener("click", () => {
- alert("Library settings clicked!");
+ openBlankWindow();
+ console.log("Blank window opened via button click");
});
this.elements.customToolbar.appendChild(toolbarFooterXML);
From 11e81d8611e6eff2fef15352e856e594bcf78878 Mon Sep 17 00:00:00 2001
From: Anoms12 <117039159+Anoms12@users.noreply.github.com>
Date: Thu, 24 Jul 2025 19:54:25 -0400
Subject: [PATCH 2/4] fix: move back to richlistbox
---
dom/library-settings.xhtml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dom/library-settings.xhtml b/dom/library-settings.xhtml
index b2a07bd..8b2ae58 100644
--- a/dom/library-settings.xhtml
+++ b/dom/library-settings.xhtml
@@ -21,7 +21,7 @@