From 580ed6b18a403390b87209dcdd830c696c80d2fa Mon Sep 17 00:00:00 2001 From: Hawtim Zhang Date: Thu, 22 Oct 2020 00:19:54 +0800 Subject: [PATCH] fix: same text search on enter will cause error (#34) * feat: add config to resolve path alias. * feat: use vue-i18n for language switch * feat: add .editorconfig for ide * fix: add no-referrer to avoid CROB * fix: setCookie and fix typo * feat: integrate vue-i18n * feat: player component i18n support * fix: duplicate key warning in explore page * fix: like songs number changed in library page * fire: remove todo * fix: same text search on enter will cause error --- src/components/Navbar.vue | 3 ++- src/locale/lang/en.js | 1 - src/locale/lang/zh-CN.js | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/Navbar.vue b/src/components/Navbar.vue index 9127d6b..afa9d2f 100644 --- a/src/components/Navbar.vue +++ b/src/components/Navbar.vue @@ -70,7 +70,8 @@ export default { else this.$router.go(1); }, goToSearchPage() { - if(!this.keywords) return; + if (!this.keywords) return; + if (this.$route.name === 'search' && this.$route.query.keywords === this.keywords) return; this.$router.push({ name: "search", query: { keywords: this.keywords }, diff --git a/src/locale/lang/en.js b/src/locale/lang/en.js index 28cdc98..3af4d89 100644 --- a/src/locale/lang/en.js +++ b/src/locale/lang/en.js @@ -57,7 +57,6 @@ export default { login: "Login", loginWithEmail: "Login with Email", loginWithPhone: "Login with Phone", - // TODO notice: `YesPlayMusic promises not to save any of your account information to the cloud.
Your password will be MD5 encrypted locally and then transmitted to NetEase Cloud API.
YesPlayMusic is not the official website of NetEase Cloud Music, please consider carefully before entering account information. You can also go to YesPlayMusic's GitHub repository to build and use the self-hosted NetEase Cloud Music API.` diff --git a/src/locale/lang/zh-CN.js b/src/locale/lang/zh-CN.js index fd2ee5c..9684433 100644 --- a/src/locale/lang/zh-CN.js +++ b/src/locale/lang/zh-CN.js @@ -57,7 +57,6 @@ export default { login: "登录", loginWithEmail: "使用邮箱登录", loginWithPhone: "使用手机号登录", - // TODO notice: ` YesPlayMusic 承诺不会保存你的任何账号信息到云端。
你的密码会在本地进行 MD5 加密后再传输到网易云 API。