mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
Merge branch 'dev'
This commit is contained in:
commit
1f657f3e84
@ -326,7 +326,7 @@ function onLoad() {
|
||||
// 检查ffmpeg
|
||||
checkFFMPEG(config.ffmpeg).then(exist => {
|
||||
if (!exist) {
|
||||
llonebotError.ffmpegError = `环境变量${process.env.PATH}中不存在ffmpeg,音频只能发送wav和silk`
|
||||
llonebotError.ffmpegError = `没有找到ffmpeg,音频只能发送wav和silk`
|
||||
}
|
||||
})
|
||||
if (config.ob11.enableHttp) {
|
||||
|
@ -117,19 +117,20 @@ async function onSettingWindowCreated(view: Element) {
|
||||
<setting-text>Access Token</setting-text>
|
||||
<input id="token" type="text" placeholder="可为空" value="${config.token}"/>
|
||||
</setting-item>
|
||||
<setting-item data-direction="row" class="vertical-list-item">
|
||||
<setting-item data-direction="row" class="vertical-list-item" style="width: 80%">
|
||||
<setting-text>ffmpeg路径</setting-text>
|
||||
<input id="ffmpegPath" class="input-text" type="text"
|
||||
style="width:80%;padding: 5px"
|
||||
value="${config.ffmpeg || ''}"/>
|
||||
</setting-item>
|
||||
<button id="selectFFMPEG" class="q-button q-button--small q-button--secondary">选择ffmpeg</button>
|
||||
</setting-item>
|
||||
<button id="save" class="q-button">保存</button>
|
||||
</setting-list>
|
||||
</setting-panel>
|
||||
<setting-panel>
|
||||
<setting-item data-direction="row" class="vertical-list-item">
|
||||
<setting-item data-direction="row" class="vertical-list-item" style="width: 80%">
|
||||
<setting-text>ffmpeg路径</setting-text>
|
||||
<input id="ffmpegPath" class="input-text" type="text"
|
||||
style="width:80%;padding: 5px"
|
||||
value="${config.ffmpeg || ''}"/>
|
||||
</setting-item>
|
||||
<button id="selectFFMPEG" class="q-button q-button--small q-button--secondary">选择ffmpeg</button>
|
||||
</setting-item>
|
||||
|
||||
<setting-item data-direction="row" class="vertical-list-item">
|
||||
<div>
|
||||
<setting-text>消息上报数据类型</setting-text>
|
||||
@ -331,7 +332,8 @@ async function onSettingWindowCreated(view: Element) {
|
||||
doc.getElementById("selectFFMPEG")?.addEventListener("click", ()=>{
|
||||
window.llonebot.selectFile().then(selectPath=>{
|
||||
if (selectPath){
|
||||
(document.getElementById("ffmpegPath") as HTMLInputElement).value = selectPath;
|
||||
config.ffmpeg = (document.getElementById("ffmpegPath") as HTMLInputElement).value = selectPath;
|
||||
// window.llonebot.setConfig(config);
|
||||
}
|
||||
});
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user