diff --git a/public/images/icon-exit.svg b/public/images/icon-exit.svg new file mode 100644 index 0000000..0ffae97 --- /dev/null +++ b/public/images/icon-exit.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/cards/RealStockCard.vue b/src/components/cards/RealStockCard.vue index 3c3fd2f..465cccf 100644 --- a/src/components/cards/RealStockCard.vue +++ b/src/components/cards/RealStockCard.vue @@ -10,7 +10,7 @@ Railtrains997 @@ -100,13 +100,13 @@ import { useStore } from '../../store'; import imageMixin from '../../mixins/imageMixin'; import stockMixin from '../../mixins/stockMixin'; -import { IRealComposition } from '../../types'; +import { IRealComposition, VehicleGroupType } from '../../types'; -function getVehicleType(stockType: string) { - if (/^E/.test(stockType)) return 'loco-e'; - if (/^S/.test(stockType)) return 'loco-s'; +function getVehicleType(stockType: string): VehicleGroupType { + if (/^E/.test(stockType)) return 'loco-electric'; + if (/^S/.test(stockType)) return 'loco-diesel'; - return 'car-passenger'; + return 'wagon-passenger'; } export default defineComponent({ @@ -223,12 +223,10 @@ export default defineComponent({ @import '../../styles/global.scss'; .exit-btn { - font-size: 1.2em; - margin: 0.25em 0; -} - -.btn { - background-color: #444; + display: flex; + background-color: #333; + border-radius: 0.25em; + padding: 0.5em; } .card_content { diff --git a/src/types.ts b/src/types.ts index 848562a..a1f3724 100644 --- a/src/types.ts +++ b/src/types.ts @@ -3,7 +3,7 @@ export type StockSectionMode = 'STOCK_LIST' | 'STOCK_GENERATOR'; export type LocoGroupType = 'loco-electric' | 'loco-diesel' | 'unit-electric' | 'unit-diesel'; export type WagonGroupType = 'wagon-passenger' | 'wagon-freight'; -export type VehicleGroupType = LocoGroupType & WagonGroupType; +export type VehicleGroupType = LocoGroupType | WagonGroupType; export interface IVehicleProps { type: string;