1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-06-17 18:13:21 +02:00

UI work, config.js stuff

This commit is contained in:
binwiederhier 2022-12-21 13:19:07 -05:00
parent 2b833413cf
commit d982ce13f5
18 changed files with 173 additions and 131 deletions
web/src/components

View file

@ -59,12 +59,12 @@ export const useAutoSubscribe = (subscriptions, selected) => {
setHasRun(true);
const eligible = params.topic && !selected && !disallowedTopic(params.topic);
if (eligible) {
const baseUrl = (params.baseUrl) ? expandSecureUrl(params.baseUrl) : window.location.origin;
const baseUrl = (params.baseUrl) ? expandSecureUrl(params.baseUrl) : config.baseUrl;
console.log(`[App] Auto-subscribing to ${topicUrl(baseUrl, params.topic)}`);
(async () => {
const subscription = await subscriptionManager.add(baseUrl, params.topic);
if (session.exists()) {
const remoteSubscription = await api.addAccountSubscription("http://localhost:2586", session.token(), {
const remoteSubscription = await api.addAccountSubscription(config.baseUrl, session.token(), {
base_url: baseUrl,
topic: params.topic
});