[ui] separate outbound and reverse

Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
This commit is contained in:
MHSanaei 2024-01-11 09:30:37 +03:30
parent a9229ecafe
commit 2111632702

View file

@ -90,7 +90,7 @@
</a-row> </a-row>
</a-card> </a-card>
<a-tabs class="ant-card-dark-box-nohover" default-active-key="tpl-1" <a-tabs class="ant-card-dark-box-nohover" default-active-key="tpl-1"
@change="(activeKey) => { if(activeKey == 'tpl-4') this.changeCode(); }" @change="(activeKey) => { if(activeKey == 'tpl-advanced') this.changeCode(); }"
:class="themeSwitcher.currentTheme"> :class="themeSwitcher.currentTheme">
<a-tab-pane key="tpl-1" tab='{{ i18n "pages.xray.basicTemplate"}}'> <a-tab-pane key="tpl-1" tab='{{ i18n "pages.xray.basicTemplate"}}'>
<a-space direction="horizontal" style="padding: 20px 20px"> <a-space direction="horizontal" style="padding: 20px 20px">
@ -333,11 +333,7 @@
</a-table> </a-table>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="tpl-3" tab='{{ i18n "pages.xray.Outbounds"}}' style="padding-top: 20px;" force-render="true"> <a-tab-pane key="tpl-3" tab='{{ i18n "pages.xray.Outbounds"}}' style="padding-top: 20px;" force-render="true">
<a-button type="primary" icon="plus" @click="addOutbound()">{{ i18n "pages.xray.outbound.addOutbound" }}</a-button> <a-button type="primary" icon="plus" @click="addOutbound()" style="margin-bottom: 10px;">{{ i18n "pages.xray.outbound.addOutbound" }}</a-button>
<a-button type="primary" icon="plus" @click="addReverse()">{{ i18n "pages.xray.outbound.addReverse" }}</a-button>
<a-row>
<a-col :sm="24" :md="12">
<p style="margin: 10px;">{{ i18n "pages.xray.Outbounds"}}</p>
<a-table :columns="outboundColumns" bordered <a-table :columns="outboundColumns" bordered
:row-key="r => r.key" :row-key="r => r.key"
:data-source="outboundData" :data-source="outboundData"
@ -374,9 +370,9 @@
</template> </template>
</template> </template>
</a-table> </a-table>
</a-col> </a-tab-pane>
<a-col :sm="24" :md="12" v-if="reverseData.length>0"> <a-tab-pane key="tpl-4" tab='{{ i18n "pages.xray.outbound.reverse"}}' style="padding-top: 20px;" force-render="true">
<p style="margin: 10px;">{{ i18n "pages.xray.outbound.reverse"}}</p> <a-button type="primary" icon="plus" @click="addReverse()" style="margin-bottom: 10px;">{{ i18n "pages.xray.outbound.addReverse" }}</a-button>
<a-table :columns="reverseColumns" bordered <a-table :columns="reverseColumns" bordered
:row-key="r => r.key" :row-key="r => r.key"
:data-source="reverseData" :data-source="reverseData"
@ -402,10 +398,8 @@
</a-dropdown> </a-dropdown>
</template> </template>
</a-table> </a-table>
</a-col>
</a-row>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="tpl-4" tab='{{ i18n "pages.xray.advancedTemplate"}}' style="padding-top: 20px;" force-render="true"> <a-tab-pane key="tpl-advanced" tab='{{ i18n "pages.xray.advancedTemplate"}}' style="padding-top: 20px;" force-render="true">
<a-list-item-meta title='{{ i18n "pages.xray.Template"}}' description='{{ i18n "pages.xray.TemplateDesc"}}'></a-list-item-meta> <a-list-item-meta title='{{ i18n "pages.xray.Template"}}' description='{{ i18n "pages.xray.TemplateDesc"}}'></a-list-item-meta>
<a-radio-group v-model="advSettings" @change="changeCode" button-style="solid" style="margin: 10px 0;" :size="isMobile ? 'small' : ''"> <a-radio-group v-model="advSettings" @change="changeCode" button-style="solid" style="margin: 10px 0;" :size="isMobile ? 'small' : ''">
<a-radio-button value="xraySetting">{{ i18n "pages.xray.completeTemplate"}}</a-radio-button> <a-radio-button value="xraySetting">{{ i18n "pages.xray.completeTemplate"}}</a-radio-button>