refactor [X-01]: надо доделать еще скрытие пользователей онлайн

This commit is contained in:
lexxik753 committed 2025-09-17 17:37:10 +03:00
1 parent 3b8e67c83b
commit 049c4a1915
5 files changed
+29 -21

No files matched your search

@@ -2,20 +2,26 @@
<!-- добавить проверку пользователи скрыты или нет (смена текста) от состояния -->
<v-tooltip v-for="itemMenu in navMenu" :text="itemMenu.text" location="bottom">
<template v-slot:activator="{ props }">
<v-btn :icon="itemMenu.icon" v-bind="props" @click="itemMenu.event"/>
<v-btn :icon="itemMenu.icon" v-bind="props" @click="itemMenu.event" :color="itemMenu.color"/>
</template>
</v-tooltip>
<v-dialog v-model="isDialog" width="800">
<card-like :LikeDialog="isDialog" @menusClose="isDialog = false"/>
</v-dialog>
</template>
<script setup>
import router from '@/router';
import { useTheme } from "vuetify";
import CardLike from '@/components/cardLike.vue'
import { useAccountStore } from '@/store/AccountStore';
import { ref } from 'vue';
const userStore = useAccountStore()
const theme = useTheme()
const isDialog = ref(null)
const navMenu = ref([
{
@@ -27,12 +33,13 @@ const navMenu = ref([
text: 'Обратная связь',
icon: 'mdi-thumb-up-outline',
// Добавить открытие модалки
event: () => router.push('/faq'),
event: () => isDialog.value = true,
},
{
text: 'Сменить тему',
icon: 'mdi-lightbulb-outline',
event: () => theme.global.name.value = theme.global.current.value.dark ? 'light' : 'dark',
color: 'lampa',
event: () => theme.toggle(),
},
{
text: 'Скрыть пользователей',
@@ -45,5 +52,4 @@ const navMenu = ref([
event: () => userStore.logout(),
},
])
</script>
+17 -4
View File
@@ -1,5 +1,5 @@
<template>
<v-app-bar density="compact" color="teal-darken-4" elevation="1">
<v-app-bar v-if="props.isAuth" density="compact" color="teal-darken-4" elevation="1">
<template v-slot:image>
<v-img gradient="to top right, rgba(19,84,122,.8), rgba(128,208,199,.8)" />
</template>
@@ -13,20 +13,33 @@
<AppNavigation />
</v-col>
</v-app-bar>
<v-app-bar v-else density="compact" color="teal-darken-4" elevation="1">
<template v-slot:image>
<v-img gradient="to top right, rgba(19,84,122,.8), rgba(128,208,199,.8)" />
</template>
<v-col class="d-flex justify-end">
<AuthForm @challengealert="alarm= true"/>
</v-col>
</v-app-bar>
</template>
<script setup>
import router from '../../router';
import vcardUser from '../../components/UI/fiousercard/vcardUser.vue';
import AppNavigation from '../../components/UI/AppHeader/AppNavigation.vue';
import router from '@/router';
import vcardUser from '@/components/UI/fiousercard/vcardUser.vue';
import AppNavigation from '@/components/UI/AppHeader/AppNavigation.vue';
import AuthForm from '@/components/UI/Auth-form.vue';
import { ref } from 'vue';
const props = defineProps({
showSideBar: Boolean,
logo: String,
author: Object,
isAuth: Boolean,
})
defineEmits(['showSide'])
const alarm = ref(false)
</script>
@@ -1,6 +1,6 @@
<template>
<v-app>
<AppHeader @show-side="rail = !rail" :showSideBar="rail" :logo="imageSrc" :author="accountStore.user"/>
<AppHeader :isAuth="accountStore.cod2user" @show-side="rail = !rail" :showSideBar="rail" :logo="imageSrc" :author="accountStore.user"/>
<v-app-bar :elevation="accountStore.cod2user ? 2 : 0" density="compact" color="app_bar" class="pl-4">
<v-icon v-if="accountStore.cod2user" class="px-3" size="20" color="black_and_white"
:icon="rail ? 'mdi-chevron-right' : 'mdi-chevron-left'" @click="rail = !rail" />
-11
View File
@@ -1,10 +1,3 @@
/**
* main.js
*
* Bootstraps Vuetify and other plugins then mounts the App`
*/
// Components
import App from './App.vue'
// Composables
@@ -27,10 +20,6 @@ components.forEach((component) => {
app.component('vue3-autocounter', Vue3Autocounter)
// Vue.use(VueScrollTo)
registerPlugins(app)
app.mount('#app')
+1 -1
View File
@@ -51,7 +51,7 @@ export default createVuetify({
},
dark: {
colors: {
lampa: '#121212',
lampa: '#FFB300',
primary: '#1E88E5',
secondary: '#64B5F6',
main_theme: "#121212",