remove startup elevation, update impersonate_system
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
7dec4f8a04
commit
cc30b9f8a5
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -2559,7 +2559,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "impersonate_system"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/21pages/impersonate-system#af4a82050580217a434c2024e181a98de24823ec"
|
||||
source = "git+https://github.com/21pages/impersonate-system#c48f37a8fd17413b2a4ba655c3873bdc5c8d25aa"
|
||||
dependencies = [
|
||||
"cc",
|
||||
]
|
||||
|
@ -412,15 +412,6 @@ 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(() {});
|
||||
|
@ -85,11 +85,6 @@ pub fn core_main() -> Option<Vec<String>> {
|
||||
.ok();
|
||||
}
|
||||
}
|
||||
#[cfg(windows)]
|
||||
#[cfg(not(debug_assertions))]
|
||||
if !crate::platform::is_installed() && args.is_empty() {
|
||||
crate::platform::elevate_or_run_as_system(is_setup, _is_elevate, _is_run_as_system);
|
||||
}
|
||||
if args.is_empty() {
|
||||
std::thread::spawn(move || crate::start_server(false));
|
||||
} else {
|
||||
|
@ -1242,9 +1242,3 @@ function refreshCurrentUser() {
|
||||
function getHttpHeaders() {
|
||||
return "Authorization: Bearer " + handler.get_local_option("access_token");
|
||||
}
|
||||
|
||||
$(body).timer(1000, function check_elevation(){
|
||||
if (is_win && handler.is_release() && !handler.is_installed() && !handler.is_root()) {
|
||||
msgbox("custom-elevation-nocancel", "Prompt", "elevation_prompt");
|
||||
}
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user