mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 13:28:11 +00:00
migracja assetów
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
<template>
|
||||
<label @dblclick="handleDbClick">
|
||||
<input type="checkbox" :class="option.section" :name="option.id" />
|
||||
<input
|
||||
:value="optionValue"
|
||||
@input="$emit('update:optionValue', ($event.target as HTMLInputElement).value)"
|
||||
type="checkbox"
|
||||
:class="option.section"
|
||||
:name="option.id"
|
||||
/>
|
||||
<span>
|
||||
{{ $t(`filters.${option.id}`) }}
|
||||
</span>
|
||||
@@ -24,9 +30,16 @@ export default defineComponent({
|
||||
option: {
|
||||
type: Object as () => FilterOption,
|
||||
required: true
|
||||
},
|
||||
|
||||
optionValue: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
|
||||
emits: ['update:optionValue'],
|
||||
|
||||
setup() {
|
||||
return {
|
||||
filterStore: useStationFiltersStore()
|
||||
@@ -45,6 +58,7 @@ export default defineComponent({
|
||||
|
||||
this.filterStore.lastClickedFilterId = this.option.id;
|
||||
// this.option.value = true;
|
||||
this.$emit('update:optionValue', true);
|
||||
|
||||
this.filterStore.inputs.options
|
||||
.filter((option) => {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<section class="filter-card" v-click-outside="closeCard" @keydown.esc="closeCard">
|
||||
<div class="card_controls">
|
||||
<button class="btn--filled btn--image" @click="toggleCard">
|
||||
<img class="button_icon" :src="getIcon('filter2')" alt="filter icon" />
|
||||
<img class="button_icon" src="/images/icon-filter2.svg" alt="filter icon" />
|
||||
{{ $t('options.filters') }} [F]
|
||||
<span class="active-indicator" v-if="!filterStore.areFiltersAtDefault"></span>
|
||||
</button>
|
||||
@@ -34,22 +34,6 @@
|
||||
<p class="card_info" v-html="$t('filters.desc')"></p>
|
||||
|
||||
<section class="card_options">
|
||||
<!-- QUICK ACTIONS (TODO) -->
|
||||
<!-- <div class="quick-actions">
|
||||
<h3 class="text--primary">{{ $t('filters.sections.quick') }}</h3>
|
||||
<hr />
|
||||
|
||||
<div>
|
||||
<button class="btn--action" style="width: 100%" @click="filterStore.handleQuickAction('all-available')">
|
||||
{{ $t('filters.all-available') }}
|
||||
</button>
|
||||
|
||||
<button class="btn--action" style="width: 100%" @click="filterStore.handleQuickAction('all-free')">
|
||||
{{ $t('filters.all-free') }}
|
||||
</button>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div
|
||||
class="option-section"
|
||||
v-for="section in filterStore.inputs.optionSections"
|
||||
@@ -68,6 +52,7 @@
|
||||
v-for="(option, i) in filterStore.inputs.options.filter(
|
||||
(o) => o.section == section
|
||||
)"
|
||||
v-model:optionValue="option.value"
|
||||
:option="option"
|
||||
:key="i"
|
||||
/>
|
||||
@@ -151,7 +136,6 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, inject } from 'vue';
|
||||
import imageMixin from '../../mixins/imageMixin';
|
||||
import keyMixin from '../../mixins/keyMixin';
|
||||
import routerMixin from '../../mixins/routerMixin';
|
||||
import StorageManager from '../../scripts/managers/storageManager';
|
||||
@@ -162,7 +146,7 @@ import FilterOption from './FilterOption.vue';
|
||||
|
||||
export default defineComponent({
|
||||
components: { FilterOption },
|
||||
mixins: [imageMixin, keyMixin, routerMixin],
|
||||
mixins: [keyMixin, routerMixin],
|
||||
|
||||
data: () => ({
|
||||
saveOptions: false,
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<img
|
||||
class="sort-icon"
|
||||
v-if="sorterActive.headerName == headerName"
|
||||
:src="sorterActive.dir == 1 ? getIcon('arrow-asc') : getIcon('arrow-desc')"
|
||||
:src="`/images/icon-arrow-${sorterActive.dir == 1 ? 'asc' : 'desc'}.svg`"
|
||||
alt="sort icon"
|
||||
/>
|
||||
</span>
|
||||
@@ -30,7 +30,7 @@
|
||||
>
|
||||
<span class="header_wrapper">
|
||||
<img
|
||||
:src="getIcon(headerName)"
|
||||
:src="`/images/icon-${headerName}.svg`"
|
||||
:alt="headerName"
|
||||
:title="$t(`sceneries.${headerName}`)"
|
||||
/>
|
||||
@@ -38,7 +38,7 @@
|
||||
<img
|
||||
class="sort-icon"
|
||||
v-if="sorterActive.headerName == headerName"
|
||||
:src="sorterActive.dir == 1 ? getIcon('arrow-asc') : getIcon('arrow-desc')"
|
||||
:src="`/images/icon-arrow-${sorterActive.dir == 1 ? 'asc' : 'desc'}.svg`"
|
||||
alt="sort icon"
|
||||
/>
|
||||
</span>
|
||||
@@ -79,16 +79,16 @@
|
||||
</span>
|
||||
|
||||
<span v-else-if="station.generalInfo.availability == 'abandoned'">
|
||||
<img :src="getIcon('abandoned')" alt="non-public" :title="$t('desc.abandoned')" />
|
||||
<img src="/images/icon-abandoned.svg" alt="non-public" :title="$t('desc.abandoned')" />
|
||||
</span>
|
||||
|
||||
<span v-else-if="station.generalInfo.availability == 'nonPublic'">
|
||||
<img :src="getIcon('lock')" alt="non-public" :title="$t('desc.non-public')" />
|
||||
<img src="/images/icon-lock.svg" alt="non-public" :title="$t('desc.non-public')" />
|
||||
</span>
|
||||
|
||||
<span v-else>
|
||||
<img
|
||||
:src="getIcon('unavailable')"
|
||||
src="/images/icon-unavailable.svg"
|
||||
alt="unavailable"
|
||||
:title="$t('desc.unavailable')"
|
||||
/>
|
||||
@@ -185,7 +185,7 @@
|
||||
<img
|
||||
class="icon-info"
|
||||
v-if="station.generalInfo.SUP"
|
||||
:src="getIcon('SUP')"
|
||||
src="/images/icon-SUP.svg"
|
||||
alt="SUP (RASP-UZK)"
|
||||
:title="$t('desc.SUP')"
|
||||
/>
|
||||
@@ -195,7 +195,7 @@
|
||||
<img
|
||||
class="icon-info"
|
||||
v-if="station.generalInfo.signalType"
|
||||
:src="getIcon(station.generalInfo.signalType)"
|
||||
:src="`/images/icon-${station.generalInfo.signalType}.svg`"
|
||||
:alt="station.generalInfo.signalType"
|
||||
:title="$t('desc.signals-type') + $t(`signals.${station.generalInfo.signalType}`)"
|
||||
/>
|
||||
@@ -205,7 +205,7 @@
|
||||
<img
|
||||
class="icon-info"
|
||||
v-if="station.generalInfo && station.generalInfo.routes.sblRouteNames.length > 0"
|
||||
:src="getIcon('SBL')"
|
||||
src="/images/icon-SBL.svg"
|
||||
alt="SBL"
|
||||
:title="$t('desc.SBL') + `${station.generalInfo.routes.sblRouteNames.join(',')}`"
|
||||
/>
|
||||
@@ -215,7 +215,7 @@
|
||||
<td class="station_info" v-else>
|
||||
<img
|
||||
class="icon-info"
|
||||
:src="getIcon('unknown')"
|
||||
src="/images/icon-unknown.svg"
|
||||
alt="icon-unknown"
|
||||
:title="$t('desc.unknown')"
|
||||
/>
|
||||
@@ -282,10 +282,8 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, computed } from 'vue';
|
||||
import { defineComponent, computed, PropType } from 'vue';
|
||||
import dateMixin from '../../mixins/dateMixin';
|
||||
import imageMixin from '../../mixins/imageMixin';
|
||||
import returnBtnMixin from '../../mixins/returnBtnMixin';
|
||||
import stationInfoMixin from '../../mixins/stationInfoMixin';
|
||||
import styleMixin from '../../mixins/styleMixin';
|
||||
import { DataStatus } from '../../scripts/enums/DataStatus';
|
||||
@@ -299,13 +297,13 @@ import StationStatusBadge from '../Global/StationStatusBadge.vue';
|
||||
export default defineComponent({
|
||||
props: {
|
||||
stations: {
|
||||
type: Array as () => Station[],
|
||||
type: Array as PropType<Station[]>,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
|
||||
components: { Loading, StationStatusBadge },
|
||||
mixins: [styleMixin, dateMixin, stationInfoMixin, returnBtnMixin, imageMixin],
|
||||
mixins: [styleMixin, dateMixin, stationInfoMixin],
|
||||
|
||||
data: () => ({
|
||||
headIconsIds,
|
||||
|
||||
Reference in New Issue
Block a user