Skip to content

Commit

Permalink
rename about -> showAboutDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian-ubs committed Sep 10, 2024
1 parent 16baf1d commit d137dd2
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions extensions/src/platform-scripture/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ export async function activate(context: ExecutionActivationContext) {
'%webView_configureChecks_title%',
);

const openAboutTabPromise = papi.commands.registerCommand('platform.about', async () =>
papi.dialogs.about(),
const showAboutDialogPromise = papi.commands.registerCommand('platform.about', async () =>
papi.dialogs.showAboutDialog(),
);

const includeProjectsCommandPromise = papi.commands.registerCommand(
Expand Down Expand Up @@ -224,7 +224,7 @@ export async function activate(context: ExecutionActivationContext) {
await checkAggregatorService.initialize();

context.registrations.add(
await openAboutTabPromise,
await showAboutDialogPromise,
await scriptureExtenderPdpefPromise,
await includeProjectsCommandPromise,
await includeProjectsValidatorPromise,
Expand Down
2 changes: 1 addition & 1 deletion lib/papi-dts/papi.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4996,7 +4996,7 @@ declare module 'shared/services/dialog.service-model' {
* @param options Various options for configuring the dialog that shows
* @returns Returns the user's selected project id or `undefined` if the user cancels
*/
about(options?: AboutDialogOptions): Promise<string | undefined>;
showAboutDialog(options?: AboutDialogOptions): Promise<string | undefined>;
}
/** Prefix on requests that indicates that the request is related to dialog operations */
export const CATEGORY_DIALOG = 'dialog';
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/components/dialogs/about-dialog.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const TAB_TYPE_ABOUT = 'about';

const STRING_KEYS: LocalizeKey[] = ['%product_name%'];

function AboutPanel() {
function AboutDialog() {
const [{ '%product_name%': productName }] = useLocalizedStrings(STRING_KEYS);

return (
Expand All @@ -31,7 +31,7 @@ const ABOUT_DIALOG: DialogDefinition<typeof ABOUT_DIALOG_TYPE> = Object.freeze({
width: 500,
height: 500,
},
Component: AboutPanel,
Component: AboutDialog,
});

export default ABOUT_DIALOG;
4 changes: 2 additions & 2 deletions src/renderer/services/dialog.service-host.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ async function showDialog<DialogTabType extends DialogTabTypes>(
}

// on the dialogService - see `dialog.service-model.ts` for JSDoc
async function about(
async function showAboutDialog(
options?: DialogTypes[typeof ABOUT_DIALOG.tabType]['options'],
): Promise<DialogTypes[typeof SELECT_PROJECT_DIALOG.tabType]['responseType'] | undefined> {
return showDialog(ABOUT_DIALOG.tabType, options);
Expand All @@ -250,7 +250,7 @@ async function selectProject(

const dialogService: DialogService = {
showDialog,
about,
showAboutDialog,
selectProject,
};

Expand Down
2 changes: 1 addition & 1 deletion src/shared/services/dialog.service-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export interface DialogService {
* @param options Various options for configuring the dialog that shows
* @returns Returns the user's selected project id or `undefined` if the user cancels
*/
about(options?: AboutDialogOptions): Promise<string | undefined>;
showAboutDialog(options?: AboutDialogOptions): Promise<string | undefined>;
}

/** Prefix on requests that indicates that the request is related to dialog operations */
Expand Down
2 changes: 1 addition & 1 deletion src/shared/services/dialog.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const dialogService: DialogService = {
await initialize();
return networkService.request(serializeRequestType(CATEGORY_DIALOG, 'showDialog'), ...args);
},
about: async (...args) => {
showAboutDialog: async (...args) => {
await initialize();
return networkService.request(serializeRequestType(CATEGORY_DIALOG, 'about'), ...args);
},
Expand Down

0 comments on commit d137dd2

Please sign in to comment.