From 93f1f3b1c1794c1a5d0b9fd9b86f76836eede330 Mon Sep 17 00:00:00 2001 From: tjcouch-sil Date: Tue, 2 Jul 2024 09:35:33 -0500 Subject: [PATCH] Used some more variables to help with white labeling --- .github/workflows/package-main.yml | 2 +- assets/localization/en.json | 1 + electron-builder.json5 | 1 + ...platform-scripture-extender-pdpef.model.ts | 12 +++++++--- extensions/src/usfm-data-provider/index.d.ts | 22 ------------------- .../src/usfm-data-provider/manifest.json | 9 -------- src/renderer/app.component.scss | 7 +++++- src/renderer/index.ejs | 2 +- .../testing/about-panel.component.tsx | 8 ++++++- 9 files changed, 26 insertions(+), 38 deletions(-) delete mode 100644 extensions/src/usfm-data-provider/index.d.ts delete mode 100644 extensions/src/usfm-data-provider/manifest.json diff --git a/.github/workflows/package-main.yml b/.github/workflows/package-main.yml index ffe7e3f325..ecb0e5ab60 100644 --- a/.github/workflows/package-main.yml +++ b/.github/workflows/package-main.yml @@ -65,7 +65,7 @@ jobs: CURRENT_VERSION=$(node -pe "require('./package.json').version") NEW_VERSION="${CURRENT_VERSION}-commit.${COMMIT_HASH}" echo "Updating version from ${CURRENT_VERSION} to ${NEW_VERSION}" - npm version $NEW_VERSION + npm --no-git-tag-version version $NEW_VERSION - name: Publish releases - Windows if: ${{ matrix.os == 'windows-latest' }} diff --git a/assets/localization/en.json b/assets/localization/en.json index 88d79e78e3..19468d5a19 100644 --- a/assets/localization/en.json +++ b/assets/localization/en.json @@ -1,4 +1,5 @@ { + "%product_name%": "Platform.Bible", "%insertNote%": "Insert Note", "%mainMenu_aboutPlatformBible%": "About Platform.Bible", "%mainMenu_downloadSlashInstallResources%": "Download/Install Resources", diff --git a/electron-builder.json5 b/electron-builder.json5 index cd43f46b48..eef94b7079 100644 --- a/electron-builder.json5 +++ b/electron-builder.json5 @@ -4,6 +4,7 @@ { productName: 'Platform.Bible', appId: 'org.paranext.PlatformBible', + copyright: 'Copyright (c) 2022-2024 SIL International', asar: true, asarUnpack: '**\\*.{node,dll}', files: ['dist', 'node_modules', 'package.json'], diff --git a/extensions/src/platform-scripture/src/project-data-provider/platform-scripture-extender-pdpef.model.ts b/extensions/src/platform-scripture/src/project-data-provider/platform-scripture-extender-pdpef.model.ts index 288cb2e94d..c5b6ebd44b 100644 --- a/extensions/src/platform-scripture/src/project-data-provider/platform-scripture-extender-pdpef.model.ts +++ b/extensions/src/platform-scripture/src/project-data-provider/platform-scripture-extender-pdpef.model.ts @@ -10,11 +10,17 @@ import ScriptureExtenderProjectDataProviderEngine, { /** PDP Factory ID for the Scripture Extender PDPF */ export const SCRIPTURE_EXTENDER_PDPF_ID = 'platformScripture.scriptureExtenderPdpf'; -/** Regex strings for the project interfaces the Scripture Extender Layering PDPF layers over */ -const SCRIPTURE_EXTENDER_OVERLAY_PROJECT_INTERFACES_REGEX_STRINGS = +/** + * Regex strings for the project interfaces the Scripture Extender Layering PDPF layers over + * + * Need to wrap in an array to AND the interfaces together since this Layering PDPF only supports + * projects that have all three interfaces available + */ +const SCRIPTURE_EXTENDER_OVERLAY_PROJECT_INTERFACES_REGEX_STRINGS = [ SCRIPTURE_EXTENDER_OVERLAY_PROJECT_INTERFACES.map((projectInterface) => escapeStringRegexp(projectInterface), - ); + ), +]; class ScriptureExtenderProjectDataProviderEngineFactory extends LayeringProjectDataProviderEngineFactory diff --git a/extensions/src/usfm-data-provider/index.d.ts b/extensions/src/usfm-data-provider/index.d.ts deleted file mode 100644 index e42780da3a..0000000000 --- a/extensions/src/usfm-data-provider/index.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -declare module 'usfm-data-provider' { - import { VerseRef } from '@sillsdev/scripture'; - import type { DataProviderDataType, IDataProvider } from '@papi/core'; - - export type UsfmProviderDataTypes = { - BookNames: DataProviderDataType; - Chapter: DataProviderDataType; - ChapterUsx: DataProviderDataType; - BookUsx: DataProviderDataType; - Verse: DataProviderDataType; - }; - - export type UsfmDataProvider = IDataProvider; -} - -declare module 'papi-shared-types' { - import type { UsfmDataProvider } from 'usfm-data-provider'; - - export interface DataProviders { - usfm: UsfmDataProvider; - } -} diff --git a/extensions/src/usfm-data-provider/manifest.json b/extensions/src/usfm-data-provider/manifest.json deleted file mode 100644 index ebde58c0d0..0000000000 --- a/extensions/src/usfm-data-provider/manifest.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "usfmDataProvider", - "version": "0.0.1", - "description": "USFM Data Provider for Paranext - provided by C# data provider", - "author": "Paranext", - "license": "MIT", - "main": "", - "activationEvents": [] -} diff --git a/src/renderer/app.component.scss b/src/renderer/app.component.scss index aa19acb54f..9e1b0df4ea 100644 --- a/src/renderer/app.component.scss +++ b/src/renderer/app.component.scss @@ -57,7 +57,12 @@ a:hover { .about-panel { width: 100%; height: 100%; - background: linear-gradient(200.96deg, #b8d432 -29.09%, #5f7333 51.77%, #47314e 129.35%); + background: linear-gradient( + 200.96deg, + $color--pt9-lightgreen -10%, + $color--pt9-darkgreen 60%, + $color--pt9-darkgray 110% + ); overflow-y: auto; } diff --git a/src/renderer/index.ejs b/src/renderer/index.ejs index 22288c323d..9fc79089bd 100644 --- a/src/renderer/index.ejs +++ b/src/renderer/index.ejs @@ -1,4 +1,4 @@ - + diff --git a/src/renderer/testing/about-panel.component.tsx b/src/renderer/testing/about-panel.component.tsx index 0591e85dae..93d46f174e 100644 --- a/src/renderer/testing/about-panel.component.tsx +++ b/src/renderer/testing/about-panel.component.tsx @@ -1,16 +1,22 @@ import icon from '@assets/icon.png'; +import { useLocalizedStrings } from '@renderer/hooks/papi-hooks'; import { SavedTabInfo, TabInfo } from '@shared/models/docking-framework.model'; +import { LocalizeKey } from 'platform-bible-utils'; export const TAB_TYPE_ABOUT = 'about'; +const STRING_KEYS: LocalizeKey[] = ['%product_name%']; + export default function AboutPanel() { + const [{ '%product_name%': productName }] = useLocalizedStrings(STRING_KEYS); + return (
icon
-

Platform.Bible

+

{productName}

);