3939 </div >
4040 <NcContextResource :resources.sync =" resources" :receivers.sync =" receivers" />
4141 </div >
42+ <div class =" row space-T" >
43+ <div >
44+ {{ t('tables', 'Navigation bar entry') }}
45+ </div >
46+ <NcCheckboxRadioSwitch :checked.sync =" displayMode" value =" NAV_ENTRY_MODE_HIDDEN"
47+ name =" NAV_ENTRY_MODE_HIDDEN" type =" radio" >
48+ No navigation bar entry
49+ </NcCheckboxRadioSwitch >
50+ <NcCheckboxRadioSwitch :checked.sync =" displayMode" value =" NAV_ENTRY_MODE_RECIPIENTS"
51+ name =" NAV_ENTRY_MODE_RECIPIENTS" type =" radio" >
52+ Navigation bar entry for share recipients, but not the owner
53+ </NcCheckboxRadioSwitch >
54+ <NcCheckboxRadioSwitch :checked.sync =" displayMode" value =" NAV_ENTRY_MODE_ALL" name =" NAV_ENTRY_MODE_ALL"
55+ type =" radio" >
56+ Navigation bar entry for everybody
57+ </NcCheckboxRadioSwitch >
58+ <br >
59+ </div >
4260 <div class =" row space-R row space-T" >
4361 <div class =" fix-col-4 end" >
4462 <NcButton type =" primary" :aria-label =" t('tables', 'Create application')" data-cy =" createContextSubmitBtn" @click =" submit" >
5169</template >
5270
5371<script >
54- import { NcModal , NcButton , NcIconSvgWrapper } from ' @nextcloud/vue'
72+ import { NcModal , NcButton , NcIconSvgWrapper , NcCheckboxRadioSwitch } from ' @nextcloud/vue'
5573import { showError } from ' @nextcloud/dialogs'
5674import ' @nextcloud/dialogs/dist/index.css'
5775import NcContextResource from ' ../../shared/components/ncContextResource/NcContextResource.vue'
5876import NcIconPicker from ' ../../shared/components/ncIconPicker/NcIconPicker.vue'
5977import svgHelper from ' ../../shared/components/ncIconPicker/mixins/svgHelper.js'
6078import permissionBitmask from ' ../../shared/components/ncContextResource/mixins/permissionBitmask.js'
79+ import { NAV_ENTRY_MODE } from ' ../../shared/constants.js'
6180
6281export default {
6382 name: ' CreateContext' ,
@@ -67,6 +86,7 @@ export default {
6786 NcButton,
6887 NcIconSvgWrapper,
6988 NcContextResource,
89+ NcCheckboxRadioSwitch,
7090 },
7191 mixins: [svgHelper, permissionBitmask],
7292 props: {
@@ -87,6 +107,7 @@ export default {
87107 description: ' ' ,
88108 resources: [],
89109 receivers: [],
110+ displayMode: ' NAV_ENTRY_MODE_HIDDEN' ,
90111 }
91112 },
92113 watch: {
@@ -147,7 +168,7 @@ export default {
147168 description: this .description ,
148169 nodes: dataResources,
149170 }
150- const res = await this .$store .dispatch (' insertNewContext' , { data, previousReceivers: [], receivers: this .receivers })
171+ const res = await this .$store .dispatch (' insertNewContext' , { data, previousReceivers: [], receivers: this .receivers , displayMode : NAV_ENTRY_MODE [ this . displayMode ] })
151172 if (res) {
152173 return res .id
153174 } else {
@@ -159,6 +180,7 @@ export default {
159180 this .errorTitle = false
160181 this .setIcon (this .randomIcon ())
161182 this .customTitleChosen = false
183+ this .displayMode = ' NAV_ENTRY_MODE_HIDDEN'
162184 },
163185 },
164186}
0 commit comments