From 1806a612b60a625832a4e367b44aab33b39aed42 Mon Sep 17 00:00:00 2001 From: nicwands Date: Thu, 9 Apr 2026 14:58:06 -0400 Subject: [PATCH] functionality updates for preferences --- bin/uploadArtifacts.js | 8 +-- src/core/ConfigManager.js | 2 + src/core/PluginManager.js | 8 ++- src/main/index.js | 2 + src/renderer/src/components/PageLoading.vue | 1 + .../components/preferences/BooleanInput.vue | 67 +++++++++++++++++++ .../components/preferences/DirectoryInput.vue | 10 +++ .../src/components/preferences/General.vue | 48 +++++++++++++ .../src/components/preferences/Storage.vue | 20 ++++-- .../src/components/preferences/TextInput.vue | 43 ++++++++++-- src/renderer/src/composables/usePlugins.js | 2 +- src/renderer/src/styles/_layers.scss | 3 + src/renderer/src/views/Preferences.vue | 14 +++- 13 files changed, 207 insertions(+), 21 deletions(-) create mode 100644 src/renderer/src/components/preferences/BooleanInput.vue create mode 100644 src/renderer/src/components/preferences/General.vue diff --git a/bin/uploadArtifacts.js b/bin/uploadArtifacts.js index dde7d99..82dce78 100644 --- a/bin/uploadArtifacts.js +++ b/bin/uploadArtifacts.js @@ -96,10 +96,10 @@ async function main() { return } - // if (isGitTagDirty()) { - // console.log('Git working directory is dirty. Skipping upload.') - // return - // } + if (isGitTagDirty()) { + console.log('Git working directory is dirty. Skipping upload.') + return + } console.log( `Uploading artifacts for ${platform} v${version} (tag: ${currentTag})`, diff --git a/src/core/ConfigManager.js b/src/core/ConfigManager.js index 16e7f29..d189596 100644 --- a/src/core/ConfigManager.js +++ b/src/core/ConfigManager.js @@ -6,6 +6,8 @@ const getDefaultConfig = () => { return { activeAdapter: 'browser', theme: 'dark', + enableBlackletter: 'true', + openNotesInNewWindow: 'true', } } diff --git a/src/core/PluginManager.js b/src/core/PluginManager.js index b9c9765..168e9b1 100644 --- a/src/core/PluginManager.js +++ b/src/core/PluginManager.js @@ -72,7 +72,13 @@ export const createPluginManagerClient = () => { }, async testPlugin(id, config) { - return window.api.pluginManagerCall('testPlugin', { id, config }) + const test = await window.api.pluginManagerCall( + 'testPlugin', + id, + config, + ) + console.log(test) + return test }, } } diff --git a/src/main/index.js b/src/main/index.js index f54c356..5a88471 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -90,6 +90,8 @@ app.whenReady().then(async () => { ) ipcMain.handle('pluginManager:call', async (_, method, ...args) => { + console.log(method, ...args) + const methodCall = await pluginManager[method](...args) if (method === 'setActivePlugin') { diff --git a/src/renderer/src/components/PageLoading.vue b/src/renderer/src/components/PageLoading.vue index e1ec605..bdba12d 100644 --- a/src/renderer/src/components/PageLoading.vue +++ b/src/renderer/src/components/PageLoading.vue @@ -15,6 +15,7 @@ import SvgSpinner from '@/components/svg/Spinner.vue' display: flex; justify-content: center; align-items: center; + pointer-events: none; svg { width: 20px; diff --git a/src/renderer/src/components/preferences/BooleanInput.vue b/src/renderer/src/components/preferences/BooleanInput.vue new file mode 100644 index 0000000..2172e1c --- /dev/null +++ b/src/renderer/src/components/preferences/BooleanInput.vue @@ -0,0 +1,67 @@ + + + + + diff --git a/src/renderer/src/components/preferences/DirectoryInput.vue b/src/renderer/src/components/preferences/DirectoryInput.vue index 0421e5c..7923a4b 100644 --- a/src/renderer/src/components/preferences/DirectoryInput.vue +++ b/src/renderer/src/components/preferences/DirectoryInput.vue @@ -53,6 +53,16 @@ const openDirectoryPicker = async () => { } button { padding: 0.2em 0.5em; + background: var(--theme-bg); + color: var(--theme-fg); + border: 1px solid var(--grey-100); + border-radius: 0.2em; + + &:hover { + background: var(--theme-fg); + color: var(--theme-bg); + border-color: var(--theme-fg); + } } } diff --git a/src/renderer/src/components/preferences/General.vue b/src/renderer/src/components/preferences/General.vue new file mode 100644 index 0000000..8c2898f --- /dev/null +++ b/src/renderer/src/components/preferences/General.vue @@ -0,0 +1,48 @@ + + + + + diff --git a/src/renderer/src/components/preferences/Storage.vue b/src/renderer/src/components/preferences/Storage.vue index 09ffa00..f38334b 100644 --- a/src/renderer/src/components/preferences/Storage.vue +++ b/src/renderer/src/components/preferences/Storage.vue @@ -38,6 +38,11 @@ v-model="config.adapters[plugin.id][field.key]" v-bind="field" /> + @@ -47,6 +52,7 @@ diff --git a/src/renderer/src/composables/usePlugins.js b/src/renderer/src/composables/usePlugins.js index 704dc7b..53b3f82 100644 --- a/src/renderer/src/composables/usePlugins.js +++ b/src/renderer/src/composables/usePlugins.js @@ -16,7 +16,7 @@ export default async () => { } const testPlugin = async (pluginId, config = {}) => { - await pluginManager.testPlugin(pluginId, { ...config }) + return await pluginManager.testPlugin(pluginId, { ...config }) } return { diff --git a/src/renderer/src/styles/_layers.scss b/src/renderer/src/styles/_layers.scss index af5e681..b50c309 100644 --- a/src/renderer/src/styles/_layers.scss +++ b/src/renderer/src/styles/_layers.scss @@ -1,4 +1,7 @@ // z-index .menu { + z-index: 20; +} +.nav { z-index: 10; } diff --git a/src/renderer/src/views/Preferences.vue b/src/renderer/src/views/Preferences.vue index f487e16..d2431bc 100644 --- a/src/renderer/src/views/Preferences.vue +++ b/src/renderer/src/views/Preferences.vue @@ -3,6 +3,8 @@

Preferences

+ + @@ -22,6 +24,7 @@