mirror of
https://github.com/HighCapable/YukiHookAPI-ProjectBuilder.git
synced 2025-09-01 08:15:27 +08:00
feat: format update logs to markdown
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
<link href="./css/mdui.min.css" rel="stylesheet">
|
||||
<link href="./render.css" rel="stylesheet">
|
||||
<script src="./js/mdui.min.js"></script>
|
||||
<script src="./js/marked.min.js"></script>
|
||||
</head>
|
||||
<body class="mdui-container-fluid mdui-theme-primary-orange mdui-theme-accent-orange mdui-theme-layout-auto">
|
||||
<div id="root_div" style="font-size:12pt;line-height:150%;padding-top:5pt;padding-left:10pt;padding-right:10pt;display:none">
|
||||
|
6
src/content/js/marked.min.js
vendored
Normal file
6
src/content/js/marked.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -718,11 +718,12 @@ const page = {
|
||||
const repoName = 'YukiHookAPI-ProjectBuilder';
|
||||
httpClient.requestGet('https://api.github.com/repos/' + repoAuthor + '/' + repoName + '/releases/latest', (body) => {
|
||||
const newVersion = body['name'] ?? '';
|
||||
const updateLogs = body['body']?.replace(/\n/g, "<br/>") ?? '';
|
||||
// noinspection JSUnresolvedReference
|
||||
const updateLogs = marked.parse(body['body']?.replace(/\n/g, "<br/>") ?? '');
|
||||
const updateUrl = body['html_url'] ?? '';
|
||||
if (newVersion !== page.appVersion)
|
||||
mdui.confirm(locale.i18n.version + ': ' + newVersion + '<br/><br/>' +
|
||||
'<strong>' + locale.i18n.updateLogs + '</strong><br/><br/>' + updateLogs, locale.i18n.newVersionFound, () => {
|
||||
'<strong>' + locale.i18n.updateLogs + '</strong>' + updateLogs, locale.i18n.newVersionFound, () => {
|
||||
page.openBrowser(updateUrl);
|
||||
}, () => null, {
|
||||
confirmText: locale.i18n.updateNow,
|
||||
|
Reference in New Issue
Block a user