Skip to content

Commit

Permalink
hkbus.app notification
Browse files Browse the repository at this point in the history
  • Loading branch information
chunlaw committed Jul 20, 2021
1 parent 3bb6da3 commit ae952e2
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# 香港 - 獨立巴士預報

## 新 repository

此專案已移施到新的 [Github](https://github.com/hkbus/hk-independent-bus-eta),新 Github 將秉持無廣告宗旨,繼續提供巴士線及到站預報資料。

[![React](https://badges.aleen42.com/src/react.svg)](http://reactjs.org/)
[![Test](https://github.com/chunlaw/hk-independent-bus-eta/actions/workflows/node.js.yml/badge.svg)](https://chunlaw.github.io/hk-independent-bus-eta)

Expand Down
1 change: 1 addition & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="canonical" href="https://hkbus.app/" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=0" />
<meta name="theme-color" content="#000000" />
<meta
Expand Down
24 changes: 24 additions & 0 deletions src/components/Home.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import React, { useContext, useEffect, useState } from 'react'
import {
Card,
Typography,
CircularProgress,
List,
Paper
} from '@material-ui/core'
import { useTranslation } from 'react-i18next'
import { makeStyles } from '@material-ui/core/styles'
import AppContext from '../AppContext'
import { getDistance } from '../utils'
Expand Down Expand Up @@ -68,8 +71,16 @@ const Home = () => {
}, [])

const classes = useStyles()
const { t } = useTranslation()
return (
<Paper className={classes.root}>
<Card
className={classes.upgradeContainer}
onClick={() => {window.location.href = "https://hkbus.app"}}
>
<Typography variant="subtitle1">{t('升級最新介面')}</Typography>
<Typography variant="caption">{t('秉持無廣告簡潔介面')} - <a href="https://hkbus.app">hkbus.app</a></Typography>
</Card>
<List className={classes.list}>
{
selectedRoutes.map( selectedRoute => (
Expand All @@ -92,6 +103,19 @@ const useStyles = makeStyles ( theme => ({
height: 'calc(100vh - 120px)',
overflowY: 'scroll',
textAlign: 'center'
},
upgradeContainer: {
width: "100%",
flexDirection: "column",
'& a': {
textDecoration: 'none'
},
'& .MuiTypography-subtitle1': {
fontWeight: '600'
},
'& .MuiTypography-caption': {
fontWeight: '600'
}
}
}))

4 changes: 3 additions & 1 deletion src/i18n/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
"經不同媒介分享給親友": "Share it!",
"Telegram 交流區": "Telegram sharing group",
"歡迎意見及技術交流": "Welcome comment & technology sharing",
"車費": "Fee"
"車費": "Fee",
"升級最新介面": "Click to upgrade",
"秉持無廣告簡潔介面": "Upholds the ad-free and clear interface"
}
},
"zh": {
Expand Down

0 comments on commit ae952e2

Please sign in to comment.