chore [P-01]: vite hmr

This commit is contained in:
Nukeap committed 2025-02-26 08:04:18 +03:00
1 parent b10199a46e
commit c718a76490
6 files changed
+169 -221

No files matched your search

+104 -173
View File
@@ -1,192 +1,127 @@
<template>
<v-container fluid class="d-flex mx-0 pa-0">
<v-row class="ma-2">
<v-col
class="d-flex flex-column"
lg=7
md=12
cols=12
>
<v-row class="flex-grow-0">
<v-col class="pa-1">
<Carousel-list/>
<v-container fluid class="d-flex mx-0 pa-0">
<v-row class="ma-2">
<v-col class="d-flex flex-column" lg="7" md="12" cols="12">
<v-row class="flex-grow-0">
<v-col class="pa-1">
<Carousel-list />
</v-col>
</v-row>
<v-row style="height: 250px">
<v-col class="d-flex flex-column flex-grow-0 pa-1">
<!-- <event-calendar/> -->
</v-col>
</v-row>
</v-col>
</v-row>
<v-row style="height:250px">
<v-col class="d-flex flex-column flex-grow-0 pa-1">
<!-- <event-calendar/> -->
</v-col>
</v-row>
</v-col>
<v-col
class="d-flex flex-column"
lg=5
md=12
cols=12
>
<v-row>
<v-col class="d-flex flex-column">
<v-row >
<v-col
lg=4
md=2
cols=12
class="pa-1"
style="min-height:250px"
>
<digital-letna/>
</v-col>
<v-col
class="d-flex flex-column pa-1"
lg=8
md=10
cols=12
style="min-height:550px"
>
<v-card class="h-100 d-flex flex-column">
<v-row class="d-flex justify-md-center">
<v-col class="flex-column d-flex">
<news-home/>
</v-col>
</v-row>
</v-card>
</v-col>
</v-row>
</v-col>
</v-row>
<v-row class="flex-grow-0">
<v-col class="pa-1">
<v-card class="flex-colmn">
<v-sheet
class="mx-auto "
:class="favorit.length>10?'mx-n3':''"
max-width="800"
>
<v-slide-group
show-arrows
<v-col class="d-flex flex-column" lg="5" md="12" cols="12">
<v-row>
<v-col class="d-flex flex-column">
<v-row>
<v-col lg="4" md="2" cols="12" class="pa-1" style="min-height: 250px">
<digital-letna />
</v-col>
<v-col
class="d-flex flex-column pa-1"
lg="8"
md="10"
cols="12"
style="min-height: 550px"
>
<v-slide-group-item
v-for="x in favorit"
:key="x"
>
<v-btn-toggle
v-model="toggle"
divided
variant="outlined"
>
<v-tooltip
:text="x.pages__page"
location="top"
>
<template v-slot:activator="{ props }">
<v-btn
v-bind="props"
:icon="x.pages__ico"
:to="x.pages__fullPath"
/>
</template>
</v-tooltip>
</v-btn-toggle>
</v-slide-group-item>
</v-slide-group>
</v-sheet>
</v-card>
</v-col>
</v-row>
</v-col>
</v-row>
</v-container>
<v-card class="h-100 d-flex flex-column">
<v-row class="d-flex justify-md-center">
<v-col class="flex-column d-flex">
<news-home />
</v-col>
</v-row>
</v-card>
</v-col>
</v-row>
</v-col>
</v-row>
<v-row class="flex-grow-0">
<v-col class="pa-1">
<v-card class="flex-colmn">
<v-sheet class="mx-auto" :class="favorit.length > 10 ? 'mx-n3' : ''" max-width="800">
<v-slide-group show-arrows>
<v-slide-group-item v-for="x in favorit" :key="x">
<v-btn-toggle v-model="toggle" divided variant="outlined">
<v-tooltip :text="x.pages__page" location="top">
<template v-slot:activator="{ props }">
<v-btn v-bind="props" :icon="x.pages__ico" :to="x.pages__fullPath" />
</template>
</v-tooltip>
</v-btn-toggle>
</v-slide-group-item>
</v-slide-group>
</v-sheet>
</v-card>
</v-col>
</v-row>
</v-col>
</v-row>
</v-container>
</template>
<script>
import { ref, onMounted } from 'vue'
import {useAppStore} from '@/store/app'
import {useAccountStore} from '@/store/AccountStore'
import {pagecounter} from '@/utils/universal_functions'
import { ref, onMounted } from 'vue';
import { useAppStore } from '@/store/app';
import { useAccountStore } from '@/store/AccountStore';
import { pagecounter } from '@/utils/universal_functions';
import CarouselList from '@/components/carousel-list.vue'
import CarouselNumbers from '@/components/carousel-numbers.vue'
import CarouselList from '@/components/carousel-list.vue';
import NewsHome from '@/components/news-home.vue'
import LoadRound from '@/components/load-round.vue'
import DigitalLetna from '@/components/digital-letna.vue'
import { axiosApiInstance } from '@/utils/axios-api'
import NewsHome from '@/components/news-home.vue';
import EventCalendar from '@/components/calendar_of_events/event-calendar.vue'
import DigitalLetna from '@/components/digital-letna.vue';
import { axiosApiInstance } from '@/utils/axios-api';
export default {
export default {
components: {
CarouselList,
components: {
CarouselList,
CarouselNumbers,
DigitalLetna,
NewsHome,
},
LoadRound,
DigitalLetna,
EventCalendar,
NewsHome
},
setup() {
const appStore = useAppStore();
const favorit = ref([]);
const toggle = ref(null);
const accountStore = useAccountStore();
pagecounter();
setup(){
const appStore = useAppStore()
const favorit = ref([])
const toggle = ref(null)
const burl ="d"
const accountStore = useAccountStore()
pagecounter()
onMounted(() => {
favoritLinks();
});
onMounted(() => {
favoritLinks()
const favoritLinks = () => {
axiosApiInstance.get(`api/watcher/selectedlinks/`).then((data) => {
favorit.value = data.data;
});
};
})
return {
accountStore,
appStore,
favoritLinks,
favorit,
const favoritLinks = () => {
axiosApiInstance.get(`api/watcher/selectedlinks/`)
.then(data => {
favorit.value = data.data
})
}
return {
accountStore,
appStore,
favoritLinks,
favorit,
toggle
}
}
}
toggle,
};
},
};
</script>
<style lang="scss">
.v-picker-title, .v-picker__header, .v-picker__actions {
.v-picker-title,
.v-picker__header,
.v-picker__actions {
display: none;
}
.pik {
height: 84vh;
/*height: 85.3vh;*/
@@ -194,7 +129,7 @@
}
.hicard {
height: 40%!important;
height: 40% !important;
overflow: auto;
}
@@ -203,8 +138,6 @@
overflow: auto;
}
.fixed-bar {
position: sticky;
position: -webkit-sticky; /* for Safari */
@@ -213,14 +146,12 @@
}
.bgCard {
/* #ffffff6b #ffffff8c*/
background: #ffffff38 ;
/* #ffffff6b #ffffff8c*/
background: #ffffff38;
}
.bgText {
background: #ffffffb0;
line-height: 2.1rem!important;
background: #ffffffb0;
line-height: 2.1rem !important;
}
</style>
+12 -23
View File
@@ -1,46 +1,35 @@
// Plugins
import vue from '@vitejs/plugin-vue'
import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
import vue from '@vitejs/plugin-vue';
import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify';
// Utilities
import { defineConfig } from 'vite'
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite';
import { fileURLToPath, URL } from 'node:url';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue({
template: { transformAssetUrls }
vue({
template: { transformAssetUrls },
}),
// https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vite-plugin
vuetify({
autoImport: true,
}),
],
define: { 'process.env': {} },
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
extensions: [
'.js',
'.json',
'.jsx',
'.mjs',
'.ts',
'.tsx',
'.vue',
],
extensions: ['.js', '.json', '.jsx', '.mjs', '.ts', '.tsx', '.vue'],
},
server: {
host: '0.0.0.0',
port: 3000,
hmr:{
host: '0.0.0.0',
hmr: {
// host: '0.0.0.0',
port: 3000,
}
},
},
})
});