Skip to content

Commit

Permalink
v1.6.3
Browse files Browse the repository at this point in the history
  • Loading branch information
050644zf committed Apr 17, 2024
1 parent 4506ebe commit 8c54bda
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 4 deletions.
2 changes: 2 additions & 0 deletions reader/src/ASTRv2/components/opcard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ export default {
background-color: rgba(0,0,0,0.2);
}
.n-tag{
font-family: sans-serif;
font-weight: bold;
Expand Down
3 changes: 2 additions & 1 deletion reader/src/ASTRv2/components/openInGTL.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ export default {
methods:{
openInGTL(){
var target_lang = this.UILang.replace(/_/g, "-");
var server_lang = this.$route.params.server.replace(/_/g, "-");
if(target_lang== 'zh_CN') target_lang = 'en';
var url = `https://050644zf-github-io.translate.goog/ArknightsStoryTextReader/?_x_tr_sl=zh-CN&_x_tr_tl=${target_lang}&_x_tr_hl=zh-CN&_x_tr_pto=wapp&_x_tr_hist=true#${this.$route.fullPath}`
var url = `https://astr-pages-dev.translate.goog/?_x_tr_sl=${server_lang}&_x_tr_tl=${target_lang}&_x_tr_hl=${target_lang}&_x_tr_pto=wapp&_x_tr_hist=true#${this.$route.fullPath}`
window.open(url, '_blank');
}
}
Expand Down
2 changes: 1 addition & 1 deletion reader/src/ASTRv2/contentpage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</n-h4>
<n-skeleton v-if="loading" :repeat="5"></n-skeleton>
<div v-else class="lines">
<OpenInGTL v-if="server=='zh_CN'"/>
<!-- <OpenInGTL v-if="server=='zh_CN'"/> -->
<Paging :storyIdx="storyIdx" :storyOpts="storyOpts" v-if="!loading"></Paging>
<div v-for="(line, lidx) in data.storyList" :key="line.id"
class="line" :id="'line'+line.id" :style="{'margin-bottom':margin +'px'}">
Expand Down
22 changes: 21 additions & 1 deletion reader/src/ASTRv2/header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@

<n-space justify="space-around" item-style="display: flex;" align="center">
<Warp v-if="loaded"/>
<n-tooltip trigger="hover" v-if="server!=UILang">
<template #trigger>
<n-button quaternary @click="openInGTL()">
<n-icon size="24">
<TranslateIcon/>
</n-icon>
</n-button>
</template>
{{i18n.openInGoogleTL[UILang]}}
</n-tooltip>

<n-dropdown :options="serverOpts" @select="pushServer" class="serverSelect" role="button" :node-props="() => {return {'role': 'button'};}">
<n-button text>
<template #icon>
Expand All @@ -52,7 +63,7 @@
</template>

<script>
import { LanguageRound, ArrowDropDownSharp, SettingsOutlined } from "@vicons/material";
import { LanguageRound, ArrowDropDownSharp, SettingsOutlined,TranslateOutlined } from "@vicons/material";
import i18n from './i18n.json';
import func from './func.js';
import settings from './settings.vue';
Expand All @@ -65,6 +76,7 @@ export default {
i18n: i18n,
showsettings: false,
server: this.$route.params.server,
UILang: func.l
}
},
props: ['loaded'],
Expand All @@ -82,6 +94,7 @@ export default {
LangIcon:LanguageRound,
ArrowDropDown:ArrowDropDownSharp,
SettingsIcon:SettingsOutlined,
TranslateIcon:TranslateOutlined,
Settings: settings,
Warp: warp,
},
Expand All @@ -102,6 +115,13 @@ export default {
async pushServer(server){
this.$emit('pushServer', {server: server});
},
openInGTL(){
var target_lang = this.UILang.replace(/_/g, "-");
var server_lang = this.$route.params.server.replace(/_/g, "-");
if(target_lang== 'zh_CN') target_lang = 'en';
var url = `https://astr-pages-dev.translate.goog/?_x_tr_sl=${server_lang}&_x_tr_tl=${target_lang}&_x_tr_hl=${server_lang}&_x_tr_pto=wapp&_x_tr_hist=true#${this.$route.fullPath}`
window.open(url, '_blank');
}
}
}
</script>
Expand Down
4 changes: 4 additions & 0 deletions reader/src/ASTRv2/menupage/homepage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<br/><br/>
我们注意到火狐浏览器存在兼容性问题,请使用Chrome、Edge或任何基于Chromium的浏览器以获得更好的体验。
</n-alert>
<n-alert type="info" >
欢迎访问我们的新域名 / Welcome to our new domain:
<n-a href="https://astr.pages.dev">astr.pages.dev</n-a>
</n-alert>
<br/>
<n-h1 prefix="bar">
欢迎访问明日方舟剧情文本阅读器!<br />
Expand Down
6 changes: 5 additions & 1 deletion reader/src/ASTRv2/menupage/or.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<n-flex class="oplist" justify="center" align="top">
<TransitionGroup name="list">
<div v-for="(cdata, cidx) in getCharList" :key="cdata.charID">
<n-card class="optile" content-style="padding: 0px;" style="display: flex; justify: center; align-items: center;" hoverable @click="showCard(cdata.charID)" >
<n-card class="optile" content-style="padding: 0px;" style="display: flex; justify: center; align-items: center;" hoverable @click="showCard(cdata.charID)" >
<template #cover>
<n-image
:src="getAvatarUrl(cdata.charID)"
Expand Down Expand Up @@ -201,6 +201,10 @@ export default{
align-items: center;
}
.optile:hover{
box-shadow: 0px 0px 10px rgba(255,255,255,0.5);
}
.optile .opcard-name{
max-width: 72px;
Expand Down

0 comments on commit 8c54bda

Please sign in to comment.