mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 17:52:21 +00:00
Vue kit: UiCheckbox for the Visual, voice, Data Library and welcome checkboxes
UiCheckbox is a label wrapping a native checkbox and its words; trailing puts the box after them, as the Visual panel's rows have it. v-model shows the value and emits the checked state, and change is emitted with its event; without a modelValue the box is the browser's own, as the welcome card's "Don't show this again" is. restore puts the box back to modelValue once a change has rendered without the owner taking it, which is what the voice panel's v-checked directive did for a refused preference. Attributes go to the label; inputId and inputAttrs to the box. checkbox.css holds the centred flex row, moved out of the two labels that hold only a checkbox (first-run.css, library.css) and loaded before them. Each box keeps its skin's size, margin and accent colour. checkboxes.test.mjs fails if a view writes a checkbox by hand; Story Explore's filters are not converted yet. Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
1 parent
52dd576769
commit
2d7b7be890
18 files changed
+385
-41
No files matched your search
@@ -3,6 +3,7 @@ import { storeToRefs } from 'pinia';
|
||||
import { computed, nextTick, useTemplateRef, watch } from 'vue';
|
||||
import { formatNumber, t, tn } from '../../../i18n/index.js';
|
||||
import UiButton from '../../kit/UiButton.vue';
|
||||
import UiCheckbox from '../../kit/UiCheckbox.vue';
|
||||
import UiCloseButton from '../../kit/UiCloseButton.vue';
|
||||
import UiSelect from '../../kit/UiSelect.js';
|
||||
import {
|
||||
@@ -153,14 +154,13 @@ const onDialogClick = (event) => {
|
||||
@update:model-value="controls?.setFamily($event)"
|
||||
/>
|
||||
</label>
|
||||
<label class="data-library-check">
|
||||
<input
|
||||
type="checkbox"
|
||||
:checked="view.filter.availableOnly"
|
||||
@change="controls?.setAvailableOnly($event.target.checked)"
|
||||
/>
|
||||
<UiCheckbox
|
||||
class="data-library-check"
|
||||
:model-value="view.filter.availableOnly"
|
||||
@update:model-value="controls?.setAvailableOnly($event)"
|
||||
>
|
||||
<span>{{ t('Only what this instance serves') }}</span>
|
||||
</label>
|
||||
</UiCheckbox>
|
||||
</div>
|
||||
<div class="data-library-toolbar">
|
||||
<p class="data-library-status" role="status" aria-live="polite">
|
||||
|
||||
Reference in new issue
Block a user