migrate to sqlite

NOTE: extension loading crashes docker (for some reason)
This commit is contained in:
2025-09-07 15:09:14 +02:00
parent 5c3057e998
commit a1c9832515
32 changed files with 536 additions and 256 deletions

View File

@@ -8,7 +8,7 @@ const width = computed(() => Math.abs(rect.a.x - rect.b.x));
const height = computed(() => Math.abs(rect.a.y - rect.b.y));
function onDocumentPointerDown(e: MouseEvent) {
if (e.button !== 0) {
if (e.button !== 0 || matchMedia('(pointer:coarse)').matches) {
return;
}
@@ -21,7 +21,7 @@ function onDocumentPointerDown(e: MouseEvent) {
}
function onDocumentPointerMove(e: MouseEvent) {
if (!rect.enabled) {
if (!rect.enabled || matchMedia('(pointer:coarse)').matches) {
return;
}
@@ -39,7 +39,11 @@ function onDocumentPointerMove(e: MouseEvent) {
}
function onDocumentPointerUp(e: MouseEvent) {
if (e.button !== 0 || !rect.enabled) {
if (
!rect.enabled ||
e.button !== 0 ||
matchMedia('(pointer:coarse)').matches
) {
return;
}

View File

@@ -51,6 +51,11 @@ const form = useForm({
canReadFiles: false,
canModifyFiles: false,
canDeleteFiles: false,
canListShares: false,
canCreateShares: false,
canModifyShares: false,
canDeleteShares: false,
},
});
@@ -231,6 +236,70 @@ const onSubmit = form.handleSubmit(async (values) => {
<FormMessage />
</FormItem>
</FormField>
<FormField
v-slot="{ value, handleChange }"
name="canListShares"
>
<FormItem class="flex flex-row justify-between">
<FormLabel class="grow">List shares</FormLabel>
<FormControl>
<Switch
:model-value="value"
@update:model-value="handleChange"
/>
</FormControl>
<FormMessage />
</FormItem>
</FormField>
<FormField
v-slot="{ value, handleChange }"
name="canCreateShares"
>
<FormItem class="flex flex-row justify-between">
<FormLabel class="grow">Create shares</FormLabel>
<FormControl>
<Switch
:model-value="value"
@update:model-value="handleChange"
/>
</FormControl>
<FormMessage />
</FormItem>
</FormField>
<FormField
v-slot="{ value, handleChange }"
name="canModifyShares"
>
<FormItem class="flex flex-row justify-between">
<FormLabel class="grow">Modify shares</FormLabel>
<FormControl>
<Switch
:model-value="value"
@update:model-value="handleChange"
/>
</FormControl>
<FormMessage />
</FormItem>
</FormField>
<FormField
v-slot="{ value, handleChange }"
name="canDeleteShares"
>
<FormItem class="flex flex-row justify-between">
<FormLabel class="grow">Delete shares</FormLabel>
<FormControl>
<Switch
:model-value="value"
@update:model-value="handleChange"
/>
</FormControl>
<FormMessage />
</FormItem>
</FormField>
</div>
</form>

View File

@@ -25,6 +25,11 @@ export const userWarrenSchema = object({
canReadFiles: boolean().required(),
canModifyFiles: boolean().required(),
canDeleteFiles: boolean().required(),
canListShares: boolean().required(),
canCreateShares: boolean().required(),
canModifyShares: boolean().required(),
canDeleteShares: boolean().required(),
});
export const createWarrenSchema = object({