|
|
@ -144,21 +144,18 @@ function install (app, api) {
|
|
|
|
title: '发现新版本:v' + value.version,
|
|
|
|
title: '发现新版本:v' + value.version,
|
|
|
|
cancelText: '暂不升级',
|
|
|
|
cancelText: '暂不升级',
|
|
|
|
okText: '升级',
|
|
|
|
okText: '升级',
|
|
|
|
width: 550,
|
|
|
|
width: 650,
|
|
|
|
content: h => {
|
|
|
|
content: h => {
|
|
|
|
if (value.releaseNotes) {
|
|
|
|
if (value.releaseNotes) {
|
|
|
|
const notes = []
|
|
|
|
const notes = []
|
|
|
|
if (typeof value.releaseNotes === 'string') {
|
|
|
|
if (typeof value.releaseNotes === 'string') {
|
|
|
|
const releaseNotes = value.releaseNotes.replace(/\r?\n/g, '\n').split('\n')
|
|
|
|
const releaseNotes = value.releaseNotes.replace(/\r\n/g, '\n')
|
|
|
|
for (const note of releaseNotes) {
|
|
|
|
|
|
|
|
notes.push(<div>{note}</div>)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return <div>
|
|
|
|
return <div>
|
|
|
|
<div>发布公告:<a onClick={openGithubUrl}>https://github.com/docmirror/dev-sidecar/releases</a></div>
|
|
|
|
<div>发布公告:<a onClick={openGithubUrl}>https://github.com/docmirror/dev-sidecar/releases</a></div>
|
|
|
|
<div>更新内容:</div>
|
|
|
|
<div>更新内容:</div>
|
|
|
|
<div style="max-height:350px;overflow-y:auto">
|
|
|
|
<pre style="max-height:350px;font-family:auto">
|
|
|
|
{notes}
|
|
|
|
{releaseNotes}
|
|
|
|
</div>
|
|
|
|
</pre>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
for (const note of value.releaseNotes) {
|
|
|
|
for (const note of value.releaseNotes) {
|
|
|
@ -194,16 +191,13 @@ function install (app, api) {
|
|
|
|
if (value.releaseNotes) {
|
|
|
|
if (value.releaseNotes) {
|
|
|
|
const notes = []
|
|
|
|
const notes = []
|
|
|
|
if (typeof value.releaseNotes === 'string') {
|
|
|
|
if (typeof value.releaseNotes === 'string') {
|
|
|
|
const releaseNotes = value.releaseNotes.replace(/\r?\n/g, '\n').split('\n')
|
|
|
|
const releaseNotes = value.releaseNotes.replace(/\r\n/g, '\n')
|
|
|
|
for (const note of releaseNotes) {
|
|
|
|
|
|
|
|
notes.push(<div>{note}</div>)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return <div>
|
|
|
|
return <div>
|
|
|
|
<div>发布公告:<a onClick={openGithubUrl}>https://github.com/docmirror/dev-sidecar/releases</a></div>
|
|
|
|
<div>发布公告:<a onClick={openGithubUrl}>https://github.com/docmirror/dev-sidecar/releases</a></div>
|
|
|
|
<div>更新内容:</div>
|
|
|
|
<div>更新内容:</div>
|
|
|
|
<div style="max-height:350px;overflow-y:auto">
|
|
|
|
<pre style="max-height:350px;font-family:auto">
|
|
|
|
{notes}
|
|
|
|
{releaseNotes}
|
|
|
|
</div>
|
|
|
|
</pre>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
for (const note of value.releaseNotes) {
|
|
|
|
for (const note of value.releaseNotes) {
|
|
|
|