Finish implementing send page
This commit is contained in:
@@ -34,7 +34,7 @@ class AppAuth extends ChangeNotifier implements TokenSource {
|
||||
}
|
||||
|
||||
bool isAuth() {
|
||||
return _userID != null && _tokenAdmin != null;
|
||||
return _userID != null && _tokenAdmin != null && _tokenSend != null;
|
||||
}
|
||||
|
||||
void set(User user, Client client, String tokenAdmin, String tokenSend) {
|
||||
|
||||
@@ -25,6 +25,7 @@ class Globals {
|
||||
String hostname = '';
|
||||
String clientType = '';
|
||||
String deviceModel = '';
|
||||
String deviceName = '';
|
||||
|
||||
late SharedPreferences sharedPrefs;
|
||||
|
||||
@@ -48,18 +49,23 @@ class Globals {
|
||||
if (Platform.isAndroid) {
|
||||
this.clientType = 'ANDROID';
|
||||
this.deviceModel = (await DeviceInfoPlugin().androidInfo).model;
|
||||
this.deviceName = (await DeviceInfoPlugin().androidInfo).name;
|
||||
} else if (Platform.isIOS) {
|
||||
this.clientType = 'IOS';
|
||||
this.deviceModel = (await DeviceInfoPlugin().iosInfo).model;
|
||||
this.deviceName = (await DeviceInfoPlugin().iosInfo).name;
|
||||
} else if (Platform.isLinux) {
|
||||
this.clientType = 'LINUX';
|
||||
this.deviceModel = (await DeviceInfoPlugin().linuxInfo).prettyName;
|
||||
this.deviceName = (await DeviceInfoPlugin().linuxInfo).name;
|
||||
} else if (Platform.isWindows) {
|
||||
this.clientType = 'WINDOWS';
|
||||
this.deviceModel = (await DeviceInfoPlugin().windowsInfo).productName;
|
||||
this.deviceName = (await DeviceInfoPlugin().windowsInfo).computerName;
|
||||
} else if (Platform.isMacOS) {
|
||||
this.clientType = 'MACOS';
|
||||
this.deviceModel = (await DeviceInfoPlugin().macOsInfo).model;
|
||||
this.deviceName = (await DeviceInfoPlugin().macOsInfo).computerName;
|
||||
} else {
|
||||
this.clientType = '?';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user