mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-28 02:47:22 +08:00
✨ feat: 在页面显示 github地址
This commit is contained in:
@@ -1,8 +1,6 @@
|
|||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
|
|
||||||
import { getMusicLrc } from '@/api/music';
|
|
||||||
import store from '@/store';
|
import store from '@/store';
|
||||||
import { ILyric } from '@/type/lyric';
|
|
||||||
import type { ILyricText, SongResult } from '@/type/music';
|
import type { ILyricText, SongResult } from '@/type/music';
|
||||||
|
|
||||||
const windowData = window as any;
|
const windowData = window as any;
|
||||||
|
|||||||
@@ -35,6 +35,14 @@
|
|||||||
/>
|
/>
|
||||||
<div v-else class="mx-2 rounded-full cursor-pointer text-sm" @click="toLogin">登录</div>
|
<div v-else class="mx-2 rounded-full cursor-pointer text-sm" @click="toLogin">登录</div>
|
||||||
</div>
|
</div>
|
||||||
|
<n-tooltip v-if="!isElectron">
|
||||||
|
<template #trigger>
|
||||||
|
<div class="github" @click="toGithub">
|
||||||
|
<i class="ri-github-fill"></i>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<div>前往 Github</div>
|
||||||
|
</n-tooltip>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -45,6 +53,7 @@ import { useStore } from 'vuex';
|
|||||||
import { getSearchKeyword } from '@/api/home';
|
import { getSearchKeyword } from '@/api/home';
|
||||||
import { getUserDetail, logout } from '@/api/login';
|
import { getUserDetail, logout } from '@/api/login';
|
||||||
import { SEARCH_TYPES, USER_SET_OPTIONS } from '@/const/bar-const';
|
import { SEARCH_TYPES, USER_SET_OPTIONS } from '@/const/bar-const';
|
||||||
|
import { isElectron } from '@/hooks/MusicHook';
|
||||||
import { getImgUrl } from '@/utils';
|
import { getImgUrl } from '@/utils';
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -135,6 +144,10 @@ const selectItem = async (key: string) => {
|
|||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const toGithub = () => {
|
||||||
|
window.open('https://github.com/algerkong/AlgerMusicPlayer', '_blank');
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@@ -154,4 +167,8 @@ const selectItem = async (key: string) => {
|
|||||||
@apply pl-4;
|
@apply pl-4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.github {
|
||||||
|
@apply cursor-pointer text-gray-100 hover:text-gray-400 text-xl ml-4 rounded-full border border-gray-600 flex justify-center items-center px-2;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user