From 817d48d17ae690f1e9f0a2e4506d8d382b496b1d Mon Sep 17 00:00:00 2001 From: Spythere Date: Fri, 10 Feb 2023 17:33:17 +0100 Subject: [PATCH] feature: project URL --- src/App.vue | 24 +++++++++++++++--------- src/components/TableActions.vue | 1 + src/types/types.ts | 3 +++ src/views/LoginView.vue | 1 - src/views/ManagerView.vue | 4 +++- 5 files changed, 22 insertions(+), 11 deletions(-) diff --git a/src/App.vue b/src/App.vue index 8b95840..28049a9 100644 --- a/src/App.vue +++ b/src/App.vue @@ -85,27 +85,33 @@ body, html { padding: 0 0.25em; margin: 0; - background-color: #1e263f; + background-color: #1e2341; color: white; } button { appearance: none; outline: none; + border: none; - background-color: #151515; + background-color: #000000; color: white; - border: 1px solid white; - padding: 0.35rem 0.75rem; + padding: 0.5rem 0.75rem; margin: 0.5rem 0; - cursor: pointer; - transition: background-color 100ms; -} + font-weight: bold; -button:focus-visible { - border: 1px solid gold; + cursor: pointer; + transition: all 75ms; + + &:focus-visible { + outline: 1px solid gold; + } + + &:hover { + color: gold; + } } // Text diff --git a/src/components/TableActions.vue b/src/components/TableActions.vue index 263a559..5344894 100644 --- a/src/components/TableActions.vue +++ b/src/components/TableActions.vue @@ -202,6 +202,7 @@ export default defineComponent({ url: '', lines: '', project: null, + projectUrl: null, reqLevel: -1, signalType: 'współczesna', controlType: 'SCS', diff --git a/src/types/types.ts b/src/types/types.ts index 516fa4a..2dea2b5 100644 --- a/src/types/types.ts +++ b/src/types/types.ts @@ -4,6 +4,7 @@ export type ChangeProp = | 'url' | 'lines' | 'project' + | 'projectUrl' | 'reqLevel' | 'signalType' | 'controlType' @@ -18,6 +19,7 @@ export enum HeaderTypes { url = 'URL', lines = 'Linie', project = 'Projekt', + projectUrl = "URL projektu", reqLevel = 'Wym. poziom', signalType = 'Sygnalizacja', controlType = 'Sterowanie', @@ -43,6 +45,7 @@ export interface SceneryRowItem { url: string; lines: string; project: string | null; + projectUrl: string | null; reqLevel: number; signalType: string; controlType: string; diff --git a/src/views/LoginView.vue b/src/views/LoginView.vue index 084da1c..1c8ce05 100644 --- a/src/views/LoginView.vue +++ b/src/views/LoginView.vue @@ -55,7 +55,6 @@ export default defineComponent({ async signIn(e: Event) { e.preventDefault(); this.loginState = LoginState.LOADING; - console.log('Ładowanie'); try { const loginData = (await this.store.login(this.name, this.password)).data; diff --git a/src/views/ManagerView.vue b/src/views/ManagerView.vue index 7c25a41..582f3fb 100644 --- a/src/views/ManagerView.vue +++ b/src/views/ManagerView.vue @@ -19,6 +19,7 @@ URL + URL {{ station[propName] ? 'POKAŻ' : 'DODAJ' }} @@ -76,6 +77,7 @@ export default defineComponent({ url: 'URL', lines: 'Linie', project: 'Projekt', + projectUrl: 'URL projektu', reqLevel: 'Wym. poziom', signalType: 'Sygnalizacja', controlType: 'Sterowanie', @@ -135,7 +137,7 @@ export default defineComponent({ 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; (this.store.stationList[stationListRow] as any)[propertyName] = typeof oldValue === 'number' ? parseInt(newValue) : newValue;