page changes
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
const settings_submenu = ref([
|
||||
{
|
||||
label: "General",
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
definePageMeta({
|
||||
layout: "settings"
|
||||
layout: "settings",
|
||||
middleware: ["login-required"]
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
definePageMeta({
|
||||
middleware: ["login-required"]
|
||||
})
|
||||
navigateTo("/settings/general");
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
definePageMeta({
|
||||
layout: "settings"
|
||||
layout: "settings",
|
||||
middleware: ["login-required"]
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user