Preferences config WIP
This commit is contained in:
@@ -168,7 +168,6 @@ app.whenReady().then(async () => {
|
|||||||
return await adapter[method](...args);
|
return await adapter[method](...args);
|
||||||
});
|
});
|
||||||
broadcastNoteChange("plugin-changed", pluginId);
|
broadcastNoteChange("plugin-changed", pluginId);
|
||||||
console.log("activePlugin: ", pluginId);
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
await setActivePlugin(initialConfig.activeAdapter);
|
await setActivePlugin(initialConfig.activeAdapter);
|
||||||
|
|||||||
@@ -116,7 +116,8 @@ onBeforeUnmount(() => {
|
|||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
p em {
|
p em {
|
||||||
font-style: italic;
|
/* font-style: italic; */
|
||||||
|
color: var(--grey-100);
|
||||||
}
|
}
|
||||||
hr {
|
hr {
|
||||||
border: 1px dashed currentColor;
|
border: 1px dashed currentColor;
|
||||||
|
|||||||
28
src/renderer/src/content/instructions.md
Normal file
28
src/renderer/src/content/instructions.md
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
Medieval Translation
|
||||||
|
|
||||||
|
Nota = Note
|
||||||
|
Capitulum = Category
|
||||||
|
Intructio = Instructions
|
||||||
|
Tabula = Index/Overview
|
||||||
|
|
||||||
|
\*This can be disabled via toolbar
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Program Key Commands
|
||||||
|
|
||||||
|
cmd + s = save
|
||||||
|
cmd + t = new capitulum
|
||||||
|
cmd + n = new nota
|
||||||
|
cmd + x = close window
|
||||||
|
dbl click = change name / open nota
|
||||||
|
paste hyperlink twice = activated url
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Text Markdowns
|
||||||
|
|
||||||
|
cmd + b = Bold
|
||||||
|
cmd + u = underline
|
||||||
|
--- = ---------- (ruled line break)
|
||||||
|
/_text_/ = Desaturated text
|
||||||
@@ -12,10 +12,29 @@
|
|||||||
:id="plugin.id"
|
:id="plugin.id"
|
||||||
:value="plugin.id"
|
:value="plugin.id"
|
||||||
/>
|
/>
|
||||||
<label :for="plugin.id">
|
<div class="info">
|
||||||
<p class="name bold">{{ plugin.name }}</p>
|
<p class="name bold">{{ plugin.name }}</p>
|
||||||
<p class="description">{{ plugin.description }}</p>
|
<p class="description">{{ plugin.description }}</p>
|
||||||
|
|
||||||
|
<form v-if="plugin.configSchema.length" class="config">
|
||||||
|
<div
|
||||||
|
v-for="field in plugin.configSchema"
|
||||||
|
class="config-field"
|
||||||
|
:key="field.key"
|
||||||
|
>
|
||||||
|
<label :for="field.key">
|
||||||
|
{{ field.label }}
|
||||||
</label>
|
</label>
|
||||||
|
<input
|
||||||
|
v-model="config.adapters[plugin.id][field.key]"
|
||||||
|
:id="field.key"
|
||||||
|
:type="field.type"
|
||||||
|
:placeholder="field.default"
|
||||||
|
:required="field.required"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</template>
|
</template>
|
||||||
@@ -23,21 +42,17 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import usePlugins from '@/composables/usePlugins'
|
import usePlugins from '@/composables/usePlugins'
|
||||||
import useConfig from '@/composables/useConfig'
|
import useConfig from '@/composables/useConfig'
|
||||||
import { ref, onMounted, watch } from 'vue'
|
import { ref, watch } from 'vue'
|
||||||
|
|
||||||
const { plugins, setActivePlugin } = await usePlugins()
|
const { plugins, setActivePlugin } = await usePlugins()
|
||||||
const { config, ensureConfig } = useConfig()
|
const { config, ensureConfig } = useConfig()
|
||||||
|
|
||||||
const activePluginId = ref(plugins.value[0].id)
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
await ensureConfig()
|
await ensureConfig()
|
||||||
activePluginId.value = config.value.activeAdapter
|
|
||||||
|
const activePluginId = ref(config.value.activeAdapter)
|
||||||
|
|
||||||
watch(activePluginId, async (id) => {
|
watch(activePluginId, async (id) => {
|
||||||
await setActivePlugin(id)
|
await setActivePlugin(id)
|
||||||
})
|
})
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@@ -52,7 +67,7 @@ onMounted(async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.plugin {
|
.plugin {
|
||||||
@@ -74,13 +89,30 @@ onMounted(async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
label {
|
.info {
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
.description {
|
.description {
|
||||||
color: var(--grey-100);
|
color: var(--grey-100);
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.config {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
|
margin-top: 16px;
|
||||||
|
}
|
||||||
|
.config-field {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 4px;
|
||||||
|
|
||||||
|
input {
|
||||||
|
width: 100%;
|
||||||
|
border: 1px solid var(--grey-100);
|
||||||
|
border-radius: 0.2em;
|
||||||
|
padding: 0.2em 0.5em;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user