fix: 🐛 don't show server stats in widget if reporting is disabled
Closes #10527
This commit is contained in:
parent
92a0952794
commit
03ddc970d5
@ -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 New Issue
Block a user