Skip to content

Commit

Permalink
界面优化
Browse files Browse the repository at this point in the history
1.网络管理详情页成员默认展示短昵称
2.设置页面启动服务后刷新顶部状态栏
3. 调整流水线检查时间
  • Loading branch information
powerAn2020 committed Dec 10, 2024
1 parent 26ceb68 commit 5694a2d
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 171 deletions.
140 changes: 0 additions & 140 deletions .github/workflows/debug.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .github/workflows/dev_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ permissions:
jobs:
build:
runs-on: ubuntu-latest
env:
COMMIT: 0
SKIP_NEXT: false
VERSION:
MODULE_VERSION:
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
27 changes: 9 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: release
on:
workflow_dispatch:
schedule:
- cron: '40 7 * * 2'
- cron: '40 15 * * *'
# push:

permissions:
Expand All @@ -13,6 +13,10 @@ permissions:
jobs:
build:
runs-on: ubuntu-latest
env:
SKIP_NEXT: false
VERSION:
MODULE_VERSION:
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -32,7 +36,6 @@ jobs:
zerotier_version=$(cat zerotier_version)
echo "${zerotier_version}=${zerotier_latest_version}"
if [ "$zerotier_latest_version" = "$zerotier_version" -a "${{github.event_name }}" = "schedule" ]; then
echo "COMMIT=0" >> $GITHUB_ENV
echo "SKIP_NEXT=true" >> $GITHUB_ENV
exit 0
fi
Expand Down Expand Up @@ -92,7 +95,6 @@ jobs:
fi
git add module.prop update_arm64.json update_arm.json changelog.md zerotier_version
git commit -m "update config"
echo "COMMIT=1" >> $GITHUB_ENV
# else
# echo "no need commit"
# exit 0
Expand Down Expand Up @@ -148,9 +150,9 @@ jobs:
./ZeroTierForKSU-arm64-${{ env.MODULE_VERSION }}.zip
./ZeroTierForKSU-arm-${{ env.MODULE_VERSION }}.zip
- name: Schedule Release
- name: Release
uses: softprops/action-gh-release@v2
if: github.event_name == 'schedule' && ${{ env.COMMIT == '1' }}
if: ${{ env.SKIP_NEXT != 'true' }}
with:
body_path: changelog.md
tag_name: ${{ env.MODULE_VERSION }}
Expand All @@ -159,20 +161,9 @@ jobs:
ZeroTierForKSU-arm64-${{ env.MODULE_VERSION }}.zip
ZeroTierForKSU-arm-${{ env.MODULE_VERSION }}.zip
- name: Manual Release
uses: softprops/action-gh-release@v2
if: github.event_name == 'workflow_dispatch'
with:
generate_release_notes: true
tag_name: ${{ env.MODULE_VERSION }}
name: ZeroTierForKSU-${{ env.MODULE_VERSION }}
files: |
ZeroTierForKSU-arm64-${{ env.MODULE_VERSION }}.zip
ZeroTierForKSU-arm-${{ env.MODULE_VERSION }}.zip
- name: Push changes
uses: ad-m/github-push-action@master
if: ${{ env.COMMIT == '1' }}
if: ${{ env.SKIP_NEXT != 'true' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
branch: main
17 changes: 7 additions & 10 deletions ui-src/src/NetworkDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</van-collapse-item>
<van-collapse-item :title="t('networkDetail.member')" name="member">
<van-collapse v-model="nodeId" @change="changeMember" accordion>
<van-collapse-item v-for="(item, index) in memberList" :title="item.nodeId" :key="index" :name="item.nodeId">
<van-collapse-item v-for="(item, index) in memberList" :title="(item.name==''?item.nodeId:item.name)" :key="index" :name="item.nodeId">
<van-field name="checkbox" :label="t('networkDetail.allowAuth')" input-align="right">
<template #input>
<van-checkbox v-model="item.config.authorized" shape="square"
Expand Down Expand Up @@ -179,7 +179,7 @@
<van-cell clickable is-link center @click="dnsEditor = true">
<template #title>
{{ t('networkDetail.DNSServers') }}
<van-icon name="info-o" @click="showTips('2')" />
<!-- <van-icon name="info-o" @click="showTips('2')" /> -->
</template>
<template #right-icon>
<!-- v-show="networkObj.config.enableBroadcast" -->
Expand Down Expand Up @@ -298,7 +298,7 @@
<van-popup v-model:show="dnsEditor" round :style="{ width: '90%', maxHeight: '85%' }" :before-close="checkDNS">
<van-cell title="DNS Servers" title-style="max-width:100%;" center>
<template #right-icon>
<van-icon size="1.2rem" name="plus" @click='addNetworkDNS' />
<van-icon size="1.2rem" name="plus" @click="networkObj.value.config.dns.servers.push('')" />
</template>
</van-cell>
<van-form>
Expand Down Expand Up @@ -372,16 +372,9 @@ const nodeId = ref(['']);
const asyncIPv4Validator = (val) =>
new Promise((resolve) => {
resolve(IPV4Pattern.test(val));
});
const addNetworkDNS = () => {
if (!networkObj.value.config.dns.servers) {
networkObj.value.config.dns.servers = [];
}
networkObj.value.config.dns.servers.push('')
}
const asyncIPPoolValidator = (val) =>
new Promise((resolve) => {
const ipArr = val.split('-');
Expand Down Expand Up @@ -813,6 +806,10 @@ const init = () => {
execCmdWithCallback({
cmd: `sh ${MODDIR}/api.sh central network list ${route.params.id}`, onSuccess: (data) => {
networkObj.value = JSON.parse(data);
if(networkObj.value.config.dns.servers==null){
networkObj.value.config.dns.servers=[]
}
debugger
if (!networkObj.value) {
closeToast();
router.push('/center/network')
Expand Down
1 change: 1 addition & 0 deletions ui-src/src/Setting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ const enableSwitch = (newValue) => {
execCmd(`sh ${MODDIR}/api.sh local service start`).then(v => {
setTimeout(() => {
enableLoading.value = false;
init()
}, 1000);
})
} else {
Expand Down
2 changes: 1 addition & 1 deletion ui-src/src/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"zt_v4": "Auto-Assign from Range (IPv4)",
"zt_v6": "Auto-Assign from Range (IPv6)",
"v6AssignModeRfc4193": "ZeroTier RFC4193(IPv6)",
"v6AssignMode6plane": "ZeroTier 6PLANE(IPv4)",
"v6AssignMode6plane": "ZeroTier 6PLANE(IPv6)",
"ipPoolManage": "IPv4/IPv6 Address Pool Config",
"DNSManage": "DNS configuration",
"DNSDomain": "DNS domain",
Expand Down
4 changes: 2 additions & 2 deletions ui-src/src/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"allowBridge": "允许桥接",
"name": "名称",
"description": "备注",
"address": "地址",
"address": "节点ID",
"physicalAddress": "物理IP",
"clientVersion": "客户端版本",
"lastOnline": "上次在线时间",
Expand All @@ -74,7 +74,7 @@
"zt_v4": "DHCPv4",
"zt_v6": "DHCPv6",
"v6AssignModeRfc4193": "ZeroTier RFC4193(IPv6)",
"v6AssignMode6plane": "ZeroTier 6PLANE(IPv4)",
"v6AssignMode6plane": "ZeroTier 6PLANE(IPv6)",
"ipPoolManage": "IPv4/IPv6地址池配置",
"DNSManage": "DNS配置",
"DNSDomain": "DNS 域名",
Expand Down

0 comments on commit 5694a2d

Please sign in to comment.