chore(web): addresses final PR review concerns

This commit is contained in:
Joshua A. Horton 2023-03-23 15:24:33 +07:00
parent 20567d494b
commit d2f4e9860e
3 changed files with 9 additions and 12 deletions

View file

@ -68,13 +68,7 @@ if builder_start_action clean; then
builder_finish_action success clean
fi
# Do not call child actions for configure - they all do the same thing, and it can take a while.
if builder_start_action configure; then
verify_npm_setup
builder_finish_action success configure
fi
builder_run_child_actions configure
## Build actions

View file

@ -29,7 +29,13 @@ export class KeymanEngine extends KeymanEngineBase<ContextManager, PassthroughKe
}
init(options: Required<WebviewInitOptionSpec>) {
let device = new DeviceSpec('native', options.embeddingApp.indexOf('Tablet') >= 0 ? 'tablet' : 'phone', this.config.hostDevice.OS, true);
let device = new DeviceSpec(
'native',
options.embeddingApp.indexOf('Tablet') >= 0 ? 'tablet' : 'phone',
this.config.hostDevice.OS,
true
);
this.config.hostDevice = device;
super.init({...WebviewInitOptionDefaults, ...options});

View file

@ -37,9 +37,6 @@ export class EngineConfiguration {
this._paths = new PathConfiguration(options, this.sourcePath);
if(typeof options.setActiveOnRegister == 'boolean') {
this._activateFirstKeyboard = options.setActiveOnRegister;
} else if (typeof options.setActiveOnRegister == 'string') {
let str = options.setActiveOnRegister.toLowerCase();
this._activateFirstKeyboard = str === 'true';
} else {
this._activateFirstKeyboard = true;
}
@ -93,7 +90,7 @@ export interface InitOptionSpec extends PathOptionSpec {
* Note that keyboards specified locally are synchronously loaded while cloud keyboards are async; as a
* result, a locally-specified keyboard will generally be available "sooner", even if added "later".
*/
setActiveOnRegister?: string | boolean; // TODO: Convert to boolean. Option loader needs to be able to receive this as a string or boolean
setActiveOnRegister?: boolean;
/**
* Determines the default text shown on the spacebar. If undefined, uses `LANGUAGE_KEYBOARD`