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