forked from vrcx-team/VRCX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
1738 lines (1673 loc) · 87 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta http-equiv="Cache-Control" content="no-cache">
<meta name="referrer" content="no-referrer">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
<title>VRCX</title>
<link rel="dns-prefetch" href="https://fonts.gstatic.com">
<link rel="preconnect" href="https://api.vrchat.cloud">
<link rel="preconnect" href="https://d348imysud55la.cloudfront.net">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/noty/3.2.0-beta/noty.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.11.1/theme-chalk/index.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Sans+JP|Noto+Sans+KR&display=swap">
</head>
<body>
<div id="x-app" class="x-app" style="display:none">
<!-- login -->
<div v-show="!API.isLoggedIn" class="x-login-container">
<div style="width:300px;margin:auto">
<el-form ref="loginForm" :model="loginForm" :rules="loginForm.rules" v-loading="loginForm.loading" @submit.native.prevent="login()">
<el-form-item label="Username or Email" prop="username" required>
<el-input v-model="loginForm.username" name="username" placeholder="Username or Email" clearable></el-input>
</el-form-item>
<el-form-item label="Password" prop="password" required>
<el-input type="password" v-model="loginForm.password" name="password" placeholder="Password" clearable show-password></el-input>
</el-form-item>
<el-form-item style="margin-top:35px">
<el-button native-type="submit" type="primary" :loading="loginForm.loading" style="width:100%">Login</el-button>
</el-form-item>
<el-form-item>
<el-button :loading="loginForm.loading" style="width:100%" @click="loginWithSteam()">Login with Steam</el-button>
</el-form-item>
</el-form>
<div style="text-align:center;font-size:12px">
<p>© 2019 <a href="https://github.com/pypy-vrc" target="_blank">pypy</a> (mina#5656)</p>
<p>VRCX is an assistant application for provide information about manage friendship. this application uses unofficial VRChat API (VRCSDK).</p>
<p>VRCX isn't endorsed by VRChat and doesn't reflect the views or opinions of VRChat or anyone officially involved in producing or managing VRChat. VRChat is trademark of VRChat Inc. VRChat © VRChat Inc.</p>
<p>pypy is not responsible for any problems caused by VRCX. Use at your own risk!</p>
</div>
</div>
</div>
<!-- menu -->
<div class="x-menu-container">
<el-menu ref="menu" collapse @select="selectMenu">
<el-menu-item index="feed">
<i class="el-icon-news"></i>
<template #title><span>Feed</span></template>
</el-menu-item>
<el-menu-item index="gameLog">
<i class="el-icon-s-data"></i>
<template #title>Game Log</span></template>
</el-menu-item>
<el-menu-item index="search">
<i class="el-icon-search"></i>
<template #title><span>Search</span></template>
</el-menu-item>
<el-menu-item index="favorite">
<i class="el-icon-star-off"></i>
<template #title><span>Favorite</span></template>
</el-menu-item>
<el-menu-item index="friendLog">
<i class="el-icon-notebook-2"></i>
<template #title><span>Friend Log</span></template>
</el-menu-item>
<el-menu-item index="moderation">
<i class="el-icon-finished"></i>
<template #title><span>Moderation</span></template>
</el-menu-item>
<el-menu-item index="notification">
<i class="el-icon-bell"></i>
<template #title><span>Notification</span></template>
</el-menu-item>
<el-menu-item index="more">
<i class="el-icon-s-tools"></i>
<template #title><span>More</span></template>
</el-menu-item>
</el-menu>
</div>
<!-- feed -->
<div v-show="$refs.menu && $refs.menu.activeIndex === 'feed'" class="x-container">
<data-tables v-bind="feedTable">
<template #tool>
<div style="margin:0 0 10px;display:flex;align-items:center">
<div style="flex:none;margin-right:10px">
<el-switch v-model="feedTable.filters[2].value" active-color="#13ce66"></el-switch>
</div>
<el-select v-model="feedTable.filters[0].value" multiple clearable collapse-tags style="flex:1" placeholder="Filter">
<el-option v-once v-for="type in ['GPS', 'Online', 'Offline', 'Status', 'Avatar']" :key="type" :label="type" :value="type"></el-option>
</el-select>
<el-input v-model="feedTable.filters[1].value" placeholder="Search" style="flex:none;width:150px;margin:0 10px"></el-input>
<el-button type="default" @click="clearFeed()" icon="el-icon-delete" circle style="flex:none"></el-button>
</div>
</template>
<el-table-column type="expand">
<template v-once #default="scope">
<div style="position:relative;font-size:14px">
<template v-if="scope.row.type === 'GPS'">
<location :location="scope.row.location[1]"></location>
<el-tag type="info" effect="plain" size="mini" style="margin-left:5px">{{ scope.row.time | timeToText }}</el-tag>
<br>
<span><i class="el-icon-right"></i></span>
<location :location="scope.row.location[0]"></location>
</template>
<template v-else-if="scope.row.type === 'Offline'">
<location :location="scope.row.location"></location>
<el-tag type="info" effect="plain" size="mini" style="margin-left:5px">{{ scope.row.time | timeToText }}</el-tag>
</template>
<template v-else-if="scope.row.type === 'Online'">
<location :location="scope.row.location"></location>
</template>
<template v-else-if="scope.row.type === 'Avatar'">
<el-popover placement="right" width="500px" trigger="click">
<img v-lazy="scope.row.avatar[1]" style="width:500px;height:375px">
<img slot="reference" v-lazy="scope.row.avatar[1]" class="x-link" style="flex:none;width:160px;height:120px;border-radius:4px">
</el-popover>
<span style="position:relative;top:-50px;margin:0 5px"><i class="el-icon-right"></i></span>
<el-popover placement="right" width="500px" trigger="click">
<img v-lazy="scope.row.avatar[0]" style="width:500px;height:375px">
<img slot="reference" v-lazy="scope.row.avatar[0]" class="x-link" style="flex:none;width:160px;height:120px;border-radius:4px">
</el-popover>
</template>
<template v-else-if="scope.row.type === 'Status'">
<el-tooltip placement="top">
<template #content>
<span v-if="scope.row.status[1].status === 'active'">Active</span>
<span v-else-if="scope.row.status[1].status === 'join me'">Join Me</span>
<span v-else-if="scope.row.status[1].status === 'busy'">Busy</span>
<span v-else>Offline</span>
</template>
<i class="x-user-status" :class="userStatusClass(scope.row.status[1])"></i>
</el-tooltip>
<span v-text="scope.row.status[1].statusDescription"></span>
<br>
<span><i class="el-icon-right"></i></span>
<el-tooltip placement="top">
<template #content>
<span v-if="scope.row.status[0].status === 'active'">Active</span>
<span v-else-if="scope.row.status[0].status === 'join me'">Join Me</span>
<span v-else-if="scope.row.status[0].status === 'busy'">Busy</span>
<span v-else>Offline</span>
</template>
<i class="x-user-status" :class="userStatusClass(scope.row.status[0])"></i>
</el-tooltip>
<span v-text="scope.row.status[0].statusDescription"></span>
</div>
</template>
</template>
</el-table-column>
<el-table-column label="Time" prop="created_at" sortable="custom" width="80">
<template v-once #default="scope">
<el-tooltip placement="right">
<template #content>
<span>{{ scope.row.created_at | formatDate('YYYY-MM-DD HH24:MI:SS') }}</span>
</template>
<span>{{ scope.row.created_at | formatDate('HH24:MI') }}</span>
</el-tooltip>
</template>
</el-table-column>
<el-table-column label="Type" prop="type" width="100"></el-table-column>
<el-table-column label="User" prop="displayName">
<template v-once #default="scope">
<span v-text="scope.row.displayName" @click="showUserDialog(scope.row.userId)" class="x-link"></span>
</template>
</el-table-column>
<el-table-column label="Detail">
<template v-once #default="scope">
<template v-if="scope.row.type === 'GPS'">
<location :location="scope.row.location[0]"></location>
</template>
<template v-else-if="scope.row.type === 'Offline' || scope.row.type === 'Online'">
<location :location="scope.row.location"></location>
</template>
<template v-else-if="scope.row.type === 'Status'">
<el-tooltip placement="top">
<template #content>
<span v-if="scope.row.status[0].status === 'active'">Active</span>
<span v-else-if="scope.row.status[0].status === 'join me'">Join Me</span>
<span v-else-if="scope.row.status[0].status === 'busy'">Busy</span>
<span v-else>Offline</span>
</template>
<i class="x-user-status" :class="userStatusClass(scope.row.status[0])"></i>
</el-tooltip>
<span v-text="scope.row.status[0].statusDescription"></span>
</template>
</template>
</el-table-column>
</data-tables>
</div>
<!-- gameLog -->
<div v-show="$refs.menu && $refs.menu.activeIndex === 'gameLog'" class="x-container">
<data-tables v-bind="gameLogTable">
<template #tool>
<div style="margin:0 0 10px;display:flex;align-items:center">
<el-select v-model="gameLogTable.filters[0].value" multiple clearable collapse-tags style="flex:1" placeholder="Filter">
<el-option v-once v-for="type in ['Location', 'OnPlayerJoined', 'OnPlayerLeft']" :key="type" :label="type" :value="type"></el-option>
</el-select>
<el-input v-model="gameLogTable.filters[1].value" placeholder="Search" style="flex:none;width:150px;margin:0 10px"></el-input>
<el-button type="default" @click="resetGameLog()" icon="el-icon-refresh" circle style="flex:none"></el-button>
</div>
</template>
<el-table-column label="Time" prop="created_at" sortable="custom" width="80">
<template v-once #default="scope">
<el-tooltip placement="right">
<template #content>
<span>{{ scope.row.created_at | formatDate('YYYY-MM-DD HH24:MI:SS') }}</span>
</template>
<span>{{ scope.row.created_at | formatDate('HH24:MI') }}</span>
</el-tooltip>
</template>
</el-table-column>
<el-table-column label="Type" prop="type" width="120"></el-table-column>
<el-table-column label="Detail">
<template v-once #default="scope">
<location v-if="scope.row.type === 'Location'" :location="scope.row.data"></location>
<span v-else v-text="scope.row.data" @click="lookupUser(scope.row.data)" class="x-link"></span>
</template>
</el-table-column>
</data-tables>
</div>
<!-- search -->
<div v-show="$refs.menu && $refs.menu.activeIndex === 'search'" class="x-container">
<div style="margin:0 0 10px;display:flex;align-items:center">
<el-input v-model="searchText" clearable placeholder="Search" @keyup.native.13="search()" style="flex:1"></el-input>
<el-button type="default" @click="clearSearch()" icon="el-icon-delete" circle style="flex:none;margin-left:10px"></el-button>
</div>
<el-tabs ref="searchTab" type="card" style="margin-top:15px">
<el-tab-pane label="User" v-loading="isSearchUserLoading" style="min-height:60px">
<div class="x-friend-list">
<div v-for="user in searchUsers" :key="user.id" @click="showUserDialog(user.id)" class="x-friend-item">
<template v-once>
<div class="avatar">
<img v-lazy="user.currentAvatarThumbnailImageUrl">
</div>
<div class="detail">
<span v-text="user.displayName" class="name"></span>
<span v-text="user.username" class="extra" style="font-family:monospace"></span>
</div>
</template>
</div>
</div>
<el-button-group style="margin-top:15px">
<el-button v-if="searchUserParam.offset" @click="moreSearchUser(-1)" icon="el-icon-back" size="small">Prev</el-button>
<el-button v-if="searchUsers.length" @click="moreSearchUser(1)" icon="el-icon-right" size="small">Next</el-button>
</el-button-group>
</el-tab-pane>
<el-tab-pane label="World" v-loading="isSearchWorldLoading" style="min-height:60px">
<el-dropdown @command="(command) => searchWorld(API.config.dynamicWorldRows[command])" size="small" trigger="click" style="margin-bottom:15px">
<el-button size="small">Search by Category <i class="el-icon-arrow-down el-icon--right"></i></el-button>
<el-dropdown-menu #default="dropdown">
<el-dropdown-item v-for="row in API.config.dynamicWorldRows" :key="row.index" v-text="row.name" :command="row.index"></el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<div class="x-friend-list">
<div v-for="world in searchWorlds" :key="world.id" @click="showWorldDialog(world.id)" class="x-friend-item">
<template v-once>
<div class="avatar">
<img v-lazy="world.thumbnailImageUrl">
</div>
<div class="detail">
<span v-text="world.name" class="name"></span>
<span v-if="world.occupants" class="extra">{{ world.authorName }} ({{ world.occupants }})</span>
<span v-else v-text="world.authorName" class="extra"></span>
</div>
</template>
</div>
</div>
<el-button-group style="margin-top:15px">
<el-button v-if="searchWorldParam.offset" @click="moreSearchWorld(-1)" icon="el-icon-back" size="small">Prev</el-button>
<el-button v-if="searchWorlds.length" @click="moreSearchWorld(1)" icon="el-icon-right" size="small">Next</el-button>
</el-button-group>
</el-tab-pane>
<el-tab-pane label="Avatar" v-loading="isSearchAvatarLoading" style="min-height:60px">
<el-dropdown @command="(command) => searchAvatar(command)" size="small" trigger="click" style="margin-bottom:15px">
<el-button size="small">Search by Category <i class="el-icon-arrow-down el-icon--right"></i></el-button>
<el-dropdown-menu #default="dropdown">
<el-dropdown-item command="updated">Updated Recently</el-dropdown-item>
<el-dropdown-item command="created">New</el-dropdown-item>
<el-dropdown-item command="mine">Mine</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<span style="margin-left:10px;font-size:12px;color:#909399">Avatar search is not possible.</span>
<div class="x-friend-list">
<div v-for="avatar in searchAvatars" :key="avatar.id" @click="showAvatarDialog(avatar.id)" class="x-friend-item">
<template v-once>
<div class="avatar">
<img v-lazy="avatar.thumbnailImageUrl">
</div>
<div class="detail">
<span v-text="avatar.name" class="name"></span>
<span v-text="avatar.authorName" class="extra"></span>
</div>
</template>
</div>
</div>
<el-button-group style="margin-top:15px">
<el-button v-if="searchAvatarParam.offset" @click="moreSearchAvatar(-1)" icon="el-icon-back" size="small">Prev</el-button>
<el-button v-if="searchAvatars.length" @click="moreSearchAvatar(1)" icon="el-icon-right" size="small">Next</el-button>
</el-button-group>
</el-tab-pane>
</el-tabs>
</div>
<!-- favorite -->
<div v-show="$refs.menu && $refs.menu.activeIndex === 'favorite'" class="x-container">
<el-button type="default" :loading="API.isFavoriteLoading" @click="API.refreshFavorite()" size="small" icon="el-icon-refresh" circle style="position:relative;float:right;z-index:1"></el-button>
<el-tabs type="card" v-loading="API.isFavoriteLoading">
<el-tab-pane label="Friend">
<el-collapse style="border:0">
<el-collapse-item v-for="group in API.favoriteFriendGroups" :key="group.name">
<template slot="title">
<span v-text="group.displayName" style="font-weight:bold;font-size:14px;margin-left:10px"></span>
<span style="color:#909399;font-size:12px;margin-left:10px">{{ group.count }}/{{ group.capacity }}</span>
<el-button @click.stop="changeFavoriteGroupName(group)" size="mini" icon="el-icon-edit" circle style="margin-left:10px"></el-button>
<el-button @click.stop="clearFavoriteGroup(group)" size="mini" icon="el-icon-delete" circle style="margin-left:5px"></el-button>
</template>
<div v-if="group.count" class="x-friend-list" style="margin-top:10px">
<div v-for="favorite in favoriteFriends" v-if="favorite.group === group.name" :key="favorite.id" @click="showUserDialog(favorite.id)" class="x-friend-item">
<template v-if="favorite.ref">
<div class="avatar" :class="userStatusClass(favorite.ref)">
<img v-lazy="favorite.ref.currentAvatarThumbnailImageUrl">
</div>
<div class="detail">
<span v-text="favorite.ref.displayName" class="name" :class="favorite.ref.trustClass_"></span>
<location v-if="favorite.ref.location !== 'offline'" :location="favorite.ref.location" :link="false" class="extra"></location>
<span v-else v-text="favorite.ref.statusDescription"></span>
</div>
</template>
<template v-else>
<span v-text="favorite.name || favorite.id"></span>
<el-button type="text" icon="el-icon-close" size="mini" @click.stop="deleteFavorite(favorite.id)" style="margin-left:5px"></el-button>
</template>
</div>
</div>
</el-collapse-item>
</el-collapse>
</el-tab-pane>
<el-tab-pane label="World">
<el-collapse style="border:0">
<el-collapse-item v-for="group in API.favoriteWorldGroups" :key="group.name">
<template slot="title">
<span v-text="group.displayName" style="font-weight:bold;font-size:14px;margin-left:10px"></span>
<span style="color:#909399;font-size:12px;margin-left:10px">{{ group.count }}/{{ group.capacity }}</span>
<el-button @click.stop="changeFavoriteGroupName(group)" size="mini" icon="el-icon-edit" circle style="margin-left:10px"></el-button>
<el-button @click.stop="clearFavoriteGroup(group)" size="mini" icon="el-icon-delete" circle style="margin-left:5px"></el-button>
</template>
<div v-if="group.count" class="x-friend-list" style="margin-top:10px">
<div v-for="favorite in favoriteWorlds" v-if="favorite.group === group.name" :key="favorite.id" @click="showWorldDialog(favorite.id)" class="x-friend-item">
<template v-if="favorite.ref">
<div class="avatar">
<img v-lazy="favorite.ref.thumbnailImageUrl">
</div>
<div class="detail">
<span v-text="favorite.ref.name" class="name"></span>
<span v-if="favorite.ref.occupants" class="extra">{{ favorite.ref.authorName }} ({{ favorite.ref.occupants }})</span>
<span v-else v-text="favorite.ref.authorName" class="extra"></span>
</div>
</template>
<template v-else>
<span v-text="favorite.name || favorite.id"></span>
<el-button type="text" icon="el-icon-close" size="mini" @click.stop="deleteFavorite(favorite.id)" style="margin-left:5px"></el-button>
</template>
</div>
</div>
</el-collapse-item>
</el-collapse>
</el-tab-pane>
<el-tab-pane label="Avatar">
<el-collapse style="border:0">
<el-collapse-item v-for="group in API.favoriteAvatarGroups" :key="group.name">
<template slot="title">
<span v-text="group.displayName" style="font-weight:bold;font-size:14px;margin-left:10px"></span>
<span style="color:#909399;font-size:12px;margin-left:10px">{{ group.count }}/{{ group.capacity }}</span>
<el-button @click.stop="changeFavoriteGroupName(group)" size="mini" icon="el-icon-edit" circle style="margin-left:10px"></el-button>
<el-button @click.stop="clearFavoriteGroup(group)" size="mini" icon="el-icon-delete" circle style="margin-left:5px"></el-button>
</template>
<div v-if="group.count" class="x-friend-list" style="margin-top:10px">
<div v-for="favorite in favoriteAvatars" v-if="favorite.group === group.name" :key="favorite.id" @click="showAvatarDialog(favorite.id)" class="x-friend-item">
<template v-if="favorite.ref">
<div class="avatar">
<img v-lazy="favorite.ref.thumbnailImageUrl">
</div>
<div class="detail">
<span v-text="favorite.ref.name" class="name"></span>
<span class="extra" v-text="favorite.ref.authorName"></span>
</div>
</template>
<template v-else>
<span v-text="favorite.name || favorite.id"></span>
<el-button type="text" icon="el-icon-close" size="mini" @click.stop="deleteFavorite(favorite.id)" style="margin-left:5px"></el-button>
</template>
</div>
</div>
</el-collapse-item>
</el-collapse>
</el-tab-pane>
</el-tabs>
</div>
<!-- friendLog -->
<div v-show="$refs.menu && $refs.menu.activeIndex === 'friendLog'" class="x-container">
<data-tables v-bind="friendLogTable">
<template #tool>
<div style="margin:0 0 10px;display:flex;align-items:center">
<el-select v-model="friendLogTable.filters[0].value" multiple clearable collapse-tags style="flex:1" placeholder="Filter">
<el-option v-once v-for="type in ['Friend', 'Unfriend', 'FriendRequest', 'CancelFriendRequest', 'DisplayName']" :key="type" :label="type" :value="type"></el-option>
</el-select>
<el-input v-model="friendLogTable.filters[1].value" placeholder="Search" style="flex:none;width:150px;margin-left:10px"></el-input>
</div>
</template>
<el-table-column label="Date" prop="created_at" sortable="custom" width="120">
<template v-once #default="scope">
<el-tooltip placement="right">
<template #content>
<span>{{ scope.row.created_at | formatDate('YYYY-MM-DD HH24:MI:SS') }}</span>
</template>
<span>{{ scope.row.created_at | formatDate('MM-DD HH24:MI') }}</span>
</el-tooltip>
</template>
</el-table-column>
<el-table-column label="Type" prop="type" width="150"></el-table-column>
<el-table-column label="User" prop="displayName">
<template v-once #default="scope">
<span v-if="scope.row.type === 'DisplayName'">{{ scope.row.previousDisplayName }} <i class="el-icon-right"></i> </span>
<span v-text="scope.row.displayName || scope.row.userId" @click="showUserDialog(scope.row.userId)" class="x-link"></span>
</template>
</el-table-column>
<el-table-column label="Action" width="80" align="right">
<template v-once #default="scope">
<el-button type="text" icon="el-icon-close" size="mini" @click="deleteFriendLog(scope.row)"></el-button>
</template>
</el-table-column>
</data-tables>
</div>
<!-- moderation -->
<div v-show="$refs.menu && $refs.menu.activeIndex === 'moderation'" class="x-container">
<data-tables v-bind="playerModerationTable" v-loading="API.isPlayerModerationLoading">
<template #tool>
<div style="margin:0 0 10px;display:flex;align-items:center">
<el-select v-model="playerModerationTable.filters[0].value" multiple clearable collapse-tags style="flex:1" placeholder="Filter">
<el-option v-once v-for="type in ['block', 'mute', 'unmute', 'hideAvatar', 'showAvatar']" :key="type" :label="type" :value="type"></el-option>
</el-select>
<el-input v-model="playerModerationTable.filters[1].value" placeholder="Search" style="flex:none;width:150px;margin:0 10px"></el-input>
<el-button type="default" :loading="API.isPlayerModerationLoading" @click="API.refreshPlayerModeration()" icon="el-icon-refresh" circle style="flex:none"></el-button>
</div>
</template>
<el-table-column label="Date" prop="created" sortable="custom" width="120">
<template v-once #default="scope">
<el-tooltip placement="right">
<template #content>
<span>{{ scope.row.created | formatDate('YYYY-MM-DD HH24:MI:SS') }}</span>
</template>
<span>{{ scope.row.created | formatDate('MM-DD HH24:MI') }}</span>
</el-tooltip>
</template>
</el-table-column>
<el-table-column label="Type" prop="type" width="120"></el-table-column>
<el-table-column label="Source" prop="sourceDisplayName">
<template v-once #default="scope">
<span v-text="scope.row.sourceDisplayName" @click="showUserDialog(scope.row.sourceUserId)" class="x-link"></span>
</template>
</el-table-column>
<el-table-column label="Target" prop="targetDisplayName">
<template v-once #default="scope">
<span v-text="scope.row.targetDisplayName" @click="showUserDialog(scope.row.targetUserId)" class="x-link"></span>
</template>
</el-table-column>
<el-table-column label="Action" width="80" align="right">
<template v-once #default="scope">
<el-button v-if="scope.row.sourceUserId === API.currentUser.id" type="text" icon="el-icon-close" size="mini" @click="deletePlayerModeration(scope.row)"></el-button>
</template>
</el-table-column>
</data-tables>
</div>
<!-- notification -->
<div v-show="$refs.menu && $refs.menu.activeIndex === 'notification'" v-loading="API.isNotificationLoading" class="x-container">
<data-tables v-bind="notificationTable">
<template #tool>
<div style="margin:0 0 10px;display:flex;align-items:center">
<el-select v-model="notificationTable.filters[0].value" multiple clearable collapse-tags style="flex:1" placeholder="Filter">
<el-option v-once v-for="type in ['requestInvite', 'invite', 'friendRequest', 'message']" :key="type" :label="type" :value="type"></el-option>
</el-select>
<el-input v-model="notificationTable.filters[1].value" placeholder="Search" style="flex:none;width:150px;margin:0 10px"></el-input>
<el-button type="default" :loading="API.isNotificationLoading" @click="API.refreshNotification()" icon="el-icon-refresh" circle style="flex:none"></el-button>
</div>
</template>
<el-table-column label="Date" prop="created_at" sortable="custom" width="120">
<template v-once #default="scope">
<el-tooltip placement="right">
<template #content>
<span>{{ scope.row.created_at | formatDate('YYYY-MM-DD HH24:MI:SS') }}</span>
</template>
<span>{{ scope.row.created_at | formatDate('MM-DD HH24:MI') }}</span>
</el-tooltip>
</template>
</el-table-column>
<el-table-column label="Type" prop="type" width="120">
<template v-once #default="scope">
<el-tooltip placement="top" v-if="scope.row.type === 'invite'">
<template #content>
<span v-text="parseInviteLocation(scope.row)"></span>
</template>
<span v-text="scope.row.type" @click="showWorldDialog(scope.row.details.worldId)" class="x-link"></span>
</el-tooltip>
<span v-else v-text="scope.row.type"></span>
</template>
</el-table-column>
<el-table-column label="User" prop="senderUsername">
<template v-once #default="scope">
<span v-text="scope.row.senderUsername" @click="showUserDialog(scope.row.senderUserId)" class="x-link"></span>
</template>
</el-table-column>
<el-table-column label="Action" width="80" align="right">
<template v-once #default="scope">
<el-button v-if="scope.row.type === 'friendRequest'" type="text" icon="el-icon-check" size="mini" @click="acceptNotification(scope.row)"></el-button>
<el-button type="text" icon="el-icon-close" size="mini" @click="hideNotification(scope.row)"></el-button>
</template>
</el-table-column>
</data-tables>
</div>
<!-- more -->
<div v-show="$refs.menu && $refs.menu.activeIndex === 'more'" class="x-container">
<div>
<span style="font-weight:bold">VRCX</span>
<div class="x-friend-list" style="margin-top:10px">
<div class="x-friend-item">
<div class="detail">
<span class="name">Version</span>
<span class="extra" v-text="appVersion"></span>
</div>
</div>
<div class="x-friend-item" @click="checkAppVersion()">
<div class="detail">
<span class="name">Latest Version</span>
<span class="extra" v-if="latestAppVersion" v-text="latestAppVersion"></span>
<span v-else class="extra">Click to refresh</span>
</div>
</div>
<div class="x-friend-item">
<div class="detail">
<span class="name">Repository URL</span>
<span class="extra">https://github.com/pypy-vrc/VRCX</span>
</div>
</div>
</div>
</div>
<div style="margin-top:30px">
<span style="font-weight:bold">Direct Access</span>
<div style="margin-top:5px">
<el-button-group>
<el-button size="small" @click="promptUserDialog()">User</el-button>
<el-button size="small" @click="promptWorldDialog()">World</el-button>
<el-button size="small" @click="promptAvatarDialog()">Avatar</el-button>
</el-button-group>
</div>
</div>
<div style="margin-top:30px">
<span style="font-weight:bold">My Profile</span>
<div class="x-friend-list" style="margin-top:10px">
<div class="x-friend-item" @click="showUserDialog(API.currentUser.id)">
<div class="avatar">
<img v-lazy="API.currentUser.currentAvatarThumbnailImageUrl">
</div>
<div class="detail">
<span class="name" v-text="API.currentUser.displayName"></span>
<span class="extra" v-text="API.currentUser.username"></span>
</div>
</div>
<div class="x-friend-item" @click="showSocialStatusDialog()">
<div class="detail">
<span class="name"><i class="el-icon-edit"></i> Social Status</span>
<span class="extra">
<el-tooltip placement="top">
<template #content>
<span v-if="API.currentUser.status === 'active'">Active</span>
<span v-else-if="API.currentUser.status === 'join me'">Join Me</span>
<span v-else-if="API.currentUser.status === 'busy'">Busy</span>
<span v-else>Offline</span>
</template>
<i class="x-user-status" :class="userStatusClass(API.currentUser)"></i>
</el-tooltip>
<span v-text="API.currentUser.statusDescription"></span>
</span>
</div>
</div>
<div class="x-friend-item">
<div class="detail">
<span class="name">Last Login</span>
<span class="extra">{{ API.currentUser.last_login | formatDate('YYYY-MM-DD HH24:MI:SS') }}</span>
</div>
</div>
<div class="x-friend-item">
<div class="detail">
<span class="name">Two-Factor Auth (2FA)</span>
<span class="extra">{{ API.currentUser.twoFactorAuthEnabled ? 'Enabled' : 'Disabled' }}</span>
</div>
</div>
<div class="x-friend-item" @click="showUserDialog(API.currentUser.id)">
<div class="detail">
<span class="name">User ID</span>
<span class="extra" v-text="API.currentUser.id"></span>
</div>
</div>
<div class="x-friend-item" @click="showAvatarDialog(API.currentUser.currentAvatar)">
<div class="detail">
<span class="name">Avatar ID</span>
<span class="extra" v-text="API.currentUser.currentAvatar"></span>
</div>
</div>
<div class="x-friend-item" v-if="API.currentUser.homeLocation" @click="showWorldDialog(API.currentUser.homeLocation)">
<div class="detail">
<span class="name">Home Location</span>
<span class="extra">
<location :location="API.currentUser.homeLocation" :link="false"></location>
<el-button @click.stop="resetHome()" size="mini" icon="el-icon-delete" circle style="margin-left:5px"></el-button>
</span>
</div>
</div>
</div>
<div style="margin-top:10px">
<el-button-group>
<el-button size="small" icon="el-icon-switch-button" @click="logout()">Logout</el-button>
</el-button-group>
</div>
<div style="margin-top:30px">
<span style="font-weight:bold">Past Display Names</span>
<data-tables v-bind="pastDisplayNameTable" style="margin-top:5px">
<el-table-column label="Date" prop="updated_at" sortable="custom">
<template v-once #default="scope">
<span>{{ scope.row.updated_at | formatDate('YYYY-MM-DD HH24:MI:SS') }}</span>
</template>
</el-table-column>
<el-table-column label="Name" prop="displayName"></el-table-column>
</data-tables>
</div>
<div style="margin-top:30px">
<span style="font-weight:bold">JSON</span>
<el-button type="default" @click="refreshCurrentUserTreeData()" size="mini" icon="el-icon-refresh" circle style="margin-left:5px"></el-button>
<el-button type="default" @click="currentUserTreeData = []" size="mini" icon="el-icon-delete" circle style="margin-left:0"></el-button>
<el-tree :data="currentUserTreeData" style="margin-top:5px;font-size:12px">
<template #default="scope">
<span>
<span v-text="scope.data.key" style="font-weight:bold;margin-right:5px"></span>
<span v-if="!scope.data.children" v-text="scope.data.value"></span>
</span>
</template>
</el-tree>
</div>
</div>
<div style="margin-top:30px">
<span style="font-weight:bold">Game Info</span>
<div style="font-size:12px;margin-top:5px">
</div>
<div class="x-friend-list" style="margin-top:10px">
<div class="x-friend-item">
<div class="detail" @click="API.getVisits()">
<span class="name">Online Users</span>
<span v-if="visits" class="extra">{{visits}} Users online.</span>
<span v-else class="extra">Click to refresh</span>
</div>
</div>
<div class="x-friend-item">
<div class="detail">
<span class="name">SDK Unity Version</span>
<span class="extra" v-text="API.config.sdkUnityVersion"></span>
</div>
</div>
<div class="x-friend-item">
<div class="detail">
<span class="name">SDK Version</span>
<span class="extra" v-text="API.config.releaseSdkVersion"></span>
</div>
</div>
<div class="x-friend-item">
<div class="detail">
<span class="name">SDK URL</span>
<span class="extra" v-text="API.config.releaseSdkUrl"></span>
</div>
</div>
</div>
</div>
<div style="margin-top:30px">
<span style="font-weight:bold">Friends Sort Option</span>
<div style="font-size:12px;margin-top:5px">
<span style="display:inline-block;min-width:150px">VIP</span>
<el-switch v-model="orderFriendGroup0" inactive-text="by name" active-text="by state"></el-switch>
</div>
<div style="font-size:12px;margin-top:5px">
<span style="display:inline-block;min-width:150px">ONLINE</span>
<el-switch v-model="orderFriendGroup1" inactive-text="by name" active-text="by state"></el-switch>
</div>
<div style="font-size:12px;margin-top:5px">
<span style="display:inline-block;min-width:150px">ACTIVE</span>
<el-switch v-model="orderFriendGroup2" inactive-text="by name" active-text="by state"></el-switch>
</div>
<div style="font-size:12px;margin-top:5px">
<span style="display:inline-block;min-width:150px">OFFLINE</span>
<el-switch v-model="orderFriendGroup3" inactive-text="by name" active-text="by state"></el-switch>
</div>
</div>
<div style="margin-top:30px">
<span style="font-weight:bold">Show name color by Trust level</span>
<div style="font-size:12px;margin-top:5px">
<span style="display:inline-block;min-width:150px">Enable</span>
<el-switch v-model="showNameColor"></el-switch>
</div>
</div>
<div style="margin-top:30px">
<span style="font-weight:bold">Discord Presence</span>
<div style="font-size:12px;margin-top:5px">
<span>* Only works when VRChat is running.</span>
</div>
<div style="font-size:12px;margin-top:5px">
<span style="display:inline-block;min-width:150px">Enable</span>
<el-switch v-model="discordActive"></el-switch>
</div>
<div style="font-size:12px;margin-top:5px">
<span style="display:inline-block;min-width:150px">Instance Details</span>
<el-switch v-model="discordInstance"></el-switch>
</div>
</div>
<div style="margin-top:30px">
<span style="font-weight:bold">SteamVR Overlay</span>
<div style="font-size:12px;margin-top:5px">
<span>* It runs automatically when VRChat is running.</span><br>
<span>Vive or Other Controller: Grab Button</span><br>
<span>Oculus Controller: B Button</span><br>
</div>
<div style="font-size:12px;margin-top:5px">
<span style="display:inline-block;min-width:150px">Enable</span>
<el-switch v-model="openVR"></el-switch>
</div>
<div style="font-size:12px;margin-top:5px">
<span style="display:inline-block;min-width:150px">Force Run</span>
<el-switch v-model="openVRAlways"></el-switch>
</div>
</div>
<div style="margin-top:45px;border-top:1px solid #eee;padding-top:30px">
<span style="font-weight:bold">Legal Notice</span>
<div style="margin-top:5px;font-size:12px">
<p>© 2019 <a href="https://github.com/pypy-vrc" target="_blank">pypy</a> (mina#5656)</p>
<p>VRCX is an assistant application for provide information about manage friendship. this application uses unofficial VRChat API (VRCSDK).</p>
<p>VRCX isn't endorsed by VRChat and doesn't reflect the views or opinions of VRChat or anyone officially involved in producing or managing VRChat. VRChat is trademark of VRChat Inc. VRChat © VRChat Inc.</p>
<p>pypy is not responsible for any problems caused by VRCX. Use at your own risk!</p>
</div>
<div style="margin-top:5px;font-size:12px">
<el-button @click="ossDialog = true" size="small">Open Source Software Notice</el-button>
</div>
</div>
</div>
<!-- friends -->
<div class="x-aside-container">
<el-select v-model="quickSearch" clearable placeholder="Search" filterable remote :remote-method="quickSearchRemoteMethod" popper-class="x-quick-search" @change="quickSearchChange" @visible-change="quickSearchVisibleChange" style="flex:none;padding:10px">
<el-option v-for="item in quickSearchItems" :key="item.value" :value="item.value" :label="item.label">
<div class="x-friend-item">
<template v-if="item.ref">
<div class="detail">
<span v-text="item.ref.displayName" class="name" :class="item.ref.trustClass_"></span>
<location :location="item.ref.location" :link="false" class="extra"></location>
</div>
<img v-lazy="item.ref.currentAvatarThumbnailImageUrl" class="avatar">
</template>
<span v-else>Search More: <span v-text="item.label" style="font-weight:bold"></span></span>
</div>
</el-option>
</el-select>
<div class="x-friend-list" style="padding-bottom:10px">
<div v-show="friendGroup0.length" class="x-friend-group">
<i class="el-icon-arrow-right" :class="{ rotate: isFriendGroup0 }"></i>
<span @click="isFriendGroup0 = !isFriendGroup0" class="x-link" style="margin-left:5px">VIP―{{ friendGroup0.length }}</span>
</div>
<div v-show="isFriendGroup0">
<div v-for="friend in friendGroup0" :key="friend.id" @click="showUserDialog(friend.id)" class="x-friend-item">
<template v-if="friend.ref">
<div class="avatar" :class="userStatusClass(friend.ref)">
<img v-lazy="friend.ref.currentAvatarThumbnailImageUrl">
</div>
<div class="detail">
<span v-if="friend.memo" class="name" :class="friend.ref.trustClass_">{{ friend.ref.displayName }} ({{ friend.memo }})</span>
<span v-else v-text="friend.ref.displayName" class="name" :class="friend.ref.trustClass_"></span>
<location :location="friend.ref.location" :link="false" class="extra"></location>
</div>
</template>
<template v-else>
<span v-text="friend.name || friend.id"></span>
<el-button type="text" icon="el-icon-close" size="mini" @click.stop="deleteFriend(friend.id)" style="margin-left:5px"></el-button>
</template>
</div>
</div>
<div v-show="friendGroup1.length" class="x-friend-group">
<i class="el-icon-arrow-right" :class="{ rotate: isFriendGroup1 }"></i>
<span @click="isFriendGroup1 = !isFriendGroup1" class="x-link" style="margin-left:5px">ONLINE―{{ friendGroup1.length }}</span>
</div>
<div v-show="isFriendGroup1">
<div v-for="friend in friendGroup1" :key="friend.id" @click="showUserDialog(friend.id)" class="x-friend-item">
<template v-if="friend.ref">
<div class="avatar" :class="userStatusClass(friend.ref)">
<img v-lazy="friend.ref.currentAvatarThumbnailImageUrl">
</div>
<div class="detail">
<span v-if="friend.memo" class="name" :class="friend.ref.trustClass_">{{ friend.ref.displayName }} ({{ friend.memo }})</span>
<span v-else v-text="friend.ref.displayName" class="name" :class="friend.ref.trustClass_"></span>
<location :location="friend.ref.location" :link="false" class="extra"></location>
</div>
</template>
<template v-else>
<span v-text="friend.name || friend.id"></span>
<el-button type="text" icon="el-icon-close" size="mini" @click.stop="deleteFriend(friend.id)" style="margin-left:5px"></el-button>
</template>
</div>
</div>
<div v-show="friendGroup2.length" class="x-friend-group">
<i class="el-icon-arrow-right" :class="{ rotate: isFriendGroup2 }"></i>
<span @click="isFriendGroup2 = !isFriendGroup2" class="x-link" style="margin-left:5px">ACTIVE―{{ friendGroup2.length }}</span>
</div>
<div v-show="isFriendGroup2">
<div v-for="friend in friendGroup2" :key="friend.id" @click="showUserDialog(friend.id)" class="x-friend-item">
<template v-if="friend.ref">
<div class="avatar">
<img v-lazy="friend.ref.currentAvatarThumbnailImageUrl">
</div>
<div class="detail">
<span v-if="friend.memo" class="name" :class="friend.ref.trustClass_">{{ friend.ref.displayName }} ({{ friend.memo }})</span>
<span v-else v-text="friend.ref.displayName" class="name" :class="friend.ref.trustClass_"></span>
<span v-text="friend.ref.statusDescription" :link="false" class="extra"></span>
</div>
</template>
<template v-else>
<span v-text="friend.name || friend.id"></span>
<el-button type="text" icon="el-icon-close" size="mini" @click.stop="deleteFriend(friend.id)" style="margin-left:5px"></el-button>
</template>
</div>
</div>
<div v-show="friendGroup3.length" class="x-friend-group">
<i class="el-icon-arrow-right" :class="{ rotate: isFriendGroup3 }"></i>
<span @click="isFriendGroup3 = !isFriendGroup3" class="x-link" style="margin-left:5px">OFFLINE―{{ friendGroup3.length }}</span>
</div>
<div v-show="isFriendGroup3">
<div v-for="friend in friendGroup3" :key="friend.id" @click="showUserDialog(friend.id)" class="x-friend-item">
<template v-if="friend.ref">
<div class="avatar">
<img v-lazy="friend.ref.currentAvatarThumbnailImageUrl">
</div>
<div class="detail">
<span v-if="friend.memo" class="name" :class="friend.ref.trustClass_">{{ friend.ref.displayName }} ({{ friend.memo }})</span>
<span v-else v-text="friend.ref.displayName" class="name" :class="friend.ref.trustClass_"></span>
<span v-text="friend.ref.statusDescription" class="extra"></span>
</div>
</template>
<template v-else>
<span v-text="friend.name || friend.id"></span>
<el-button type="text" icon="el-icon-close" size="mini" @click.stop="deleteFriend(friend.id)" style="margin-left:5px"></el-button>
</template>
</div>
</div>
</div>
</div>
<!-- dialog: user -->
<el-dialog ref="userDialog" :visible.sync="userDialog.visible" :show-close="false" width="600px" class="x-dialog x-user-dialog">
<div v-loading="userDialog.loading">
<div style="display:flex">
<el-popover placement="right" width="500px" trigger="click">
<img v-lazy="userDialog.ref.currentAvatarThumbnailImageUrl" style="width:500px;height:375px">
<img slot="reference" v-lazy="userDialog.ref.currentAvatarThumbnailImageUrl" class="x-link" style="flex:none;width:160px;height:120px;border-radius:4px">
</el-popover>
<div style="flex:1;display:flex;align-items:center;margin-left:15px">
<div style="flex:1">
<div>
<el-tooltip v-if="userDialog.ref.status" placement="top">
<template #content>
<span v-if="userDialog.ref.location === 'offline'">Offline</span>
<span v-else-if="userDialog.ref.status === 'active'">Active</span>
<span v-else-if="userDialog.ref.status === 'join me'">Join Me</span>
<span v-else-if="userDialog.ref.status === 'busy'">Busy</span>
<span v-else>Offline</span>
</template>
<i class="x-user-status" :class="userStatusClass(userDialog.ref)"></i>
</el-tooltip>
<span v-text="userDialog.ref.displayName" style="font-weight:bold"></span>
</div>
<div style="margin-top:5px">
<el-popover placement="top" trigger="click">
<span style="display:block;text-align:center;font-family:monospace">{{ userDialog.ref.username | textToHex }}</span>
<span slot="reference" v-text="userDialog.ref.username" style="color:#909399;font-family:monospace;cursor:pointer"></span>
</el-popover>
</div>
<div style="margin-top:5px">
<el-tag type="info" effect="plain" size="mini" class="name" :class="userDialog.ref.trustClass_" v-text="userDialog.ref.trustLevel_"></el-tag>
<!--
<el-tag v-if="userDialog.ref.admin_" type="info" effect="plain" size="mini" class="x-tag-vip">VRChat Team</el-tag>
<el-tag v-else-if="userDialog.ref.trustLevel_ === 'Legendary User'" type="info" effect="plain" size="mini" class="x-tag-legendary">Legendary User</el-tag>
<el-tag v-else-if="userDialog.ref.trustLevel_ === 'Veteran User'" type="info" effect="plain" size="mini" class="x-tag-legend">Veteran User</el-tag>
<el-tag v-else-if="userDialog.ref.trustLevel_ === 'Trusted User'" type="info" effect="plain" size="mini" class="x-tag-veteran">Trusted User</el-tag>
<el-tag v-else-if="userDialog.ref.trustLevel_ === 'Known User'" type="info" effect="plain" size="mini" class="x-tag-trusted">Known User</el-tag>
<el-tag v-else-if="userDialog.ref.trustLevel_ === 'User'" type="info" effect="plain" size="mini" class="x-tag-known">User</el-tag>
<el-tag v-else-if="userDialog.ref.trustLevel_ === 'New User'" type="info" effect="plain" size="mini" class="x-tag-basic">New User</el-tag>
<el-tag v-else type="info" effect="plain" size="mini" class="x-tag-untrusted">Visitor</el-tag>
<el-tag v-if="userDialog.ref.troll_" type="info" effect="plain" size="mini" class="x-tag-troll">Nuisance</el-tag>
-->
<el-tag v-if="userDialog.isFriend && userDialog.friend" type="info" effect="plain" size="mini" class="x-tag-friend">Friend No.{{userDialog.friend.no}}</el-tag>
</div>
<div style="margin-top:5px">
<span v-text="userDialog.ref.statusDescription" style="font-size:12px"></span>
</div>
</div>
<div style="flex:none;margin-left:10px">
<el-button v-if="userDialog.isFavorite" @click="userDialogCommand('Delete Favorite')" type="warning" icon="el-icon-star-on" circle></el-button>
<el-button v-else type="default" @click="userDialogCommand('Add Favorite')" icon="el-icon-star-off" circle></el-button>
<el-dropdown trigger="click" @command="userDialogCommand" size="small">
<el-button :type="(userDialog.incomingRequest || userDialog.outgoingRequest) ? 'success' : (userDialog.isBlock || userDialog.isMute || userDialog.isHideAvatar) ? 'danger' : 'default'" icon="el-icon-more" circle></el-button>
<el-dropdown-menu #default="dropdown">
<template v-if="userDialog.isFriend">
<el-dropdown-item icon="el-icon-message" command="Message">Message</el-dropdown-item>
<el-dropdown-item icon="el-icon-delete" command="Unfriend" divided>Unfriend</el-dropdown-item>
</template>
<template v-else-if="userDialog.incomingRequest">
<el-dropdown-item icon="el-icon-check" command="Accept Friend Request">Accept Friend Request</el-dropdown-item>
<el-dropdown-item icon="el-icon-close" command="Decline Friend Request">Decline Friend Request</el-dropdown-item>
</template>
<el-dropdown-item v-else-if="userDialog.outgoingRequest" icon="el-icon-close" command="Cancel Friend Request">Cancel Friend Request</el-dropdown-item>
<el-dropdown-item v-else icon="el-icon-plus" command="Send Friend Request">Send Friend Request</el-dropdown-item>
<el-dropdown-item v-if="userDialog.isBlock" icon="el-icon-circle-check" command="Unblock" divided style="color:#F56C6C">Unblock</el-dropdown-item>
<el-dropdown-item v-else icon="el-icon-circle-close" command="Block" divided>Block</el-dropdown-item>
<el-dropdown-item v-if="userDialog.isMute" icon="el-icon-microphone" command="Unmute" style="color:#F56C6C">Unmute</el-dropdown-item>
<el-dropdown-item v-else icon="el-icon-turn-off-microphone" command="Mute">Mute</el-dropdown-item>
<el-dropdown-item v-if="userDialog.isHideAvatar" icon="el-icon-user-solid" command="Show Avatar" style="color:#F56C6C">Show Avatar</el-dropdown-item>
<el-dropdown-item v-else icon="el-icon-user" command="Hide Avatar">Hide Avatar</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</div>
<el-tabs>
<el-tab-pane label="Info">
<div v-if="userDialog.ref.location" style="display:flex;flex-direction:column;margin-bottom:10px;padding-bottom:10px;border-bottom:1px solid #eee">
<div style="flex:none">
<i class="el-icon-position"></i>
<location :location="userDialog.ref.location">
<template #default v-if="userDialog.instance.occupants"> ({{ userDialog.instance.occupants }})</template>
</location>
<launch :location="userDialog.ref.location" style="margin-left:5px"></launch>
</div>
<div class="x-friend-list" style="flex:1;margin-top:10px">
<div v-if="userDialog.location_.userId" @click="showUserDialog(userDialog.location_.userId)" class="x-friend-item">
<template v-if="userDialog.location_.user">
<div class="avatar">
<img v-lazy="userDialog.location_.user.currentAvatarThumbnailImageUrl">
</div>
<div class="detail">
<span v-text="userDialog.location_.user.displayName" class="name" :class="userDialog.location_.user.trustClass_"></span>
<span class="extra">Instance Creator</span>
</div>
</template>
<span v-else v-text="userDialog.location_.userId"></span>
</div>
<div v-for="user in userDialog.users" :key="user.id" @click="showUserDialog(user.id)" class="x-friend-item">
<div class="avatar">
<img v-lazy="user.currentAvatarThumbnailImageUrl">
</div>
<div class="detail">
<span v-text="user.displayName" class="name" :class="user.trustClass_"></span>
<span class="extra"><timer :epoch="user.location_at_"></timer></span>
</div>
</div>
</div>
</div>
<div class="x-friend-list" style="max-height:none">
<div class="x-friend-item" style="width:100%">
<div class="detail">
<span class="name">Note</span>
<el-input v-model="userDialog.memo" type="textarea" :rows="2" placeholder="Click to add a note" size="mini" resize="none" class="extra"></el-input>
</div>
</div>
<div class="x-friend-item">
<div class="detail">
<span class="name">Avatar Copying</span>
<span class="extra" v-if="userDialog.ref.allowAvatarCopying" style="color:#67C23A">Allow</span>
<span class="extra" v-else style="color:#F56C6C">Deny</span>
</div>
</div>
<div class="x-friend-item">
<div class="detail">
<span class="name">Last Login</span>
<span class="extra">{{ userDialog.ref.last_login | formatDate('YYYY-MM-DD HH24:MI:SS') || '-' }}</span>
</div>
</div>