fix: mobile UI (#2569)
* improve mobile ui * general cleanup * cleanup, improvements * fix hydration mismatch
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
>
|
>
|
||||||
<slot name="description" />
|
<slot name="description" />
|
||||||
</DialogDescription>
|
</DialogDescription>
|
||||||
<div class="mt-6 flex justify-end gap-2">
|
<div class="mt-6 flex flex-wrap justify-end gap-2">
|
||||||
<slot name="actions" />
|
<slot name="actions" />
|
||||||
</div>
|
</div>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<div class="flex flex-grow flex-col gap-1">
|
<div class="flex flex-grow flex-col gap-1">
|
||||||
<ClientCardName :client="client" />
|
<ClientCardName :client="client" />
|
||||||
<div
|
<div
|
||||||
class="flex flex-col pb-1 text-xs text-gray-500 md:inline-block md:pb-0 dark:text-neutral-400"
|
class="flex flex-col text-xs text-gray-500 dark:text-neutral-400"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<ClientCardAddress :client="client" />
|
<ClientCardAddress :client="client" />
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div class="block text-xs text-gray-500 dark:text-neutral-400">
|
||||||
class="block pb-1 text-xs text-gray-500 md:inline-block md:pb-0 dark:text-neutral-400"
|
|
||||||
>
|
|
||||||
<span class="inline-block">{{ expiredDateFormat(client.expiresAt) }}</span>
|
<span class="inline-block">{{ expiredDateFormat(client.expiresAt) }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="text-sm text-gray-700 md:text-base dark:text-neutral-200"
|
class="break-all text-sm text-gray-700 md:text-base dark:text-neutral-200"
|
||||||
:title="$t('client.createdOn') + $d(new Date(client.createdAt))"
|
:title="$t('client.createdOn') + $d(new Date(client.createdAt))"
|
||||||
>
|
>
|
||||||
<span class="border-b-2 border-t-2 border-transparent">
|
|
||||||
{{ client.name }}
|
{{ client.name }}
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
{{ $t('client.empty') }}<br /><br />
|
{{ $t('client.empty') }}<br /><br />
|
||||||
<ClientsCreateDialog>
|
<ClientsCreateDialog>
|
||||||
<BaseSecondaryButton as="span">
|
<BaseSecondaryButton as="span">
|
||||||
<IconsPlus class="w-4 md:mr-2" />
|
<IconsPlus class="mr-2 w-4" />
|
||||||
<span class="text-sm">{{ $t('client.new') }}</span>
|
<span class="text-sm">{{ $t('client.new') }}</span>
|
||||||
</BaseSecondaryButton>
|
</BaseSecondaryButton>
|
||||||
</ClientsCreateDialog>
|
</ClientsCreateDialog>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<ClientsCreateDialog>
|
<ClientsCreateDialog>
|
||||||
<BaseSecondaryButton as="span">
|
<BaseSecondaryButton as="span">
|
||||||
<IconsPlus class="w-4 md:mr-2" />
|
<IconsPlus class="mr-2 w-4" />
|
||||||
<span class="text-sm max-md:hidden">{{ $t('client.newShort') }}</span>
|
<span class="text-sm">{{ $t('client.newShort') }}</span>
|
||||||
</BaseSecondaryButton>
|
</BaseSecondaryButton>
|
||||||
</ClientsCreateDialog>
|
</ClientsCreateDialog>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="relative w-60 md:mr-2">
|
<div class="relative">
|
||||||
<div class="relative flex h-full items-center">
|
<div class="relative flex h-full items-center">
|
||||||
<IconsMagnifyingGlass
|
<IconsMagnifyingGlass
|
||||||
class="absolute left-2.5 h-4 w-4 text-gray-400 dark:text-neutral-500"
|
class="absolute left-2.5 h-4 w-4 text-gray-400 dark:text-neutral-500"
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<BasePrimaryButton @click="toggleSort">
|
<BasePrimaryButton @click="toggleSort">
|
||||||
<IconsArrowDown
|
<IconsArrowDown v-if="globalStore.sortClient === true" class="mr-2 w-4" />
|
||||||
v-if="globalStore.sortClient === true"
|
<IconsArrowUp v-else class="mr-2 w-4" />
|
||||||
class="w-4 md:mr-2"
|
<span class="text-sm">{{ $t('client.sort') }}</span>
|
||||||
/>
|
|
||||||
<IconsArrowUp v-else class="w-4 md:mr-2" />
|
|
||||||
<span class="text-sm max-md:hidden"> {{ $t('client.sort') }}</span>
|
|
||||||
</BasePrimaryButton>
|
</BasePrimaryButton>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -12,23 +12,15 @@
|
|||||||
class="rounded-lg border-2 border-gray-100 text-gray-500 focus:border-red-800 focus:outline-0 focus:ring-0 dark:border-neutral-800 dark:bg-neutral-700 dark:text-neutral-200 dark:placeholder:text-neutral-400"
|
class="rounded-lg border-2 border-gray-100 text-gray-500 focus:border-red-800 focus:outline-0 focus:ring-0 dark:border-neutral-800 dark:bg-neutral-700 dark:text-neutral-200 dark:placeholder:text-neutral-400"
|
||||||
@input="update($event, i)"
|
@input="update($event, i)"
|
||||||
/>
|
/>
|
||||||
<BaseSecondaryButton
|
<BaseSecondaryButton type="button" class="rounded-lg" @click="del(i)">
|
||||||
as="input"
|
{{ '-' }}
|
||||||
type="button"
|
</BaseSecondaryButton>
|
||||||
class="rounded-lg"
|
|
||||||
value="-"
|
|
||||||
@click="del(i)"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<BasePrimaryButton
|
<BasePrimaryButton type="button" class="rounded-lg" @click="add">
|
||||||
as="input"
|
{{ $t('form.add') }}
|
||||||
type="button"
|
</BasePrimaryButton>
|
||||||
class="rounded-lg"
|
|
||||||
:value="$t('form.add')"
|
|
||||||
@click="add"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<h4 class="col-span-full flex items-center py-6 text-2xl">
|
<h3 class="col-span-full flex items-center py-6 text-2xl">
|
||||||
<slot />
|
<slot />
|
||||||
<BaseTooltip v-if="description" :text="description">
|
<BaseTooltip v-if="description" :text="description">
|
||||||
<IconsInfo class="size-4" />
|
<IconsInfo class="size-4" />
|
||||||
</BaseTooltip>
|
</BaseTooltip>
|
||||||
</h4>
|
</h3>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<RLabel :for="props.for" class="md:align-middle md:leading-10"
|
<RLabel :for="props.for" class="md:leading-[2.75rem]">
|
||||||
><slot
|
<slot />
|
||||||
/></RLabel>
|
</RLabel>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
|||||||
@@ -12,23 +12,15 @@
|
|||||||
class="rounded-lg border-2 border-gray-100 text-gray-500 focus:border-red-800 focus:outline-0 focus:ring-0 dark:border-neutral-800 dark:bg-neutral-700 dark:text-neutral-200 dark:placeholder:text-neutral-400"
|
class="rounded-lg border-2 border-gray-100 text-gray-500 focus:border-red-800 focus:outline-0 focus:ring-0 dark:border-neutral-800 dark:bg-neutral-700 dark:text-neutral-200 dark:placeholder:text-neutral-400"
|
||||||
@input="update($event, i)"
|
@input="update($event, i)"
|
||||||
/>
|
/>
|
||||||
<BaseSecondaryButton
|
<BaseSecondaryButton type="button" class="rounded-lg" @click="del(i)">
|
||||||
as="input"
|
{{ '-' }}
|
||||||
type="button"
|
</BaseSecondaryButton>
|
||||||
class="rounded-lg"
|
|
||||||
value="-"
|
|
||||||
@click="del(i)"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<BasePrimaryButton
|
<BasePrimaryButton type="button" class="rounded-lg" @click="add">
|
||||||
as="input"
|
{{ $t('form.add') }}
|
||||||
type="button"
|
</BasePrimaryButton>
|
||||||
class="rounded-lg"
|
|
||||||
:value="$t('form.add')"
|
|
||||||
@click="add"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -7,7 +7,9 @@
|
|||||||
<IconsInfo class="size-4" />
|
<IconsInfo class="size-4" />
|
||||||
</BaseTooltip>
|
</BaseTooltip>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="my-auto">
|
||||||
<BaseSwitch :id="id" v-model="data" />
|
<BaseSwitch :id="id" v-model="data" />
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<NuxtLink to="/" class="mb-4">
|
<NuxtLink to="/" class="max-sm:mb-4">
|
||||||
<h1 class="text-4xl font-medium dark:text-neutral-200">
|
<h1 class="text-4xl font-medium dark:text-neutral-200">
|
||||||
<img
|
<img
|
||||||
src="/logo.png"
|
src="/logo.png"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
authStore.userData &&
|
authStore.userData &&
|
||||||
hasPermissions(authStore.userData, 'admin', 'any')
|
hasPermissions(authStore.userData, 'admin', 'any')
|
||||||
"
|
"
|
||||||
class="font-small mb-10 rounded-md bg-red-800 p-4 text-sm text-white shadow-lg dark:bg-red-100 dark:text-red-600"
|
class="font-small rounded-md bg-red-800 p-4 text-sm text-white shadow-lg dark:bg-red-100 dark:text-red-600"
|
||||||
:title="`v${globalStore.information.currentRelease} → v${globalStore.information.latestRelease.version}`"
|
:title="`v${globalStore.information.currentRelease} → v${globalStore.information.latestRelease.version}`"
|
||||||
>
|
>
|
||||||
<div class="container mx-auto flex flex-auto flex-row items-center">
|
<div class="container mx-auto flex flex-auto flex-row items-center">
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<div class="container mx-auto max-w-3xl">
|
||||||
<div
|
<div
|
||||||
class="container mx-auto max-w-3xl overflow-hidden rounded-lg bg-white px-3 text-gray-700 shadow-md md:px-0 dark:bg-neutral-700 dark:text-neutral-200"
|
class="mx-3 overflow-hidden rounded-lg bg-white text-gray-700 shadow-md dark:bg-neutral-700 dark:text-neutral-200"
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="flex flex-shrink-0 items-center space-x-2">
|
<div class="flex flex-shrink-0 flex-col items-center gap-2 sm:flex-row">
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="flex flex-auto flex-grow flex-row items-center border-b-2 border-gray-100 p-3 px-5 dark:border-neutral-600"
|
class="flex flex-col items-center gap-2 border-b-2 border-gray-100 p-3 px-5 sm:flex-row dark:border-neutral-600"
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<h2 class="flex-1 text-2xl font-medium">
|
<h2 class="flex-1 break-all text-2xl font-medium">
|
||||||
{{ text }}
|
<slot />
|
||||||
</h2>
|
</h2>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
const { text } = defineProps<{
|
|
||||||
text: string;
|
|
||||||
}>();
|
|
||||||
</script>
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<header class="mx-auto mt-4 flex max-w-3xl flex-col justify-center">
|
<header
|
||||||
|
class="mx-auto my-4 flex max-w-3xl flex-col justify-center max-md:px-3"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
class="mb-5 w-full"
|
class="mb-5 w-full"
|
||||||
:class="
|
:class="
|
||||||
@@ -17,7 +19,7 @@
|
|||||||
<UiUserMenu v-if="loggedIn" />
|
<UiUserMenu v-if="loggedIn" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<HeaderUpdate class="mt-4" />
|
<HeaderUpdate class="my-4" />
|
||||||
</header>
|
</header>
|
||||||
<slot />
|
<slot />
|
||||||
<UiFooter />
|
<UiFooter />
|
||||||
|
|||||||
+19
-7
@@ -2,13 +2,18 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="container mx-auto p-4">
|
<div class="container mx-auto p-4">
|
||||||
<div class="flex flex-col gap-4 lg:flex-row">
|
<div class="flex flex-col gap-4 lg:flex-row">
|
||||||
<div class="rounded-lg bg-white p-4 lg:w-64 dark:bg-neutral-700">
|
<div
|
||||||
|
class="overflow-hidden rounded-lg bg-white text-gray-700 shadow-md lg:w-64 dark:bg-neutral-700 dark:text-neutral-200"
|
||||||
|
>
|
||||||
|
<PanelHead>
|
||||||
|
<PanelHeadTitle>
|
||||||
<NuxtLink to="/admin">
|
<NuxtLink to="/admin">
|
||||||
<h2 class="mb-4 text-xl font-bold dark:text-neutral-200">
|
|
||||||
{{ t('pages.admin.panel') }}
|
{{ t('pages.admin.panel') }}
|
||||||
</h2>
|
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
<div class="flex flex-col space-y-2">
|
</PanelHeadTitle>
|
||||||
|
</PanelHead>
|
||||||
|
<PanelBody>
|
||||||
|
<nav class="flex flex-col gap-2">
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
v-for="(item, index) in menuItems"
|
v-for="(item, index) in menuItems"
|
||||||
:key="index"
|
:key="index"
|
||||||
@@ -23,14 +28,21 @@
|
|||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</BaseSecondaryButton>
|
</BaseSecondaryButton>
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
</div>
|
</nav>
|
||||||
|
</PanelBody>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="flex-1 rounded-lg bg-white p-6 dark:bg-neutral-700 dark:text-neutral-200"
|
class="flex-1 overflow-hidden rounded-lg bg-white text-gray-700 shadow-md dark:bg-neutral-700 dark:text-neutral-200"
|
||||||
>
|
>
|
||||||
<h1 class="mb-6 text-3xl font-bold">{{ activeMenuItem.name }}</h1>
|
<PanelHead>
|
||||||
|
<PanelHeadTitle>
|
||||||
|
{{ activeMenuItem.name }}
|
||||||
|
</PanelHeadTitle>
|
||||||
|
</PanelHead>
|
||||||
|
<PanelBody>
|
||||||
<NuxtPage />
|
<NuxtPage />
|
||||||
|
</PanelBody>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,7 +2,9 @@
|
|||||||
<main v-if="data">
|
<main v-if="data">
|
||||||
<Panel>
|
<Panel>
|
||||||
<PanelHead>
|
<PanelHead>
|
||||||
<PanelHeadTitle :text="data.name" />
|
<PanelHeadTitle>
|
||||||
|
{{ data.name }}
|
||||||
|
</PanelHeadTitle>
|
||||||
</PanelHead>
|
</PanelHead>
|
||||||
<PanelBody>
|
<PanelBody>
|
||||||
<FormElement @submit.prevent="submit">
|
<FormElement @submit.prevent="submit">
|
||||||
|
|||||||
@@ -2,11 +2,15 @@
|
|||||||
<main>
|
<main>
|
||||||
<Panel>
|
<Panel>
|
||||||
<PanelHead>
|
<PanelHead>
|
||||||
<PanelHeadTitle :text="$t('pages.clients')" />
|
<PanelHeadTitle>
|
||||||
|
{{ $t('pages.clients') }}
|
||||||
|
</PanelHeadTitle>
|
||||||
<PanelHeadBoat>
|
<PanelHeadBoat>
|
||||||
<ClientsSearch />
|
<ClientsSearch />
|
||||||
|
<div class="flex gap-2">
|
||||||
<ClientsSort />
|
<ClientsSort />
|
||||||
<ClientsNew />
|
<ClientsNew />
|
||||||
|
</div>
|
||||||
</PanelHeadBoat>
|
</PanelHeadBoat>
|
||||||
</PanelHead>
|
</PanelHead>
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,9 @@
|
|||||||
<main>
|
<main>
|
||||||
<Panel>
|
<Panel>
|
||||||
<PanelHead>
|
<PanelHead>
|
||||||
<PanelHeadTitle :text="$t('pages.me')" />
|
<PanelHeadTitle>
|
||||||
|
{{ $t('pages.me') }}
|
||||||
|
</PanelHeadTitle>
|
||||||
</PanelHead>
|
</PanelHead>
|
||||||
<PanelBody class="dark:text-neutral-200">
|
<PanelBody class="dark:text-neutral-200">
|
||||||
<FormElement @submit.prevent="submit">
|
<FormElement @submit.prevent="submit">
|
||||||
|
|||||||
Reference in New Issue
Block a user