hide logs button if xray logs are disabled

This commit is contained in:
fgsfds 2025-08-04 21:14:16 +05:00
parent 5cee263d09
commit 75fc4d01a1

View file

@ -182,7 +182,7 @@
</template> </template>
</template> </template>
<template #actions> <template #actions>
<a-space direction="horizontal" @click="openXrayLogs()" :style="{ justifyContent: 'center' }"> <a-space v-if="app.ipLimitEnable" direction="horizontal" @click="openXrayLogs()" :style="{ justifyContent: 'center' }">
<a-icon type="bars"></a-icon> <a-icon type="bars"></a-icon>
<span v-if="!isMobile">{{ i18n "pages.index.logs" }}</span> <span v-if="!isMobile">{{ i18n "pages.index.logs" }}</span>
</a-space> </a-space>
@ -429,7 +429,8 @@
</a-form> </a-form>
<div class="ant-input" :style="{ height: 'auto', maxHeight: '500px', overflow: 'auto', marginTop: '0.5rem' }" v-html="logModal.formattedLogs"></div> <div class="ant-input" :style="{ height: 'auto', maxHeight: '500px', overflow: 'auto', marginTop: '0.5rem' }" v-html="logModal.formattedLogs"></div>
</a-modal> </a-modal>
<a-modal id="xraylog-modal" v-model="xraylogModal.visible" <a-modal id="xraylog-modal"
v-model="xraylogModal.visible"
:closable="true" @cancel="() => xraylogModal.visible = false" :closable="true" @cancel="() => xraylogModal.visible = false"
:class="themeSwitcher.currentTheme" :class="themeSwitcher.currentTheme"
width="80vw" width="80vw"
@ -724,7 +725,8 @@ ${dateTime}
backupModal, backupModal,
loadingTip: '{{ i18n "loading"}}', loadingTip: '{{ i18n "loading"}}',
showAlert: false, showAlert: false,
showIp: false showIp: false,
ipLimitEnable: false,
}, },
methods: { methods: {
loading(spinning, tip = '{{ i18n "loading"}}') { loading(spinning, tip = '{{ i18n "loading"}}') {
@ -875,6 +877,12 @@ ${dateTime}
if (window.location.protocol !== "https:") { if (window.location.protocol !== "https:") {
this.showAlert = true; this.showAlert = true;
} }
const msg = await HttpUtil.post('/panel/setting/defaultSettings');
if (msg.success) {
this.ipLimitEnable = msg.obj.ipLimitEnable;
}
while (true) { while (true) {
try { try {
await this.getStatus(); await this.getStatus();