Circuit go on...
This commit is contained in:
@@ -212,16 +212,6 @@ export const useUserStore = defineStore('UserStore', {
|
||||
return false
|
||||
},
|
||||
|
||||
IsMyCircuitByGroupname(mycircuit: string): boolean {
|
||||
|
||||
/*if (this.my.profile.mycircuit)
|
||||
return this.my.profile.mycircuit.findIndex((rec) => rec.name === name) >= 0
|
||||
else
|
||||
return false
|
||||
|
||||
*/
|
||||
},
|
||||
|
||||
IsAskedFriendByUsername(username: string): boolean {
|
||||
if (this.my.profile.asked_friends)
|
||||
return this.my.profile.asked_friends.findIndex((rec) => rec.username === username) >= 0
|
||||
@@ -297,6 +287,32 @@ export const useUserStore = defineStore('UserStore', {
|
||||
return ''
|
||||
},
|
||||
|
||||
|
||||
IsAskedCircuitByName(groupname: string): boolean {
|
||||
if (this.my.profile.asked_circuits)
|
||||
return this.my.profile.asked_circuits.findIndex((rec: IMyGroup) => rec.groupname === groupname) >= 0
|
||||
else
|
||||
return false
|
||||
},
|
||||
|
||||
|
||||
IsMyCircuitByName(name: string): boolean {
|
||||
|
||||
if (this.my.profile.manage_mycircuits)
|
||||
return this.my.profile.manage_mycircuits.findIndex((rec: ICircuit) => rec.name === name) >= 0
|
||||
else
|
||||
return false
|
||||
|
||||
},
|
||||
|
||||
IsRefusedCircuitByName(name: string): boolean {
|
||||
if (this.my.profile.refused_circuits)
|
||||
return this.my.profile.refused_circuits.findIndex((rec: ICircuit) => rec.name === name) >= 0
|
||||
else
|
||||
return false
|
||||
},
|
||||
|
||||
|
||||
getImgByCircuit(circ: ICircuit): string {
|
||||
|
||||
try {
|
||||
@@ -1092,9 +1108,9 @@ export const useUserStore = defineStore('UserStore', {
|
||||
|
||||
},
|
||||
|
||||
async loadCIrcuit(name: string, idnotif: string) {
|
||||
async loadCIrcuit(path: string, idnotif: string) {
|
||||
const data = {
|
||||
name,
|
||||
path,
|
||||
idnotif,
|
||||
}
|
||||
|
||||
@@ -1194,6 +1210,18 @@ export const useUserStore = defineStore('UserStore', {
|
||||
|
||||
},
|
||||
|
||||
async setCircuitCmd($q: any, t: any, usernameOrig: string, name: string, cmd: number, value: any) {
|
||||
return Api.SendReq('/users/circuits/cmd', 'POST', { usernameOrig, name, cmd, value })
|
||||
.then((res) => {
|
||||
this.updateTables = true
|
||||
return res.data
|
||||
}).catch((error) => {
|
||||
tools.showNegativeNotif($q, t('db.recfailed'))
|
||||
return {}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
async sendMsgToBotTelegram($q: any, t: any, mydata: IMsgGlobParam, showmsgsent: boolean) {
|
||||
return Api.SendReq('/users/mgt', 'POST', { mydata })
|
||||
.then((res) => {
|
||||
|
||||
Reference in New Issue
Block a user