slightly better
This commit is contained in:
parent
86c132f9cd
commit
f9b8d6ed1b
7 changed files with 47 additions and 27 deletions
|
@ -122,7 +122,7 @@ const NavList = (props) => {
|
|||
<ListItemIcon><SettingsIcon/></ListItemIcon>
|
||||
<ListItemText primary={t("nav_button_settings")}/>
|
||||
</ListItemButton>
|
||||
<ListItemButton onClick={() => openUrl("/docs")}>
|
||||
<ListItemButton onClick={() => openUrl("docs")}>
|
||||
<ListItemIcon><ArticleIcon/></ListItemIcon>
|
||||
<ListItemText primary={t("nav_button_documentation")}/>
|
||||
</ListItemButton>
|
||||
|
|
|
@ -22,7 +22,7 @@ i18n
|
|||
escapeValue: false, // not needed for react as it escapes by default
|
||||
},
|
||||
backend: {
|
||||
loadPath: '/static/langs/{{lng}}.json',
|
||||
loadPath: 'static/langs/{{lng}}.json',
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
import config from "../app/config";
|
||||
import {shortUrl} from "../app/utils";
|
||||
|
||||
const root = RootPath; // Defined in `public/index.html`.
|
||||
const routes = {
|
||||
root: config.appRoot,
|
||||
settings: "/settings",
|
||||
subscription: "/:topic",
|
||||
subscriptionExternal: "/:baseUrl/:topic",
|
||||
root: root,
|
||||
settings: root+"settings",
|
||||
subscription: root+":topic",
|
||||
subscriptionExternal: root+":baseUrl/:topic",
|
||||
forSubscription: (subscription) => {
|
||||
if (subscription.baseUrl !== window.location.origin) {
|
||||
return `/${shortUrl(subscription.baseUrl)}/${subscription.topic}`;
|
||||
return root+`${shortUrl(subscription.baseUrl)}/${subscription.topic}`;
|
||||
}
|
||||
return `/${subscription.topic}`;
|
||||
return root+`${subscription.topic}`;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue