2019-07-05 03:19:24 +08:00
|
|
|
import { i18n } from 'Common/Translator';
|
2020-09-17 02:35:29 +08:00
|
|
|
import { root } from 'Common/Links';
|
|
|
|
|
2021-04-27 03:56:11 +08:00
|
|
|
export default App => {
|
2015-11-19 01:32:29 +08:00
|
|
|
|
2020-09-04 20:36:24 +08:00
|
|
|
rl.app = App;
|
2021-03-24 21:14:21 +08:00
|
|
|
rl.logoutReload = App.logoutReload;
|
2015-11-19 01:32:29 +08:00
|
|
|
|
2016-06-17 07:23:49 +08:00
|
|
|
rl.i18n = i18n;
|
2015-11-19 01:32:29 +08:00
|
|
|
|
2021-01-27 17:59:15 +08:00
|
|
|
rl.Enums = {
|
2021-03-16 16:46:23 +08:00
|
|
|
StorageResultType: {
|
|
|
|
Success: 0,
|
|
|
|
Error: 1,
|
2021-03-18 19:33:13 +08:00
|
|
|
Abort: 2
|
2021-03-16 16:46:23 +08:00
|
|
|
}
|
2021-01-27 17:59:15 +08:00
|
|
|
};
|
2015-11-19 01:32:29 +08:00
|
|
|
|
2020-09-17 02:35:29 +08:00
|
|
|
rl.route = {
|
|
|
|
root: () => {
|
|
|
|
rl.route.off();
|
2022-03-03 23:28:05 +08:00
|
|
|
hasher.setHash(root());
|
2020-09-17 02:35:29 +08:00
|
|
|
},
|
|
|
|
reload: () => {
|
2020-09-17 05:28:29 +08:00
|
|
|
rl.route.root();
|
2022-09-30 20:01:57 +08:00
|
|
|
setTimeout(() => location.reload(), 100);
|
2020-09-17 02:35:29 +08:00
|
|
|
},
|
2021-08-13 16:01:01 +08:00
|
|
|
off: () => hasher.active = false,
|
2022-03-03 23:28:05 +08:00
|
|
|
on: () => hasher.active = true
|
2020-09-17 02:35:29 +08:00
|
|
|
};
|
|
|
|
|
2016-04-21 01:12:51 +08:00
|
|
|
};
|