-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update 3rd party deps and clean up typography in error view
- Loading branch information
1 parent
bca9b35
commit e972406
Showing
6 changed files
with
63 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
namespace UI.Avalonia.ViewModels; | ||
using CommunityToolkit.Mvvm.ComponentModel; | ||
|
||
namespace UI.Avalonia.ViewModels; | ||
|
||
public partial class ErrorStubViewModel: ViewModelBase | ||
{ | ||
[ObservableProperty] private bool uacIsEnabled = false; | ||
public string UacInfoLink => "https://learn.microsoft.com/en-us/windows/security/application-security/application-control/user-account-control/"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#if WINDOWS | ||
using System; | ||
using System.Security.AccessControl; | ||
using IrdLibraryClient; | ||
using Microsoft.Win32; | ||
|
||
namespace UI.Avalonia.ViewModels; | ||
|
||
public partial class ErrorStubViewModel: ViewModelBase | ||
{ | ||
|
||
public ErrorStubViewModel() | ||
{ | ||
try | ||
{ | ||
using var key = Registry.LocalMachine.OpenSubKey( | ||
@"Software\Microsoft\Windows\CurrentVersion\Policies\System", | ||
RegistryRights.ReadKey | RegistryRights.QueryValues | ||
); | ||
UacIsEnabled = key?.GetValue("EnableLUA") is 1; | ||
} | ||
catch (Exception e) | ||
{ | ||
Log.Warn(e, "Failed to check UAC status"); | ||
} | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters