mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
refactor(app): styles cleanup; minor code improvements
This commit is contained in:
@@ -1,13 +0,0 @@
|
|||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
stroke-width="2"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
d="M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 341 B |
@@ -14,7 +14,7 @@
|
|||||||
class="header-text"
|
class="header-text"
|
||||||
:class="headerName"
|
:class="headerName"
|
||||||
>
|
>
|
||||||
<span class="header_wrapper">
|
<div class="header_wrapper">
|
||||||
<div v-html="$t(`sceneries.headers.${headerName}`)"></div>
|
<div v-html="$t(`sceneries.headers.${headerName}`)"></div>
|
||||||
|
|
||||||
<img
|
<img
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
:src="`/images/icon-arrow-${activeSorter.dir == 1 ? 'asc' : 'desc'}.svg`"
|
:src="`/images/icon-arrow-${activeSorter.dir == 1 ? 'asc' : 'desc'}.svg`"
|
||||||
alt="sort icon"
|
alt="sort icon"
|
||||||
/>
|
/>
|
||||||
</span>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th
|
<th
|
||||||
@@ -52,14 +52,14 @@
|
|||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<router-link
|
<tr
|
||||||
v-for="station in filteredStationList"
|
v-for="station in filteredStationList"
|
||||||
class="a-row"
|
class="a-row"
|
||||||
role="row"
|
tabindex="0"
|
||||||
:key="station.name"
|
:key="station.name"
|
||||||
@click.right.prevent="openForumSite($event, station.generalInfo?.url)"
|
@click.right.prevent="openForumSite($event, station.generalInfo?.url)"
|
||||||
@keydown.space.prevent="openForumSite($event, station.generalInfo?.url)"
|
@click="getSceneryRoute(station)"
|
||||||
:to="getSceneryRoute(station)"
|
@keydown.enter="getSceneryRoute(station)"
|
||||||
>
|
>
|
||||||
<td class="station-name" :class="station.generalInfo?.availability">
|
<td class="station-name" :class="station.generalInfo?.availability">
|
||||||
<b v-if="station.generalInfo?.project" style="color: salmon">{{
|
<b v-if="station.generalInfo?.project" style="color: salmon">{{
|
||||||
@@ -314,7 +314,7 @@
|
|||||||
>
|
>
|
||||||
{{ station.onlineInfo?.scheduledTrainCount.confirmed ?? '-' }}
|
{{ station.onlineInfo?.scheduledTrainCount.confirmed ?? '-' }}
|
||||||
</td>
|
</td>
|
||||||
</router-link>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@@ -384,15 +384,13 @@ export default defineComponent({
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
getSceneryRoute(station: Station) {
|
getSceneryRoute(station: Station) {
|
||||||
// TODO: Hide tooltips when navigating away
|
this.$router.push({
|
||||||
|
|
||||||
return {
|
|
||||||
name: 'SceneryView',
|
name: 'SceneryView',
|
||||||
query: {
|
query: {
|
||||||
station: station.name,
|
station: station.name,
|
||||||
region: this.$route.query.region || undefined
|
region: this.$route.query.region || undefined
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
openDonationCard(e: Event) {
|
openDonationCard(e: Event) {
|
||||||
@@ -459,78 +457,78 @@ table {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
min-width: 1250px;
|
min-width: 1250px;
|
||||||
white-space: wrap;
|
white-space: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
thead {
|
thead {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
z-index: 50;
|
||||||
|
}
|
||||||
|
|
||||||
|
thead tr {
|
||||||
|
background-color: var(--clr-bg3);
|
||||||
|
}
|
||||||
|
|
||||||
|
thead th {
|
||||||
|
background-color: var(--clr-bg3);
|
||||||
|
white-space: pre-wrap;
|
||||||
|
padding: 0.5em 0.25em;
|
||||||
|
|
||||||
|
cursor: pointer;
|
||||||
|
user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
|
||||||
|
&.station {
|
||||||
|
width: 12em;
|
||||||
}
|
}
|
||||||
|
|
||||||
thead tr {
|
&.min-lvl {
|
||||||
background-color: var(--clr-bg3);
|
width: 4em;
|
||||||
}
|
}
|
||||||
|
|
||||||
thead th {
|
&.status {
|
||||||
&.station {
|
width: 10em;
|
||||||
width: 12em;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
&.min-lvl {
|
&.dispatcher {
|
||||||
width: 4em;
|
width: 12em;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.status {
|
&.dispatcher-lvl {
|
||||||
width: 10em;
|
width: 6em;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.dispatcher {
|
&.routes-double,
|
||||||
width: 12em;
|
&.routes-single {
|
||||||
}
|
width: 7em;
|
||||||
|
}
|
||||||
|
|
||||||
&.dispatcher-lvl {
|
&.general {
|
||||||
width: 6em;
|
width: 11em;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.routes-double,
|
&.header-image {
|
||||||
&.routes-single {
|
width: 3.5em;
|
||||||
width: 7em;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.general {
|
&.user {
|
||||||
width: 11em;
|
width: 5em;
|
||||||
}
|
|
||||||
|
|
||||||
&.header-image {
|
|
||||||
width: 3.5em;
|
|
||||||
|
|
||||||
&.user {
|
|
||||||
width: 5em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
padding: 0.5em 0.25em;
|
|
||||||
background-color: var(--clr-bg3);
|
|
||||||
white-space: pre-wrap;
|
|
||||||
|
|
||||||
cursor: pointer;
|
|
||||||
user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
-webkit-user-select: none;
|
|
||||||
|
|
||||||
span {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
|
|
||||||
img {
|
|
||||||
width: 1.5em;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tr,
|
thead th .header_wrapper {
|
||||||
.a-row {
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 1.5em;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tbody tr {
|
||||||
background-color: $rowCol;
|
background-color: $rowCol;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
|
||||||
@@ -550,6 +548,7 @@ tr,
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
height: 2.5em;
|
||||||
|
|
||||||
&.inactive {
|
&.inactive {
|
||||||
opacity: 0.2;
|
opacity: 0.2;
|
||||||
|
|||||||
@@ -38,7 +38,8 @@ export const useMainStore = defineStore('mainStore', {
|
|||||||
modalLastClickedTarget: null,
|
modalLastClickedTarget: null,
|
||||||
currentLocale: 'pl',
|
currentLocale: 'pl',
|
||||||
|
|
||||||
isMigrateInfoCardOpen: false
|
isMigrateInfoCardOpen: false,
|
||||||
|
pinnedStationNames: []
|
||||||
}) as MainStoreState,
|
}) as MainStoreState,
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
@@ -431,7 +432,6 @@ export const useMainStore = defineStore('mainStore', {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
name: scenery.name,
|
name: scenery.name,
|
||||||
|
|
||||||
generalInfo: {
|
generalInfo: {
|
||||||
...scenery,
|
...scenery,
|
||||||
authors: scenery.authors?.split(',').map((a) => a.trim()),
|
authors: scenery.authors?.split(',').map((a) => a.trim()),
|
||||||
@@ -446,7 +446,7 @@ export const useMainStore = defineStore('mainStore', {
|
|||||||
},
|
},
|
||||||
|
|
||||||
allStationInfo(): Station[] {
|
allStationInfo(): Station[] {
|
||||||
const onlineUnsavedStations = this.activeSceneryList
|
const onlineUnsavedStations: Station[] = this.activeSceneryList
|
||||||
.filter(
|
.filter(
|
||||||
(scenery) =>
|
(scenery) =>
|
||||||
this.stationList.findIndex((st) => st.name == scenery.name) == -1 &&
|
this.stationList.findIndex((st) => st.name == scenery.name) == -1 &&
|
||||||
|
|||||||
+21
-1
@@ -89,7 +89,8 @@ select {
|
|||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
input, select {
|
input,
|
||||||
|
select {
|
||||||
background: none;
|
background: none;
|
||||||
color: white;
|
color: white;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
@@ -358,3 +359,22 @@ a.a-button {
|
|||||||
background-color: #aaa;
|
background-color: #aaa;
|
||||||
margin: 0.5em 0;
|
margin: 0.5em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.g-checkbox {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
user-select: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
input {
|
||||||
|
position: absolute;
|
||||||
|
width: 1px;
|
||||||
|
height: 1px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -39,9 +39,3 @@
|
|||||||
color: #aefff8;
|
color: #aefff8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-heart {
|
|
||||||
-webkit-mask: url(images/icon-heart.svg) no-repeat center;
|
|
||||||
mask: url(images/icon-heart.svg) no-repeat center;
|
|
||||||
mask-size: 1em;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -62,7 +62,3 @@
|
|||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
padding-right: 0.5em;
|
padding-right: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
select.search-input {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -95,9 +95,7 @@ export interface TrainTimetableData {
|
|||||||
|
|
||||||
export interface Station {
|
export interface Station {
|
||||||
name: string;
|
name: string;
|
||||||
|
|
||||||
generalInfo?: StationGeneralInfo;
|
generalInfo?: StationGeneralInfo;
|
||||||
|
|
||||||
onlineInfo?: ActiveScenery;
|
onlineInfo?: ActiveScenery;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user