From 95f7c2a4d99edfc5e3b8766f91dbd06ebdbcf17b Mon Sep 17 00:00:00 2001 From: Spythere Date: Tue, 27 Sep 2022 14:52:24 +0200 Subject: [PATCH] Poprawki --- src/components/TrainsView/TrainTable.vue | 23 ++++------------------- src/scripts/utils/apiURLs.ts | 2 +- src/styles/global.scss | 6 ++++++ 3 files changed, 11 insertions(+), 20 deletions(-) diff --git a/src/components/TrainsView/TrainTable.vue b/src/components/TrainsView/TrainTable.vue index a68b28b..e83b433 100644 --- a/src/components/TrainsView/TrainTable.vue +++ b/src/components/TrainsView/TrainTable.vue @@ -42,7 +42,9 @@ export default defineComponent({ required: true, }, }, + mixins: [returnBtnMixin, modalTrainMixin], + setup(props) { const store = useStore(); const searchedTrain = inject('searchedTrain') as Ref; @@ -50,6 +52,7 @@ export default defineComponent({ const currentTrains = computed(() => { return props.trains; }); + return { searchedTrain, searchedDriver, @@ -64,6 +67,7 @@ export default defineComponent({ ), }; }, + activated() { const query = this.$route.query; if (query.trainNo && query.driverName) { @@ -74,25 +78,6 @@ export default defineComponent({ }, 20); } }, - methods: { - enter(el: HTMLElement) { - const maxHeight = getComputedStyle(el).height; - el.style.height = '0px'; - getComputedStyle(el); - setTimeout(() => { - el.style.height = maxHeight; - }, 10); - }, - afterEnter(el: HTMLElement) { - el.style.height = 'auto'; - }, - leave(el: HTMLElement) { - el.style.height = getComputedStyle(el).height; - setTimeout(() => { - el.style.height = '0px'; - }, 10); - }, - }, }); diff --git a/src/scripts/utils/apiURLs.ts b/src/scripts/utils/apiURLs.ts index 6ce39c0..ce8eedd 100644 --- a/src/scripts/utils/apiURLs.ts +++ b/src/scripts/utils/apiURLs.ts @@ -2,7 +2,7 @@ export const URLs = { stacjownikAPI: import.meta.env.VITE_APP_API_DEV == 1 && !import.meta.env.PROD ? 'http://localhost:3000' - : 'https://stacjownik-api.up.railway.app', + : 'https://stacjownik.eu-4.evennode.com', stacjownikAPIDev: 'localhost:3000', // trains: "https://api.td2.info.pl:9640/?method=getTrainsOnline", // getTimetableURL: (trainNo: string | number, region = "eu") => `https://api.td2.info.pl:9640/?method=readFromSWDR&value=getTimetable%3B${trainNo}%3B${region}` diff --git a/src/styles/global.scss b/src/styles/global.scss index 803fe16..db524c4 100644 --- a/src/styles/global.scss +++ b/src/styles/global.scss @@ -202,6 +202,12 @@ button { border-radius: 0.25em; padding: 0.25em 0.5em; + + transition: all 100ms ease; + + &:hover { + background-color: #2a2a2a; + } } .btn {