Skip to content

Commit a3e9623

Browse files
committed
feat: core upgrade
1 parent 2ef2461 commit a3e9623

File tree

41 files changed

+126
-919
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+126
-919
lines changed

app/Constant/AppConstant.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ class AppConstant
66
{
77
const APP = 'blog';
88
const APP_NAME = 'ModStartBlog';
9-
const VERSION = '5.2.0';
9+
const VERSION = '5.3.0';
1010
}

module/AdminManager/Admin/Controller/UpgradeController.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ private function doNext($step, $msgs = [], $data = [])
5454

5555
public function index()
5656
{
57+
if (config('modstart.admin.upgradeDisable', false)) {
58+
return Response::sendError('系统升级功能已关闭');
59+
}
5760
if (Request::isPost()) {
5861
AdminPermission::demoCheck();
5962
$input = InputPackage::buildFromInput();

module/Blog/View/widget/blogInfo.blade.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
<b>ModStartBlog</b>
1313
<b>V{{\App\Constant\AppConstant::VERSION}}</b>
1414
</div>
15-
<div data-admin-version></div>
15+
@if(!config('modstart.admin.versionCheckDisable',false))
16+
<div data-admin-version></div>
17+
@endif
1618
</div>
1719
<script type="text/javascript">
1820
// 最新版本检测

module/ModuleStore/Asset/entry/moduleStore.js

Lines changed: 1 addition & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

module/ModuleStore/Docs/release.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 1.9.0
2+
3+
- 新增:模块市场预览包功能支持
4+
- 新增:模块管理模块升级判断逻辑修改
5+
6+
---
7+
18
## 1.8.0 系统升级文件写入权限检查校验
29

310
- 新增:已安装模块新版本显示重复

module/ModuleStore/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"Vendor:>=1.4.0"
1313
],
1414
"modstartVersion": ">=3.3.0",
15-
"version": "1.8.0",
15+
"version": "1.9.0",
1616
"author": "官方",
1717
"description": "提供各种各样的应用模块,方便应用快速集成"
1818
}

