mirror of
https://github.com/Spythere/station-manager-2.0.git
synced 2026-05-03 13:38:13 +00:00
Migracja projektu na Vite
This commit is contained in:
+88
@@ -0,0 +1,88 @@
|
||||
<template>
|
||||
<PopUpCard v-if="store.alertMessage || store.confirmMessage" />
|
||||
|
||||
<router-view></router-view>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import dataMixin from './mixins/dataMixin';
|
||||
import { useStore } from './store';
|
||||
import PopUpCard from './components/PopUpCard.vue';
|
||||
|
||||
export default defineComponent({
|
||||
mixins: [dataMixin],
|
||||
components: { PopUpCard },
|
||||
setup() {
|
||||
const store = useStore();
|
||||
return {
|
||||
store,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
async autoLogin() {
|
||||
const token = window.localStorage.getItem('auth-token');
|
||||
if (token) {
|
||||
this.store.isAuthorized = true;
|
||||
this.store.token = token;
|
||||
this.store.user = JSON.parse(window.localStorage.getItem('user')!);
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.autoLogin();
|
||||
if (window.localStorage.getItem('notifyDiscord') !== null) {
|
||||
this.store.notifyDiscord = Boolean(Number(window.localStorage.getItem('notifyDiscord')));
|
||||
}
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@500;600&display=swap');
|
||||
|
||||
a {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: rgb(124, 164, 218);
|
||||
}
|
||||
|
||||
* {
|
||||
font-family: 'Inter', sans-serif;
|
||||
}
|
||||
|
||||
body,
|
||||
html {
|
||||
padding: 0 0.25em;
|
||||
margin: 0;
|
||||
background-color: #1e263f;
|
||||
color: white;
|
||||
}
|
||||
|
||||
button {
|
||||
appearance: none;
|
||||
outline: none;
|
||||
|
||||
background-color: #151515;
|
||||
color: white;
|
||||
border: 1px solid white;
|
||||
|
||||
padding: 0.35rem 0.75rem;
|
||||
margin: 0.5rem 0;
|
||||
|
||||
cursor: pointer;
|
||||
transition: background-color 100ms;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-color: #505050;
|
||||
}
|
||||
|
||||
button:focus-within {
|
||||
border: 1px solid gold;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user