Skip to content

Commit

Permalink
feat: Revamp browser alert permission in profile settings (#9350)
Browse files Browse the repository at this point in the history
  • Loading branch information
muhsin-k committed May 6, 2024
1 parent 4ed1378 commit 0914d4d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
3 changes: 2 additions & 1 deletion app/javascript/dashboard/i18n/locale/en/settings.json
Expand Up @@ -109,7 +109,8 @@
"SLA_MISSED_FIRST_RESPONSE": "A conversation misses first response SLA",
"SLA_MISSED_NEXT_RESPONSE": "A conversation misses next response SLA",
"SLA_MISSED_RESOLUTION": "A conversation misses resolution SLA"
}
},
"BROWSER_PERMISSION": "Enable push notifications for your browser so you鈥檙e able to receive them"
},
"API": {
"UPDATE_SUCCESS": "Your notification preferences are updated successfully",
Expand Down
Expand Up @@ -31,10 +31,6 @@
>
{{ $t('PROFILE_SETTINGS.FORM.NOTIFICATIONS.PUSH') }}
</span>
<form-switch
:value="hasEnabledPushPermissions"
@input="onRequestPermissions"
/>
</div>
</table-header-cell>
</div>
Expand Down Expand Up @@ -94,10 +90,6 @@
<span class="text-sm font-medium normal-case text-ash-900">
{{ $t('PROFILE_SETTINGS.FORM.PUSH_NOTIFICATIONS_SECTION.TITLE') }}
</span>
<form-switch
:value="hasEnabledPushPermissions"
@input="onRequestPermissions"
/>
</div>

<div class="flex flex-col gap-4">
Expand All @@ -116,6 +108,25 @@
</div>
</div>
</div>

<div
class="flex items-center justify-between w-full gap-2 p-4 border border-solid border-ash-200 rounded-xl dark:bg-ash-25"
>
<div class="flex flex-row items-center gap-2">
<fluent-icon
icon="alert"
class="flex-shrink-0 text-ash-900"
size="18"
/>
<span class="text-sm text-ash-900">
{{ $t('PROFILE_SETTINGS.FORM.NOTIFICATIONS.BROWSER_PERMISSION') }}
</span>
</div>
<form-switch
:value="hasEnabledPushPermissions"
@input="onRequestPermissions"
/>
</div>
</div>
</template>

Expand All @@ -139,7 +150,6 @@ export default {
components: {
TableHeaderCell,
FormSwitch,
CheckBox,
},
mixins: [alertMixin, configMixin, uiSettingsMixin],
Expand Down

0 comments on commit 0914d4d

Please sign in to comment.