module/ModuleStore/resources/asset/src/pages/ModuleStore.vue

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
style="width:0.8rem;display:inline-block;vertical-align:middle;"
6464
:style="{backgroundImage:`url(${memberUser.avatar})`}"></div>
6565
<i v-else class="iconfont icon-user"></i>
66-
{{memberUser.username}}
66+
{{ memberUser.username }}
6767
</span>
6868
<span v-else>
6969
<i class="iconfont icon-user"></i>
@@ -92,7 +92,7 @@
9292
<a href="javascript:;" class="tw-mr-1 tw-text-gray-500 tw-mr-1"
9393
:class="{'ub-text-primary':search.categoryId===cat.id}"
9494
v-for="(cat,catIndex) in categories" :key="catIndex" @click="search.categoryId=cat.id">
95-
{{cat.title}}
95+
{{ cat.title }}
9696
</a>
9797
</div>
9898
<div class="tw-px-2 tw-pt-2" v-if="types.length>0 && search.tab!=='system'">
@@ -105,7 +105,7 @@
105105
<a href="javascript:;" class="tw-mr-1 tw-text-gray-500 tw-mr-1"
106106
:class="{'ub-text-primary':search.type===type.value}"
107107
v-for="(type,typeIndex) in types" :key="typeIndex" @click="search.type=type.value">
108-
{{type.title}}
108+
{{ type.title }}
109109
</a>
110110
</div>
111111
<div class="ub-empty" v-if="loading">
@@ -151,8 +151,8 @@
151151
<span v-if="!module.isFee && !module._isLocal"
152152
class="ub-text-success">免费</span>
153153
<div v-if="module.isFee" class="ub-text-danger">
154-
<span v-if="module.priceYearEnable">¥{{module.priceYear}}</span>
155-
<span v-else-if="module.priceSuperEnable">¥{{module.priceSuper}}</span>
154+
<span v-if="module.priceYearEnable">¥{{ module.priceYear }}</span>
155+
<span v-else-if="module.priceSuperEnable">¥{{ module.priceSuper }}</span>
156156
</div>
157157
</div>
158158
<div class="tw-text-gray-400 tw-text-sm tw-mt-2"
@@ -181,7 +181,7 @@
181181
<i class="iconfont icon-down"></i>
182182
</a>
183183
</el-tooltip>
184-
<a v-if="module._isInstalled && !module._isLocal && module.latestVersion!==module._localVersion"
184+
<a v-if="module._isInstalled && !module._isLocal && canUpgrade(module._localVersion,module.latestVersion)"
185185
@click="doUpgrade(module)"
186186
:data-tk-event="'ModuleStore,Upgrade,'+module.name"
187187
href="javascript:;" class="ub-text-warning tw-mr-4">
@@ -232,13 +232,13 @@
232232
v-html="$highlight(module.name,search.keywords)"></span></div>
233233
<span class="ub-text-muted">|</span>
234234
<span class="ub-text-muted" v-if="module._isLocal">
235-
版本V{{module._localVersion}}
235+
版本V{{ module._localVersion }}
236236
</span>
237237
<span class="ub-text-muted" v-else-if="module._isInstalled">
238-
已安装V{{module._localVersion}},最新版V{{module.latestVersion}}
238+
已安装V{{ module._localVersion }},最新版V{{ module.latestVersion }}
239239
</span>
240240
<span class="ub-text-muted" v-else>
241-
最新版V{{module.latestVersion}}
241+
最新版V{{ module.latestVersion }}
242242
</span>
243243
</div>
244244
</div>
@@ -332,7 +332,7 @@
332332
:style="{backgroundImage:`url(${memberUser.avatar||'/asset/image/avatar.png'})`}"></div>
333333
</div>
334334
<div class="tw-ml-4 tw-mr-auto">
335-
<div class="tw-font-medium">{{memberUser.username || ''}}</div>
335+
<div class="tw-font-medium">{{ memberUser.username || '' }}</div>
336336
</div>
337337
<div>
338338
<a href="javascript:;" @click="doMemberUserLogout()">退出</a>
@@ -359,14 +359,14 @@
359359
<div slot="title">
360360
<div class="ub-text-bold ub-text-primary">
361361
<i class="iconfont icon-code"></i>
362-
{{commandDialogTitle}}
362+
{{ commandDialogTitle }}
363363
</div>
364364
</div>
365365
<div class="tw-bg-gray-900 tw-font-mono tw-leading-8 tw-p-4 tw-text-white">
366366
<div v-for="(msg,msgIndex) in commandDialogMsgs" v-html="msg"></div>
367367
<div v-if="!commandDialogFinish">
368368
<i class="iconfont icon-loading tw-inline-block tw-animate-spin"></i>
369-
当前操作已运行 {{commandDialogRunElapse}} s ...
369+
当前操作已运行 {{ commandDialogRunElapse }} s ...
370370
</div>
371371
<div v-else>
372372
<i class="iconfont icon-check"></i>
@@ -384,16 +384,19 @@
384384
<div slot="title">
385385
<div class="ub-text-bold ub-text-primary" v-if="installVersionModule">
386386
<i class="iconfont icon-code"></i>
387-
安装 {{installVersionModule.title}} 其他版本
387+
安装 {{ installVersionModule.title }} 其他版本
388388
</div>
389389
</div>
390390
<div v-if="installVersionModule">
391391
<table class="ub-table tw-w-full tw-font-mono">
392392
<tbody>
393393
<tr v-for="(v,vIndex) in installVersionReleases">
394-
<td width="100">v{{v.version}}</td>
395-
<td>{{v.feature}}</td>
396-
<td width="100">{{v.time}}</td>
394+
<td width="100">v{{ v.version }}</td>
395+
<td>
396+
<span class="ub-tag warning" v-if="v.status==='preview'">预览</span>
397+
{{ v.feature }}
398+
</td>
399+
<td width="100">{{ v.time }}</td>
397400
<td>
398401
<a href="javascript:;" @click="doInstallVersionSubmit(installVersionModule,v.version)">
399402
<i class="iconfont icon-plus"></i>
@@ -493,7 +496,7 @@ export default {
493496
if (!module._isSystem) return false
494497
break
495498
case 'upgradeable':
496-
if (!(module._isInstalled && !module._isLocal && module.latestVersion !== module._localVersion)) {
499+
if (!(module._isInstalled && !module._isLocal && this.canUpgrade(module._localVersion, module.latestVersion))) {
497500
return false
498501
}
499502
if (module._isSystem) return false
@@ -556,6 +559,9 @@ export default {
556559
}
557560
return 0;
558561
},
562+
canUpgrade(currentVersion, latestVersion) {
563+
return this.versionCompare(currentVersion, latestVersion) < 0
564+
},
559565
doStoreRequest(url, data, cbSuccess, cbError) {
560566
const cbErrorDefault = (res) => {
561567
this.$dialog.tipError(res.msg)

public/asset/common/editor.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
-11.2 KB
Binary file not shown.

public/asset/vendor/ueditor/dialogs/map/map.html

Lines changed: 0 additions & 135 deletions
This file was deleted.

0 commit comments

Comments
 (0)