diff --git a/src/app.js b/src/app.js
index 9a26520e..ec8ba052 100644
--- a/src/app.js
+++ b/src/app.js
@@ -1,11 +1,8 @@
-import s from './app.module.scss';
-
import { ipcRenderer } from 'electron';
import _find from 'lodash/find';
import React, { useReducer, useMemo, useRef, useEffect } from 'react';
import { HashRouter as Router, Switch, Route } from 'react-router-dom';
-import { useTranslation } from 'react-i18next';
import { Client as Styletron } from 'styletron-engine-atomic';
import { Provider as StyletronProvider } from 'styletron-react';
@@ -15,6 +12,7 @@ import AppContext from 'src/share/context';
import appReducer, { initialState, init } from 'src/share/reducer';
import config from 'src/native/config';
+import Footer from 'src/components/footer';
import Toolbar from 'src/components/toolbar';
import Home from 'src/modules/home';
import Import from 'src/modules/import';
@@ -41,7 +39,6 @@ const findUserChampion = (cellId, actions = []) => {
};
const App = () => {
- const [t] = useTranslation();
const [store, dispatch] = useReducer(appReducer, initialState, init);
const contextValue = useMemo(() => ({ store, dispatch }), [store, dispatch]);
@@ -118,9 +115,7 @@ const App = () => {
-
- {t('app version')}: {process.env.APP_VERSION}
-
+
diff --git a/src/app.module.scss b/src/app.module.scss
index b09d693c..96243203 100644
--- a/src/app.module.scss
+++ b/src/app.module.scss
@@ -85,13 +85,3 @@
}
}
}
-
-.app-ver {
- position: fixed;
- bottom: 2vh;
- left: 50%;
- transform: translateX(-50%);
- color: #b5b4b4;
- font-size: 1.6ex;
- font-family: SF Mono, Consolas, sans-serif;
-}
diff --git a/src/components/footer/index.js b/src/components/footer/index.js
new file mode 100644
index 00000000..c73aac34
--- /dev/null
+++ b/src/components/footer/index.js
@@ -0,0 +1,30 @@
+import s from './style.module.scss';
+
+import { shell } from 'electron';
+
+import React from 'react';
+import { useTranslation } from 'react-i18next';
+import { Star } from 'react-feather';
+import { useStyletron } from 'baseui';
+import { StatefulTooltip } from 'baseui/tooltip';
+
+export default function Footer() {
+ const [t] = useTranslation();
+ const [, theme] = useStyletron();
+
+ const star = (ev) => {
+ ev.preventDefault();
+ shell.openItem(`https://github.com/cangzhang/champ-r`);
+ };
+
+ return (
+
+ {t('app version')}: {process.env.APP_VERSION}
+
+
+
+
+
+
+ );
+}
diff --git a/src/components/footer/style.module.scss b/src/components/footer/style.module.scss
new file mode 100644
index 00000000..a24ef856
--- /dev/null
+++ b/src/components/footer/style.module.scss
@@ -0,0 +1,22 @@
+.footer {
+ display: flex;
+ align-items: center;
+
+ position: fixed;
+ bottom: 2vh;
+ left: 50%;
+ transform: translateX(-50%);
+ color: #b5b4b4;
+ font-size: 1.6ex;
+ font-family: SF Mono, Consolas, sans-serif;
+
+ .star {
+ display: flex;
+ margin-left: 1ex;
+ cursor: pointer;
+
+ svg {
+ fill: #ffc043;
+ }
+ }
+}
diff --git a/src/modules/i18n/en-us.js b/src/modules/i18n/en-us.js
index 8710b76f..6ec807e2 100644
--- a/src/modules/i18n/en-us.js
+++ b/src/modules/i18n/en-us.js
@@ -26,5 +26,6 @@ export default {
'pick count': `Pick count`,
'win ratio': `Win ratio`,
'apply perk': `Apply`,
+ 'star it': `Star it!`,
},
};
diff --git a/src/modules/i18n/zh-cn.js b/src/modules/i18n/zh-cn.js
index d4058708..fa4b170d 100644
--- a/src/modules/i18n/zh-cn.js
+++ b/src/modules/i18n/zh-cn.js
@@ -26,5 +26,6 @@ export default {
'pick count': `选用场次`,
'win ratio': `胜率`,
'apply perk': `应用符文页`,
+ 'star it': `给 ChampR 🌟`,
},
};