diff --git a/package.json b/package.json index ce1b8721..cb9456c1 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "version": "3.8.0", "clientVersion": "1.55", "buildNumber": "0", + "searchAPIVersion": "1.55.3", "description": "Symphony desktop app (Foundation ODP)", "author": "Symphony", "main": "lib/src/app/init.js", @@ -129,6 +130,6 @@ }, "optionalDependencies": { "screen-snippet": "git+https://github.com/symphonyoss/ScreenSnippet.git#v1.0.5", - "swift-search": "1.55.2-beta.5" + "swift-search": "1.55.2-beta.6" } } diff --git a/src/locale/en-US.json b/src/locale/en-US.json index df56c62e..fe493d68 100644 --- a/src/locale/en-US.json +++ b/src/locale/en-US.json @@ -14,9 +14,11 @@ "User name:": "User name:" }, "MoreInfo": { + "Swift Search Version": "Swift Search Version", "More Information": "More Information", "Others": "Others", "related": "related", + "API Version": "API Version", "Version Information": "Version Information" }, "Bring All to Front": "Bring All to Front", diff --git a/src/locale/en.json b/src/locale/en.json index df56c62e..fe493d68 100644 --- a/src/locale/en.json +++ b/src/locale/en.json @@ -14,9 +14,11 @@ "User name:": "User name:" }, "MoreInfo": { + "Swift Search Version": "Swift Search Version", "More Information": "More Information", "Others": "Others", "related": "related", + "API Version": "API Version", "Version Information": "Version Information" }, "Bring All to Front": "Bring All to Front", diff --git a/src/locale/fr-FR.json b/src/locale/fr-FR.json index 3df7d5ed..84426c0c 100644 --- a/src/locale/fr-FR.json +++ b/src/locale/fr-FR.json @@ -73,9 +73,11 @@ "Minimize on Close": "Minimiser lors de la fermeture", "More Information": "Informations détaillées", "MoreInfo": { + "Swift Search Version": "Version de recherche rapide", "More Information": "Informations détaillées", "Others": "Autres", "related": "en relation", + "API Version": "Version de l'API", "Version Information": "Information sur cette version de Symphony" }, "Native": "Originaire", diff --git a/src/locale/fr.json b/src/locale/fr.json index 3df7d5ed..84426c0c 100644 --- a/src/locale/fr.json +++ b/src/locale/fr.json @@ -73,9 +73,11 @@ "Minimize on Close": "Minimiser lors de la fermeture", "More Information": "Informations détaillées", "MoreInfo": { + "Swift Search Version": "Version de recherche rapide", "More Information": "Informations détaillées", "Others": "Autres", "related": "en relation", + "API Version": "Version de l'API", "Version Information": "Information sur cette version de Symphony" }, "Native": "Originaire", diff --git a/src/locale/ja-JP.json b/src/locale/ja-JP.json index 59ff009a..2b65810e 100644 --- a/src/locale/ja-JP.json +++ b/src/locale/ja-JP.json @@ -14,9 +14,11 @@ "User name:": "ユーザー名:" }, "MoreInfo": { + "Swift Search Version": "迅速な検索バージョン", "More Information": "詳しくは", "Others": "その他", "related": "関連した", + "API Version": "APIのバージョン", "Version Information": "バージョン情報" }, "Bring All to Front": "すべて前面に表示", diff --git a/src/locale/ja.json b/src/locale/ja.json index 59ff009a..2b65810e 100644 --- a/src/locale/ja.json +++ b/src/locale/ja.json @@ -14,9 +14,11 @@ "User name:": "ユーザー名:" }, "MoreInfo": { + "Swift Search Version": "迅速な検索バージョン", "More Information": "詳しくは", "Others": "その他", "related": "関連した", + "API Version": "APIのバージョン", "Version Information": "バージョン情報" }, "Bring All to Front": "すべて前面に表示", diff --git a/src/renderer/components/more-info.tsx b/src/renderer/components/more-info.tsx index f16a3e81..8cd05d62 100644 --- a/src/renderer/components/more-info.tsx +++ b/src/renderer/components/more-info.tsx @@ -1,13 +1,58 @@ import * as React from 'react'; +import { optionalDependencies, searchAPIVersion } from '../../../package.json'; import { i18n } from '../../common/i18n-preload'; +interface ISSDataInterface { + supportedVersion?: string; + swiftSearchVersion?: string; +} + const MORE_INFO_NAMESPACE = 'MoreInfo'; + +/** + * Returns process variable if the value is set + */ +const getSwiftSearchData = () => { + const swiftSearchInfo: ISSDataInterface = { + swiftSearchVersion: optionalDependencies['swift-search'], + supportedVersion: searchAPIVersion, + }; + return swiftSearchInfo; +}; + /** * Window that display app version and copyright info */ export default class MoreInfo extends React.PureComponent { + /** + * Render Swift-Search version details + */ + public static renderSwiftSearchInfo(): JSX.Element | null { + const { swiftSearchVersion, supportedVersion }: ISSDataInterface = getSwiftSearchData() || {}; + if (!swiftSearchVersion || !supportedVersion) { + return null; + } + return ( +
+

Swift Search

+ + + + + + + + + + + +
{i18n.t('Swift Search Version', MORE_INFO_NAMESPACE)()}{i18n.t('API Version', MORE_INFO_NAMESPACE)()}
{swiftSearchVersion || 'N/A'}{supportedVersion || 'N/A'}
+
+ ); + } + /** * main render function */ @@ -57,6 +102,7 @@ export default class MoreInfo extends React.PureComponent { + {MoreInfo.renderSwiftSearchInfo()} ); } diff --git a/src/renderer/ssf-api.ts b/src/renderer/ssf-api.ts index 7389b502..0e62f1ef 100644 --- a/src/renderer/ssf-api.ts +++ b/src/renderer/ssf-api.ts @@ -1,6 +1,6 @@ import { ipcRenderer, remote } from 'electron'; -import { buildNumber } from '../../package.json'; +import { buildNumber, searchAPIVersion } from '../../package.json'; import { ICustomBrowserWindow } from '../app/window-handler'; import { apiCmds, @@ -177,7 +177,7 @@ export class SSFApi { buildNumber, apiVer: '2.0.0', // Only need to bump if there are any breaking changes. - searchApiVer: '1.55.3', + searchApiVer: searchAPIVersion, }); }