page changes

This commit is contained in:
2026-01-14 12:36:32 +00:00
parent 9b5cbd00f7
commit 904a2dd805
6 changed files with 15 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import { ui_colors_dropdown } from '~/composables/set_colors';
const loggedIn = ref(true);
const loggedIn = ref(false);
const logout_prompt = ref(false);
const props = defineProps({
@@ -29,14 +29,14 @@ const props = defineProps({
<h2 class="font-bold">{{props.title}}</h2>
</template>
<template #right>
<UColorModeButton />
<UDropdownMenu :items="ui_colors_dropdown">
<UColorModeButton class="hover:cursor-pointer" />
<!----<UDropdownMenu :items="ui_colors_dropdown">
<UButton icon="lucide:palette" variant="ghost" color="neutral" />
</UDropdownMenu>
</UDropdownMenu>-->
<UButton icon="lucide:settings" variant="ghost" color="neutral" :to="props.settings_link ? '/settings/general' : undefined" v-if="loggedIn" />
<UModal :ui="{ overlay: 'bg-black opacity-75', content: 'bg-zinc-950 py-3'}" v-model:open="logout_prompt">
<UButton icon="lucide:log-out" variant="ghost" color="error" v-if="loggedIn" />
<UButton icon="lucide:log-out" variant="ghost" color="error" class="hover:cursor-pointer" v-if="loggedIn" />
<template #content>
<div class="p-4 text-center">
@@ -45,7 +45,7 @@ const props = defineProps({
You will have to login again.
</p>
<div class="flex gap-4 flex-col justify-end">
<UButton class="w-full dark:bg-zinc-900 hover:dark:bg-zinc-800 active:dark:bg-black" variant="soft" color="neutral" @click="logout_prompt = false">No</UButton>
<UButton class="w-full hover:cursor-pointer dark:bg-zinc-900 hover:dark:bg-zinc-800 active:dark:bg-black" variant="soft" color="neutral" @click="logout_prompt = false">No</UButton>
<UButton class="w-full" variant="soft" color="error" to="/logout">Yes</UButton>
</div>
</div>

View File

@@ -1,4 +1,5 @@
<script setup lang="ts">
const settings_submenu = ref([
{
label: "General",

View File

@@ -51,7 +51,7 @@ function onSubmit(payload: FormSubmitEvent<Schema>) {
:submit="{
label: 'Login',
class: 'rounded-full',
variant: 'solid'
variant: 'soft'
}"
>
<template #validation v-if="wrong_login">

View File

@@ -1,6 +1,7 @@
<script setup lang="ts">
definePageMeta({
layout: "settings"
layout: "settings",
middleware: ["login-required"]
})
</script>

View File

@@ -1,4 +1,7 @@
<script setup lang="ts">
definePageMeta({
middleware: ["login-required"]
})
navigateTo("/settings/general");
</script>

View File

@@ -1,6 +1,7 @@
<script setup lang="ts">
definePageMeta({
layout: "settings"
layout: "settings",
middleware: ["login-required"]
})
</script>