generated from Seekra/repository-template
Compare commits
8
Commits
main
..
dd8263b2b8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd8263b2b8
|
||
|
|
589d886a63
|
||
|
|
a14189e130
|
||
|
|
d0a2cce293
|
||
|
|
15b2673643
|
||
|
|
e62fdea1b4
|
||
|
|
542d295650
|
||
|
|
8177d67ed1
|
-34
@@ -21,42 +21,8 @@ limitations under the License.
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<meta name="theme-color" content="#0158D2" />
|
<meta name="theme-color" content="#0158D2" />
|
||||||
<title>Seekra</title>
|
<title>Seekra</title>
|
||||||
<noscript>
|
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #000;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</noscript>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<noscript>
|
|
||||||
<h1>
|
|
||||||
Seekra
|
|
||||||
</h1>
|
|
||||||
<p>
|
|
||||||
You need to enable JavaScript to use Seekra.
|
|
||||||
</p>
|
|
||||||
<section>
|
|
||||||
<h2>Legal Content</h2>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<a href="https://assets.seekra.jcloud-services.ddns.net/2026-08-04-76a067e/legal/legal_notice.html">
|
|
||||||
Legal Notice
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</section>
|
|
||||||
</noscript>
|
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<script type="module" src="/src/main.js"></script>
|
<script type="module" src="/src/main.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -54,9 +54,10 @@ const props = defineProps({
|
|||||||
const store = useSettingsStore();
|
const store = useSettingsStore();
|
||||||
|
|
||||||
const optionType = computed(() => props.setting.allowMultiple ? 'checkbox' : 'radio');
|
const optionType = computed(() => props.setting.allowMultiple ? 'checkbox' : 'radio');
|
||||||
const selected = computed({
|
const selected = ref(normalizeSelectedValue(store.get(props.path) ?? props.setting.default));
|
||||||
get: () => normalizeSelectedValue(store.get(props.path) ?? props.setting.default),
|
|
||||||
set: (value) => store.set(props.path, value)
|
watch(selected, (newValue) => {
|
||||||
|
store.set(props.path, newValue);
|
||||||
});
|
});
|
||||||
|
|
||||||
const labelId = useId();
|
const labelId = useId();
|
||||||
|
|||||||
@@ -90,32 +90,6 @@ describe('Selection', () => {
|
|||||||
expect(inputsChecked).toStrictEqual([false, true, false]);
|
expect(inputsChecked).toStrictEqual([false, true, false]);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('reacts on store change', async () => {
|
|
||||||
const wrapper = getWrapper({
|
|
||||||
options: exampleOptions,
|
|
||||||
piniaOptions: {
|
|
||||||
setupStores: () => {
|
|
||||||
const store = useSettingsStore();
|
|
||||||
store.set('selection', 'o1');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
const settings = useSettingsStore();
|
|
||||||
|
|
||||||
{
|
|
||||||
const inputs = wrapper.findAll('input');
|
|
||||||
const inputsChecked = getChecked(inputs);
|
|
||||||
expect(inputsChecked).toStrictEqual([false, true, false]);
|
|
||||||
}
|
|
||||||
{
|
|
||||||
settings.set('selection', 'o2');
|
|
||||||
await nextTick();
|
|
||||||
const inputs = wrapper.findAll('input');
|
|
||||||
const inputsChecked = getChecked(inputs);
|
|
||||||
expect(inputsChecked).toStrictEqual([false, false, true]);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
test('shows multiple values from store', () => {
|
test('shows multiple values from store', () => {
|
||||||
const wrapper = getWrapper({
|
const wrapper = getWrapper({
|
||||||
options: exampleOptions,
|
options: exampleOptions,
|
||||||
|
|||||||
Reference in New Issue
Block a user