dd
This commit is contained in:
1 parent
4ae64194ec
commit
515a66711e
3 files changed
+25
-12
No files matched your search
@@ -1,11 +1,15 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-list-item v-for="x in onlineuser"
|
||||
:key="x"
|
||||
|
||||
|
||||
<v-list-item v-for="x in onlineuser" v-show=" x!=accountStore.user.login"
|
||||
:key="x"
|
||||
:prepend-avatar="checkremote( `${spravURL}${x}.jpg`)"
|
||||
title="x"
|
||||
nav
|
||||
|
||||
@click="whatuser(x)"
|
||||
|
||||
>
|
||||
|
||||
<v-dialog
|
||||
@@ -23,6 +27,7 @@
|
||||
|
||||
</v-dialog>
|
||||
</v-list-item>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
@@ -41,15 +46,22 @@ export default {
|
||||
setup(){
|
||||
const loging = ref('')
|
||||
const menuGetUserDialog=ref(false)
|
||||
const wsfuncs={onliner:function(data){
|
||||
// console.log(onlineuser)
|
||||
const wsfuncs={onliner:function(data){
|
||||
let newset = new Set(data)
|
||||
onlineuser.value = Array.from(newset)
|
||||
// console.log(onlineuser)
|
||||
onlineuser.value = Array.from(newset)
|
||||
}}
|
||||
const accountStore = useAccountStore()
|
||||
let onlineuser= ref([''])
|
||||
// const userlinks = ref([])
|
||||
|
||||
}}
|
||||
const accountStore = useAccountStore()
|
||||
let onlineuser= ref([''])
|
||||
// const loadlinksUser=async()=>{
|
||||
// // console.log(`accountStore`, accountStore);
|
||||
// const res = await clearAxios.get('api/accounts/getuser/?userlogin='+props.loging)
|
||||
// userlinks.value=res.data
|
||||
// }
|
||||
// const gh = () => {
|
||||
// console.log('hi');
|
||||
// }
|
||||
|
||||
const connect = new WebSocket(baseWS+"ws/watcher/?token="+localStorage.access)
|
||||
|
||||
@@ -60,7 +72,8 @@ export default {
|
||||
}
|
||||
|
||||
connect.onmessage=(e)=>{
|
||||
let data = JSON.parse(e.data)
|
||||
let data = JSON.parse(e.data)
|
||||
|
||||
wsfuncs[data['message']['action']](data.message.data)
|
||||
}
|
||||
|
||||
@@ -73,7 +86,7 @@ export default {
|
||||
|
||||
|
||||
|
||||
return {loging, menuGetUserDialog, onlineuser, checkremote,spravURL, whatuser}
|
||||
return {loging, menuGetUserDialog, onlineuser, checkremote,spravURL, whatuser, accountStore, gh}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user