elevation prompt && uac warning

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2022-09-27 13:30:49 +08:00
parent e1c2b8de6e
commit 728985e3bf
32 changed files with 156 additions and 16 deletions

View File

@@ -407,6 +407,15 @@ class _DesktopHomePageState extends State<DesktopHomePage>
@override
void initState() {
super.initState();
Timer(const Duration(seconds: 1), () async {
final installed = bind.mainIsInstalled();
final root = await bind.mainIsRoot();
final release = await bind.mainIsRelease();
if (Platform.isWindows && release && !installed && !root) {
msgBox('custom-elevation-nocancel', 'Prompt', 'elevation_prompt',
gFFI.dialogManager);
}
});
Timer(const Duration(seconds: 5), () async {
updateUrl = await bind.mainGetSoftwareUpdateUrl();
if (updateUrl.isNotEmpty) setState(() {});