mirror of
https://github.com/Spythere/station-manager-2.0.git
synced 2026-05-03 05:28:13 +00:00
feature: project URL
This commit is contained in:
+15
-9
@@ -85,27 +85,33 @@ body,
|
|||||||
html {
|
html {
|
||||||
padding: 0 0.25em;
|
padding: 0 0.25em;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
background-color: #1e263f;
|
background-color: #1e2341;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
appearance: none;
|
appearance: none;
|
||||||
outline: none;
|
outline: none;
|
||||||
|
border: none;
|
||||||
|
|
||||||
background-color: #151515;
|
background-color: #000000;
|
||||||
color: white;
|
color: white;
|
||||||
border: 1px solid white;
|
|
||||||
|
|
||||||
padding: 0.35rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
margin: 0.5rem 0;
|
margin: 0.5rem 0;
|
||||||
|
|
||||||
cursor: pointer;
|
font-weight: bold;
|
||||||
transition: background-color 100ms;
|
|
||||||
}
|
|
||||||
|
|
||||||
button:focus-visible {
|
cursor: pointer;
|
||||||
border: 1px solid gold;
|
transition: all 75ms;
|
||||||
|
|
||||||
|
&:focus-visible {
|
||||||
|
outline: 1px solid gold;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: gold;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Text
|
// Text
|
||||||
|
|||||||
@@ -202,6 +202,7 @@ export default defineComponent({
|
|||||||
url: '',
|
url: '',
|
||||||
lines: '',
|
lines: '',
|
||||||
project: null,
|
project: null,
|
||||||
|
projectUrl: null,
|
||||||
reqLevel: -1,
|
reqLevel: -1,
|
||||||
signalType: 'współczesna',
|
signalType: 'współczesna',
|
||||||
controlType: 'SCS',
|
controlType: 'SCS',
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ export type ChangeProp =
|
|||||||
| 'url'
|
| 'url'
|
||||||
| 'lines'
|
| 'lines'
|
||||||
| 'project'
|
| 'project'
|
||||||
|
| 'projectUrl'
|
||||||
| 'reqLevel'
|
| 'reqLevel'
|
||||||
| 'signalType'
|
| 'signalType'
|
||||||
| 'controlType'
|
| 'controlType'
|
||||||
@@ -18,6 +19,7 @@ export enum HeaderTypes {
|
|||||||
url = 'URL',
|
url = 'URL',
|
||||||
lines = 'Linie',
|
lines = 'Linie',
|
||||||
project = 'Projekt',
|
project = 'Projekt',
|
||||||
|
projectUrl = "URL projektu",
|
||||||
reqLevel = 'Wym. poziom',
|
reqLevel = 'Wym. poziom',
|
||||||
signalType = 'Sygnalizacja',
|
signalType = 'Sygnalizacja',
|
||||||
controlType = 'Sterowanie',
|
controlType = 'Sterowanie',
|
||||||
@@ -43,6 +45,7 @@ export interface SceneryRowItem {
|
|||||||
url: string;
|
url: string;
|
||||||
lines: string;
|
lines: string;
|
||||||
project: string | null;
|
project: string | null;
|
||||||
|
projectUrl: string | null;
|
||||||
reqLevel: number;
|
reqLevel: number;
|
||||||
signalType: string;
|
signalType: string;
|
||||||
controlType: string;
|
controlType: string;
|
||||||
|
|||||||
@@ -55,7 +55,6 @@ export default defineComponent({
|
|||||||
async signIn(e: Event) {
|
async signIn(e: Event) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this.loginState = LoginState.LOADING;
|
this.loginState = LoginState.LOADING;
|
||||||
console.log('Ładowanie');
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const loginData = (await this.store.login(this.name, this.password)).data;
|
const loginData = (await this.store.login(this.name, this.password)).data;
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
<tr v-for="(station, row) in sortedStationList" tabindex="0">
|
<tr v-for="(station, row) in sortedStationList" tabindex="0">
|
||||||
<td v-for="(value, propName) in headerNameList" @click="changeProperty(station, row, propName as string)">
|
<td v-for="(value, propName) in headerNameList" @click="changeProperty(station, row, propName as string)">
|
||||||
<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 === 'checkpoints'">{{ station[propName] ? 'POKAŻ' : 'DODAJ' }}</span>
|
<span v-else-if="propName === 'checkpoints'">{{ station[propName] ? 'POKAŻ' : 'DODAJ' }}</span>
|
||||||
|
|
||||||
@@ -76,6 +77,7 @@ export default defineComponent({
|
|||||||
url: 'URL',
|
url: 'URL',
|
||||||
lines: 'Linie',
|
lines: 'Linie',
|
||||||
project: 'Projekt',
|
project: 'Projekt',
|
||||||
|
projectUrl: 'URL projektu',
|
||||||
reqLevel: 'Wym. poziom',
|
reqLevel: 'Wym. poziom',
|
||||||
signalType: 'Sygnalizacja',
|
signalType: 'Sygnalizacja',
|
||||||
controlType: 'Sterowanie',
|
controlType: 'Sterowanie',
|
||||||
@@ -135,7 +137,7 @@ export default defineComponent({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let newValue = prompt(`Zmień wartość dla rubryki ${this.headerNameList[propertyName]}`, oldValue);
|
let newValue = prompt(`Zmień wartość dla rubryki ${this.headerNameList[propertyName]}`, oldValue || '');
|
||||||
if (newValue == null) return;
|
if (newValue == null) return;
|
||||||
(this.store.stationList[stationListRow] as any)[propertyName] =
|
(this.store.stationList[stationListRow] as any)[propertyName] =
|
||||||
typeof oldValue === 'number' ? parseInt(newValue) : newValue;
|
typeof oldValue === 'number' ? parseInt(newValue) : newValue;
|
||||||
|
|||||||
Reference in New Issue
Block a user