mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-19 21:42:24 +00:00
small fixes #1300
This commit is contained in:
parent
848e549c0c
commit
e1da2a2eed
7 changed files with 132 additions and 77 deletions
|
@ -3,7 +3,7 @@ class AllSetting {
|
||||||
constructor(data) {
|
constructor(data) {
|
||||||
this.webListen = "";
|
this.webListen = "";
|
||||||
this.webDomain = "";
|
this.webDomain = "";
|
||||||
this.webPort = 54321;
|
this.webPort = 2053;
|
||||||
this.webCertFile = "";
|
this.webCertFile = "";
|
||||||
this.webKeyFile = "";
|
this.webKeyFile = "";
|
||||||
this.webBasePath = "/";
|
this.webBasePath = "/";
|
||||||
|
@ -19,7 +19,9 @@ class AllSetting {
|
||||||
this.tgBotBackup = false;
|
this.tgBotBackup = false;
|
||||||
this.tgBotLoginNotify = false;
|
this.tgBotLoginNotify = false;
|
||||||
this.tgCpu = "";
|
this.tgCpu = "";
|
||||||
this.tgLang = "";
|
this.tgLang = "en-US";
|
||||||
|
this.xrayTemplateConfig = "";
|
||||||
|
this.secretEnable = false;
|
||||||
this.subEnable = false;
|
this.subEnable = false;
|
||||||
this.subListen = "";
|
this.subListen = "";
|
||||||
this.subPort = "2096";
|
this.subPort = "2096";
|
||||||
|
|
|
@ -38,21 +38,48 @@
|
||||||
<a-icon type="delete" @click="() => inbound.settings.delTrojanFallback(index)"
|
<a-icon type="delete" @click="() => inbound.settings.delTrojanFallback(index)"
|
||||||
style="color: rgb(255, 77, 79);cursor: pointer;"/>
|
style="color: rgb(255, 77, 79);cursor: pointer;"/>
|
||||||
</a-divider>
|
</a-divider>
|
||||||
<a-form-item label="Name">
|
<table width="100%">
|
||||||
<a-input v-model="fallback.name"></a-input>
|
<tr>
|
||||||
</a-form-item>
|
<td style="width: 20%;">Name</td>
|
||||||
<a-form-item label="Alpn">
|
<td>
|
||||||
<a-input v-model="fallback.alpn"></a-input>
|
<a-form-item>
|
||||||
</a-form-item>
|
<a-input v-model="fallback.name" style="width: 250px"></a-input>
|
||||||
<a-form-item label="Path">
|
</a-form-item>
|
||||||
<a-input v-model="fallback.path"></a-input>
|
</td>
|
||||||
</a-form-item>
|
</tr>
|
||||||
<a-form-item label="Dest">
|
<tr>
|
||||||
<a-input v-model="fallback.dest"></a-input>
|
<td>Alpn</td>
|
||||||
</a-form-item>
|
<td>
|
||||||
<a-form-item label="xVer">
|
<a-form-item>
|
||||||
<a-input-number v-model="fallback.xver"></a-input-number>
|
<a-input v-model="fallback.alpn" style="width: 250px"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Path</td>
|
||||||
|
<td>
|
||||||
|
<a-form-item>
|
||||||
|
<a-input v-model="fallback.path" style="width: 250px"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Dest</td>
|
||||||
|
<td>
|
||||||
|
<a-form-item>
|
||||||
|
<a-input v-model="fallback.dest" style="width: 250px"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>xVer</td>
|
||||||
|
<td>
|
||||||
|
<a-form-item>
|
||||||
|
<a-input-number v-model="fallback.xver" :min="0" :max="2"></a-input-number>
|
||||||
|
</a-form-item>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</a-form>
|
</a-form>
|
||||||
<a-divider style="margin:0;"></a-divider>
|
<a-divider style="margin:0;"></a-divider>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -40,21 +40,49 @@
|
||||||
<a-icon type="delete" @click="() => inbound.settings.delFallback(index)"
|
<a-icon type="delete" @click="() => inbound.settings.delFallback(index)"
|
||||||
style="color: rgb(255, 77, 79);cursor: pointer;"/>
|
style="color: rgb(255, 77, 79);cursor: pointer;"/>
|
||||||
</a-divider>
|
</a-divider>
|
||||||
<a-form-item label="Name">
|
<table width="100%">
|
||||||
<a-input v-model="fallback.name"></a-input>
|
<tr>
|
||||||
</a-form-item>
|
<td style="width: 20%;">Name</td>
|
||||||
<a-form-item label="Alpn">
|
<td>
|
||||||
<a-input v-model="fallback.alpn"></a-input>
|
<a-form-item>
|
||||||
</a-form-item>
|
<a-input v-model="fallback.name" style="width: 250px"></a-input>
|
||||||
<a-form-item label="Path">
|
</a-form-item>
|
||||||
<a-input v-model="fallback.path"></a-input>
|
</td>
|
||||||
</a-form-item>
|
</tr>
|
||||||
<a-form-item label="Dest">
|
<tr>
|
||||||
<a-input v-model="fallback.dest"></a-input>
|
<td>Alpn</td>
|
||||||
</a-form-item>
|
<td>
|
||||||
<a-form-item label="xVer">
|
<a-form-item>
|
||||||
<a-input-number v-model="fallback.xver"></a-input-number>
|
<a-input v-model="fallback.alpn" style="width: 250px"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Path</td>
|
||||||
|
<td>
|
||||||
|
<a-form-item>
|
||||||
|
<a-input v-model="fallback.path" style="width: 250px"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Dest</td>
|
||||||
|
<td>
|
||||||
|
<a-form-item>
|
||||||
|
<a-input v-model="fallback.dest" style="width: 250px"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>xVer</td>
|
||||||
|
<td>
|
||||||
|
<a-form-item>
|
||||||
|
<a-input-number v-model="fallback.xver" :min="0" :max="2"></a-input-number>
|
||||||
|
</a-form-item>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</a-form>
|
</a-form>
|
||||||
|
<a-divider style="margin:0;"></a-divider>
|
||||||
</template>
|
</template>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -5,26 +5,25 @@
|
||||||
<a-divider style="margin:0;"></a-divider>
|
<a-divider style="margin:0;"></a-divider>
|
||||||
<table width="100%" class="ant-table-tbody">
|
<table width="100%" class="ant-table-tbody">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td colspan="2">
|
||||||
<span>{{ i18n "security" }}</span>
|
<a-form-item label='{{ i18n "security" }}'>
|
||||||
</td>
|
<a-radio-group v-model="inbound.stream.security" button-style="solid">
|
||||||
<td>
|
<a-radio-button value="none">{{ i18n "none" }}</a-radio-button>
|
||||||
<a-radio-group v-model="inbound.stream.security" button-style="solid">
|
<a-tooltip>
|
||||||
<a-radio-button value="none">{{ i18n "none" }}</a-radio-button>
|
<template slot="title">
|
||||||
<a-tooltip>
|
<span>{{ i18n "pages.inbounds.xtlsDesc" }}</span>
|
||||||
<template slot="title">
|
</template>
|
||||||
<span>{{ i18n "pages.inbounds.xtlsDesc" }}</span>
|
<a-radio-button v-if="inbound.canEnableXtls()" value="xtls">XTLS</a-radio-button>
|
||||||
</template>
|
</a-tooltip>
|
||||||
<a-radio-button v-if="inbound.canEnableXtls()" value="xtls">XTLS</a-radio-button>
|
<a-tooltip>
|
||||||
</a-tooltip>
|
<template slot="title">
|
||||||
<a-tooltip>
|
<span>{{ i18n "pages.inbounds.realityDesc" }}</span>
|
||||||
<template slot="title">
|
</template>
|
||||||
<span>{{ i18n "pages.inbounds.realityDesc" }}</span>
|
<a-radio-button v-if="inbound.canEnableReality()" value="reality">Reality</a-radio-button>
|
||||||
</template>
|
</a-tooltip>
|
||||||
<a-radio-button v-if="inbound.canEnableReality()" value="reality">Reality</a-radio-button>
|
<a-radio-button value="tls">TLS</a-radio-button>
|
||||||
</a-tooltip>
|
</a-radio-group>
|
||||||
<a-radio-button value="tls">TLS</a-radio-button>
|
</a-form-item>
|
||||||
</a-radio-group>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<td v-if="dbInbound.isVMess || dbInbound.isVLess || dbInbound.isTrojan || dbInbound.isSS">
|
<td v-if="dbInbound.isVMess || dbInbound.isVLess || dbInbound.isTrojan || dbInbound.isSS">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ i18n "transmission" }}</td><td><a-tag color="blue">[[ inbound.network ]]</a-tag></td>
|
<td>{{ i18n "transmission" }}</td><td><a-tag color="green">[[ inbound.network ]]</a-tag></td>
|
||||||
</tr>
|
</tr>
|
||||||
<template v-if="inbound.isTcp || inbound.isWs || inbound.isH2">
|
<template v-if="inbound.isTcp || inbound.isWs || inbound.isH2">
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -53,11 +53,11 @@
|
||||||
<tr colspan="2" v-if="dbInbound.hasLink()">
|
<tr colspan="2" v-if="dbInbound.hasLink()">
|
||||||
<td>
|
<td>
|
||||||
{{ i18n "security" }}
|
{{ i18n "security" }}
|
||||||
<a-tag :color="inbound.stream.security == 'none' ? 'red' : 'green'">[[ inbound.stream.security ]]</a-tag>
|
<a-tag :color="inbound.stream.security == 'none' ? 'red' : 'blue'">[[ inbound.stream.security ]]</a-tag>
|
||||||
<br />
|
<br />
|
||||||
<template v-if="inbound.stream.security != 'none'">
|
<template v-if="inbound.stream.security != 'none'">
|
||||||
{{ i18n "domainName" }}
|
{{ i18n "domainName" }}
|
||||||
<a-tag :color="inbound.serverName ? 'green' : 'orange'">[[ inbound.serverName ? inbound.serverName : '' ]]</a-tag>
|
<a-tag :color="inbound.serverName ? 'blue' : 'orange'">[[ inbound.serverName ? inbound.serverName : '' ]]</a-tag>
|
||||||
</template>
|
</template>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -65,13 +65,13 @@
|
||||||
<table v-if="dbInbound.isSS" style="margin-bottom: 10px; width: 100%;">
|
<table v-if="dbInbound.isSS" style="margin-bottom: 10px; width: 100%;">
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ i18n "encryption" }}</td>
|
<td>{{ i18n "encryption" }}</td>
|
||||||
<td><a-tag color="blue">[[ inbound.settings.method ]]</a-tag></td>
|
<td><a-tag color="green">[[ inbound.settings.method ]]</a-tag></td>
|
||||||
</tr><tr v-if="inbound.isSS2022">
|
</tr><tr v-if="inbound.isSS2022">
|
||||||
<td>{{ i18n "password" }}</td>
|
<td>{{ i18n "password" }}</td>
|
||||||
<td><a-tag>[[ inbound.settings.password ]]</a-tag></td>
|
<td><a-tag>[[ inbound.settings.password ]]</a-tag></td>
|
||||||
</tr><tr>
|
</tr><tr>
|
||||||
<td>{{ i18n "pages.inbounds.network" }}</td>
|
<td>{{ i18n "pages.inbounds.network" }}</td>
|
||||||
<td><a-tag color="blue">[[ inbound.settings.network ]]</a-tag></td>
|
<td><a-tag color="green">[[ inbound.settings.network ]]</a-tag></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<template v-if="infoModal.clientSettings">
|
<template v-if="infoModal.clientSettings">
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
<table style="margin-bottom: 10px;">
|
<table style="margin-bottom: 10px;">
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ i18n "pages.inbounds.email" }}</td>
|
<td>{{ i18n "pages.inbounds.email" }}</td>
|
||||||
<td><a-tag color="blue">[[ infoModal.clientSettings.email ]]</a-tag></td>
|
<td><a-tag color="green">[[ infoModal.clientSettings.email ]]</a-tag></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-if="infoModal.clientSettings.id">
|
<tr v-if="infoModal.clientSettings.id">
|
||||||
<td>ID</td>
|
<td>ID</td>
|
||||||
|
@ -96,7 +96,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ i18n "status" }}</td>
|
<td>{{ i18n "status" }}</td>
|
||||||
<td>
|
<td>
|
||||||
<a-tag v-if="isEnable" color="blue">{{ i18n "enabled" }}</a-tag>
|
<a-tag v-if="isEnable" color="green">{{ i18n "enabled" }}</a-tag>
|
||||||
<a-tag v-else>{{ i18n "disabled" }}</a-tag>
|
<a-tag v-else>{{ i18n "disabled" }}</a-tag>
|
||||||
<a-tag v-if="!isActive" color="red">{{ i18n "depleted" }}</a-tag>
|
<a-tag v-if="!isActive" color="red">{{ i18n "depleted" }}</a-tag>
|
||||||
</td>
|
</td>
|
||||||
|
@ -104,7 +104,7 @@
|
||||||
<tr v-if="infoModal.clientStats">
|
<tr v-if="infoModal.clientStats">
|
||||||
<td>{{ i18n "usage" }}</td>
|
<td>{{ i18n "usage" }}</td>
|
||||||
<td>
|
<td>
|
||||||
<a-tag color="blue">[[ sizeFormat(infoModal.clientStats.up + infoModal.clientStats.down) ]]</a-tag>
|
<a-tag color="green">[[ sizeFormat(infoModal.clientStats.up + infoModal.clientStats.down) ]]</a-tag>
|
||||||
<a-tag>↑ [[ sizeFormat(infoModal.clientStats.up) ]] / [[ sizeFormat(infoModal.clientStats.down) ]] ↓</a-tag>
|
<a-tag>↑ [[ sizeFormat(infoModal.clientStats.up) ]] / [[ sizeFormat(infoModal.clientStats.down) ]] ↓</a-tag>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -133,7 +133,7 @@
|
||||||
[[ DateUtil.formatMillis(infoModal.clientSettings.expiryTime) ]]
|
[[ DateUtil.formatMillis(infoModal.clientSettings.expiryTime) ]]
|
||||||
</a-tag>
|
</a-tag>
|
||||||
</template>
|
</template>
|
||||||
<a-tag v-else-if="infoModal.clientSettings.expiryTime < 0" color="blue">[[ infoModal.clientSettings.expiryTime / -86400000 ]] {{ i18n "pages.client.days" }}</a-tag>
|
<a-tag v-else-if="infoModal.clientSettings.expiryTime < 0" color="green">[[ infoModal.clientSettings.expiryTime / -86400000 ]] {{ i18n "pages.client.days" }}</a-tag>
|
||||||
<a-tag v-else color="purple" class="infinite-tag">∞</a-tag>
|
<a-tag v-else color="purple" class="infinite-tag">∞</a-tag>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -167,7 +167,7 @@
|
||||||
<template v-if="dbInbound.hasLink()">
|
<template v-if="dbInbound.hasLink()">
|
||||||
<a-divider>URL</a-divider>
|
<a-divider>URL</a-divider>
|
||||||
<a-row v-for="(link,index) in infoModal.links">
|
<a-row v-for="(link,index) in infoModal.links">
|
||||||
<a-col :span="22"><a-tag color="blue">[[ link.remark ]]</a-tag><br />[[ link.link ]]</a-col>
|
<a-col :span="22"><a-tag color="green">[[ link.remark ]]</a-tag><br />[[ link.link ]]</a-col>
|
||||||
<a-col :span="2" style="text-align: right;">
|
<a-col :span="2" style="text-align: right;">
|
||||||
<a-tooltip title='{{ i18n "copy" }}'>
|
<a-tooltip title='{{ i18n "copy" }}'>
|
||||||
<button class="ant-btn ant-btn-primary" :id="'copy-url-link-'+index" @click="copyToClipboard('copy-url-link-'+index, link.link)">
|
<button class="ant-btn ant-btn-primary" :id="'copy-url-link-'+index" @click="copyToClipboard('copy-url-link-'+index, link.link)">
|
||||||
|
@ -182,7 +182,7 @@
|
||||||
<template v-if="dbInbound.isSS && !inbound.isSSMultiUser">
|
<template v-if="dbInbound.isSS && !inbound.isSSMultiUser">
|
||||||
<a-divider>URL</a-divider>
|
<a-divider>URL</a-divider>
|
||||||
<a-row v-for="(link,index) in infoModal.links">
|
<a-row v-for="(link,index) in infoModal.links">
|
||||||
<a-col :span="22"><a-tag color="blue">[[ link.remark ]]</a-tag><br />[[ link.link ]]</a-col>
|
<a-col :span="22"><a-tag color="green">[[ link.remark ]]</a-tag><br />[[ link.link ]]</a-col>
|
||||||
<a-col :span="2" style="text-align: right;">
|
<a-col :span="2" style="text-align: right;">
|
||||||
<a-tooltip title='{{ i18n "copy" }}'>
|
<a-tooltip title='{{ i18n "copy" }}'>
|
||||||
<button class="ant-btn ant-btn-primary" :id="'copy-url-link-'+index" @click="copyToClipboard('copy-url-link-'+index, link.link)">
|
<button class="ant-btn ant-btn-primary" :id="'copy-url-link-'+index" @click="copyToClipboard('copy-url-link-'+index, link.link)">
|
||||||
|
@ -199,10 +199,10 @@
|
||||||
<th>{{ i18n "pages.inbounds.network" }}</th>
|
<th>{{ i18n "pages.inbounds.network" }}</th>
|
||||||
<th>FollowRedirect</th>
|
<th>FollowRedirect</th>
|
||||||
</tr><tr>
|
</tr><tr>
|
||||||
<td><a-tag color="blue">[[ inbound.settings.address ]]</a-tag></td>
|
<td><a-tag color="green">[[ inbound.settings.address ]]</a-tag></td>
|
||||||
<td><a-tag color="blue">[[ inbound.settings.port ]]</a-tag></td>
|
<td><a-tag color="green">[[ inbound.settings.port ]]</a-tag></td>
|
||||||
<td><a-tag color="blue">[[ inbound.settings.network ]]</a-tag></td>
|
<td><a-tag color="green">[[ inbound.settings.network ]]</a-tag></td>
|
||||||
<td><a-tag color="blue">[[ inbound.settings.followRedirect ]]</a-tag></td>
|
<td><a-tag color="green">[[ inbound.settings.followRedirect ]]</a-tag></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<table v-if="dbInbound.isSocks" style="margin-bottom: 10px; width: 100%;">
|
<table v-if="dbInbound.isSocks" style="margin-bottom: 10px; width: 100%;">
|
||||||
|
@ -223,8 +223,8 @@
|
||||||
<td>{{ i18n "password" }}</td>
|
<td>{{ i18n "password" }}</td>
|
||||||
</tr><tr v-for="account,index in inbound.settings.accounts">
|
</tr><tr v-for="account,index in inbound.settings.accounts">
|
||||||
<td>[[ index ]]</td>
|
<td>[[ index ]]</td>
|
||||||
<td><a-tag color="blue">[[ account.user ]]</a-tag></td>
|
<td><a-tag color="green">[[ account.user ]]</a-tag></td>
|
||||||
<td><a-tag color="blue">[[ account.pass ]]</a-tag></td>
|
<td><a-tag color="green">[[ account.pass ]]</a-tag></td>
|
||||||
</tr>
|
</tr>
|
||||||
</template>
|
</template>
|
||||||
</table>
|
</table>
|
||||||
|
@ -235,8 +235,8 @@
|
||||||
<th>{{ i18n "password" }}</th>
|
<th>{{ i18n "password" }}</th>
|
||||||
</tr><tr v-for="account,index in inbound.settings.accounts">
|
</tr><tr v-for="account,index in inbound.settings.accounts">
|
||||||
<td>[[ index ]]</td>
|
<td>[[ index ]]</td>
|
||||||
<td><a-tag color="blue">[[ account.user ]]</a-tag></td>
|
<td><a-tag color="green">[[ account.user ]]</a-tag></td>
|
||||||
<td><a-tag color="blue">[[ account.pass ]]</a-tag></td>
|
<td><a-tag color="green">[[ account.pass ]]</a-tag></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -185,9 +185,8 @@
|
||||||
:row-class-name="dbInbound => (dbInbound.isMultiUser() ? '' : 'hideExpandIcon')"
|
:row-class-name="dbInbound => (dbInbound.isMultiUser() ? '' : 'hideExpandIcon')"
|
||||||
style="margin-top: 10px">
|
style="margin-top: 10px">
|
||||||
<template slot="action" slot-scope="text, dbInbound">
|
<template slot="action" slot-scope="text, dbInbound">
|
||||||
<a-icon type="edit" style="font-size: 22px" @click="openEditInbound(dbInbound.id);"></a-icon>
|
|
||||||
<a-dropdown :trigger="['click']">
|
<a-dropdown :trigger="['click']">
|
||||||
<a @click="e => e.preventDefault()">{{ i18n "pages.inbounds.operate" }}</a>
|
<a-icon @click="e => e.preventDefault()" type="more" style="font-size: 20px; text-decoration: solid;"></a-icon>
|
||||||
<a-menu slot="overlay" @click="a => clickAction(a, dbInbound)" :theme="themeSwitcher.currentTheme">
|
<a-menu slot="overlay" @click="a => clickAction(a, dbInbound)" :theme="themeSwitcher.currentTheme">
|
||||||
<a-menu-item key="edit">
|
<a-menu-item key="edit">
|
||||||
<a-icon type="edit"></a-icon>
|
<a-icon type="edit"></a-icon>
|
||||||
|
|
|
@ -437,8 +437,8 @@
|
||||||
},
|
},
|
||||||
formatLogs(logs) {
|
formatLogs(logs) {
|
||||||
let formattedLogs = '';
|
let formattedLogs = '';
|
||||||
const levels = ["DEBUG","INFO","WARNING","ERROR"];
|
const levels = ["DEBUG","INFO","NOTICE","WARNING","ERROR"];
|
||||||
const levelColors = ["#7a316f","#008771","#f37b24","#cf3c3c","#bcbcbc"];
|
const levelColors = ["#3c89e8","#008771","#008771","#f37b24","#e04141","#bcbcbc"];
|
||||||
|
|
||||||
logs.forEach((log, index) => {
|
logs.forEach((log, index) => {
|
||||||
let [data, message] = log.split(" - ",2);
|
let [data, message] = log.split(" - ",2);
|
||||||
|
@ -449,13 +449,13 @@
|
||||||
const d = parts[0];
|
const d = parts[0];
|
||||||
const t = parts[1];
|
const t = parts[1];
|
||||||
const level = parts[2];
|
const level = parts[2];
|
||||||
const levelIndex = levels.indexOf(level,levels) || 4;
|
const levelIndex = levels.indexOf(level,levels) || 5;
|
||||||
|
|
||||||
//formattedLogs += `<span style="color: gray;">${index + 1}.</span>`;
|
//formattedLogs += `<span style="color: gray;">${index + 1}.</span>`;
|
||||||
formattedLogs += `<span style="color: ${levelColors[0]};">${d} ${t}</span> `;
|
formattedLogs += `<span style="color: ${levelColors[0]};">${d} ${t}</span> `;
|
||||||
formattedLogs += `<span style="color: ${levelColors[levelIndex]}">${level}</span>`;
|
formattedLogs += `<span style="color: ${levelColors[levelIndex]}">${level}</span>`;
|
||||||
} else {
|
} else {
|
||||||
const levelIndex = levels.indexOf(data,levels) || 4;
|
const levelIndex = levels.indexOf(data,levels) || 5;
|
||||||
formattedLogs += `<span style="color: ${levelColors[levelIndex]}">${data}</span>`;
|
formattedLogs += `<span style="color: ${levelColors[levelIndex]}">${data}</span>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue