From 689fc80c3b3f2e862b938482db777b2e4da2d2b9 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Fri, 19 May 2023 11:43:25 -0400 Subject: [PATCH] Remove notifications pages from dashboard --- .../dashboard/AdvancedDrawerSection.tsx | 11 +- .../experimental/routes/asyncRoutes/admin.ts | 1 + .../experimental/routes/legacyRoutes/admin.ts | 12 -- src/apps/stable/routes/asyncRoutes/admin.ts | 1 + .../stable/routes/dashboard/notifications.tsx | 36 ++++++ src/apps/stable/routes/legacyRoutes/admin.ts | 12 -- .../notifications/notification/index.html | 68 ---------- .../notifications/notification/index.js | 121 ------------------ .../notifications/notifications/index.html | 9 -- .../notifications/notifications/index.js | 61 --------- .../dashboard/plugins/add/index.html | 2 +- src/scripts/libraryMenu.js | 5 +- src/strings/en-us.json | 13 +- 13 files changed, 53 insertions(+), 299 deletions(-) create mode 100644 src/apps/stable/routes/dashboard/notifications.tsx delete mode 100644 src/controllers/dashboard/notifications/notification/index.html delete mode 100644 src/controllers/dashboard/notifications/notification/index.js delete mode 100644 src/controllers/dashboard/notifications/notifications/index.html delete mode 100644 src/controllers/dashboard/notifications/notifications/index.js diff --git a/src/apps/experimental/components/drawers/dashboard/AdvancedDrawerSection.tsx b/src/apps/experimental/components/drawers/dashboard/AdvancedDrawerSection.tsx index 71e2c0d95f..d01a0518d5 100644 --- a/src/apps/experimental/components/drawers/dashboard/AdvancedDrawerSection.tsx +++ b/src/apps/experimental/components/drawers/dashboard/AdvancedDrawerSection.tsx @@ -1,4 +1,11 @@ -import { Lan, VpnKey, Article, EditNotifications, Extension, Schedule, ExpandLess, ExpandMore } from '@mui/icons-material'; +import Article from '@mui/icons-material/Article'; +import EditNotifications from '@mui/icons-material/EditNotifications'; +import ExpandLess from '@mui/icons-material/ExpandLess'; +import ExpandMore from '@mui/icons-material/ExpandMore'; +import Extension from '@mui/icons-material/Extension'; +import Lan from '@mui/icons-material/Lan'; +import Schedule from '@mui/icons-material/Schedule'; +import VpnKey from '@mui/icons-material/VpnKey'; import Collapse from '@mui/material/Collapse'; import List from '@mui/material/List'; import ListItem from '@mui/material/ListItem'; @@ -62,7 +69,7 @@ const AdvancedDrawerSection = () => { - + diff --git a/src/apps/experimental/routes/asyncRoutes/admin.ts b/src/apps/experimental/routes/asyncRoutes/admin.ts index 0f2ec6b9cf..72bcc6f32b 100644 --- a/src/apps/experimental/routes/asyncRoutes/admin.ts +++ b/src/apps/experimental/routes/asyncRoutes/admin.ts @@ -1,6 +1,7 @@ import { AsyncRoute } from '../../../../components/router/AsyncRoute'; export const ASYNC_ADMIN_ROUTES: AsyncRoute[] = [ + { path: 'notificationsettings.html', page: 'dashboard/notifications' }, { path: 'usernew.html', page: 'user/usernew' }, { path: 'userprofiles.html', page: 'user/userprofiles' }, { path: 'useredit.html', page: 'user/useredit' }, diff --git a/src/apps/experimental/routes/legacyRoutes/admin.ts b/src/apps/experimental/routes/legacyRoutes/admin.ts index dd1f95f6e5..e2037ddb11 100644 --- a/src/apps/experimental/routes/legacyRoutes/admin.ts +++ b/src/apps/experimental/routes/legacyRoutes/admin.ts @@ -103,18 +103,6 @@ export const LEGACY_ADMIN_ROUTES: LegacyRoute[] = [ controller: 'dashboard/metadatanfo', view: 'dashboard/metadatanfo.html' } - }, { - path: 'notificationsetting.html', - pageProps: { - controller: 'dashboard/notifications/notification/index', - view: 'dashboard/notifications/notification/index.html' - } - }, { - path: 'notificationsettings.html', - pageProps: { - controller: 'dashboard/notifications/notifications/index', - view: 'dashboard/notifications/notifications/index.html' - } }, { path: 'playbackconfiguration.html', pageProps: { diff --git a/src/apps/stable/routes/asyncRoutes/admin.ts b/src/apps/stable/routes/asyncRoutes/admin.ts index 0f2ec6b9cf..72bcc6f32b 100644 --- a/src/apps/stable/routes/asyncRoutes/admin.ts +++ b/src/apps/stable/routes/asyncRoutes/admin.ts @@ -1,6 +1,7 @@ import { AsyncRoute } from '../../../../components/router/AsyncRoute'; export const ASYNC_ADMIN_ROUTES: AsyncRoute[] = [ + { path: 'notificationsettings.html', page: 'dashboard/notifications' }, { path: 'usernew.html', page: 'user/usernew' }, { path: 'userprofiles.html', page: 'user/userprofiles' }, { path: 'useredit.html', page: 'user/useredit' }, diff --git a/src/apps/stable/routes/dashboard/notifications.tsx b/src/apps/stable/routes/dashboard/notifications.tsx new file mode 100644 index 0000000000..ca874d1333 --- /dev/null +++ b/src/apps/stable/routes/dashboard/notifications.tsx @@ -0,0 +1,36 @@ +import React from 'react'; + +import Page from 'components/Page'; +import globalize from 'scripts/globalize'; + +const PluginLink = () => ( + '; - itemHtml += ''; - } - itemHtml += '
'; - itemHtml += '
'; - itemHtml += '

'; - itemHtml += notification.Category; - itemHtml += '

'; - if (showHelp) { - showHelp = false; - itemHtml += ''; - itemHtml += globalize.translate('Help'); - itemHtml += ''; - } - itemHtml += '
'; - itemHtml += ''; - html += '
'; - } - page.querySelector('.notificationList').innerHTML = html; - loading.hide(); - }); -} - -export default function (view) { - view.addEventListener('viewshow', function () { - reload(view); - }); -} diff --git a/src/controllers/dashboard/plugins/add/index.html b/src/controllers/dashboard/plugins/add/index.html index 7d3abd55fa..7f83304609 100644 --- a/src/controllers/dashboard/plugins/add/index.html +++ b/src/controllers/dashboard/plugins/add/index.html @@ -23,7 +23,7 @@
${ServerRestartNeededAfterPluginInstall}
diff --git a/src/scripts/libraryMenu.js b/src/scripts/libraryMenu.js index ec7f26a0b2..ae59829aa5 100644 --- a/src/scripts/libraryMenu.js +++ b/src/scripts/libraryMenu.js @@ -516,10 +516,9 @@ function createToolsMenuList(pluginItems) { icon: 'bug_report' }); links.push({ - name: globalize.translate('TabNotifications'), + name: globalize.translate('Notifications'), icon: 'notifications', - href: '#/notificationsettings.html', - pageIds: ['notificationSettingsPage', 'notificationSettingPage'] + href: '#/notificationsettings.html' }); links.push({ name: globalize.translate('TabPlugins'), diff --git a/src/strings/en-us.json b/src/strings/en-us.json index 785d17182c..a9e77b1dde 100644 --- a/src/strings/en-us.json +++ b/src/strings/en-us.json @@ -4,7 +4,6 @@ "Actor": "Actor", "Add": "Add", "AddedOnValue": "Added {0}", - "AdditionalNotificationServices": "Browse the plugin catalog to install additional notification services.", "AddToCollection": "Add to collection", "AddToFavorites": "Add to favorites", "AddToPlaylist": "Add to playlist", @@ -290,6 +289,7 @@ "General": "General", "Genre": "Genre", "Genres": "Genres", + "GetThePlugin": "Get the Plugin", "GoogleCastUnsupported": "Google Cast Unsupported", "GroupBySeries": "Group by series", "GroupVersions": "Group versions", @@ -770,7 +770,6 @@ "LabelModelName": "Model name", "LabelModelNumber": "Model number", "LabelModelUrl": "Model URL", - "LabelMonitorUsers": "Monitor activity from", "LabelMovieCategories": "Movie categories", "LabelMoviePrefix": "Movie prefix", "LabelMoviePrefixHelp": "If a prefix is applied to movie titles, enter it here so the server can handle it properly.", @@ -782,7 +781,6 @@ "LabelNewPassword": "New password", "LabelNewPasswordConfirm": "New password confirm", "LabelNewsCategories": "News categories", - "LabelNotificationEnabled": "Enable this notification", "LabelNumber": "Number", "LabelNumberOfGuideDays": "Number of days of guide data to download", "LabelNumberOfGuideDaysHelp": "Downloading more days worth of guide data provides the ability to schedule out further in advance and view more listings, but it will also take longer to download. Auto will pick based on the number of channels.", @@ -855,9 +853,7 @@ "LabelSeasonNumber": "Season number", "LabelSelectFolderGroups": "Automatically group content from the following folders into views such as 'Movies', 'Music' and 'TV'", "LabelSelectFolderGroupsHelp": "Folders that are unchecked will be displayed by themselves in their own view.", - "LabelSelectUsers": "Select users", "LabelSelectVersionToInstall": "Select version to install", - "LabelSendNotificationToUsers": "Send the notification to", "LabelSerialNumber": "Serial number", "LabelSeriesRecordingPath": "Series recording path", "LabelServerHost": "Host", @@ -968,7 +964,6 @@ "LabelUDPPortRange": "UDP Communication Range", "LabelUDPPortRangeHelp": "Restrict Jellyfin to use this port range when making UDP connections. (Default is 1024 - 645535).
Note: Certain function require fixed ports that may be outside of this range.", "LabelUnstable": "Unstable", - "LabelUseNotificationServices": "Use the following services", "LabelUser": "User", "LabelUserAgent": "User agent", "LabelUserLibrary": "User library", @@ -1172,6 +1167,8 @@ "Normal": "Normal", "NoSubtitleSearchResultsFound": "No results found.", "NoSubtitlesHelp": "Subtitles will not be loaded by default. They can still be turned on manually during playback.", + "Notifications": "Notifications", + "NotificationsMovedMessage": "The notifications functionality has moved to the Webhook plugin.", "NumLocationsValue": "{0} folders", "Off": "Off", "OnApplicationStartup": "On application startup", @@ -1181,7 +1178,6 @@ "OnlyImageFormats": "Only Image Formats (VobSub, PGS, SUB)", "OnWakeFromSleep": "On wake from sleep", "Option3D": "3D", - "OptionAdminUsers": "Administrators", "OptionAllowAudioPlaybackTranscoding": "Allow audio playback that requires transcoding", "OptionAllowBrowsingLiveTv": "Allow Live TV access", "OptionAllowContentDownload": "Allow media downloads", @@ -1198,14 +1194,12 @@ "OptionAllowUserToManageServer": "Allow this user to manage the server", "OptionAllowVideoPlaybackRemuxing": "Allow video playback that requires conversion without re-encoding", "OptionAllowVideoPlaybackTranscoding": "Allow video playback that requires transcoding", - "OptionAllUsers": "All users", "OptionAutomaticallyGroupSeries": "Automatically merge series that are spread across multiple folders", "OptionAutomaticallyGroupSeriesHelp": "Series that are spread across multiple folders within this library will be automatically merged into a single series.", "OptionBluray": "BD", "OptionCaptionInfoExSamsung": "CaptionInfoEx (Samsung)", "OptionCommunityRating": "Community Rating", "OptionCriticRating": "Critics Rating", - "OptionCustomUsers": "Custom", "OptionDaily": "Daily", "OptionDateAdded": "Date Added", "OptionDateEpisodeAdded": "Date Episode Added", @@ -1504,7 +1498,6 @@ "TabNetworking": "Networking", "TabNetworks": "TV Networks", "TabNfoSettings": "NFO Settings", - "TabNotifications": "Notifications", "TabOther": "Other", "TabParentalControl": "Parental Control", "TabPlugins": "Plugins",