Skip to content

Commit 05b1f49

Browse files
committed
feat: get app description from manifest for non App Hub apps
1 parent 339aa56 commit 05b1f49

File tree

3 files changed

+20
-19
lines changed

3 files changed

+20
-19
lines changed

i18n/en.pot

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ msgstr ""
55
"Content-Type: text/plain; charset=utf-8\n"
66
"Content-Transfer-Encoding: 8bit\n"
77
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
8-
"POT-Creation-Date: 2021-06-23T11:27:13.375Z\n"
9-
"PO-Revision-Date: 2021-06-23T11:27:13.375Z\n"
8+
"POT-Creation-Date: 2021-07-02T09:59:39.076Z\n"
9+
"PO-Revision-Date: 2021-07-02T09:59:39.076Z\n"
1010

1111
msgid "Version {{version}} installed"
1212
msgstr "Version {{version}} installed"

src/components/AppDetails/AppDetails.js

+17-16
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ export const AppDetails = ({
9292
const appDeveloper = appHubApp
9393
? appHubApp.developer.organisation || appHubApp.developer.name
9494
: installedApp.developer?.company || installedApp.developer?.name
95+
const description = appHubApp
96+
? appHubApp.description
97+
: installedApp.description
9598
const screenshots = appHubApp?.images
9699
.filter(i => !i.logo)
97100
.map(i => i.imageUrl)
@@ -111,22 +114,20 @@ export const AppDetails = ({
111114
</header>
112115
<Divider />
113116
<section className={[styles.section, styles.mainSection].join(' ')}>
114-
{appHubApp && (
115-
<div>
116-
<h2 className={styles.sectionHeader}>
117-
{i18n.t('About this app')}
118-
</h2>
119-
<p>
120-
{appHubApp.description || (
121-
<em>
122-
{i18n.t(
123-
'The developer of this application has not provided a description'
124-
)}
125-
</em>
126-
)}
127-
</p>
128-
</div>
129-
)}
117+
<div>
118+
<h2 className={styles.sectionHeader}>
119+
{i18n.t('About this app')}
120+
</h2>
121+
<p>
122+
{description || (
123+
<em>
124+
{i18n.t(
125+
'The developer of this application has not provided a description'
126+
)}
127+
</em>
128+
)}
129+
</p>
130+
</div>
130131
<div>
131132
<ManageInstalledVersion
132133
installedApp={installedApp}

src/components/AppDetails/ManageInstalledVersion.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ export const ManageInstalledVersion = ({
100100
}
101101

102102
ManageInstalledVersion.propTypes = {
103-
versions: PropTypes.array.isRequired,
104103
onVersionInstall: PropTypes.func.isRequired,
105104
installedApp: PropTypes.object,
105+
versions: PropTypes.array,
106106
onUninstall: PropTypes.func,
107107
}

0 commit comments

Comments
 (0)