fix(electron): update electron login page

master
qier222 4 years ago
parent f68ae5c078
commit 95aa6e176c

@ -68,6 +68,8 @@ export default {
notice: `YesPlayMusic promises not to save any of your account information to the cloud.<br /> notice: `YesPlayMusic promises not to save any of your account information to the cloud.<br />
Your password will be MD5 encrypted locally and then transmitted to NetEase Music API.<br /> Your password will be MD5 encrypted locally and then transmitted to NetEase Music API.<br />
YesPlayMusic is not the official website of NetEase Music, please consider carefully before entering account information. You can also go to <a href="https://github.com/qier222/YesPlayMusic">YesPlayMusic's GitHub repository</a> to build and use the self-hosted NetEase Music API.`, YesPlayMusic is not the official website of NetEase Music, please consider carefully before entering account information. You can also go to <a href="https://github.com/qier222/YesPlayMusic">YesPlayMusic's GitHub repository</a> to build and use the self-hosted NetEase Music API.`,
noticeElectron: `Your password will be MD5 encrypted locally and then transmitted to NetEase Music API.<br />
YesPlayMusic promises not to save any of your account information to the cloud.<br />`,
}, },
mv: { mv: {
moreVideo: "More Videos", moreVideo: "More Videos",

@ -62,14 +62,15 @@ export default {
login: "登录", login: "登录",
loginWithEmail: "使用邮箱登录", loginWithEmail: "使用邮箱登录",
loginWithPhone: "使用手机号登录", loginWithPhone: "使用手机号登录",
notice: ` notice: `YesPlayMusic 承诺不会保存你的任何账号信息到云端。<br />
YesPlayMusic 承诺不会保存你的任何账号信息到云端<br />
你的密码会在本地进行 MD5 加密后再传输到网易云 API<br /> 你的密码会在本地进行 MD5 加密后再传输到网易云 API<br />
YesPlayMusic 并非网易云官方网站输入账号信息前请慎重考虑 你也可以前往 YesPlayMusic 并非网易云官方网站输入账号信息前请慎重考虑 你也可以前往
<a href="https://github.com/qier222/YesPlayMusic" <a href="https://github.com/qier222/YesPlayMusic"
>YesPlayMusic GitHub 源代码仓库</a >YesPlayMusic GitHub 源代码仓库</a
> >
自行构建并使用自托管的网易云 API`, 自行构建并使用自托管的网易云 API`,
noticeElectron: `你的密码会在本地进行 MD5 加密后再传输到网易云 API。<br />
YesPlayMusic 不会传输你的账号数据到任何非网易云音乐官方的服务器<br />`,
}, },
mv: { mv: {
moreVideo: "更多视频", moreVideo: "更多视频",

@ -128,9 +128,12 @@ router.beforeEach((to, from, next) => {
if (isLooseLoggedIn()) { if (isLooseLoggedIn()) {
next(); next();
} else { } else {
if (process.env.IS_ELECTRON === true) next({ path: "/login/account" }); if (process.env.IS_ELECTRON === true) {
next({ path: "/login/account" });
} else {
next({ path: "/login" }); next({ path: "/login" });
} }
}
} else { } else {
next(); next();
} }

@ -79,7 +79,10 @@
$t("login.loginWithPhone") $t("login.loginWithPhone")
}}</a> }}</a>
</div> </div>
<div class="notice" v-html="$t('login.notice')"></div> <div
class="notice"
v-html="isElectron ? $t('login.noticeElectron') : $t('login.notice')"
></div>
</div> </div>
</template> </template>
@ -104,6 +107,11 @@ export default {
inputFocus: "", inputFocus: "",
}; };
}, },
computed: {
isElectron() {
return process.env.IS_ELECTRON;
},
},
created() { created() {
if (this.$route.query.mode === "phone") { if (this.$route.query.mode === "phone") {
this.mode = "phone"; this.mode = "phone";
@ -197,6 +205,7 @@ export default {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center;
min-height: calc(100vh - 192px); min-height: calc(100vh - 192px);
} }

Loading…
Cancel
Save