Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion apps/atrium-telegram/app/app.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
export default defineAppConfig({
ui: {
input: {
slots: {
base: '!ring-muted',
},
},
inputMenu: {
slots: {
base: '!ring-muted',
},
},
selectMenu: {
slots: {
base: '!ring-muted',
},
},
textarea: {
slots: {
base: '!ring-muted',
},
},
button: {
slots: {
base: 'font-semibold',
Expand Down Expand Up @@ -28,7 +48,7 @@ export default defineAppConfig({
slots: {
content: 'divide-y-0 !ring-muted/50',
header: 'pb-0 min-h-12',
title: 'text-lg/5 font-semibold',
title: 'font-semibold',
},
},
navigationMenu: {
Expand Down
5 changes: 4 additions & 1 deletion apps/atrium-telegram/app/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
<UApp
:locale="locales[locale]"
:tooltip="{ delayDuration: 0 }"
:toaster="{ position: 'top-center' }"
:toaster="{
position: 'top-center',
class: 'mt-16',
}"
class="min-h-svh"
>
<NuxtLoadingIndicator :color="false" class="bg-primary h-[2px]" />
Expand Down
4 changes: 2 additions & 2 deletions apps/atrium-telegram/app/components/Navigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ const mainRoutes = computed(() => [
{
path: '/epic',
name: 'quests',
title: 'Секрет',
icon: 'i-lucide-lock',
title: 'Эпики',
icon: 'i-lucide-crown',
},
{
path: '/secret1',
Expand Down
9 changes: 2 additions & 7 deletions apps/atrium-telegram/app/components/form/CompleteTask.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<UTextarea
v-model="state.report"
:rows="4"
size="lg"
size="xl"
class="w-full"
/>
</UFormField>
Expand All @@ -27,7 +27,7 @@
type="submit"
variant="solid"
color="secondary"
size="lg"
size="xl"
trailing-icon="i-lucide-flag"
block
:label="$t('app.update.task.close')"
Expand All @@ -49,9 +49,7 @@ const { taskId } = defineProps<{

const emit = defineEmits(['success', 'submitted'])

const { t } = useI18n()
const { vibrate } = useFeedback()
const actionToast = useActionToast()
const userStore = useUserStore()
const taskStore = useTaskStore()

Expand All @@ -63,7 +61,6 @@ const state = ref<Partial<CompleteTask>>({
})

async function onSubmit(event: FormSubmitEvent<CompleteTask>) {
const toastId = actionToast.start()
emit('submitted')

try {
Expand All @@ -80,12 +77,10 @@ async function onSubmit(event: FormSubmitEvent<CompleteTask>) {
userStore.update(),
])

actionToast.success(toastId, t('toast.task-completed'))
vibrate('success')
emit('success')
} catch (error) {
console.error(error)
actionToast.error(toastId)
vibrate('error')
}
}
Expand Down
60 changes: 29 additions & 31 deletions apps/atrium-telegram/app/components/form/CreateTask.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<UInput
v-model="state.name"
:placeholder="$t('app.task.name-placeholder')"
size="lg"
size="xl"
class="w-full items-center justify-center"
/>
</UFormField>
Expand All @@ -22,7 +22,7 @@
<UTextarea
v-model="state.description"
:rows="4"
size="lg"
size="xl"
class="w-full"
/>
</UFormField>
Expand All @@ -36,44 +36,42 @@
:content="{
side: 'top',
}"
size="lg"
size="xl"
class="w-full"
/>
</UFormField>

<div class="grid grid-cols-1 md:grid-cols-2">
<UPopover>
<UFormField :label="$t('common.date')" name="date">
<UInput
:value="selectedDate ? df.format(selectedDate.toDate(getLocalTimeZone())) : ''"
placeholder="Выберите дату"
size="lg"
class="w-full items-center justify-center cursor-pointer"
:ui="{ trailing: 'pe-1.5' }"
>
<template v-if="selectedDate" #trailing>
<UButton
color="neutral"
variant="ghost"
size="md"
icon="i-lucide-x"
@click="selectedDate = undefined"
/>
</template>
</UInput>
</UFormField>

<template #content>
<UCalendar v-model="selectedDate" class="p-2" />
</template>
</UPopover>
</div>
<UPopover>
<UFormField :label="$t('common.date')" name="date">
<UInput
:value="selectedDate ? df.format(selectedDate.toDate(getLocalTimeZone())) : ''"
placeholder="Выберите дату"
size="xl"
class="w-full items-center justify-center cursor-pointer"
:ui="{ trailing: 'pe-2' }"
>
<template v-if="selectedDate" #trailing>
<UButton
color="neutral"
variant="ghost"
size="md"
icon="i-lucide-x"
@click="selectedDate = undefined"
/>
</template>
</UInput>
</UFormField>

<template #content>
<UCalendar v-model="selectedDate" class="p-2" />
</template>
</UPopover>

<UButton
type="submit"
variant="solid"
color="secondary"
size="lg"
size="xl"
block
class="mt-3"
:label="$t('common.create')"
Expand Down
8 changes: 4 additions & 4 deletions apps/atrium-telegram/app/components/form/CreateTaskList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<UFormField :label="$t('common.title')" name="name">
<UInput
v-model="state.name"
size="lg"
size="xl"
class="w-full items-center justify-center"
/>
</UFormField>
Expand All @@ -17,7 +17,7 @@
<UInput
v-model="state.description"
placeholder="Для чего создан и что в нем будет"
size="lg"
size="xl"
class="w-full items-center justify-center"
/>
</UFormField>
Expand All @@ -32,7 +32,7 @@
side: 'top',
}"
multiple
size="lg"
size="xl"
class="w-full"
/>
</UFormField>
Expand All @@ -41,7 +41,7 @@
type="submit"
variant="solid"
color="secondary"
size="lg"
size="xl"
block
class="mt-3"
:label="$t('common.create')"
Expand Down
64 changes: 31 additions & 33 deletions apps/atrium-telegram/app/components/form/UpdateTask.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
>
<UInput
v-model="state.name"
size="lg"
size="xl"
class="w-full items-center justify-center"
/>
</UFormField>
Expand All @@ -21,7 +21,7 @@
<UTextarea
v-model="state.description"
:rows="4"
size="lg"
size="xl"
class="w-full"
/>
</UFormField>
Expand All @@ -32,45 +32,43 @@
:items="availablePerformersItems"
:avatar="selectedPerformer?.avatar"
:placeholder="$t('common.select')"
size="lg"
size="xl"
class="w-full"
/>
</UFormField>

<div class="grid grid-cols-1">
<UPopover>
<UFormField :label="$t('common.date')" name="date">
<UInput
:value="selectedDate ? df.format(selectedDate.toDate(getLocalTimeZone())) : ''"
placeholder="Выберите дату"
size="lg"
class="w-full items-center justify-center cursor-pointer"
:ui="{ trailing: 'pe-1.5' }"
>
<template v-if="selectedDate" #trailing>
<UButton
color="neutral"
variant="ghost"
size="md"
icon="i-lucide-x"
@click="selectedDate = undefined"
/>
</template>
</UInput>
</UFormField>

<template #content>
<UCalendar v-model="selectedDate" class="p-2" />
</template>
</UPopover>
</div>
<UPopover>
<UFormField :label="$t('common.date')" name="date">
<UInput
:value="selectedDate ? df.format(selectedDate.toDate(getLocalTimeZone())) : ''"
placeholder="Выберите дату"
size="xl"
class="w-full items-center justify-center cursor-pointer"
:ui="{ trailing: 'pe-2' }"
>
<template v-if="selectedDate" #trailing>
<UButton
color="neutral"
variant="ghost"
size="md"
icon="i-lucide-x"
@click="selectedDate = undefined"
/>
</template>
</UInput>
</UFormField>

<template #content>
<UCalendar v-model="selectedDate" class="p-2" />
</template>
</UPopover>

<UFormField label="В проекте" name="listId">
<USelectMenu
v-model="selectedList"
:items="availableLists"
:placeholder="$t('common.select')"
size="lg"
size="xl"
class="w-full"
/>
</UFormField>
Expand All @@ -80,15 +78,15 @@
type="submit"
variant="solid"
color="secondary"
size="lg"
size="xl"
block
:label="$t('common.update')"
/>

<UButton
variant="soft"
color="error"
size="lg"
size="xl"
icon="i-lucide-trash-2"
class="aspect-square justify-center"
@click="onDelete"
Expand Down
10 changes: 5 additions & 5 deletions apps/atrium-telegram/app/components/form/UpdateTaskList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<UFormField :label="$t('common.title')" name="name">
<UInput
v-model="state.name"
size="lg"
size="xl"
class="w-full items-center justify-center"
/>
</UFormField>
Expand All @@ -17,7 +17,7 @@
<UInput
v-model="state.description"
placeholder="Для чего создан и что в нем будет"
size="lg"
size="xl"
class="w-full items-center justify-center"
/>
</UFormField>
Expand All @@ -32,7 +32,7 @@
side: 'top',
}"
multiple
size="lg"
size="xl"
class="w-full"
/>
</UFormField>
Expand All @@ -42,15 +42,15 @@
type="submit"
variant="solid"
color="secondary"
size="lg"
size="xl"
block
:label="$t('common.update')"
/>

<UButton
variant="soft"
color="error"
size="lg"
size="xl"
icon="i-lucide-trash-2"
class="aspect-square justify-center"
@click="onDelete"
Expand Down
Loading