Tabbed side panel

This commit is contained in:
Natsumi
2023-06-04 11:06:34 +12:00
parent 61fa42f897
commit e0bde3be98
5 changed files with 114 additions and 90 deletions

View File

@@ -13655,6 +13655,10 @@ speechSynthesis.getVoices();
false
);
$app.data.asideWidth = configRepository.getInt('VRCX_asidewidth', 350);
if ($app.data.asideWidth === 236) {
$app.data.asideWidth = 350;
configRepository.setInt('VRCX_asidewidth', $app.data.asideWidth);
}
$app.data.autoUpdateVRCX = configRepository.getString(
'VRCX_autoUpdateVRCX',
'Auto Download'

View File

@@ -705,3 +705,19 @@ i.x-user-status.busy {
padding: 3px;
top: 0 !important;
}
.el-tab-pane {
height: 100%;
}
.el-tabs {
// height: calc(100vh - 60px);
display: flex;
flex-direction: column;
}
.el-tabs__content {
flex: 1;
max-height: 100%;
overflow: auto;
}

View File

@@ -106,95 +106,99 @@ html
el-button(type="default" @click="directAccessPaste" size="mini" icon="el-icon-discover" circle)
el-tooltip(placement="bottom" :content="$t('side_panel.refresh_tooltip')" :disabled="hideTooltips")
el-button(type="default" @click="refreshFriendsList" :loading="API.isRefreshFriendsLoading" size="mini" icon="el-icon-refresh" circle style="margin-right:10px")
.x-friend-list(style="padding-bottom:10px")
.x-friend-group(style="padding:5px 0 0")
span {{ $t('side_panel.friends') }} ― {{ onlineFriendCount }}/{{ friends.size }}
.x-friend-group.x-link(@click="isFriendsGroupMe = !isFriendsGroupMe" style="padding:10px 0 5px")
i.el-icon-arrow-right(:class="{ rotate: isFriendsGroupMe }")
span(style="margin-left:5px") {{ $t('side_panel.me') }}
div(v-show="isFriendsGroupMe")
.x-friend-item(:key="API.currentUser.id" @click="showUserDialog(API.currentUser.id)")
.avatar(:class="userStatusClass(API.currentUser)")
img(v-lazy="userImage(API.currentUser)")
.detail
span.name(v-text="API.currentUser.displayName" :style="{'color':API.currentUser.$userColour}")
location.extra(v-if="isGameRunning" :location="lastLocation.location" :traveling="lastLocationDestination" :link="false")
location.extra(v-else-if="isRealInstance(API.currentUser.$locationTag) || isRealInstance(API.currentUser.$travelingToLocation)" :location="API.currentUser.$locationTag" :traveling="API.currentUser.$travelingToLocation" :link="false")
span.extra(v-else v-text="API.currentUser.statusDescription")
.x-friend-group.x-link(@click="isGroupInstances = !isGroupInstances")
i.el-icon-arrow-right(:class="{ rotate: isGroupInstances }")
span(style="margin-left:5px") {{ $t('side_panel.groups') }} ― {{ groupInstances.length }}
div(v-show="isGroupInstances")
.x-friend-item(v-for="instance in groupInstances" :key="instance.id" @click="showGroupDialog(instance.ownerId)")
.avatar
img(v-lazy="instance.$group.iconUrl")
.detail
span.name
span(v-text="instance.$group.name")
span(style="font-weight:normal;margin-left:5px") ({{ instance.userCount }}/{{ instance.capacity }})
location.extra(:location="instance.location" :link="false")
.x-friend-group.x-link(@click="isFriendsGroup0 = !isFriendsGroup0" v-show="friendsGroup0.length")
i.el-icon-arrow-right(:class="{ rotate: isFriendsGroup0 }")
span(style="margin-left:5px") {{ $t('side_panel.favorite') }} ― {{ friendsGroup0.length }}
div(v-show="isFriendsGroup0")
.x-friend-item(v-for="friend in friendsGroup0" :key="friend.id" @click="showUserDialog(friend.id)")
template(v-if="friend.ref")
.avatar(:class="userStatusClass(friend.ref, friend.pendingOffline)")
img(v-lazy="userImage(friend.ref)")
.detail
span.name(v-if="!hideUserMemos && friend.$nickName" :style="{'color':friend.ref.$userColour}") {{ friend.ref.displayName }} ({{ friend.$nickName }})
span.name(v-else v-text="friend.ref.displayName" :style="{'color':friend.ref.$userColour}")
span.extra(v-if="friend.pendingOffline") #[i.el-icon-warning-outline] {{ $t('side_panel.pending_offline') }}
location.extra(v-else :location="friend.ref.location" :traveling="friend.ref.travelingToLocation" :link="false")
template(v-else)
span(v-text="friend.name || friend.id")
el-button(type="text" icon="el-icon-close" size="mini" @click.stop="confirmDeleteFriend(friend.id)" style="margin-left:5px")
.x-friend-group.x-link(@click="isFriendsGroup1 = !isFriendsGroup1" v-show="friendsGroup1.length")
i.el-icon-arrow-right(:class="{ rotate: isFriendsGroup1 }")
span(style="margin-left:5px") {{ $t('side_panel.online') }} ― {{ friendsGroup1.length }}
div(v-show="isFriendsGroup1")
.x-friend-item(v-for="friend in friendsGroup1" :key="friend.id" @click="showUserDialog(friend.id)")
template(v-if="friend.ref")
.avatar(:class="userStatusClass(friend.ref, friend.pendingOffline)")
img(v-lazy="userImage(friend.ref)")
.detail
span.name(v-if="!hideUserMemos && friend.$nickName" :style="{'color':friend.ref.$userColour}") {{ friend.ref.displayName }} ({{ friend.$nickName }})
span.name(v-else v-text="friend.ref.displayName" :style="{'color':friend.ref.$userColour}")
span.extra(v-if="friend.pendingOffline") #[i.el-icon-warning-outline] {{ $t('side_panel.pending_offline') }}
location.extra(v-else :location="friend.ref.location" :traveling="friend.ref.travelingToLocation" :link="false")
template(v-else)
span(v-text="friend.name || friend.id")
el-button(type="text" icon="el-icon-close" size="mini" @click.stop="confirmDeleteFriend(friend.id)" style="margin-left:5px")
.x-friend-group.x-link(@click="isFriendsGroup2 = !isFriendsGroup2" v-show="friendsGroup2.length")
i.el-icon-arrow-right(:class="{ rotate: isFriendsGroup2 }")
span(style="margin-left:5px") {{ $t('side_panel.active') }} ― {{ friendsGroup2.length }}
div(v-show="isFriendsGroup2")
.x-friend-item(v-for="friend in friendsGroup2" :key="friend.id" @click="showUserDialog(friend.id)")
template(v-if="friend.ref")
el-tabs(type="card" stretch="true" style="height: calc(100vh - 60px")
el-tab-pane
template(#label)
span {{ $t('side_panel.friends') }}: {{ onlineFriendCount }}/{{ friends.size }}
.x-friend-list(style="padding-bottom:10px")
.x-friend-group.x-link(@click="isFriendsGroupMe = !isFriendsGroupMe" style="padding:0px 0px 5px")
i.el-icon-arrow-right(:class="{ rotate: isFriendsGroupMe }")
span(style="margin-left:5px") {{ $t('side_panel.me') }}
div(v-show="isFriendsGroupMe")
.x-friend-item(:key="API.currentUser.id" @click="showUserDialog(API.currentUser.id)")
.avatar(:class="userStatusClass(API.currentUser)")
img(v-lazy="userImage(API.currentUser)")
.detail
span.name(v-text="API.currentUser.displayName" :style="{'color':API.currentUser.$userColour}")
location.extra(v-if="isGameRunning" :location="lastLocation.location" :traveling="lastLocationDestination" :link="false")
location.extra(v-else-if="isRealInstance(API.currentUser.$locationTag) || isRealInstance(API.currentUser.$travelingToLocation)" :location="API.currentUser.$locationTag" :traveling="API.currentUser.$travelingToLocation" :link="false")
span.extra(v-else v-text="API.currentUser.statusDescription")
.x-friend-group.x-link(@click="isFriendsGroup0 = !isFriendsGroup0" v-show="friendsGroup0.length")
i.el-icon-arrow-right(:class="{ rotate: isFriendsGroup0 }")
span(style="margin-left:5px") {{ $t('side_panel.favorite') }} ― {{ friendsGroup0.length }}
div(v-show="isFriendsGroup0")
.x-friend-item(v-for="friend in friendsGroup0" :key="friend.id" @click="showUserDialog(friend.id)")
template(v-if="friend.ref")
.avatar(:class="userStatusClass(friend.ref, friend.pendingOffline)")
img(v-lazy="userImage(friend.ref)")
.detail
span.name(v-if="!hideUserMemos && friend.$nickName" :style="{'color':friend.ref.$userColour}") {{ friend.ref.displayName }} ({{ friend.$nickName }})
span.name(v-else v-text="friend.ref.displayName" :style="{'color':friend.ref.$userColour}")
span.extra(v-if="friend.pendingOffline") #[i.el-icon-warning-outline] {{ $t('side_panel.pending_offline') }}
location.extra(v-else :location="friend.ref.location" :traveling="friend.ref.travelingToLocation" :link="false")
template(v-else)
span(v-text="friend.name || friend.id")
el-button(type="text" icon="el-icon-close" size="mini" @click.stop="confirmDeleteFriend(friend.id)" style="margin-left:5px")
.x-friend-group.x-link(@click="isFriendsGroup1 = !isFriendsGroup1" v-show="friendsGroup1.length")
i.el-icon-arrow-right(:class="{ rotate: isFriendsGroup1 }")
span(style="margin-left:5px") {{ $t('side_panel.online') }} ― {{ friendsGroup1.length }}
div(v-show="isFriendsGroup1")
.x-friend-item(v-for="friend in friendsGroup1" :key="friend.id" @click="showUserDialog(friend.id)")
template(v-if="friend.ref")
.avatar(:class="userStatusClass(friend.ref, friend.pendingOffline)")
img(v-lazy="userImage(friend.ref)")
.detail
span.name(v-if="!hideUserMemos && friend.$nickName" :style="{'color':friend.ref.$userColour}") {{ friend.ref.displayName }} ({{ friend.$nickName }})
span.name(v-else v-text="friend.ref.displayName" :style="{'color':friend.ref.$userColour}")
span.extra(v-if="friend.pendingOffline") #[i.el-icon-warning-outline] {{ $t('side_panel.pending_offline') }}
location.extra(v-else :location="friend.ref.location" :traveling="friend.ref.travelingToLocation" :link="false")
template(v-else)
span(v-text="friend.name || friend.id")
el-button(type="text" icon="el-icon-close" size="mini" @click.stop="confirmDeleteFriend(friend.id)" style="margin-left:5px")
.x-friend-group.x-link(@click="isFriendsGroup2 = !isFriendsGroup2" v-show="friendsGroup2.length")
i.el-icon-arrow-right(:class="{ rotate: isFriendsGroup2 }")
span(style="margin-left:5px") {{ $t('side_panel.active') }} ― {{ friendsGroup2.length }}
div(v-show="isFriendsGroup2")
.x-friend-item(v-for="friend in friendsGroup2" :key="friend.id" @click="showUserDialog(friend.id)")
template(v-if="friend.ref")
.avatar
img(v-lazy="userImage(friend.ref)")
.detail
span.name(v-if="!hideUserMemos && friend.$nickName" :style="{'color':friend.ref.$userColour}") {{ friend.ref.displayName }} ({{ friend.$nickName }})
span.name(v-else v-text="friend.ref.displayName" :style="{'color':friend.ref.$userColour}")
span.extra(v-text="friend.ref.statusDescription" :link="false")
template(v-else)
span(v-text="friend.name || friend.id")
el-button(type="text" icon="el-icon-close" size="mini" @click.stop="confirmDeleteFriend(friend.id)" style="margin-left:5px")
.x-friend-group.x-link(@click="isFriendsGroup3 = !isFriendsGroup3" v-show="friendsGroup3.length")
i.el-icon-arrow-right(:class="{ rotate: isFriendsGroup3 }")
span(style="margin-left:5px") {{ $t('side_panel.offline') }} ― {{ friendsGroup3.length }}
div(v-show="isFriendsGroup3")
.x-friend-item(v-for="friend in friendsGroup3" :key="friend.id" @click="showUserDialog(friend.id)")
template(v-if="friend.ref")
.avatar
img(v-lazy="userImage(friend.ref)")
.detail
span.name(v-if="!hideUserMemos && friend.$nickName" :style="{'color':friend.ref.$userColour}") {{ friend.ref.displayName }} ({{ friend.$nickName }})
span.name(v-else v-text="friend.ref.displayName" :style="{'color':friend.ref.$userColour}")
span.extra(v-text="friend.ref.statusDescription")
template(v-else)
span(v-text="friend.name || friend.id")
el-button(type="text" icon="el-icon-close" size="mini" @click.stop="confirmDeleteFriend(friend.id)" style="margin-left:5px")
el-tab-pane
template(#label)
span {{ $t('side_panel.groups') }}: {{ groupInstances.length }}
.x-friend-list(style="padding-bottom:10px")
.x-friend-item(v-for="instance in groupInstances" :key="instance.id" @click="showGroupDialog(instance.ownerId)")
.avatar
img(v-lazy="userImage(friend.ref)")
img(v-lazy="instance.$group.iconUrl")
.detail
span.name(v-if="!hideUserMemos && friend.$nickName" :style="{'color':friend.ref.$userColour}") {{ friend.ref.displayName }} ({{ friend.$nickName }})
span.name(v-else v-text="friend.ref.displayName" :style="{'color':friend.ref.$userColour}")
span.extra(v-text="friend.ref.statusDescription" :link="false")
template(v-else)
span(v-text="friend.name || friend.id")
el-button(type="text" icon="el-icon-close" size="mini" @click.stop="confirmDeleteFriend(friend.id)" style="margin-left:5px")
.x-friend-group.x-link(@click="isFriendsGroup3 = !isFriendsGroup3" v-show="friendsGroup3.length")
i.el-icon-arrow-right(:class="{ rotate: isFriendsGroup3 }")
span(style="margin-left:5px") {{ $t('side_panel.offline') }} ― {{ friendsGroup3.length }}
div(v-show="isFriendsGroup3")
.x-friend-item(v-for="friend in friendsGroup3" :key="friend.id" @click="showUserDialog(friend.id)")
template(v-if="friend.ref")
.avatar
img(v-lazy="userImage(friend.ref)")
.detail
span.name(v-if="!hideUserMemos && friend.$nickName" :style="{'color':friend.ref.$userColour}") {{ friend.ref.displayName }} ({{ friend.$nickName }})
span.name(v-else v-text="friend.ref.displayName" :style="{'color':friend.ref.$userColour}")
span.extra(v-text="friend.ref.statusDescription")
template(v-else)
span(v-text="friend.name || friend.id")
el-button(type="text" icon="el-icon-close" size="mini" @click.stop="confirmDeleteFriend(friend.id)" style="margin-left:5px")
span.name
span(v-text="instance.$group.name")
span(style="font-weight:normal;margin-left:5px") ({{ instance.userCount }}/{{ instance.capacity }})
location.extra(:location="instance.location" :link="false")
//- ## Dialogs ## -\\

View File

@@ -477,8 +477,8 @@
"search_result_more": "Search More:",
"direct_access_tooltip": "Direct access ID/URL from clipboard",
"refresh_tooltip": "Refresh friends",
"friends": "FRIENDS",
"groups": "GROUPS",
"groups": "Group Instances",
"friends": "Friends",
"me": "ME",
"favorite": "FAVORITES",
"online": "ONLINE",

View File

@@ -31,7 +31,7 @@ mixin settingsTab()
.x-container(v-show="$refs.menu && $refs.menu.activeIndex === 'settings'")
div.options-container(style="margin-top:0")
span.header {{ $t("view.settings.header") }}
el-tabs(type="card" style="margin-top:10px")
el-tabs(type="card" style="height: calc(100vh - 51px")
el-tab-pane(:label="$t('view.settings.category.general')")
//- General | General
div.options-container(style="margin-top:0")