Skip to content

Commit

Permalink
fix: Armbian distribution information (#1388)
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
  • Loading branch information
pedrolamas committed Mar 13, 2024
1 parent 090f3de commit c8da496
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions src/components/widgets/system/SystemOverviewCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@
<th>{{ $t('app.system_info.label.operating_system') }}</th>
<td>{{ distribution.name }}</td>
</tr>
<tr v-if="distribution.release_info?.name">
<tr v-if="distributionName">
<th>{{ $t('app.system_info.label.distribution_name') }}</th>
<td>
{{ distribution.release_info.name }} {{ distribution.release_info.version_id }}
{{ distributionName }}
</td>
</tr>
<tr v-if="distribution.like">
Expand Down Expand Up @@ -118,6 +118,22 @@ export default class PrinterStatsCard extends Mixins(StateMixin) {
return this.systemInfo?.distribution || {} as DistroInfo
}
get distributionName (): string | undefined {
const { name, id } = this.distribution
if (name) {
if (name.startsWith('0.')) {
return undefined
}
return `${(
name.startsWith('#')
? id
: name
)} ${this.distribution.release_info?.version_id} ?? ''`
}
}
get virtualization () {
return this.systemInfo?.virtualization || {} as Virtualization
}
Expand Down

0 comments on commit c8da496

Please sign in to comment.