generated from Seekra/repository-template
Compare commits
14
Commits
187332b95a
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f44609702
|
||
|
|
5dc3ddd549
|
||
|
|
f739676a1a
|
||
|
|
f73e2edae7
|
||
|
|
f7358ceb34
|
||
|
|
f8d2086433
|
||
|
|
7613122658
|
||
|
|
b27c89945f
|
||
|
|
d9ed16f3de
|
||
|
|
4c39fadd9a
|
||
|
|
dccdab0d4a
|
||
|
|
f6cf1e9777
|
||
|
|
53bd67b7a0
|
||
|
|
1f51a0b3ae
|
+34
@@ -21,8 +21,42 @@ 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,10 +54,9 @@ 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 = ref(normalizeSelectedValue(store.get(props.path) ?? props.setting.default));
|
const selected = computed({
|
||||||
|
get: () => normalizeSelectedValue(store.get(props.path) ?? props.setting.default),
|
||||||
watch(selected, (newValue) => {
|
set: (value) => store.set(props.path, value)
|
||||||
store.set(props.path, newValue);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const labelId = useId();
|
const labelId = useId();
|
||||||
|
|||||||
@@ -90,6 +90,32 @@ 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