Skip to content

Commit

Permalink
chore: rename components
Browse files Browse the repository at this point in the history
  • Loading branch information
ludchieng committed Jan 24, 2023
1 parent a0a324a commit eb70416
Show file tree
Hide file tree
Showing 18 changed files with 38 additions and 38 deletions.
9 changes: 3 additions & 6 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<template>
<div id="app">
<AppHeader />
<AppPageView />
<AppView />
</div>
</template>

Expand All @@ -10,15 +9,13 @@ import Vue from 'vue'
import '@fontsource/inter/latin-500.css'
import '@fontsource/inter/latin-600.css'
import '@fontsource/inter/latin-700.css'
import AppHeader from '@/components/AppHeader.vue'
import AppPageView from '@/components/AppPageView.vue'
import AppView from '@/components/AppView.vue'
import { lastUpdatedAt, synchronize } from './utils/localstore/synchronizer'
export default Vue.extend({
name: 'App',
components: {
AppHeader,
AppPageView,
AppView,
},
created () {
if (!lastUpdatedAt()) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/AppHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<script lang="ts">
import Vue from 'vue'
import LineIcon from '@/components/Line/Icon.vue'
import LineIcon from '@/components/LineIcon.vue'
import TimeClock from '@/components/TimeClock.vue'
import { DateTime } from '@/utils/datetime'
export default Vue.extend({
Expand Down
2 changes: 1 addition & 1 deletion src/components/AppNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<script lang="ts">
import Vue from 'vue'
import { getStop } from '@/utils/localstore/stops'
import LineIcon from '@/components/Line/Icon.vue'
import LineIcon from '@/components/LineIcon.vue'
export default Vue.extend({
name: 'AppNav',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<div>
<AppHeader />
<div class="tab">
<router-view>
</router-view>
Expand All @@ -11,10 +12,12 @@
<script lang="ts">
import Vue from 'vue'
import AppNav from '@/components/AppNav.vue'
import AppHeader from '@/components/AppHeader.vue'
export default Vue.extend({
name: 'AppPageView',
name: 'AppView',
components: {
AppHeader,
AppNav,
},
})
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

<script lang="ts">
import Vue from 'vue'
import LineRouteMapTable from './Table.vue'
import LineRouteMapTable from './LineMapTable.vue'
import { RouteMapType } from '@/utils/parser'
import { getLineRouteMap } from '@/utils/localstore/lines'
export default Vue.extend({
name: 'LineRouteMap',
name: 'LineMap',
components: { LineRouteMapTable },
props: {
line: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
import Vue from 'vue'
export default Vue.extend({
name: 'LineRouteMapDrawingCell',
name: 'LineMapDrawingCell',
props: {
content: String,
isLargeCircle: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
<script lang="ts">
import Vue, { PropType } from 'vue'
import { LineConnectionType } from '@/utils/parser'
import LineIcon from '@/components/Line/Icon.vue'
import LineIcon from '@/components/LineIcon.vue'
export default Vue.extend({
name: 'LineRouteMapLabelCell',
name: 'LineMapLabelCell',
components: { LineIcon },
props: {
stopName: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
<script lang="ts">
import Vue, { PropType } from 'vue'
import { RouteMapType } from '@/utils/parser'
import DrawingCell from './DrawingCell.vue'
import LabelCell from './LabelCell.vue'
import DrawingCell from './LineMapDrawingCell.vue'
import LabelCell from './LineMapLabelCell.vue'
export default Vue.extend({
name: 'LineRouteMapTable',
name: 'LineMapTable',
components: { DrawingCell, LabelCell },
props: {
line: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<script lang="ts">
import Vue, { PropType } from 'vue'
import { StopType } from '@/utils/parser'
import LineIcon from '@/components/Line/Icon.vue'
import LineIcon from '@/components/LineIcon.vue'
export default Vue.extend({
name: 'StopHeader',
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@

<script lang="ts">
import Vue, { PropType } from 'vue'
import TrainVisits from '@/components/Stop/Timetable/Visits.vue'
import TrainVisits from '@/components/Stop/StopSchedulesVisits.vue'
import { StopType } from '@/utils/parser'
import { fetchTimetables, VisitType } from '@/utils/fetcher'
import { getLinesByRef } from '@/utils/localstore/lines'
export default Vue.extend({
name: 'StopTimetable',
name: 'StopSchedules',
components: {
TrainVisits,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ import { toDateTime } from '@/utils/datetime'
import TimeClock from '@/components/TimeClock.vue'

export default Vue.extend({
name: 'StopTimetableVisits',
name: 'StopSchedulesVisits',
components: {
TimeClock,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

<script lang="ts">
import Vue from 'vue'
import LineIcon from '@/components/Line/Icon.vue'
import LineIcon from '@/components/LineIcon.vue'
import { getLinesByCategory } from '@/utils/localstore/lines'
export default Vue.extend({
name: 'TabPageNew',
name: 'TimetablesHome',
components: { LineIcon },
computed: {
linesByCategory () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

<script lang="ts">
import Vue from 'vue'
import LineRouteMap from '@/components/Line/RouteMap/index.vue'
import LineRouteMap from '@/components/LineMap/LineMap.vue'
export default Vue.extend({
name: 'TabPageLine',
name: 'TimetablesLine',
components: { LineRouteMap },
})
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
<script lang="ts">
import Vue from 'vue'
import { StopType } from '@/utils/parser'
import StopTimetable from '@/components/Stop/Timetable/index.vue'
import StopHeader from '@/components/Stop/Header.vue'
import StopPrevNextStops from '@/components/Stop/PrevNextStops.vue'
import StopTimetable from '@/components/Stop/StopSchedules.vue'
import StopHeader from '@/components/Stop/StopHeader.vue'
import StopPrevNextStops from '@/components/Stop/StopPrevNextStops.vue'
import { getStop } from '@/utils/localstore/stops'
export default Vue.extend({
name: 'TabPageStop',
name: 'TimetablesStop',
components: {
StopTimetable,
StopHeader,
Expand Down
10 changes: 5 additions & 5 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Vuex from 'vuex'
import VuexPersistence from 'vuex-persist'
import './registerServiceWorker'
import App from './App.vue'
import TabPage from '@/pages/TabPage/index.vue'
import TimetablesPage from '@/pages/TimetablesPage.vue'
import SettingsPage from '@/pages/SettingsPage.vue'

Vue.config.productionTip = false
Expand All @@ -14,10 +14,10 @@ Vue.use(Vuex)
const routes = [
{ path: '/', component: App },
{ path: '/settings', component: SettingsPage },
{ path: '/timetables/', component: TabPage },
{ path: '/timetables/:tab', component: TabPage },
{ path: '/timetables/:tab/:line', component: TabPage },
{ path: '/timetables/:tab/:line/:stop', component: TabPage },
{ path: '/timetables/', component: TimetablesPage },
{ path: '/timetables/:tab', component: TimetablesPage },
{ path: '/timetables/:tab/:line', component: TimetablesPage },
{ path: '/timetables/:tab/:line/:stop', component: TimetablesPage },
]

const router = new VueRouter({
Expand Down
8 changes: 4 additions & 4 deletions src/pages/TabPage/index.vue → src/pages/TimetablesPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

<script lang="ts">
import Vue from 'vue'
import TabPageNew from '@/pages/TabPage/New.vue'
import TabPageLine from '@/pages/TabPage/Line.vue'
import TabPageStop from '@/pages/TabPage/Stop.vue'
import TabPageNew from '@/components/Timetables/TimetablesHome.vue'
import TabPageLine from '@/components/Timetables/TimetablesLine.vue'
import TabPageStop from '@/components/Timetables/TimetablesStop.vue'
export default Vue.extend({
name: 'TabPage',
name: 'TimetablesPage',
components: {
TabPageNew,
TabPageLine,
Expand Down

0 comments on commit eb70416

Please sign in to comment.