mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-22 09:48:11 +00:00
feat(manage): 优化新建菜单并添加 AI 助手快捷键
- 主按钮从「新建项目」改为「新建任务」 - 下拉菜单首位添加「AI 助手」选项(需安装 AI 插件) - 添加 Ctrl/Cmd+I 快捷键打开 AI 助手 - 键盘设置页面同步显示 AI 助手快捷键
This commit is contained in:
parent
53dd9dca0f
commit
22de7de87c
@ -225,14 +225,15 @@
|
|||||||
</Form>
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
<ButtonGroup class="manage-box-new-group">
|
<ButtonGroup class="manage-box-new-group">
|
||||||
<Button class="manage-box-new" type="primary" icon="md-add" @click="onAddShow">{{$L('新建项目')}}</Button>
|
<Button class="manage-box-new" type="primary" icon="md-add" @click="onAddMenu('task')">{{$L('新建任务')}}</Button>
|
||||||
<Dropdown @on-click="onAddMenu" trigger="click">
|
<Dropdown @on-click="onAddMenu" trigger="click">
|
||||||
<Button type="primary">
|
<Button type="primary">
|
||||||
<Icon type="ios-arrow-down"></Icon>
|
<Icon type="ios-arrow-down"></Icon>
|
||||||
</Button>
|
</Button>
|
||||||
<DropdownMenu slot="list">
|
<DropdownMenu slot="list">
|
||||||
<DropdownItem name="project">{{$L('新建项目')}} ({{mateName}}+B)</DropdownItem>
|
<DropdownItem v-if="aiInstalled" name="aiAssistant">{{$L('AI 助手')}} ({{mateName}}+I)</DropdownItem>
|
||||||
<DropdownItem name="task">{{$L('新建任务')}} ({{mateName}}+K)</DropdownItem>
|
<DropdownItem name="task">{{$L('新建任务')}} ({{mateName}}+K)</DropdownItem>
|
||||||
|
<DropdownItem name="project">{{$L('新建项目')}} ({{mateName}}+B)</DropdownItem>
|
||||||
<DropdownItem name="group">{{$L('创建群组')}} ({{mateName}}+U)</DropdownItem>
|
<DropdownItem name="group">{{$L('创建群组')}} ({{mateName}}+U)</DropdownItem>
|
||||||
<DropdownItem name="createMeeting">{{$L('新会议')}} ({{mateName}}+J)</DropdownItem>
|
<DropdownItem name="createMeeting">{{$L('新会议')}} ({{mateName}}+J)</DropdownItem>
|
||||||
<DropdownItem name="joinMeeting">{{$L('加入会议')}}</DropdownItem>
|
<DropdownItem name="joinMeeting">{{$L('加入会议')}}</DropdownItem>
|
||||||
@ -615,11 +616,16 @@ export default {
|
|||||||
'mobileTabbar',
|
'mobileTabbar',
|
||||||
'longpressData',
|
'longpressData',
|
||||||
|
|
||||||
'mcpServerStatus'
|
'mcpServerStatus',
|
||||||
|
'microAppsIds'
|
||||||
]),
|
]),
|
||||||
|
|
||||||
...mapGetters(['dashboardTask', "filterMicroAppsMenusMain"]),
|
...mapGetters(['dashboardTask', "filterMicroAppsMenusMain"]),
|
||||||
|
|
||||||
|
aiInstalled() {
|
||||||
|
return this.microAppsIds?.includes('ai');
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* page className
|
* page className
|
||||||
* @param mobileTabbar
|
* @param mobileTabbar
|
||||||
@ -1080,9 +1086,22 @@ export default {
|
|||||||
type: 'join',
|
type: 'join',
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'aiAssistant':
|
||||||
|
this.onOpenAIAssistant();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onOpenAIAssistant() {
|
||||||
|
emitter.emit('openAIAssistant', {
|
||||||
|
displayMode: 'chat',
|
||||||
|
sessionKey: 'global',
|
||||||
|
resumeSession: 300,
|
||||||
|
showApplyButton: false,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
onAddShow() {
|
onAddShow() {
|
||||||
this.$store.dispatch("getColumnTemplate").catch(() => {})
|
this.$store.dispatch("getColumnTemplate").catch(() => {})
|
||||||
this.addShow = true;
|
this.addShow = true;
|
||||||
@ -1337,6 +1356,13 @@ export default {
|
|||||||
this.onAddMenu('createMeeting')
|
this.onAddMenu('createMeeting')
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 73: // I - AI助手
|
||||||
|
if (this.aiInstalled) {
|
||||||
|
e.preventDefault();
|
||||||
|
this.onOpenAIAssistant();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case 83: // S - 保存任务
|
case 83: // S - 保存任务
|
||||||
if (this.$refs.taskModal.checkUpdate()) {
|
if (this.$refs.taskModal.checkUpdate()) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|||||||
@ -12,9 +12,9 @@
|
|||||||
{{mateName}}<div class="input-box-push">+</div>{{altName}}<div class="input-box-push">+</div>L
|
{{mateName}}<div class="input-box-push">+</div>{{altName}}<div class="input-box-push">+</div>L
|
||||||
</div>
|
</div>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem :label="$L('新建项目')">
|
<FormItem v-if="aiInstalled" :label="$L('AI 助手')">
|
||||||
<div class="input-box">
|
<div class="input-box">
|
||||||
{{mateName}}<div class="input-box-push">+</div>B
|
{{mateName}}<div class="input-box-push">+</div>I
|
||||||
</div>
|
</div>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem :label="$L('新建任务')">
|
<FormItem :label="$L('新建任务')">
|
||||||
@ -22,6 +22,11 @@
|
|||||||
{{mateName}}<div class="input-box-push">+</div>N
|
{{mateName}}<div class="input-box-push">+</div>N
|
||||||
</div>
|
</div>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
<FormItem :label="$L('新建项目')">
|
||||||
|
<div class="input-box">
|
||||||
|
{{mateName}}<div class="input-box-push">+</div>B
|
||||||
|
</div>
|
||||||
|
</FormItem>
|
||||||
<FormItem :label="$L('新会议')">
|
<FormItem :label="$L('新会议')">
|
||||||
<div class="input-box">
|
<div class="input-box">
|
||||||
{{mateName}}<div class="input-box-push">+</div>J
|
{{mateName}}<div class="input-box-push">+</div>J
|
||||||
@ -70,7 +75,17 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
|
import {mapState} from "vuex";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
computed: {
|
||||||
|
...mapState(['microAppsIds']),
|
||||||
|
|
||||||
|
aiInstalled() {
|
||||||
|
return this.microAppsIds?.includes('ai');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loadIng: 0,
|
loadIng: 0,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user