File tree Expand file tree Collapse file tree 2 files changed +14
-8
lines changed
Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -129,11 +129,12 @@ export default {
129129
130130 data () {
131131 return {
132- entries: this .openReadOnly
132+ entries: ( this .openReadOnly
133133 ? [... ReadOnlyDoneEntries, ... MenuEntries]
134134 : this .isPublic || this .isRichWorkSpace
135135 ? [... MenuEntries]
136- : [... MenuEntries, ... AssistantMenuEntries],
136+ : [... MenuEntries, ... AssistantMenuEntries]
137+ ).filter ((entry ) => !! entry),
137138 randomID: ` menu-bar-${ Math .ceil (Math .random () * 10000 + 500 ).toString (16 )} ` ,
138139 displayHelp: false ,
139140 isReady: false ,
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ import ActionInsertLink from './ActionInsertLink.vue'
4242import AssistantAction from './AssistantAction.vue'
4343import EmojiPickerAction from './EmojiPickerAction.vue'
4444
45+ import { loadState } from '@nextcloud/initial-state'
4546import { t } from '@nextcloud/l10n'
4647import { isMobileDevice } from '../../helpers/isMobileDevice.js'
4748import { MODIFIERS } from './keys.js'
@@ -438,11 +439,15 @@ if (!isMobileDevice) {
438439 } )
439440}
440441
442+ const hasAssistantTaskTypes = loadState ( 'text' , 'taskprocessing' , [ ] ) . length > 0
443+
441444export const AssistantMenuEntries = [
442- {
443- key : 'assistant' ,
444- label : t ( 'text' , 'Nextcloud Assistant' ) ,
445- component : AssistantAction ,
446- priority : 7 ,
447- } ,
445+ hasAssistantTaskTypes
446+ ? {
447+ key : 'assistant' ,
448+ label : t ( 'text' , 'Nextcloud Assistant' ) ,
449+ component : AssistantAction ,
450+ priority : 7 ,
451+ }
452+ : undefined ,
448453]
You can’t perform that action at this time.
0 commit comments