X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fguards%2Fcan-deactivate-guard.service.ts;h=3a35fcfb3eb28dee882b234a193fd1cbcb9643f7;hb=45800f7e63665708665ab0252049e54846ec84c5;hp=e2a79e8c4e9d3a2e9a4e745d180cbf1c30e4874c;hpb=0b4e5fe32708afce54212810738aa4d0c3dc178d;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/guards/can-deactivate-guard.service.ts b/client/src/app/shared/guards/can-deactivate-guard.service.ts index e2a79e8c4..3a35fcfb3 100644 --- a/client/src/app/shared/guards/can-deactivate-guard.service.ts +++ b/client/src/app/shared/guards/can-deactivate-guard.service.ts @@ -4,8 +4,10 @@ import { Observable } from 'rxjs' import { ConfirmService } from '../../core/index' import { I18n } from '@ngx-translate/i18n-polyfill' +export type CanComponentDeactivateResult = { text?: string, canDeactivate: Observable | boolean } + export interface CanComponentDeactivate { - canDeactivate: () => { text?: string, canDeactivate: Observable | boolean } + canDeactivate: () => CanComponentDeactivateResult } @Injectable()