Add to the Circuit
Remove to the Circuit Revoke request Users Admins
This commit is contained in:
@@ -218,6 +218,13 @@ export default defineComponent({
|
||||
// {label: 'Seguo', value: tools.FILTER_MYFOLLOW},
|
||||
]
|
||||
|
||||
} else if (props.table === toolsext.TABCIRCUITS) {
|
||||
myoptions.value = [
|
||||
{ label: '🌎 Tutti', value: tools.FILTER_ALL },
|
||||
{ label: '👤 Circuiti che Gestisci', value: tools.FILTER_MYREC },
|
||||
// {label: 'Seguo', value: tools.FILTER_MYFOLLOW},
|
||||
]
|
||||
|
||||
} else {
|
||||
myoptions.value = [
|
||||
{ label: '🌎 Tutti', value: tools.FILTER_ALL },
|
||||
@@ -1022,7 +1029,8 @@ export default defineComponent({
|
||||
let lk_as = 'circuit'
|
||||
let af_objId_tab = 'myId'
|
||||
|
||||
return {}
|
||||
return {
|
||||
}
|
||||
|
||||
} else if (props.table === toolsext.TABMYGOODS) {
|
||||
return {
|
||||
|
||||
@@ -217,6 +217,11 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
circuitname: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
components: { CMyPopupEdit, CTitleBanner, CMyFieldDb, CMySelect, CMyFriends, CMyGroups,
|
||||
CMyUser, CMyRecCard, CMyCardPopup, CMyRecGrpCard, CMyCardGrpPopup, CMyCardCircuitPopup,
|
||||
|
||||
@@ -254,6 +254,7 @@
|
||||
:mycontact="row"
|
||||
:visu="visufind"
|
||||
:groupname="extrafield"
|
||||
:circuitname="circuitname"
|
||||
:labelextra="col_title ? row[col_title] : ''"
|
||||
:labelFooter="col_footer ? getLabelFooterByRow(row) : ''"
|
||||
>
|
||||
@@ -686,7 +687,7 @@
|
||||
|
||||
</CMyCardGrpPopup>
|
||||
<CMyCardCircuitPopup
|
||||
v-if="mytable === toolsext.TABCIRCUITS"
|
||||
v-else-if="mytable === toolsext.TABCIRCUITS"
|
||||
:table="mytable"
|
||||
:prop_myrec="myrecdialog">
|
||||
|
||||
|
||||
@@ -20,63 +20,58 @@
|
||||
<q-menu>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item clickable icon="fas fa-user-minus" v-close-popup
|
||||
@click="tools.setCmd($q, shared_consts.GROUPSCMD.REMOVE_FROM_MYGROUP, myusername(), '', circuit.groupnameId)">
|
||||
<q-item-section>{{ $t('groups.remove_from_mygroups') }}</q-item-section>
|
||||
@click="tools.setCmd($q, shared_consts.CIRCUITCMD.REMOVE_FROM_MYLIST, myusername(), '', circuit.NAME)">
|
||||
<q-item-section>{{ $t('circuit.remove_from_mylist') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list v-if="tools.iAmAdminGroup(circuit.groupnameId)" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.DELETE_GROUP, myusername(), '', circuit.groupnameId)">
|
||||
<q-item-section>{{ $t('groups.delete_group') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item v-if="!tools.iAmAdminGroup(circuit.groupnameId)" clickable icon="fas fa-ban" v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.BLOCK_GROUP, myusername(), '', circuit.groupnameId)">
|
||||
<q-item-section>{{ $t('groups.block_group') }}</q-item-section>
|
||||
<q-list v-if="tools.iAmAdminCircuit(circuit.name)" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.CIRCUITCMD.DELETE, myusername(), '', circuit.name)">
|
||||
<q-item-section>{{ $t('circuit.delete') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side v-if="visu === costanti.USER_GROUPS">
|
||||
<q-item-section side v-if="visu === costanti.USER_CIRCUITS">
|
||||
<q-item-label>
|
||||
<q-btn rounded :icon="userStore.IsMyGroupByGroupname(circuit.groupnameId) ? `fas fa-ellipsis-h` : `fas fa-user`">
|
||||
<q-btn rounded :icon="userStore.IsMyCircuitByName(circuit.name) ? `fas fa-ellipsis-h` : `fas fa-user`">
|
||||
<q-menu>
|
||||
<q-list v-if="(!userStore.IsMyGroupByGroupname(circuit.groupnameId) && !userStore.IsAskedGroupByGroupname(circuit.groupnameId) && !userStore.IsRefusedGroupByGroupname(circuit.groupnameId))" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.REQGROUP, myusername(), true, circuitgroupnameId)">
|
||||
<q-item-section>{{ $t('groups.ask_group') }}</q-item-section>
|
||||
<q-list v-if="(!userStore.IsMyCircuitByName(circuit.name) && !userStore.IsAskedCircuitByName(circuit.name) && !userStore.IsRefusedCircuitByName(circuit.name))" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.CIRCUITCMD.REQ, myusername(), true, circuitname)">
|
||||
<q-item-section>{{ $t('circuit.ask') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list v-else-if="(!userStore.IsMyGroupByGroupname(circuit.groupnameId) && userStore.IsAskedGroupByGroupname(circuit.groupnameId) && !userStore.IsRefusedGroupByGroupname(circuit.groupnameId))" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.REQGROUP, myusername(), false, circuit.groupnameId)">
|
||||
<q-list v-else-if="(!userStore.IsMyCircuitByName(circuit.name) && userStore.IsAskedCircuitByName(circuit.name) && !userStore.IsRefusedCircuitByName(circuit.name))" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.CIRCUITCMD.REQ, myusername(), false, circuit.name)">
|
||||
<q-item-section>{{ $t('shared.refuse_ask') }}</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.REQGROUP, myusername(), false, circuit.groupnameId)">
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.CIRCUITCMD.REQ, myusername(), false, circuit.name)">
|
||||
<q-item-section>{{ $t('shared.cancel_ask') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list v-else-if="userStore.IsMyGroupByGroupname(circuit.groupnameId)" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.REMOVE_FROM_MYGROUP, myusername(), '', circuit.groupnameId)">
|
||||
<q-item-section>{{ $t('groups.exit_group') }}</q-item-section>
|
||||
<q-list v-else-if="userStore.IsMyCircuitByName(circuit.name)" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.CIRCUITCMD.REMOVE_FROM_MYLIST, myusername(), '', circuit.name)">
|
||||
<q-item-section>{{ $t('circuit.exit') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list v-if="tools.iAmAdminGroup(circuit.groupnameId)" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.DELETE_GROUP, myusername(), '', circuit.groupnameId)">
|
||||
<q-item-section>{{ $t('groups.delete_group') }}</q-item-section>
|
||||
<q-list v-if="tools.iAmAdminCircuit(circuit.name)" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.CIRCUITCMD.DELETE, myusername(), '', circuit.name)">
|
||||
<q-item-section>{{ $t('circuit.delete') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side v-if="visu === costanti.REQ_GROUP">
|
||||
<q-item-section side v-if="visu === costanti.REQ_CIRCUIT">
|
||||
<q-item-label>
|
||||
<q-btn rounded icon="fas fa-ellipsis-h">
|
||||
<q-menu>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item clickable icon="fas fa-user-minus" v-close-popup
|
||||
@click="tools.setCmd($q, shared_consts.GROUPSCMD.REQGROUP, myusername(), false, circuit.groupnameId)">
|
||||
<q-item-section>{{ $t('groups.reject_ask_group') }}</q-item-section>
|
||||
@click="tools.setCmd($q, shared_consts.CIRCUITCMD.REFUSE_REQ, myusername(), false, circuit.name)">
|
||||
<q-item-section>{{ $t('circuit.reject_ask') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
@@ -89,11 +84,11 @@
|
||||
<q-menu>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item clickable icon="fas fa-user-minus" v-close-popup
|
||||
@click="tools.setCmd($q, shared_consts.GROUPSCMD.REFUSE_REQ_GROUP, myusername(), '', circuit.groupnameId)">
|
||||
@click="tools.setCmd($q, shared_consts.CIRCUITCMD.REFUSE_REQ, myusername(), '', circuit.name)">
|
||||
<q-item-section>{{ $t('shared.refuse_ask') }}</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable icon="fas fa-user-minus" v-close-popup
|
||||
@click="tools.setCmd($q, shared_consts.GROUPSCMD.CANCEL_REQ_GROUP, myusername(), '', circuit.groupnameId)">
|
||||
@click="tools.setCmd($q, shared_consts.CIRCUITCMD.CANCEL_REQ, myusername(), '', circuit.name)">
|
||||
<q-item-section>{{ $t('shared.cancel_ask') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
|
||||
@@ -56,8 +56,8 @@ export default defineComponent({
|
||||
try {
|
||||
if (props.modelValue === costanti.CIRCUITS) {
|
||||
arr = circuitStore.listcircuits
|
||||
} else if (props.modelValue === costanti.MY_USERACCOUNTS ) {
|
||||
arr = userStore.my.profile.listUserAccounts
|
||||
} else if (props.modelValue === costanti.MY_CIRCUITS ) {
|
||||
arr = userStore.my.profile.mycircuits
|
||||
} else if (props.modelValue === costanti.MANAGE_CIRCUITS) {
|
||||
// arr = userStore.my.profile.manage_mycircuits
|
||||
} else if (props.modelValue === costanti.ASK_SENT_CIRCUIT) {
|
||||
@@ -73,13 +73,13 @@ export default defineComponent({
|
||||
const myoptions = computed(() => {
|
||||
const mybutt = []
|
||||
mybutt.push({ label: t('mypages.find_circuit'), value: costanti.FIND_CIRCUIT })
|
||||
mybutt.push({ label: t('mypages.follow_circuits') + ' (' + numMyCircuits.value + ')', value: costanti.MY_USERACCOUNTS })
|
||||
mybutt.push({ label: t('mypages.follow_circuits') + ' (' + numMyCircuits.value + ')', value: costanti.MY_CIRCUITS })
|
||||
// mybutt.push({ label: t('mypages.manage_my_circuits') + ' (' + numManageCircuits.value + ')', value: costanti.MANAGE_CIRCUITS })
|
||||
|
||||
|
||||
if (numAskSentCircuits.value > 0 || props.modelValue === costanti.ASK_SENT_CIRCUIT)
|
||||
mybutt.push({
|
||||
label: t('mypages.request_sent_circuits') + ' (' + numAskSentCircuits.value + ')',
|
||||
label: t('mypages.request_sent') + ' (' + numAskSentCircuits.value + ')',
|
||||
value: costanti.ASK_SENT_CIRCUIT
|
||||
})
|
||||
|
||||
@@ -89,7 +89,7 @@ export default defineComponent({
|
||||
|
||||
|
||||
const numMyCircuits = computed(() => {
|
||||
const arr = userStore.my.profile.listUserAccounts
|
||||
const arr = userStore.my.profile.mycircuits
|
||||
return (arr) ? arr.length : 0
|
||||
})
|
||||
|
||||
|
||||
@@ -44,6 +44,11 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
circuitname: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
labelextra: {
|
||||
type: String,
|
||||
required: false,
|
||||
@@ -98,7 +103,7 @@ export default defineComponent({
|
||||
})
|
||||
if (numAskSentFriends.value > 0 || props.modelValue === costanti.ASK_SENT_FRIENDS)
|
||||
mybutt.push({
|
||||
label: t('mypages.request_sent_friends') + ' (' + numAskSentFriends.value + ')',
|
||||
label: t('mypages.request_sent') + ' (' + numAskSentFriends.value + ')',
|
||||
value: costanti.ASK_SENT_FRIENDS
|
||||
})
|
||||
if (numAskTrust.value > 0 || props.modelValue === costanti.ASK_TRUST)
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
@setCmd="setCmd"
|
||||
:visu="visu"
|
||||
:groupname="groupname"
|
||||
:circuitname="circuitname"
|
||||
:labelextra="labelextra">
|
||||
</CMyUser>
|
||||
</span>
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list v-else-if="(!userStore.IsMyGroupByGroupname(grp.groupname) && userStore.IsAskedGroupByGroupname(grp.groupname) && !userStore.IsRefusedGroupByGroupname(grp.groupname))" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.REQGROUP, myusername(), false, grp.groupname)">
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.REFUSE_REQ_GROUP, myusername(), false, grp.groupname)">
|
||||
<q-item-section>{{ $t('shared.refuse_ask') }}</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.REQGROUP, myusername(), false, grp.groupname)">
|
||||
|
||||
@@ -76,7 +76,7 @@ export default defineComponent({
|
||||
|
||||
if (numAskSentGroups.value > 0 || props.modelValue === costanti.ASK_SENT_GROUP)
|
||||
mybutt.push({
|
||||
label: t('mypages.request_sent_groups') + ' (' + numAskSentGroups.value + ')',
|
||||
label: t('mypages.request_sent') + ' (' + numAskSentGroups.value + ')',
|
||||
value: costanti.ASK_SENT_GROUP
|
||||
})
|
||||
|
||||
|
||||
@@ -31,6 +31,16 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
circuitname: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
labelextra: {
|
||||
type: String,
|
||||
required: false,
|
||||
|
||||
@@ -93,43 +93,6 @@
|
||||
</q-btn>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side v-else-if="visu === costanti.REQ_ADD_USER_TO_CIRCUIT">
|
||||
<q-item-label>
|
||||
<q-btn rounded icon="fas fa-ellipsis-h">
|
||||
<q-menu>
|
||||
<q-list v-if="true" style="min-width: 150px">
|
||||
|
||||
<q-item clickable v-close-popup @click="tools.addToMyCircuits($q, contact.username, groupname)">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="positive" name="fas fa-user-plus"/>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
{{ $t('groups.accept_circuit') }}
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list style="min-width: 200px">
|
||||
<q-item clickable v-close-popup
|
||||
@click="tools.refuseReqGroup($q, contact.username, groupname)">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="negative" name="fas fa-user-minus"/>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>{{ $t('shared.refuse_ask') }}</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-close-popup
|
||||
@click="tools.cancelReqGroups($q, contact.username, groupname)">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="negative" name="fas fa-user-minus"/>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>{{ $t('shared.cancel_ask_short') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side v-else-if="visu === costanti.REQ_REMOVE_USER_TO_GROUP">
|
||||
<q-item-label v-if="contact.username !== userStore.my.username">
|
||||
<q-btn rounded icon="fas fa-ellipsis-h">
|
||||
@@ -164,6 +127,77 @@
|
||||
</q-btn>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side v-else-if="visu === costanti.REQ_ADD_USER_TO_CIRCUIT">
|
||||
<q-item-label>
|
||||
<q-btn rounded icon="fas fa-ellipsis-h">
|
||||
<q-menu>
|
||||
<q-list v-if="true" style="min-width: 150px">
|
||||
|
||||
<q-item clickable v-close-popup @click="tools.addToMyCircuits($q, contact.username, circuitname)">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="positive" name="fas fa-user-plus"/>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
{{ $t('circuit.accept') }}
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list style="min-width: 200px">
|
||||
<q-item clickable v-close-popup
|
||||
@click="tools.refuseReqCircuit($q, contact.username, circuitname)">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="negative" name="fas fa-user-minus"/>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>{{ $t('shared.refuse_ask') }}</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-close-popup
|
||||
@click="tools.cancelReqCircuit($q, contact.username, circuitname)">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="negative" name="fas fa-user-minus"/>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>{{ $t('shared.cancel_ask_short') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side v-else-if="visu === costanti.REQ_REMOVE_USER_TO_CIRCUIT">
|
||||
<q-item-label v-if="contact.username !== userStore.my.username">
|
||||
<q-btn rounded icon="fas fa-ellipsis-h">
|
||||
<q-menu>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item clickable v-if="!tools.isUserAdminCircuit(circuitname, contact.username)" v-close-popup @click="tools.addtoAdminOfCircuit($q, contact.username, circuitname)">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="positive" name="fas fa-user-shield"/>
|
||||
</q-item-section>
|
||||
<q-item-section>{{ $t('circuit.addasadmin') }}</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-if="tools.isUserAdminCircuit(circuitname, contact.username) && tools.iAmTheCreatorOfTheCircuit(circuitname)" v-close-popup @click="tools.removeAdminOfCircuit($q, contact.username, circuitname)">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="negative" name="fas fa-user-times"/>
|
||||
</q-item-section>
|
||||
<q-item-section>{{ $t('circuit.remove_as_admin') }}</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-if="!tools.isUserTheCreatorOfTheCircuit(circuitname, contact.username)" v-close-popup @click="tools.removeFromMyCircuits($q, contact.username, circuitname)">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="negative" name="fas fa-user-minus"/>
|
||||
</q-item-section>
|
||||
<q-item-section>{{ $t('circuit.remove_from_mycircuit') }}</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-close-popup @click="tools.reportUser($q, userStore.my.username, contact.username)">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="negative" name="fas fa-flag"/>
|
||||
</q-item-section>
|
||||
<q-item-section>{{ $t('friends.report_user') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side v-else-if="visu === costanti.ASK_SENT_FRIENDS">
|
||||
<q-item-label>
|
||||
<q-btn rounded icon="fas fa-ellipsis-h">
|
||||
|
||||
Reference in New Issue
Block a user