diff --git a/publish.ps1 b/publish.ps1 index f645445..ca5ed53 100644 --- a/publish.ps1 +++ b/publish.ps1 @@ -1,3 +1,14 @@ +Param( + [Switch] $Prod = $false +) + +# 用于执行shell命令 +function Exec-Shell-Cmd { + Param($Cmd) + + ssh root:zwsd@192.168.8.11 "cd /frontend && $Cmd" +} + # build project yarn build # rename dist to current time, like 20221215121300 @@ -8,13 +19,20 @@ Compress-Archive -Path ./$now -DestinationPath ./app.zip -Force # upload app.zip to server scp app.zip root@192.168.8.11:/frontend/ # unzip app.zip -ssh root:zwsd@192.168.8.11 "cd /frontend && unzip app.zip" +Exec-Shell-Cmd "unzip app.zip" # remove old link -ssh root:zwsd@192.168.8.11 "cd /frontend && rm -f dist" +Exec-Shell-Cmd "rm -f /frontend/dist" # create link -ssh root:zwsd@192.168.8.11 "cd /frontend && ln -s /frontend/$now /frontend/dist" +Exec-Shell-Cmd "ln -s /frontend/$now /frontend/dist" # remove app.zip -ssh root:zwsd@192.168.8.11 "cd /frontend && rm -f app.zip" +Exec-Shell-Cmd "rm -f app.zip" Remove-Item -Path ./app.zip # remove folder -Remove-Item -Path ./$now -Recurse \ No newline at end of file +Remove-Item -Path ./$now -Recurse + +# 创建测试模式标记 +Exec-Shell-Cmd "touch /var/zapp_flag/chrome_in_test_mode" +if ($Prod) { + # 删除测试模式标记 + Exec-Shell-Cmd "rm /var/zapp_flag/chrome_in_test_mode" +} \ No newline at end of file diff --git a/src/components/Setting/components/History.vue b/src/components/Setting/components/History.vue index 0af3ac7..c32484c 100644 --- a/src/components/Setting/components/History.vue +++ b/src/components/Setting/components/History.vue @@ -369,7 +369,7 @@ const showDetailModal = item => { width: 100%; height: 580px; display: flex; - justify-content: space-evenly; + justify-content: start; align-items: center; overflow: scroll; .table_column {