diff --git a/frontend/.vscode/settings.json b/frontend/.vscode/settings.json index ce016a207..8ebee51da 100644 --- a/frontend/.vscode/settings.json +++ b/frontend/.vscode/settings.json @@ -12,7 +12,6 @@ "NotificationsManagmentMachines", "NotificationsNetworkTable", "NotificationsOverview", - "NotificationsRocketPoolTable", "a11y", "checkout", "ci", diff --git a/frontend/components/notifications/NotificationsRocketPoolTable.vue b/frontend/components/notifications/NotificationsRocketPoolTable.vue deleted file mode 100644 index 74e654823..000000000 --- a/frontend/components/notifications/NotificationsRocketPoolTable.vue +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - - - - - - - - - - - - - - {{ getEventTypeName(slotProps.data.event_type) }} - - ({{ formatToPercent(slotProps.data.alert_value ?? 0) }}) - - - - - - - - - - - - - {{ $t('notifications.rocketpool.col.node_address') }} - - - - - - - - - - - - - - - - diff --git a/frontend/locales/en.json b/frontend/locales/en.json index 586d44e26..50beb6d4e 100644 --- a/frontend/locales/en.json +++ b/frontend/locales/en.json @@ -805,19 +805,6 @@ }, "push": "Push" }, - "rocketpool": { - "col": { - "node_address": "Node Address", - "notification": "Notification", - "rocketpool_subscription":"Rocketpool ({count} Subscriptions)" - }, - "event_types": { - "collateral_max": "Max collateral reached", - "collateral_min": "Min collateral reached", - "reward_round": "New reward round" - }, - "search_placeholder": "Node Address" - }, "subscriptions": { "accounts": { "erc20_token_transfers": { @@ -906,8 +893,7 @@ "dashboards": "Dashboards", "general": "General", "machines": "Machines", - "networks": "Networks", - "rocketpool": "Rocket Pool" + "networks": "Networks" }, "title": "Notifications" }, diff --git a/frontend/pages/notifications.vue b/frontend/pages/notifications.vue index 53179e311..0ec1050d3 100644 --- a/frontend/pages/notifications.vue +++ b/frontend/pages/notifications.vue @@ -19,7 +19,6 @@ const tabKey = { dashboards: 'dashboards', machines: 'machines', networks: 'networks', - rocketpool: 'rocketpool', } const tabs: HashTabs = [ { @@ -37,10 +36,6 @@ const tabs: HashTabs = [ key: tabKey.clients, title: $t('notifications.tabs.clients'), }, - { - key: tabKey.rocketpool, - title: $t('notifications.tabs.rocketpool'), - }, { icon: faNetworkWired, key: tabKey.networks, @@ -106,14 +101,6 @@ const openManageNotifications = () => { @open-dialog="openManageNotifications" /> - - - - - - { - const data = ref() - return { data } -}) - -export function useNotificationsRocketpoolStore() { - const { isLoggedIn } = useUserStore() - const { fetch } = useCustomFetch() - const { data: rocketpoolNotifications } = storeToRefs(notificationsRocketpoolStore()) - - const { - cursor, - isStoredQuery, - onSort, - pageSize, - query, - setCursor, - setPageSize, - setSearch, - setStoredQuery, - } = useTableQuery({ - limit: 10, - sort: 'timestamp:desc', - }, 10) - - const isLoading = ref(false) - async function loadRocketpoolNotifications(q: TableQueryParams) { - isLoading.value = true - setStoredQuery(q) - try { - const res = await fetch( - API_PATH.NOTIFICATIONS_ROCKETPOOL, - undefined, - undefined, - q, - ) - isLoading.value = false - if (!isStoredQuery(q)) { - return // in case some query params change while loading - } - rocketpoolNotifications.value = res - return rocketpoolNotifications.value - } - catch (e) { - rocketpoolNotifications.value = undefined - throw e - } - } - // - - watch([ query ], ([ q ]) => { - if (q) { - isLoggedIn.value && loadRocketpoolNotifications(q) - } - }, - { immediate: true }, - ) - - return { - cursor, - isLoading, - onSort, - pageSize, - query, - rocketpoolNotifications, - setCursor, - setPageSize, - setSearch, - } -} diff --git a/frontend/types/customFetch.ts b/frontend/types/customFetch.ts index 508a8cb0d..6f44c0a81 100644 --- a/frontend/types/customFetch.ts +++ b/frontend/types/customFetch.ts @@ -54,7 +54,6 @@ export enum API_PATH { NOTIFICATIONS_MANAGEMENT_SAVE = '/notifications/management/save', NOTIFICATIONS_NETWORK = '/notifications/networks', NOTIFICATIONS_OVERVIEW = '/notifications', - NOTIFICATIONS_ROCKETPOOL = '/notifications/rocket_pool', NOTIFICATIONS_TEST_EMAIL = '/notifications/test_email', NOTIFICATIONS_TEST_PUSH = '/notifications/test_push', NOTIFICATIONS_TEST_WEBHOOK = '/users/me/notifications/test_webhook', @@ -365,10 +364,6 @@ export const mapping: Record = { mock: false, path: '/users/me/notifications', }, - [API_PATH.NOTIFICATIONS_ROCKETPOOL]: { - method: 'GET', - path: '/users/me/notifications/rocket-pool', - }, [API_PATH.NOTIFICATIONS_TEST_EMAIL]: { method: 'POST', path: '/users/me/notifications/test-email',