Skip to content

Commit

Permalink
feat: get app description from manifest for non App Hub apps
Browse files Browse the repository at this point in the history
  • Loading branch information
mediremi committed Jul 2, 2021
1 parent 339aa56 commit 05b1f49
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
4 changes: 2 additions & 2 deletions i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2021-06-23T11:27:13.375Z\n"
"PO-Revision-Date: 2021-06-23T11:27:13.375Z\n"
"POT-Creation-Date: 2021-07-02T09:59:39.076Z\n"
"PO-Revision-Date: 2021-07-02T09:59:39.076Z\n"

msgid "Version {{version}} installed"
msgstr "Version {{version}} installed"
Expand Down
33 changes: 17 additions & 16 deletions src/components/AppDetails/AppDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ export const AppDetails = ({
const appDeveloper = appHubApp
? appHubApp.developer.organisation || appHubApp.developer.name
: installedApp.developer?.company || installedApp.developer?.name
const description = appHubApp
? appHubApp.description
: installedApp.description
const screenshots = appHubApp?.images
.filter(i => !i.logo)
.map(i => i.imageUrl)
Expand All @@ -111,22 +114,20 @@ export const AppDetails = ({
</header>
<Divider />
<section className={[styles.section, styles.mainSection].join(' ')}>
{appHubApp && (
<div>
<h2 className={styles.sectionHeader}>
{i18n.t('About this app')}
</h2>
<p>
{appHubApp.description || (
<em>
{i18n.t(
'The developer of this application has not provided a description'
)}
</em>
)}
</p>
</div>
)}
<div>
<h2 className={styles.sectionHeader}>
{i18n.t('About this app')}
</h2>
<p>
{description || (
<em>
{i18n.t(
'The developer of this application has not provided a description'
)}
</em>
)}
</p>
</div>
<div>
<ManageInstalledVersion
installedApp={installedApp}
Expand Down
2 changes: 1 addition & 1 deletion src/components/AppDetails/ManageInstalledVersion.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ export const ManageInstalledVersion = ({
}

ManageInstalledVersion.propTypes = {
versions: PropTypes.array.isRequired,
onVersionInstall: PropTypes.func.isRequired,
installedApp: PropTypes.object,
versions: PropTypes.array,
onUninstall: PropTypes.func,
}

0 comments on commit 05b1f49

Please sign in to comment.