Compare commits

...

2 Commits

Author SHA1 Message Date
5b2546fdbc removed unnecessary log 2023-06-15 19:07:25 +02:00
c11e3993ea Added successmessage to NotificationManager 2023-06-15 19:06:53 +02:00
2 changed files with 6 additions and 3 deletions

View File

@ -68,13 +68,17 @@ public class TrangaSettings
if (values.Length != 2) if (values.Length != 2)
return; return;
notificationManagers.RemoveWhere(nm => nm.GetType() == typeof(Gotify)); notificationManagers.RemoveWhere(nm => nm.GetType() == typeof(Gotify));
notificationManagers.Add(new Gotify(values[0], values[1], logger)); Gotify newGotify = new(values[0], values[1], logger);
notificationManagers.Add(newGotify);
newGotify.SendNotification("Success!", "Gotify was added to Tranga!");
break; break;
case UpdateField.LunaSea: case UpdateField.LunaSea:
if(values.Length != 1) if(values.Length != 1)
return; return;
notificationManagers.RemoveWhere(nm => nm.GetType() == typeof(LunaSea)); notificationManagers.RemoveWhere(nm => nm.GetType() == typeof(LunaSea));
notificationManagers.Add(new LunaSea(values[0], logger)); LunaSea newLunaSea = new(values[0], logger);
notificationManagers.Add(newLunaSea);
newLunaSea.SendNotification("Success!", "LunaSea was added to Tranga!");
break; break;
} }
} }

View File

@ -303,7 +303,6 @@ function GetSettingsClick(){
settingApiUri.placeholder = apiUri; settingApiUri.placeholder = apiUri;
GetSettings().then(json => { GetSettings().then(json => {
console.log(json);
settingDownloadLocation.innerText = json.downloadLocation; settingDownloadLocation.innerText = json.downloadLocation;
json.libraryManagers.forEach(lm => { json.libraryManagers.forEach(lm => {
if(lm.libraryType == 0){ if(lm.libraryType == 0){