mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-25 01:33:51 +02:00
Hide offline friends by default in friends sidebar 1
This commit is contained in:
@@ -169,7 +169,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref, watch } from 'vue';
|
||||||
import { ArrowRight } from '@element-plus/icons-vue';
|
import { ArrowRight } from '@element-plus/icons-vue';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
@@ -185,6 +185,7 @@
|
|||||||
} from '../../../stores';
|
} from '../../../stores';
|
||||||
import { isRealInstance, userImage, userStatusClass } from '../../../shared/utils';
|
import { isRealInstance, userImage, userStatusClass } from '../../../shared/utils';
|
||||||
import { getFriendsLocations } from '../../../shared/utils/location.js';
|
import { getFriendsLocations } from '../../../shared/utils/location.js';
|
||||||
|
import { watchState } from '../../../service/watchState';
|
||||||
|
|
||||||
import FriendItem from './FriendItem.vue';
|
import FriendItem from './FriendItem.vue';
|
||||||
import configRepository from '../../../service/config';
|
import configRepository from '../../../service/config';
|
||||||
@@ -208,9 +209,18 @@
|
|||||||
const isVIPFriends = ref(true);
|
const isVIPFriends = ref(true);
|
||||||
const isOnlineFriends = ref(true);
|
const isOnlineFriends = ref(true);
|
||||||
const isActiveFriends = ref(false);
|
const isActiveFriends = ref(false);
|
||||||
const isOfflineFriends = computed(() => (offlineFriends.value.length < 10 ? true : false));
|
const isOfflineFriends = ref(false);
|
||||||
const isSidebarGroupByInstanceCollapsed = ref(false);
|
const isSidebarGroupByInstanceCollapsed = ref(false);
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => watchState.isFriendsLoaded,
|
||||||
|
(isFriendsLoaded) => {
|
||||||
|
if (isFriendsLoaded) {
|
||||||
|
isOfflineFriends.value = offlineFriends.value.length < 10 ? true : false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
loadFriendsGroupStates();
|
loadFriendsGroupStates();
|
||||||
|
|
||||||
const sameInstanceFriendId = computed(() => {
|
const sameInstanceFriendId = computed(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user