asdek; hotfixy

This commit is contained in:
2024-03-04 18:14:42 +01:00
parent f7eeaa342a
commit c3b8ed9359
5 changed files with 13 additions and 5 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ export default defineComponent({
const response = await client.post<IUser>('/auth/token');
this.store.setUserData(response.data);
this.$router.push('/');
// this.$router.push('/');
} catch (error) {
this.store.removeUserData();
this.$router.push('/login');
+1 -1
View File
@@ -148,7 +148,7 @@ export default defineComponent({
signalType: 'współczesna',
controlType: 'SCS',
SUP: false,
routes: 'Test_1EPB:0:0',
ASDEK: false,
hidden: false,
routesInfo: [
{
+5 -1
View File
@@ -20,6 +20,10 @@ router.beforeEach((to, from, next) => {
return;
}
if (to.meta.loginPage && window.localStorage.getItem('user')) {
next('/');
return;
}
next();
});
+3 -1
View File
@@ -10,6 +10,7 @@ export type ChangeProp =
| 'signalType'
| 'controlType'
| 'SUP'
| 'ASDEK'
| 'routesInfo'
| 'checkpoints'
| 'authors'
@@ -28,6 +29,7 @@ export enum HeaderTypes {
signalType = 'Sygnalizacja',
controlType = 'Sterowanie',
SUP = 'SUP',
ASDEK = 'ASDEK',
authors = 'Autorzy',
routesInfo = 'Szlaki',
checkpoints = 'Posterunki',
@@ -68,8 +70,8 @@ export interface SceneryRowItem {
signalType: string;
controlType: string;
SUP: boolean;
ASDEK: boolean;
hidden: boolean;
routes: string;
routesInfo: SceneryRoutesInfo[];
checkpoints: string;
authors: string;
+3 -1
View File
@@ -17,7 +17,7 @@
<tbody>
<tr v-for="(station, row) in store.sortedStationList" tabindex="0">
<td v-for="(value, propName) in headerNameList" @click="changeProperty(station, row, propName as string)" :class="propName">
<td v-for="(_, propName) in headerNameList" @click="changeProperty(station, row, propName as string)" :class="propName">
<span v-if="propName === 'url'" :style="station.url ? 'color: gold' : 'color: gray;'">URL</span>
<span v-else-if="propName === 'projectUrl'" :style="station.projectUrl ? 'color: gold' : 'color: gray;'">URL</span>
@@ -31,6 +31,7 @@
<span v-else-if="typeof (station as any)[propName] === 'boolean'">
{{ (station as any)[propName] ? '' : '' }}
</span>
<span v-else>{{ (station as any)[propName] }}</span>
</td>
@@ -85,6 +86,7 @@ export default defineComponent({
signalType: 'Sygnalizacja',
controlType: 'Sterowanie',
SUP: 'SUP',
ASDEK: 'ASDEK',
authors: 'Autorzy',
routes: 'Szlaki',
checkpoints: 'Posterunki',