mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Very first approach to resolve callback problem in direction of customization of Modals
This commit is contained in:
parent
a981f8cda2
commit
f944142e4b
@ -12,12 +12,13 @@
|
|||||||
>
|
>
|
||||||
<hc-upload v-if="myProfile" :user="user" />
|
<hc-upload v-if="myProfile" :user="user" />
|
||||||
<hc-avatar v-else :user="user" class="profile-avatar" size="x-large" />
|
<hc-avatar v-else :user="user" class="profile-avatar" size="x-large" />
|
||||||
|
<!-- Content Menu (can open Modals) -->
|
||||||
<no-ssr>
|
<no-ssr>
|
||||||
<content-menu
|
<content-menu
|
||||||
placement="bottom-end"
|
placement="bottom-end"
|
||||||
resource-type="user"
|
resource-type="user"
|
||||||
:resource="user"
|
:resource="user"
|
||||||
:callbacks="{ confirm: deletePostCallback, cancel: null }"
|
:modalsData="modalsData"
|
||||||
:is-owner="myProfile"
|
:is-owner="myProfile"
|
||||||
class="user-content-menu"
|
class="user-content-menu"
|
||||||
/>
|
/>
|
||||||
@ -266,6 +267,35 @@ export default {
|
|||||||
voted: false,
|
voted: false,
|
||||||
page: 1,
|
page: 1,
|
||||||
pageSize: 6,
|
pageSize: 6,
|
||||||
|
modalsData: {
|
||||||
|
delete: {
|
||||||
|
titel: () => {
|
||||||
|
this.$t('delete.contribution.title')
|
||||||
|
},
|
||||||
|
message: () => {
|
||||||
|
const name = this.$filters.truncate(this.name, 30)
|
||||||
|
return this.$t(`delete.contribution.message`, { name })
|
||||||
|
},
|
||||||
|
buttons: {
|
||||||
|
confirm: {
|
||||||
|
icon: 'trash',
|
||||||
|
text: () => {
|
||||||
|
this.$t('delete.submit')
|
||||||
|
},
|
||||||
|
callback: this.deletePostCallback,
|
||||||
|
},
|
||||||
|
cancel: {
|
||||||
|
icon: 'close',
|
||||||
|
text: () => {
|
||||||
|
this.$t('delete.cancel')
|
||||||
|
},
|
||||||
|
callback: () => {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
disableCallbacks: { confirmCallback: () => {}, cancelCallback: () => {} },
|
||||||
|
reportCallbacks: { confirmCallback: () => {}, cancelCallback: () => {} },
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user