feat: show deprecation notice (#587)

* feat: show deprecation notice

* feat: show deprecation message

* chore(deps): update snjs

Co-authored-by: Johnny Almonte <johnny243@users.noreply.github.com>
This commit is contained in:
Johnny A
2021-07-02 11:18:06 -04:00
committed by GitHub
parent 4a07d3e7db
commit b3347b75ba
4 changed files with 24 additions and 5 deletions

View File

@@ -33,6 +33,9 @@ class ComponentViewCtrl implements ComponentViewScope {
private unregisterComponentHandler!: () => void
private unregisterDesktopObserver!: () => void
private issueLoading = false
private isDeprecated = false
private deprecationMessage = ''
private deprecationMessageDismissed = false
public reloading = false
private expired = false
private loading = false
@@ -175,6 +178,12 @@ class ComponentViewCtrl implements ComponentViewScope {
});
}
private dismissDeprecationMessage() {
this.$timeout(() => {
this.deprecationMessageDismissed = true;
});
}
private onVisibilityChange() {
if (document.visibilityState === 'hidden') {
return;
@@ -215,6 +224,8 @@ class ComponentViewCtrl implements ComponentViewScope {
if (this.expired && doManualReload) {
this.$rootScope.$broadcast(RootScopeMessages.ReloadExtendedData);
}
this.isDeprecated = component.isDeprecated;
this.deprecationMessage = component.package_info.deprecation_message;
}
private async handleIframeLoadTimeout() {