Browse Source

feat: 增加一些提示信息 (#1234)

pull/1236/head
zhengkunwang223 1 year ago committed by GitHub
parent
commit
a8b7c3d8c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      Makefile
  2. 2
      backend/app/service/app.go
  3. 2
      frontend/src/lang/modules/en.ts
  4. 1
      frontend/src/lang/modules/zh.ts
  5. 5
      frontend/src/views/app-store/installed/index.vue

7
Makefile

@ -10,6 +10,13 @@ WEB_PATH=$(BASE_PAH)/frontend
SERVER_PATH=$(BASE_PAH)/backend
MAIN= $(BASE_PAH)/cmd/server/main.go
APP_NAME=1panel
ASSERT_PATH= $(BASE_PAH)/cmd/server/web/asserts
clean_asserts:
rm -rf $(ASSERT_PATH)
upx_bin:
upx $(BUILD_PATH)/$(APP_NAME)
build_frontend:
cd $(WEB_PATH) && npm install && npm run build:dev

2
backend/app/service/app.go

@ -812,7 +812,7 @@ func (a AppService) SyncAppListFromRemote() error {
} else {
if d.Status == constant.AppTakeDown {
runtime, _ := runtimeRepo.GetFirst(runtimeRepo.WithDetailId(d.ID))
if runtime.ID > 0 {
if runtime != nil {
continue
}
deleteDetails = append(deleteDetails, d)

2
frontend/src/lang/modules/en.ts

@ -1176,6 +1176,8 @@ const message = {
takeDown: 'TakeDown',
allReadyInstalled: 'Installed',
installHelper: 'Configuring image acceleration can solve the problem of image pull failure',
upgradeHelper:
'If the upgrade fails or the abnormal application needs to be synchronized to the normal state first',
},
website: {
website: 'Website',

1
frontend/src/lang/modules/zh.ts

@ -1156,6 +1156,7 @@ const message = {
takeDown: '已废弃',
allReadyInstalled: '已安装',
installHelper: '配置镜像加速可以解决镜像拉取失败的问题',
upgradeHelper: '升级失败或者异常应用需要先同步到正常状态',
},
website: {
website: '网站',

5
frontend/src/views/app-store/installed/index.vue

@ -64,6 +64,11 @@
</span>
</template>
</el-alert>
<el-alert type="info" :closable="false" v-if="mode === 'upgrade'">
<template #default>
<span>{{ $t('app.upgradeHelper') }}</span>
</template>
</el-alert>
<div class="update-prompt" v-if="data == null">
<span>{{ mode === 'upgrade' ? $t('app.updatePrompt') : $t('app.installPrompt') }}</span>
<div>

Loading…
Cancel
Save