fix: disable features for public beta
This commit is contained in:
@@ -63,8 +63,11 @@ type AccountMenuState = {
|
||||
server: string;
|
||||
encryptionEnabled: boolean;
|
||||
selectedAutoLockInterval: any;
|
||||
strictSigninDisabled: boolean;
|
||||
}
|
||||
|
||||
declare const __PUBLIC_BETA__: boolean;
|
||||
|
||||
class AccountMenuCtrl extends PureViewCtrl<{}, AccountMenuState> {
|
||||
|
||||
public appVersion: string
|
||||
@@ -89,8 +92,9 @@ class AccountMenuCtrl extends PureViewCtrl<{}, AccountMenuState> {
|
||||
user: this.application!.getUser(),
|
||||
formData: {
|
||||
mergeLocal: true,
|
||||
ephemeral: false
|
||||
ephemeral: false,
|
||||
},
|
||||
strictSigninDisabled: __PUBLIC_BETA__,
|
||||
mutable: {}
|
||||
} as AccountMenuState;
|
||||
}
|
||||
@@ -331,6 +335,16 @@ class AccountMenuCtrl extends PureViewCtrl<{}, AccountMenuState> {
|
||||
);
|
||||
}
|
||||
|
||||
showRegister() {
|
||||
if (__PUBLIC_BETA__) {
|
||||
alertDialog({ text: 'Registration is disabled for this beta version.' });
|
||||
} else {
|
||||
this.setFormDataState({
|
||||
showRegister: true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
async readFile(file: File): Promise<any> {
|
||||
return new Promise((resolve) => {
|
||||
const reader = new FileReader();
|
||||
|
||||
@@ -28,6 +28,8 @@ import {
|
||||
import { PureViewCtrl } from '@Views/abstract/pure_view_ctrl';
|
||||
import { confirmDialog } from '@/services/alertService';
|
||||
|
||||
declare const __PUBLIC_BETA__: boolean;
|
||||
|
||||
/**
|
||||
* Disable before production release.
|
||||
* Anyone who used the beta will still have access to
|
||||
@@ -139,6 +141,9 @@ class FooterViewCtrl extends PureViewCtrl<{}, {
|
||||
|
||||
reloadUpgradeStatus() {
|
||||
this.application.checkForSecurityUpdate().then((available) => {
|
||||
if (__PUBLIC_BETA__) {
|
||||
return;
|
||||
}
|
||||
this.setState({
|
||||
dataUpgradeAvailable: available
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user