no message
This commit is contained in:
@@ -1203,6 +1203,13 @@ export default {
|
||||
return "";
|
||||
},
|
||||
|
||||
insertText(text) {
|
||||
if (this.quill) {
|
||||
const {index} = this.quill.getSelection(true);
|
||||
this.quill.insertText(index, text)
|
||||
}
|
||||
},
|
||||
|
||||
setText(value) {
|
||||
if (this.quill) {
|
||||
this.quill.setText(value)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
{{$L("您好,我是机器人")}}:{{msg.data.nickname}},{{$L("我的机器人ID是")}}:{{msg.data.userid}},{{$L("你可以发送")}} <span class="mark-color">/help</span> {{$L("查看我支持什么命令")}}。
|
||||
{{$L("您好,我是机器人")}}:{{msg.data.nickname}},{{$L("我的机器人ID是")}}:{{msg.data.userid}},{{$L("你可以发送")}} <span class="mark-color mark-set">/help</span> {{$L("查看我支持什么命令")}}。
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -4,32 +4,32 @@
|
||||
<p> </p>
|
||||
|
||||
<template v-if="msg.manager">
|
||||
<p><span class="mark-color">/list</span> - {{$L("机器人列表")}}</p>
|
||||
<p><span class="mark-color">/newbot ({{$L('机器人名称')}})</span> - {{$L("创建机器人")}}</p>
|
||||
<p><span class="mark-color mark-set">/list</span> - {{$L("机器人列表")}}</p>
|
||||
<p><span class="mark-color mark-set">/newbot ({{$L('机器人名称')}})</span> - {{$L("创建机器人")}}</p>
|
||||
</template>
|
||||
<template v-else>
|
||||
<p><span class="mark-color">/info</span> - {{$L("查看机器人详情")}}</p>
|
||||
<p><span class="mark-color mark-set">/info</span> - {{$L("查看机器人详情")}}</p>
|
||||
</template>
|
||||
<p> </p>
|
||||
|
||||
<p><b>{{$L("修改机器人")}}</b></p>
|
||||
<p><span class="mark-color">/setname{{IDLabel}} ({{$L('机器人名称')}})</span> - {{$L("修改机器人名称")}}</p>
|
||||
<p><span class="mark-color">/deletebot{{IDLabel}}</span> - {{$L("删除机器人")}}</p>
|
||||
<p><span class="mark-color">/clearday{{IDLabel}} ({{$L('天数')}})</span> - {{$L("设置保留消息时间(默认30天)")}}</p>
|
||||
<p><span class="mark-color">/webhook{{IDLabel}} [url]</span> - {{$L("设置消息Webhook(详情请看 API接口文档)")}}</p>
|
||||
<p><span class="mark-color mark-set">/setname{{IDLabel}} ({{$L('机器人名称')}})</span> - {{$L("修改机器人名称")}}</p>
|
||||
<p><span class="mark-color mark-set">/deletebot{{IDLabel}}</span> - {{$L("删除机器人")}}</p>
|
||||
<p><span class="mark-color mark-set">/clearday{{IDLabel}} ({{$L('天数')}})</span> - {{$L("设置保留消息时间(默认30天)")}}</p>
|
||||
<p><span class="mark-color mark-set">/webhook{{IDLabel}} [url]</span> - {{$L("设置消息Webhook(详情请看 API接口文档)")}}</p>
|
||||
<p> </p>
|
||||
|
||||
<p><b>{{$L("机器人设置")}}</b></p>
|
||||
<p><span class="mark-color">/token{{IDLabel}}</span> - {{$L("生成Token令牌")}}</p>
|
||||
<p><span class="mark-color">/revoke{{IDLabel}}</span> - {{$L("撤销机器人Token令牌")}}</p>
|
||||
<p><span class="mark-color mark-set">/token{{IDLabel}}</span> - {{$L("生成Token令牌")}}</p>
|
||||
<p><span class="mark-color mark-set">/revoke{{IDLabel}}</span> - {{$L("撤销机器人Token令牌")}}</p>
|
||||
<p> </p>
|
||||
|
||||
<p><b>{{$L("会话管理")}}</b></p>
|
||||
<p><span class="mark-color">/dialog{{IDLabel}} [{{$L('搜索关键词')}}]</span> - {{$L("查看会话ID")}}</p>
|
||||
<p><span class="mark-color mark-set">/dialog{{IDLabel}} [{{$L('搜索关键词')}}]</span> - {{$L("查看会话ID")}}</p>
|
||||
<p> </p>
|
||||
|
||||
<p><b>{{$L("API接口文档")}}</b></p>
|
||||
<p><span class="mark-color">/api</span> - {{$L("查看接口列表")}}</p>
|
||||
<p><span class="mark-color mark-set">/api</span> - {{$L("查看接口列表")}}</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div v-if="isBot">
|
||||
{{$L("不支持的指令")}} <span class="warning-color">{{msg.type}}</span>,{{$L("你可以发送")}} <span class="mark-color">/help</span> {{$L("查看帮助菜单")}}。
|
||||
{{$L("不支持的指令")}} <span class="warning-color">{{msg.type}}</span>,{{$L("你可以发送")}} <span class="mark-color mark-set">/help</span> {{$L("查看帮助菜单")}}。
|
||||
</div>
|
||||
<div v-else>
|
||||
{{$L("未知的消息")}}
|
||||
|
||||
@@ -3541,6 +3541,17 @@ export default {
|
||||
}
|
||||
const {target, clientX} = event
|
||||
|
||||
// 快速输入
|
||||
if (target.classList.contains('mark-set')) {
|
||||
!this.windowTouch && this.$refs.input.focus()
|
||||
this.$refs.input.setText(target.innerText)
|
||||
return
|
||||
}
|
||||
if (target.classList.contains('mark-insert')) {
|
||||
this.$refs.input.insertText(target.innerText)
|
||||
return
|
||||
}
|
||||
|
||||
// 创建任务
|
||||
if (target.classList.contains('apply-create-task-button')) {
|
||||
this.operateItem = this.findMsgByElement(el)
|
||||
|
||||
@@ -1212,6 +1212,13 @@
|
||||
.mark-color {
|
||||
color: $primary-color;
|
||||
}
|
||||
|
||||
.mark-set {
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content-loading {
|
||||
|
||||
Reference in New Issue
Block a user