You've already forked obsidian-visualiser
New Toaster class, Ability and Resistance removed from config file and choices improvement
This commit is contained in:
@@ -31,9 +31,10 @@
|
||||
</script>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { format } from '~/shared/general.util';
|
||||
import { iconByType } from '~/shared/content.util';
|
||||
import { format } from '#shared/general.util';
|
||||
import { iconByType } from '#shared/content.util';
|
||||
import { Icon } from '@iconify/vue/dist/iconify.js';
|
||||
import { Toaster } from '#shared/components.util';
|
||||
|
||||
interface File
|
||||
{
|
||||
@@ -69,8 +70,6 @@ definePageMeta({
|
||||
rights: ['admin'],
|
||||
});
|
||||
|
||||
const toaster = useToast();
|
||||
|
||||
const { data: users } = useFetch('/api/admin/users', {
|
||||
transform: (users) => {
|
||||
//@ts-ignore
|
||||
@@ -125,13 +124,13 @@ async function editPermissions(user: User)
|
||||
body: permissionCopy.value,
|
||||
});
|
||||
user.permission = permissionCopy.value;
|
||||
toaster.add({
|
||||
Toaster.add({
|
||||
duration: 10000, type: 'success', content: 'Permissions mises à jour.', timer: true,
|
||||
});
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
toaster.add({
|
||||
Toaster.add({
|
||||
duration: 10000, type: 'error', content: (e as any).message, timer: true,
|
||||
});
|
||||
}
|
||||
@@ -146,13 +145,13 @@ async function logout(user: User)
|
||||
|
||||
user.session.length = 0;
|
||||
|
||||
toaster.add({
|
||||
Toaster.add({
|
||||
duration: 10000, type: 'success', content: 'L\'utilisateur vient d\'être déconnecté.', timer: true,
|
||||
});
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
toaster.add({
|
||||
Toaster.add({
|
||||
duration: 10000, type: 'error', content: (e as any).message, timer: true,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -15,13 +15,13 @@ const schemaList: Record<string, z.ZodObject<any> | null> = {
|
||||
<script setup lang="ts">
|
||||
import { z } from 'zod/v4';
|
||||
import { Icon } from '@iconify/vue/dist/iconify.js';
|
||||
import { Toaster } from '#shared/components.util';
|
||||
|
||||
definePageMeta({
|
||||
rights: ['admin'],
|
||||
})
|
||||
const job = ref<string>('');
|
||||
|
||||
const toaster = useToast();
|
||||
const payload = reactive<Record<string, any>>({
|
||||
data: JSON.stringify({ username: "Peaceultime", id: 1, timestamp: Date.now() }),
|
||||
to: 'clem31470@gmail.com',
|
||||
@@ -51,7 +51,7 @@ async function fetch()
|
||||
error.value = null;
|
||||
success.value = true;
|
||||
|
||||
toaster.add({ duration: 10000, content: data.value ?? 'Job executé avec succès', type: 'success', timer: true, });
|
||||
Toaster.add({ duration: 10000, content: data.value ?? 'Job executé avec succès', type: 'success', timer: true, });
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
@@ -59,7 +59,7 @@ async function fetch()
|
||||
error.value = e as Error;
|
||||
success.value = false;
|
||||
|
||||
toaster.add({ duration: 10000, content: error.value.message, type: 'error', timer: true, });
|
||||
Toaster.add({ duration: 10000, content: error.value.message, type: 'error', timer: true, });
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user