Compare commits

..

No commits in common. "e10b5abe90e6cd773fded6f9f309884f2197f3c1" and "4018fd33343dd6753afeafd8dda071cdef0d4844" have entirely different histories.

8 changed files with 30 additions and 125 deletions

56
package-lock.json generated
View File

@ -7,7 +7,6 @@
"dependencies": {
"@mdi/font": "^7.4.47",
"axios": "^1.6.4",
"pinia": "^2.1.7",
"typescript": "^5.3.3",
"vue": "^3.4.14",
"vuetify": "^3.4.10"
@ -606,11 +605,6 @@
"@vue/shared": "3.4.14"
}
},
"node_modules/@vue/devtools-api": {
"version": "6.6.1",
"resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.6.1.tgz",
"integrity": "sha512-LgPscpE3Vs0x96PzSSB4IGVSZXZBZHpfxs+ZA1d+VEPwHdOXowy/Y2CsvCAIFrf+ssVU1pD1jidj505EpUnfbA=="
},
"node_modules/@vue/reactivity": {
"version": "3.4.14",
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.14.tgz",
@ -912,56 +906,6 @@
"url": "https://github.com/sponsors/jonschlinkert"
}
},
"node_modules/pinia": {
"version": "2.1.7",
"resolved": "https://registry.npmjs.org/pinia/-/pinia-2.1.7.tgz",
"integrity": "sha512-+C2AHFtcFqjPih0zpYuvof37SFxMQ7OEG2zV9jRI12i9BOy3YQVAHwdKtyyc8pDcDyIc33WCIsZaCFWU7WWxGQ==",
"dependencies": {
"@vue/devtools-api": "^6.5.0",
"vue-demi": ">=0.14.5"
},
"funding": {
"url": "https://github.com/sponsors/posva"
},
"peerDependencies": {
"@vue/composition-api": "^1.4.0",
"typescript": ">=4.4.4",
"vue": "^2.6.14 || ^3.3.0"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
},
"typescript": {
"optional": true
}
}
},
"node_modules/pinia/node_modules/vue-demi": {
"version": "0.14.7",
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.7.tgz",
"integrity": "sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==",
"hasInstallScript": true,
"bin": {
"vue-demi-fix": "bin/vue-demi-fix.js",
"vue-demi-switch": "bin/vue-demi-switch.js"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
},
"peerDependencies": {
"@vue/composition-api": "^1.0.0-rc.1",
"vue": "^3.0.0-0 || ^2.6.0"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
}
}
},
"node_modules/postcss": {
"version": "8.4.33",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz",

View File

@ -15,7 +15,6 @@
"dependencies": {
"@mdi/font": "^7.4.47",
"axios": "^1.6.4",
"pinia": "^2.1.7",
"typescript": "^5.3.3",
"vue": "^3.4.14",
"vuetify": "^3.4.10"

View File

@ -1,15 +0,0 @@
import {defineStore} from "pinia";
export const useScheduleStore = defineStore('Schedule', {
state: () => ({
fetchingDates: true,
fetchingTable: true,
fetchingLinks: true
}),
getters: {
},
actions: {
},
})

View File

@ -1,11 +1,12 @@
<template>
<v-sheet class="mt-5 mb-5 rounded-lg w-75">
<p class="text-h3 ma-5">Расписание стримов</p>
<v-skeleton-loader v-if="fetching" type="text" />
<p v-else class="ma-5 text-h4"> {{ parseDate(dates[0].current_date) }} - {{ parseDate(dates[1].current_date) }}</p>
<ScheduleTable/>
<p class="text-h3 ma-5">Ссылочки</p>
<Links/>
<v-sheet class="bg-gradient h-100 w-100 d-flex justify-center">
<v-sheet class="mt-5 mb-5 rounded-lg w-75">
<p class="text-h3 ma-5">Расписание стримов</p>
<p class="ma-5 text-h4">{{ parseDate(dates[0].current_date) }} - {{ parseDate(dates[1].current_date) }}</p>
<ScheduleTable/>
<p class="text-h3 ma-5">Ссылочки</p>
<Links/>
</v-sheet>
</v-sheet>
</template>
@ -18,31 +19,31 @@ export default {
name: "Schedule",
components: {Links, ScheduleTable},
data: () => ({
dates: [],
fetching: true
dates: []
}),
methods: {
parseDate(date){
let dateArr = date.split("-");
return dateArr[2] + "." + dateArr[1];
},
async getDates(){
await axios
.get('/api/v1/dates')
.then(response => {
this.dates = response.data;
this.fetching = false;
});
}
},
mounted() {
this.getDates();
axios
.get('/api/v1/dates')
.then(response => (this.dates = response.data));
}
}
</script>
<style scoped>
.bg-gradient {
background: linear-gradient(-45deg, #f103b0, #f0a068, #4fdbfeff);
background-size: 200% 200%;
animation: gradient 15s ease infinite;
height: 100vh;
}
@keyframes gradient {
0% {
background-position: 0 50%;

View File

@ -1,19 +1,14 @@
<script>
import axios from "axios";
export default {
name: "Links",
data: () => ({
links: [],
fetching: true
links: []
}),
mounted() {
axios
.get('/api/v1/links')
.then(response => {
this.links = response.data;
this.fetching = false;
});
.then(response => (this.links = response.data));
}
}
</script>
@ -21,8 +16,7 @@
<template>
<div class="w-100 d-flex justify-center">
<v-list class="w-66">
<v-skeleton-loader v-if="fetching" type="list-item"/>
<v-list-item v-else class="ma-5 bg-gradient-noh" elevation="6" v-for="link in links" :href="link.link"> <!-- style="background-color: #E57373; color: #FFFFFF" -->
<v-list-item class="ma-5 bg-gradient-noh" elevation="6" v-for="link in links" :href="link.link"> <!-- style="background-color: #E57373; color: #FFFFFF" -->
<template v-slot:prepend>
<v-avatar :image="link.image" rounded="0"></v-avatar>
</template>

View File

@ -1,11 +1,9 @@
<script>
import axios from "axios";
export default {
name: "ScheduleTable",
data: () => ({
schedules: [],
fetching: true
schedules: []
}),
methods: {
parseDate(date){
@ -16,18 +14,14 @@
mounted() {
axios
.get('/api/v1/schedules')
.then(response => {
this.schedules = response.data;
this.fetching = false;
});
.then(response => (this.schedules = response.data));
}
}
</script>
<template>
<div class="w-100 d-flex justify-center">
<v-skeleton-loader v-if="fetching" type="table"/>
<v-table v-else class="text-h5 w-66">
<v-table class="text-h5 w-66">
<tbody>
<tr v-for="schedule in schedules">
<td>{{ parseDate(schedule.current_date) }} {{ schedule.weekday_name }} {{ schedule.stream_time }}</td>

View File

@ -1,13 +1,11 @@
<template>
<v-app>
<v-sheet class="bg-gradient h-100 w-100 d-flex justify-center">
<Schedule/>
</v-sheet>
<Schedule></Schedule>
</v-app>
</template>
<script>
import Schedule from "./Schedule.vue";
import Schedule from "./Schedule.vue"
export default {
name: "Welcome",
@ -17,11 +15,4 @@ export default {
<style scoped>
.bg-gradient {
background: linear-gradient(-45deg, #f103b0, #f0a068, #4fdbfeff);
background-size: 200% 200%;
animation: gradient 15s ease infinite;
height: 100vh;
}
</style>

View File

@ -1,6 +1,5 @@
import './js/bootstrap';
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import {createApp} from 'vue'
import App from './views/Welcome.vue'
import { createVuetify } from 'vuetify'
import 'vuetify/styles'
@ -8,11 +7,9 @@ import * as components from 'vuetify/components'
import * as directives from 'vuetify/directives'
import '@mdi/font/css/materialdesignicons.css'
const pinia = createPinia();
const vuetify = createVuetify({
components,
directives
});
})
createApp(App).use(vuetify).use(pinia).mount("#app");
createApp(App).use(vuetify).mount("#app")