fix: 🐛 don't show server stats in widget if reporting is disabled

Closes #10527
This commit is contained in:
ThatOneCalculator 2023-07-25 21:49:09 -07:00
parent 92a0952794
commit 03ddc970d5
No known key found for this signature in database
GPG Key ID: 8703CACD01000000
2 changed files with 12 additions and 1 deletions

View File

@ -394,6 +394,12 @@ export const meta = {
optional: "true",
nullable: true,
},
enableServerMachineStats: {
type: "boolean",
optional: "true",
nullable: false,
default: false,
},
},
},
} as const;
@ -497,6 +503,8 @@ export default define(meta, paramDef, async (ps, me) => {
instance.deeplAuthKey != null || instance.libreTranslateApiUrl != null,
defaultReaction: instance.defaultReaction,
donationLink: instance.donationLink,
enableServerMachineStats: instance.enableServerMachineStats,
enableIdenticonGeneration: instance.enableIdenticonGeneration,
...(ps.detail
? {

View File

@ -12,7 +12,10 @@
<i class="ph-sort-ascending ph-bold ph-lg"></i></button
></template>
<div v-if="meta" class="mkw-serverMetric">
<div
v-if="meta && instance.enableServerMachineStats"
class="mkw-serverMetric"
>
<XCpuMemory
v-if="widgetProps.view === 0"
:connection="connection"