fix: 🐛 don't show server stats in widget if reporting is disabled
Closes #10527
This commit is contained in:
parent
92a0952794
commit
03ddc970d5
2 changed files with 12 additions and 1 deletions
|
@ -394,6 +394,12 @@ export const meta = {
|
||||||
optional: "true",
|
optional: "true",
|
||||||
nullable: true,
|
nullable: true,
|
||||||
},
|
},
|
||||||
|
enableServerMachineStats: {
|
||||||
|
type: "boolean",
|
||||||
|
optional: "true",
|
||||||
|
nullable: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -497,6 +503,8 @@ export default define(meta, paramDef, async (ps, me) => {
|
||||||
instance.deeplAuthKey != null || instance.libreTranslateApiUrl != null,
|
instance.deeplAuthKey != null || instance.libreTranslateApiUrl != null,
|
||||||
defaultReaction: instance.defaultReaction,
|
defaultReaction: instance.defaultReaction,
|
||||||
donationLink: instance.donationLink,
|
donationLink: instance.donationLink,
|
||||||
|
enableServerMachineStats: instance.enableServerMachineStats,
|
||||||
|
enableIdenticonGeneration: instance.enableIdenticonGeneration,
|
||||||
|
|
||||||
...(ps.detail
|
...(ps.detail
|
||||||
? {
|
? {
|
||||||
|
|
|
@ -12,7 +12,10 @@
|
||||||
<i class="ph-sort-ascending ph-bold ph-lg"></i></button
|
<i class="ph-sort-ascending ph-bold ph-lg"></i></button
|
||||||
></template>
|
></template>
|
||||||
|
|
||||||
<div v-if="meta" class="mkw-serverMetric">
|
<div
|
||||||
|
v-if="meta && instance.enableServerMachineStats"
|
||||||
|
class="mkw-serverMetric"
|
||||||
|
>
|
||||||
<XCpuMemory
|
<XCpuMemory
|
||||||
v-if="widgetProps.view === 0"
|
v-if="widgetProps.view === 0"
|
||||||
:connection="connection"
|
:connection="connection"
|
||||||
|
|
Loading…
Reference in a new issue