-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[File Locksmith] Add infobar when not running as admin #30993
base: main
Are you sure you want to change the base?
Conversation
src/modules/FileLocksmith/FileLocksmithUI/Strings/en-us/Resources.resw
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be extra nice to have a "Restart as admin" button somewhere here :-)
@@ -164,4 +164,7 @@ | |||
<value>Administrator: File Locksmith</value> | |||
<comment>Title of the window when running as administrator.</comment> | |||
</data> | |||
<data name="NotRunningAsAdminInfoBar.Message" xml:space="preserve"> | |||
<value>Some results might be missing because of insufficient permission. Restart as administrator to see them.</value> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personal opinion: this is still pretty vague, to me.
<value>Some results might be missing because of insufficient permission. Restart as administrator to see them.</value> | |
<value>Run [File Locksmith] with admin rights to see more results.</value> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not contain information about missing results were because of insufficient permissions, maybe make it more clear?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to use the text "Some results might be missing because of insufficient permission." and move the restart as admin
button to the infobar as text button "Restart as administrator"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on @htcfreek 's suggestion. This is consistent with the OS and other PT modules.
src/modules/FileLocksmith/FileLocksmithUI/FileLocksmithXAML/Views/MainPage.xaml
Show resolved
Hide resolved
It exists in the ui. At the top where the reload button is. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening the PR.
I've tried running the PR in both Debug and release, but both are crashing for me when trying to start File Locksmith.
I can replicate this problem when running from a clean build at the first time, but it does not crash in subsequent runs. |
Thank for looking into it. Definitely can't bring it in if it's causing crashes, though. |
This is how it looks currently. Maybe putting the restart as admin button in the infobar would be better? |
@HydroH |
Sorry for responding late, I was on a holiday. But I think this PR is blocked by the infobar issue at the moment. |
src/modules/FileLocksmith/FileLocksmithUI/Strings/en-us/Resources.resw
Outdated
Show resolved
Hide resolved
src/modules/FileLocksmith/FileLocksmithUI/FileLocksmithXAML/Views/MainPage.xaml
Show resolved
Hide resolved
…ces.resw Co-authored-by: Niels Laute <niels.laute@live.nl>
src/modules/FileLocksmith/FileLocksmithUI/FileLocksmithXAML/Views/MainPage.xaml
Outdated
Show resolved
Hide resolved
I know it's kinda late, but I think a Popup control might be even better: you can connect it to the existing restart-as-admin button. And it's just as intrusive as an info bar. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've given it another test with the latest changes. This is still crashing for me on startup of File Locksmith.
The way I test it is by building an installer and running from the context menu. It also crashes when I run directly from "PowerToys\x64\Release\WinUI3Apps\PowerToys.FileLocksmithUI.exe"
/needinfo
Summary of the Pull Request
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed