diff --git a/dom/library-settings.css b/dom/library-settings.css new file mode 100644 index 0000000..fc8a7b1 --- /dev/null +++ b/dom/library-settings.css @@ -0,0 +1,37 @@ +@namespace html "http://www.w3.org/1999/xhtml"; +@namespace xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; +body { + margin: 0 !important; + width: 100vw; + height: 100vh; + #main-container { + color: white; + font-size: 12px; + width: 100%; + height: 100%; + display: flex; + flex-direction: row; + background-color: var(--zen-main-browser-background); + + #sidebar { + height: 100%; + width: 25%; + overflow-y: auto; + background-color: black; + border-right: 1px solid white; + padding: 40px 10px 40px 10px; + display: flex; + flex-direction: column; + justify-content: center; + align-items: flex-start; + .sidebar-tabbuton { + margin: auto 10px auto 0; + } + } + #settings-content { + display: flex; + flex-direction: column; + padding: 15px; + } + } +} diff --git a/dom/library-settings.xhtml b/dom/library-settings.xhtml new file mode 100644 index 0000000..93d5e77 --- /dev/null +++ b/dom/library-settings.xhtml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + General settings go here. + + + + + Module settings go here. + + + + + Advanced settings go here. + + + + + diff --git a/sections/download.js b/sections/download.js index ff95b21..917063c 100644 --- a/sections/download.js +++ b/sections/download.js @@ -1,5 +1,14 @@ import { parseElement } from "../utils/parse.js"; +// Prefs for the settings menu/window thingy. +const getFileCategories = UC_API.Prefs.get("zen.library.downloads.file-catagories").value; +const showFileStatus = UC_API.Prefs.get("zen.library.downloads.show-file-status").value; +const showFileSize = UC_API.Prefs.get("zen.library.downloads.show-file-size").value; +const showFileTime = UC_API.Prefs.get("zen.library.downloads.show-file-time").value; +const showFileUrl = UC_API.Prefs.get("zen.library.downloads.show-file-url").value; +const showDownloadInfo = UC_API.Prefs.get("zen.library.downloads.show-download-info").value; +const DoubleClickToOpen = UC_API.Prefs.get("zen.library.downloads.double-click-to-open").value; + export const downloadsSection = { id: "downloads", label: "Downloads", diff --git a/style.css b/style.css index b1f8628..ee19252 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 c050387..0d033e6 100644 --- a/zenhaven.uc.js +++ b/zenhaven.uc.js @@ -312,10 +312,20 @@ import { historySection } from "./sections/history.js"; .addEventListener("click", () => { window.library.closelibrary(); }); + + 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);