feat(settings): add settings to adjust screen brightness when reading, closes #1532 (#2197)

This commit is contained in:
Huang Xin 2025-10-11 01:02:35 +08:00 committed by GitHub
parent f696b9a573
commit ada427b134
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
54 changed files with 588 additions and 57 deletions

View file

@ -127,6 +127,21 @@ pub(crate) async fn get_safe_area_insets<R: Runtime>(
app.native_bridge().get_safe_area_insets()
}
#[command]
pub(crate) async fn get_screen_brightness<R: Runtime>(
app: AppHandle<R>,
) -> Result<GetScreenBrightnessResponse> {
app.native_bridge().get_screen_brightness()
}
#[command]
pub(crate) async fn set_screen_brightness<R: Runtime>(
app: AppHandle<R>,
payload: SetScreenBrightnessRequest,
) -> Result<SetScreenBrightnessResponse> {
app.native_bridge().set_screen_brightness(payload)
}
#[command]
pub(crate) async fn request_manage_storage_permission<R: Runtime>(
app: AppHandle<R>,