diff --git a/frontend/components/bc/BcAccordion.vue b/frontend/components/bc/BcAccordion.vue index aed38db72..a6c8dfb4b 100644 --- a/frontend/components/bc/BcAccordion.vue +++ b/frontend/components/bc/BcAccordion.vue @@ -4,6 +4,7 @@ import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome' const props = defineProps<{ infoCopy?: string, + item?: T, items?: T[], open?: boolean, }>() @@ -56,17 +57,22 @@ const copyText = async () => { + + + + + + user.value?.premium_perks.notifications_validator_dashboard_group_efficiency, +) function closeDialog(): void { dialogRef?.value.close() } @@ -17,10 +21,9 @@ function closeDialog(): void { const checkboxes = ref({ is_attestations_missed_subscribed: props.value?.is_attestations_missed_subscribed ?? false, is_block_proposal_subscribed: props.value?.is_block_proposal_subscribed ?? false, - is_group_offline_subscribed: props.value?.is_group_offline_subscribed ?? false, + is_group_efficiency_below_subscribed: props.value?.is_group_efficiency_below_subscribed ?? false, is_max_collateral_subscribed: props.value?.is_max_collateral_subscribed ?? false, is_min_collateral_subscribed: props.value?.is_min_collateral_subscribed ?? false, - is_real_time_mode_enabled: props.value?.is_real_time_mode_enabled ?? false, is_slashed_subscribed: props.value?.is_slashed_subscribed ?? false, is_sync_subscribed: props.value?.is_sync_subscribed ?? false, is_upcoming_block_proposal_subscribed: props.value?.is_upcoming_block_proposal_subscribed ?? false, @@ -28,7 +31,7 @@ const checkboxes = ref({ is_withdrawal_processed_subscribed: props.value?.is_withdrawal_processed_subscribed ?? false, }) const thresholds = ref({ - group_offline_threshold: formatFraction(props.value?.group_offline_threshold ?? 0), + group_efficiency_below_threshold: formatFraction(props.value?.group_efficiency_below_threshold ?? 0), max_collateral_threshold: formatFraction(props.value?.max_collateral_threshold ?? 0), min_collateral_threshold: formatFraction(props.value?.min_collateral_threshold ?? 0), }) @@ -43,7 +46,7 @@ watchDebounced([ ], () => { emit('change-settings', { ...checkboxes.value, - group_offline_threshold: Number(formatToFraction(thresholds.value.group_offline_threshold)), + group_efficiency_below_threshold: Number(formatToFraction(thresholds.value.group_efficiency_below_threshold)), max_collateral_threshold: Number(formatToFraction(thresholds.value.max_collateral_threshold)), min_collateral_threshold: Number(formatToFraction(thresholds.value.min_collateral_threshold)), }) @@ -118,6 +121,14 @@ watch(hasAllEvents, () => { v-model:checkbox="checkboxes.is_slashed_subscribed" :label="$t('notifications.subscriptions.validators.validator_got_slashed.label')" /> + { } const validatorSub: NotificationSettingsValidatorDashboard = { - group_offline_threshold: 0, // means "deactivated/unchecked" + group_efficiency_below_threshold: 0, is_attestations_missed_subscribed: true, is_block_proposal_subscribed: true, - is_group_offline_subscribed: true, + is_group_efficiency_below_subscribed: true, is_max_collateral_subscribed: false, is_min_collateral_subscribed: false, - is_real_time_mode_enabled: false, is_slashed_subscribed: false, is_sync_subscribed: true, is_upcoming_block_proposal_subscribed: false, diff --git a/frontend/composables/notifications/useNotificationsManagementDashboards.ts b/frontend/composables/notifications/useNotificationsManagementDashboards.ts index a27fbf32d..cb4b0b799 100644 --- a/frontend/composables/notifications/useNotificationsManagementDashboards.ts +++ b/frontend/composables/notifications/useNotificationsManagementDashboards.ts @@ -83,13 +83,12 @@ export function useNotificationsManagementDashboards() { return } const accountDashboarSettings = settings as NotificationSettingsValidatorDashboard - accountDashboarSettings.group_offline_threshold = 0 + accountDashboarSettings.group_efficiency_below_threshold = 0 accountDashboarSettings.is_attestations_missed_subscribed = false accountDashboarSettings.is_block_proposal_subscribed = false - accountDashboarSettings.is_group_offline_subscribed = false + accountDashboarSettings.is_group_efficiency_below_subscribed = false accountDashboarSettings.is_max_collateral_subscribed = false accountDashboarSettings.is_min_collateral_subscribed = false - accountDashboarSettings.is_real_time_mode_enabled = false accountDashboarSettings.is_slashed_subscribed = false accountDashboarSettings.is_sync_subscribed = false accountDashboarSettings.is_upcoming_block_proposal_subscribed = false diff --git a/frontend/locales/en.json b/frontend/locales/en.json index 66a5f0ec2..f2256ef24 100644 --- a/frontend/locales/en.json +++ b/frontend/locales/en.json @@ -616,6 +616,8 @@ }, "entity": { "attestation_missed":"Attestation missed", + "group_efficiency": "Group efficiency ", + "group_efficiency_text": "efficiency below {percentage}", "max_collateral":"Maximum collateral reached", "min_collateral":"Minimum collateral reached", "proposal_done": "Proposal done", @@ -650,8 +652,7 @@ }, "event_type": { "attestation_missed": "Attestation missed", - "group_offline": "Group offline", - "group_online": "Group online", + "group_efficiency_below": "Low group efficiency", "incoming_tx": "Incoming Tx.", "max_collateral": "Max. collateral", "min_collateral": "Min. collateral", @@ -814,6 +815,10 @@ "erc1155_token_transfers": { "label": "ERC1155 token transfers" }, + "group_efficiency": { + "info": "efficiency below {percentage}", + "label": "Group efficiency" + }, "ignore_spam_transactions": { "hint": [ "Ignores", @@ -844,6 +849,10 @@ "label": "Block proposal (missed & success)" }, "explanation": "All notifications are sent after network finality (~20min).", + "group_efficiency": { + "info": "Notifies you if your group's efficiency falls below {percentage}% in any given epoch", + "label": "Group efficiency below" + }, "max_collateral_reached": { "label": "Max collateral reached" },