feat: add option for password protection in askString function

This commit is contained in:
antoKeinanen
2023-06-05 13:24:50 +03:00
parent 13e70475d9
commit 55601f7910
3 changed files with 12 additions and 6 deletions

View File

@@ -405,9 +405,9 @@ export const askSelectString = (app: App, message: string, items: string[]): Pro
};
export const askString = (app: App, title: string, key: string, placeholder: string): Promise<string | false> => {
export const askString = (app: App, title: string, key: string, placeholder: string, isPassword?: boolean): Promise<string | false> => {
return new Promise((res) => {
const dialog = new InputStringDialog(app, title, key, placeholder, (result) => res(result));
const dialog = new InputStringDialog(app, title, key, placeholder, isPassword, (result) => res(result));
dialog.open();
});
};
@@ -737,4 +737,4 @@ export const remoteDatabaseCleanup = async (plugin: ObsidianLiveSyncPlugin, dryR
Logger(ex, LOG_LEVEL.VERBOSE);
}
});
}
}