mirror of
https://github.com/bitwarden/browser
synced 2025-12-29 06:33:40 +00:00
[PM-22788] Add Autotype Crate and Windowing Functions (#15317)
* [PM-22783] Add initial feature flag and settings toggle for autotype MVP * [PM-22783] Undo Cargo.lock changes * [PM-22783] Disable console.log block * [PM-22783] Lint fix * [PM-22783] Small updates * [PM-22783] Build fix * [PM-22783] Use combineLatest in updating the desktop autotype service * [PM-22783] Check if the user is on Windows * [PM-22783] Undo access selector html change, linting keeps removing this * [PM-22783] Fix failing test * [PM-22788] Add initial desktop native autotype crate based on spike ticket investigation * [PM-22788] cargo fmt * [PM-22783] Update autotypeEnabled to be stored in service * [PM-22783] Add todo comments * [PM-22783] Add SlimConfigService and MainDesktopAutotypeService * [PM-22783] Small fixes * [PM-22788] Add get_foreground_window_title() and cleanup * [PM-22788] Add comment * [PM-22788] Lint and cross platform build fixes * [PM-22788] Update windows.rs in autotype_internal * [PM-22788] Update windows.rs and dummy.rs in autotype_internal * [PM-22788] cargo fmt * [PM-22788] Edit napi result types * [PM-22788] Edit napi result types again * [PM-22788] Add autofill as a codeowner of the desktop_native/autotype directory * [PM-22788] Refactor autotype code * [PM-22788] Move autotype dependency out of windows only due to abstraction change * [PM-22788] Fix lint errors * [PM-22788] Updates based on PR comments * [PM-22788] cargo fmt
This commit is contained in:
@@ -14,6 +14,7 @@ default = []
|
||||
manual_test = []
|
||||
|
||||
[dependencies]
|
||||
autotype = { path = "../autotype" }
|
||||
base64 = { workspace = true }
|
||||
hex = { workspace = true }
|
||||
anyhow = { workspace = true }
|
||||
|
||||
3
apps/desktop/desktop_native/napi/index.d.ts
vendored
3
apps/desktop/desktop_native/napi/index.d.ts
vendored
@@ -208,3 +208,6 @@ export declare namespace logging {
|
||||
}
|
||||
export function initNapiLog(jsLogFn: (err: Error | null, arg0: LogLevel, arg1: string) => any): void
|
||||
}
|
||||
export declare namespace autotype {
|
||||
export function getForegroundWindowTitle(): string
|
||||
}
|
||||
|
||||
@@ -865,3 +865,15 @@ pub mod logging {
|
||||
fn flush(&self) {}
|
||||
}
|
||||
}
|
||||
|
||||
#[napi]
|
||||
pub mod autotype {
|
||||
#[napi]
|
||||
pub fn get_foreground_window_title() -> napi::Result<String, napi::Status> {
|
||||
autotype::get_foreground_window_title().map_err(|_| {
|
||||
napi::Error::from_reason(
|
||||
"Autotype Error: faild to get foreground window title".to_string(),
|
||||
)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user