@@ -86,12 +86,11 @@ import '@nextcloud/dialogs/style.css'
8686import { mapGetters , mapState } from ' vuex'
8787import NcContextResource from ' ../../shared/components/ncContextResource/NcContextResource.vue'
8888import NcIconPicker from ' ../../shared/components/ncIconPicker/NcIconPicker.vue'
89- import { NODE_TYPE_TABLE , NODE_TYPE_VIEW , PERMISSION_READ , PERMISSION_CREATE , PERMISSION_UPDATE , PERMISSION_DELETE } from ' ../../shared/constants.js'
89+ import { NODE_TYPE_TABLE , NODE_TYPE_VIEW , PERMISSION_READ , PERMISSION_CREATE , PERMISSION_UPDATE , PERMISSION_DELETE , NAV_ENTRY_MODE } from ' ../../shared/constants.js'
9090import svgHelper from ' ../../shared/components/ncIconPicker/mixins/svgHelper.js'
9191import permissionBitmask from ' ../../shared/components/ncContextResource/mixins/permissionBitmask.js'
9292import { emit } from ' @nextcloud/event-bus'
9393import permissionsMixin from ' ../../shared/components/ncTable/mixins/permissionsMixin.js'
94- import { NAV_ENTRY_MODE } from ' ../../shared/constants.js'
9594
9695export default {
9796 name: ' EditContext' ,
@@ -186,7 +185,15 @@ export default {
186185 nodes: dataResources,
187186 }
188187 const context = this .getContext (this .contextId )
189-
188+ // adding share to oneself to have navigation display control
189+ this .receivers .push (
190+ {
191+ id: getCurrentUser ().uid ,
192+ displayName: getCurrentUser ().uid ,
193+ icon: ' icon-user' ,
194+ isUser: true ,
195+ key: ' user-' + getCurrentUser ().uid ,
196+ })
190197 const res = await this .$store .dispatch (' updateContext' , { id: this .contextId , data, previousReceivers: Object .values (context .sharing ), receivers: this .receivers })
191198 if (res) {
192199 showSuccess (t (' tables' , ' Updated application "{contextTitle}".' , { contextTitle: this .title }))
@@ -204,6 +211,15 @@ export default {
204211 this .receivers = context ? this .getContextReceivers (context) : []
205212 this .prepareDeleteContext = false
206213 },
214+ getDisplayMode (context ) {
215+ const shares = Object .keys (context .sharing || {})
216+ if (shares .length ) {
217+ print (' vals' , context .sharing [shares[0 ]])
218+ const displayMode = context .sharing [shares[0 ]].display_mode_default
219+ return Object .keys (NAV_ENTRY_MODE ).find (key => NAV_ENTRY_MODE [key] === displayMode)
220+ }
221+ return ' NAV_ENTRY_MODE_HIDDEN'
222+ },
207223 getContextReceivers (context ) {
208224 let sharing = Object .values (context .sharing )
209225 sharing = sharing .filter ((share ) => ! (getCurrentUser ().uid === share .receiver && share .receiver_type === ' user' ))
0 commit comments