Remove Check update for others feature
This commit is contained in:
parent
2fb372ead9
commit
cf50295ca4
@ -3,8 +3,6 @@ import { SwUpdate, UpdateAvailableEvent } from '@angular/service-worker';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { NotifyService } from '../core-services/notify.service';
|
||||
|
||||
/**
|
||||
* Handle Service Worker updates using the SwUpdate service form angular.
|
||||
*/
|
||||
@ -12,8 +10,6 @@ import { NotifyService } from '../core-services/notify.service';
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class UpdateService {
|
||||
private static NOTIFY_NAME = 'swCheckForUpdate';
|
||||
|
||||
/**
|
||||
* @returns the updateSubscription
|
||||
*/
|
||||
@ -28,12 +24,7 @@ export class UpdateService {
|
||||
* @param swUpdate Service Worker update service
|
||||
* @param matSnackBar Currently to show that an update is available
|
||||
*/
|
||||
public constructor(private swUpdate: SwUpdate, private notify: NotifyService) {
|
||||
// Listen on requests from other users to check for updates.
|
||||
this.notify.getMessageObservable(UpdateService.NOTIFY_NAME).subscribe(() => {
|
||||
this.checkForUpdate();
|
||||
});
|
||||
}
|
||||
public constructor(private swUpdate: SwUpdate) {}
|
||||
|
||||
/**
|
||||
* Manually applies the update if one was found
|
||||
@ -52,13 +43,4 @@ export class UpdateService {
|
||||
this.swUpdate.checkForUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Emits a message to all clients initiating to check for updates. This method
|
||||
* can only be called by users with 'users.can_manage'. This will be checked by
|
||||
* the server.
|
||||
*/
|
||||
public initiateUpdateCheckForAllClients(): void {
|
||||
this.notify.sendToAllUsers(UpdateService.NOTIFY_NAME, {});
|
||||
}
|
||||
}
|
||||
|
@ -32,18 +32,6 @@
|
||||
<span translate>Check for updates</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div *osIsSuperAdmin>
|
||||
<button
|
||||
type="button"
|
||||
mat-button
|
||||
(click)="initiateUpdateCheckForAllClients()"
|
||||
matTooltip="{{ 'This will send an update notification to all active clients' | translate }}"
|
||||
>
|
||||
<span translate>Initiate update check for all clients</span>
|
||||
<mat-icon class="warning spacer-left-10">warning</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-card>
|
||||
|
||||
<os-count-users></os-count-users>
|
||||
|
@ -52,10 +52,6 @@ export class LegalNoticeComponent extends BaseViewComponent implements OnInit {
|
||||
this.update.checkForUpdate();
|
||||
}
|
||||
|
||||
public initiateUpdateCheckForAllClients(): void {
|
||||
this.update.initiateUpdateCheckForAllClients();
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves changes.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user