This commit is contained in:
2022-10-12 21:56:36 +02:00
parent d27e254899
commit 393021fb0e
4 changed files with 30 additions and 5 deletions
+4
View File
@@ -0,0 +1,4 @@
vite.svg,1665228976584,59ec4b6085a0cb1bf712a5e48dd5f35b08e34830d49c2026c18241be04e05d5a
assets/index.694f84f0.css,1665604158056,07c0ac3ec502686b9c25bd54b4db96e1923049ecdd45f0c223d6a9165734aac0
index.html,1665604158056,e72c5dec31089b141e62f438da34ad4af037ad20e9edc3fcd4041e1143a278cd
assets/index.2d867ca1.js,1665604158056,2bc5e40da1c762576b1c14113f33b21203eaa404a74184f941fd171f8b9298bc
+2 -1
View File
@@ -6,7 +6,8 @@
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "vue-tsc --noEmit && vite build", "build": "vue-tsc --noEmit && vite build",
"preview": "vite preview" "preview": "vite preview",
"deploy": "yarn build && firebase deploy --only hosting"
}, },
"dependencies": { "dependencies": {
"@types/vue-router": "^2.0.0", "@types/vue-router": "^2.0.0",
+14 -3
View File
@@ -1,13 +1,15 @@
<template> <template>
<div class="app_content"> <div class="app_content">
<nav class="navbar"> <nav class="navbar">
<div v-if="!selectedStation">Pragotron TD2</div> <div v-if="!selectedStation">
Pragotron TD2 <span class="text--accent">v{{ VERSION }}</span> <sup>by Spythere</sup>
</div>
<button v-else class="back-btn btn--text" @click="selectedStation = null">&lt; powrót</button> <button v-else class="back-btn btn--text" @click="selectedStation = null">&lt; powrót</button>
</nav> </nav>
<main> <main>
<div class="scenery-selector" v-if="!selectedStation"> <div class="scenery-selector" v-if="!selectedStation">
<h1>Scenerie online</h1> <h1>Scenerie <span class="text--accent">online</span></h1>
<ul class="scenery-list"> <ul class="scenery-list">
<li v-for="(station, i) in onlineStations"> <li v-for="(station, i) in onlineStations">
@@ -32,6 +34,8 @@ import IStationData from './types/IStationData';
import { ISceneryResponse } from './types/ISceneryReponse'; import { ISceneryResponse } from './types/ISceneryReponse';
import { IOnlineStationsResponse } from './types/IOnlineStationsResponse'; import { IOnlineStationsResponse } from './types/IOnlineStationsResponse';
import packageInfo from '../package.json';
export default defineComponent({ export default defineComponent({
components: { components: {
PragotronVue, PragotronVue,
@@ -56,6 +60,8 @@ export default defineComponent({
data: () => ({ data: () => ({
onlineStations: [] as IStationData[], onlineStations: [] as IStationData[],
dataLoaded: false, dataLoaded: false,
VERSION: packageInfo.version,
}), }),
async mounted() { async mounted() {
@@ -116,7 +122,7 @@ export default defineComponent({
} }
nav { nav {
flex: 0 1 auto; flex: 0 1 40px;
font-size: 1.35em; font-size: 1.35em;
padding: 0.25em; padding: 0.25em;
@@ -126,6 +132,11 @@ nav {
background-color: $accentBg; background-color: $accentBg;
sup {
font-size: 0.8em;
color: $dimmedText;
}
button { button {
padding: 0; padding: 0;
} }
+9
View File
@@ -1,7 +1,16 @@
$primaryText: white; $primaryText: white;
$accentText: gold; $accentText: gold;
$dimmedText: #ddd;
$primaryBg: #333; $primaryBg: #333;
$secondaryBg: #aaa; $secondaryBg: #aaa;
$accentBg: #327ea5; $accentBg: #327ea5;
.text--accent {
color: $accentText;
}
.text--grayed {
color: $dimmedText;
}