Skip to content

Commit

Permalink
Fix wait for user login
Browse files Browse the repository at this point in the history
  • Loading branch information
HeHang0 committed Mar 17, 2024
1 parent d8e9186 commit fd7f8c1
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
15 changes: 8 additions & 7 deletions web/src/components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,15 @@ onUnmounted(unWatch);
v-show="setting.currentMusicTypeShow"
:value="setting.currentMusicType"
size="large"
@change="changeMusicType"
style="margin-right: 12px" />
@change="changeMusicType" />
</div>
<div class="music-header-operate">
<span class="music-icon" @click="push('/setting')" title="设置">
<div
class="music-header-operate"
v-if="isWindows && webView2Services.enabled">
<!-- <span class="music-icon" @click="push('/setting')" title="设置">
</span>
<WindowControls v-if="isWindows && webView2Services.enabled" />
</span> -->
<WindowControls />
</div>
</el-header>
</template>
Expand Down Expand Up @@ -152,7 +153,7 @@ onUnmounted(unWatch);
width: calc(100% - 13px);
}
button + &-search {
width: calc(100% - 50px);
width: calc(100% - 38px);
}
.el-radio-group {
width: 100%;
Expand Down
17 changes: 16 additions & 1 deletion web/src/components/SideMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,21 @@ function toHome() {
</div>
</el-dialog>
</el-scrollbar>
<ul
role="menubar"
class="el-menu el-menu--vertical music-aside-menu"
style="--el-menu-level: 0"
@click="push('/setting')">
<li
class="el-menu-item"
:class="route.meta.key == 'setting' ? 'is-active' : ''"
role="menuitem"
tabindex="-1"
id="/setting">
<span class="music-icon">设</span>
<span>设置</span>
</li>
</ul>
</el-aside>
</template>
<style lang="less" scoped>
Expand All @@ -212,7 +227,7 @@ function toHome() {
background: transparent !important;
}
& > .el-scrollbar {
height: calc(100% - 80px);
height: calc(100% - 145px);
}
&-title {
height: 80px;
Expand Down
3 changes: 3 additions & 0 deletions web/src/views/playlist.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ async function searchMusic(clear: boolean = true) {
break;
case 'playlist':
loading.value = true;
if (playlistId === 'daily') {
await setting.waitLoaded();
}
result = await api.playlistDetail(
musicType,
playlistId,
Expand Down
1 change: 1 addition & 0 deletions web/src/views/recommend.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ async function getPlaylist(clear: boolean = true) {
loading.value = true;
let result = null;
if (key === 'yours') {
await setting.waitLoaded();
result = await api.yours(setting.currentMusicType, playlist.value.length);
} else {
result = await api.recommend(
Expand Down

0 comments on commit fd7f8c1

Please sign in to comment.