mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-11-10 09:02:45 +08:00
32 lines
508 B
JavaScript
32 lines
508 B
JavaScript
import { i18n } from 'Common/Translator';
|
|
import { root } from 'Common/Links';
|
|
|
|
export default App => {
|
|
|
|
rl.app = App;
|
|
rl.logoutReload = App.logoutReload;
|
|
|
|
rl.i18n = i18n;
|
|
|
|
rl.Enums = {
|
|
StorageResultType: {
|
|
Success: 0,
|
|
Error: 1,
|
|
Abort: 2
|
|
}
|
|
};
|
|
|
|
rl.route = {
|
|
root: () => {
|
|
rl.route.off();
|
|
hasher.setHash(root());
|
|
},
|
|
reload: () => {
|
|
rl.route.root();
|
|
setTimeout(() => location.reload(), 100);
|
|
},
|
|
off: () => hasher.active = false,
|
|
on: () => hasher.active = true
|
|
};
|
|
|
|
};
|