Merge pull request #5 from Spythere/development

Wersja 2.4.1
This commit is contained in:
Spythere
2024-03-04 18:19:39 +01:00
committed by GitHub
6 changed files with 14 additions and 6 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "station-manager-2.0", "name": "station-manager-2.0",
"private": true, "private": true,
"version": "2.4.0", "version": "2.4.1",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
+1 -1
View File
@@ -35,7 +35,7 @@ export default defineComponent({
const response = await client.post<IUser>('/auth/token'); const response = await client.post<IUser>('/auth/token');
this.store.setUserData(response.data); this.store.setUserData(response.data);
this.$router.push('/'); // this.$router.push('/');
} catch (error) { } catch (error) {
this.store.removeUserData(); this.store.removeUserData();
this.$router.push('/login'); this.$router.push('/login');
+1 -1
View File
@@ -148,7 +148,7 @@ export default defineComponent({
signalType: 'współczesna', signalType: 'współczesna',
controlType: 'SCS', controlType: 'SCS',
SUP: false, SUP: false,
routes: 'Test_1EPB:0:0', ASDEK: false,
hidden: false, hidden: false,
routesInfo: [ routesInfo: [
{ {
+5 -1
View File
@@ -20,6 +20,10 @@ router.beforeEach((to, from, next) => {
return; return;
} }
if (to.meta.loginPage && window.localStorage.getItem('user')) {
next('/');
return;
}
next(); next();
}); });
+3 -1
View File
@@ -10,6 +10,7 @@ export type ChangeProp =
| 'signalType' | 'signalType'
| 'controlType' | 'controlType'
| 'SUP' | 'SUP'
| 'ASDEK'
| 'routesInfo' | 'routesInfo'
| 'checkpoints' | 'checkpoints'
| 'authors' | 'authors'
@@ -28,6 +29,7 @@ export enum HeaderTypes {
signalType = 'Sygnalizacja', signalType = 'Sygnalizacja',
controlType = 'Sterowanie', controlType = 'Sterowanie',
SUP = 'SUP', SUP = 'SUP',
ASDEK = 'ASDEK',
authors = 'Autorzy', authors = 'Autorzy',
routesInfo = 'Szlaki', routesInfo = 'Szlaki',
checkpoints = 'Posterunki', checkpoints = 'Posterunki',
@@ -68,8 +70,8 @@ export interface SceneryRowItem {
signalType: string; signalType: string;
controlType: string; controlType: string;
SUP: boolean; SUP: boolean;
ASDEK: boolean;
hidden: boolean; hidden: boolean;
routes: string;
routesInfo: SceneryRoutesInfo[]; routesInfo: SceneryRoutesInfo[];
checkpoints: string; checkpoints: string;
authors: string; authors: string;
+3 -1
View File
@@ -17,7 +17,7 @@
<tbody> <tbody>
<tr v-for="(station, row) in store.sortedStationList" tabindex="0"> <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-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> <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'"> <span v-else-if="typeof (station as any)[propName] === 'boolean'">
{{ (station as any)[propName] ? '' : '' }} {{ (station as any)[propName] ? '' : '' }}
</span> </span>
<span v-else>{{ (station as any)[propName] }}</span> <span v-else>{{ (station as any)[propName] }}</span>
</td> </td>
@@ -85,6 +86,7 @@ export default defineComponent({
signalType: 'Sygnalizacja', signalType: 'Sygnalizacja',
controlType: 'Sterowanie', controlType: 'Sterowanie',
SUP: 'SUP', SUP: 'SUP',
ASDEK: 'ASDEK',
authors: 'Autorzy', authors: 'Autorzy',
routes: 'Szlaki', routes: 'Szlaki',
checkpoints: 'Posterunki', checkpoints: 'Posterunki',