1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2024-09-28 19:31:59 +02:00
ntfy/web/src/components/routes.js

26 lines
683 B
JavaScript
Raw Normal View History

import config from "../app/config";
import {shortUrl} from "../app/utils";
2022-12-21 19:19:07 +01:00
// Remember to also update the "disallowedTopics" list!
const routes = {
2022-12-02 21:37:48 +01:00
home: "/",
2022-12-13 21:19:40 +01:00
pricing: "/pricing",
2022-12-02 21:37:48 +01:00
login: "/login",
2022-12-08 02:44:20 +01:00
signup: "/signup",
2022-12-16 04:07:04 +01:00
resetPassword: "/reset-password",
2022-12-02 21:37:48 +01:00
app: config.appRoot,
2022-12-16 04:07:04 +01:00
account: "/account",
settings: "/settings",
subscription: "/:topic",
subscriptionExternal: "/:baseUrl/:topic",
forSubscription: (subscription) => {
2022-12-21 19:19:07 +01:00
if (subscription.baseUrl !== config.baseUrl) {
return `/${shortUrl(subscription.baseUrl)}/${subscription.topic}`;
}
return `/${subscription.topic}`;
}
};
2022-04-08 16:44:35 +02:00
export default routes;