[Glitch] Add button to dismiss desktop notifications permissions banner

Port 4790a126be to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
This commit is contained in:
Eugen Rochko
2020-11-11 05:36:29 +01:00
committed by Thibaut Girka
parent c077cdaba7
commit 0aeb833317
5 changed files with 46 additions and 7 deletions

View File

@ -19,6 +19,7 @@ import {
NOTIFICATIONS_MARK_AS_READ,
NOTIFICATIONS_SET_BROWSER_SUPPORT,
NOTIFICATIONS_SET_BROWSER_PERMISSION,
NOTIFICATIONS_DISMISS_BROWSER_PERMISSION,
} from 'flavours/glitch/actions/notifications';
import {
ACCOUNT_BLOCK_SUCCESS,
@ -283,6 +284,8 @@ export default function notifications(state = initialState, action) {
return state.set('browserSupport', action.value);
case NOTIFICATIONS_SET_BROWSER_PERMISSION:
return state.set('browserPermission', action.value);
case NOTIFICATIONS_DISMISS_BROWSER_PERMISSION:
return state.set('browserPermission', 'denied');
case NOTIFICATION_MARK_FOR_DELETE:
return markForDelete(state, action.id, action.yes);