Finish implementing send page

This commit is contained in:
2025-04-13 01:51:52 +02:00
parent 95353735b0
commit e96be86314
7 changed files with 300 additions and 85 deletions

View File

@@ -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) {

View File

@@ -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 = '?';
}