-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ LLOneBot 配置文件补充 ✨ 优化了更新提示的逻辑 💚 [build-electron]
- Loading branch information
Showing
11 changed files
with
346 additions
and
285 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
name: LLOneBot | ||
redirect: NapCat.Onebot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<template> | ||
<div class="update-info"> | ||
<span>{{ from == 'web' ? $t('update_history') : $t('new_update') }}</span> | ||
<a>{{ version }}</a> | ||
<div class="title"> | ||
<img :src="user.avatar"> | ||
<a :href="user.url">{{ user.name }}</a> | ||
<span> {{ Intl.DateTimeFormat(getTrueLang(), { year: 'numeric', month: 'short', day: 'numeric' }) | ||
.format(new Date(user.date)) }} </span> | ||
</div> | ||
<div class="info"><span>{{ info.title }}</span> | ||
<div> | ||
<div v-for="(str, index) in info.content" :key="'changelog-' + index"> | ||
<span>{{ str }}</span> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
|
||
<script lang="ts"> | ||
import { defineComponent } from 'vue' | ||
import { getTrueLang, gitmojiToEmoji } from '@/function/utils/systemUtil' | ||
export default defineComponent({ | ||
name: 'UpdatePan', | ||
props: ['version', 'user', 'message', 'from'], | ||
data() { | ||
return { | ||
getTrueLang, | ||
info: { | ||
title: '' as string, | ||
content: [] as string[] | ||
} | ||
} | ||
}, | ||
mounted() { | ||
const updateInfo = this.message.split('\n') | ||
this.info.title = updateInfo[0] | ||
for (let i = 1; i < updateInfo.length; i++) { | ||
let text = updateInfo[i] | ||
if (text.startsWith(':')) { | ||
const end = text.substring(1).indexOf(':') | ||
const name = text.substring(0, end + 2) | ||
const emj = gitmojiToEmoji(name) | ||
if (emj != undefined) { | ||
text = text.replace(name, emj) | ||
} | ||
} | ||
this.info.content.push(text) | ||
} | ||
} | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.