|
|
@@ -1,8 +1,7 @@
|
|
|
-<script setup>
|
|
|
+锘�<script setup>
|
|
|
import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'
|
|
|
import lottie from 'lottie-web'
|
|
|
import { clearSession, loadSession, logout, saveSession, socialLogin } from './services/auth'
|
|
|
-import { loadHomeScenes } from './services/home-scenes'
|
|
|
import { disableGoogleAutoSelect, parseGoogleCredential, renderGoogleSignInButton } from './google-auth.js'
|
|
|
import {
|
|
|
clearStoredAppleAuthState,
|
|
|
@@ -40,12 +39,12 @@ const authStatus = ref('')
|
|
|
|
|
|
const languageOptions = [
|
|
|
{ value: 'en', label: 'English' },
|
|
|
- { value: 'zh', label: '中文' },
|
|
|
+ { value: 'zh', label: '涓�枃' },
|
|
|
]
|
|
|
|
|
|
-const heroScene = computed(() => scenes.value.find((scene) => scene.id === '自锁带点动') ?? null)
|
|
|
-const interactiveScenes = computed(() => scenes.value.filter((scene) => scene.id === '家庭双控'))
|
|
|
-const simulationScenes = computed(() => scenes.value.filter((scene) => scene.id === '工业自锁'))
|
|
|
+const heroScene = computed(() => scenes.value.find((scene) => scene.id === '鑷�攣甯︾偣鍔�') ?? null)
|
|
|
+const interactiveScenes = computed(() => scenes.value.filter((scene) => scene.id === '瀹跺涵鍙屾帶'))
|
|
|
+const simulationScenes = computed(() => scenes.value.filter((scene) => scene.id === '宸ヤ笟鑷�攣'))
|
|
|
const isAuthenticated = computed(() => Boolean(session.value?.token))
|
|
|
|
|
|
function openProDestination() {
|
|
|
@@ -367,7 +366,6 @@ async function confirmLogout() {
|
|
|
}
|
|
|
|
|
|
onMounted(async () => {
|
|
|
- scenes.value = await loadHomeScenes()
|
|
|
await mountAllAnimations()
|
|
|
document.addEventListener('click', handleDocumentClick)
|
|
|
window.addEventListener('message', handleAppleCallbackMessage)
|
|
|
@@ -491,70 +489,70 @@ const copy = {
|
|
|
footerPrivacy: 'Privacy Policy',
|
|
|
},
|
|
|
zh: {
|
|
|
- login: '登录',
|
|
|
- heroTitle: 'Simubus - 电气接线仿真软件',
|
|
|
- heroSubtitle: '你的虚拟电气实验室。',
|
|
|
- iosDownload: 'iOS 下载',
|
|
|
- androidDownload: 'Android 下载',
|
|
|
- featureOneTitle: '交互式电路设计体验',
|
|
|
- featureOneBody: '通过直观、易用的拖拽方式构建复杂电路。',
|
|
|
- featureTwoTitle: '实时仿真',
|
|
|
- featureTwoBody: '一键启动高精度电路仿真。',
|
|
|
- componentsTitle: '元器件',
|
|
|
- componentsSubtitle: '上百个元器件 随心体验',
|
|
|
- componentAltPrefix: '元器件',
|
|
|
+ login: '鐧诲綍',
|
|
|
+ heroTitle: 'Simubus - 鐢垫皵鎺ョ嚎浠跨湡杞�欢',
|
|
|
+ heroSubtitle: '浣犵殑铏氭嫙鐢垫皵瀹為獙瀹ゃ€�',
|
|
|
+ iosDownload: 'iOS 涓嬭浇',
|
|
|
+ androidDownload: 'Android 涓嬭浇',
|
|
|
+ featureOneTitle: '浜や簰寮忕數璺��璁′綋楠�',
|
|
|
+ featureOneBody: '閫氳繃鐩磋�銆佹槗鐢ㄧ殑鎷栨嫿鏂瑰紡鏋勫缓澶嶆潅鐢佃矾銆�',
|
|
|
+ featureTwoTitle: '瀹炴椂浠跨湡',
|
|
|
+ featureTwoBody: '涓€閿�惎鍔ㄩ珮绮惧害鐢佃矾浠跨湡銆�',
|
|
|
+ componentsTitle: '鍏冨櫒浠�',
|
|
|
+ componentsSubtitle: '涓婄櫨涓�厓鍣ㄤ欢 闅忓績浣撻獙',
|
|
|
+ componentAltPrefix: '鍏冨櫒浠�',
|
|
|
components: {
|
|
|
- heatingTube: '加热管',
|
|
|
- safetyRelay: '安全继电器',
|
|
|
- selectorSwitch: '选择开关',
|
|
|
- limitSwitch: '限位开关',
|
|
|
- temperatureController: '温度控制器',
|
|
|
- automaticTransferSwitch: '双电源自动转换开关',
|
|
|
+ heatingTube: '鍔犵儹绠�',
|
|
|
+ safetyRelay: '瀹夊叏缁х數鍣�',
|
|
|
+ selectorSwitch: '閫夋嫨寮€鍏�',
|
|
|
+ limitSwitch: '闄愪綅寮€鍏�',
|
|
|
+ temperatureController: '娓╁害鎺у埗鍣�',
|
|
|
+ automaticTransferSwitch: '鍙岀數婧愯嚜鍔ㄨ浆鎹㈠紑鍏�',
|
|
|
},
|
|
|
- benefitsTitle: '为什么选择 Simubus',
|
|
|
+ benefitsTitle: '涓轰粈涔堥€夋嫨 Simubus',
|
|
|
benefits: {
|
|
|
- secure: { title: '安全可靠', body: '你的项目会安全存储在云端,并定期备份。你的数据隐私是我们的首要任务。' },
|
|
|
- professional: { title: '职业级', body: '行业标准的仿真引擎为教育和专业用途提供准确结果。' },
|
|
|
- crossPlatform: { title: '跨平台', body: '在桌面、平板和移动设备上无缝运行。你的模拟会跟随你走到哪里。' },
|
|
|
- cloud: { title: '基于云平台', body: '无需安装。随时随地,直接从浏览器访问强大的模拟工具。' },
|
|
|
+ secure: { title: '瀹夊叏鍙�潬', body: '浣犵殑椤圭洰浼氬畨鍏ㄥ瓨鍌ㄥ湪浜戠�锛屽苟瀹氭湡澶囦唤銆備綘鐨勬暟鎹�殣绉佹槸鎴戜滑鐨勯�瑕佷换鍔°€�' },
|
|
|
+ professional: { title: '鑱屼笟绾�', body: '琛屼笟鏍囧噯鐨勪豢鐪熷紩鎿庝负鏁欒偛鍜屼笓涓氱敤閫旀彁渚涘噯纭�粨鏋溿€�' },
|
|
|
+ crossPlatform: { title: '璺ㄥ钩鍙�', body: '鍦ㄦ�闈€€佸钩鏉垮拰绉诲姩璁惧�涓婃棤缂濊繍琛屻€備綘鐨勬ā鎷熶細璺熼殢浣犺蛋鍒板摢閲屻€�' },
|
|
|
+ cloud: { title: '鍩轰簬浜戝钩鍙�', body: '鏃犻渶瀹夎�銆傞殢鏃堕殢鍦帮紝鐩存帴浠庢祻瑙堝櫒璁块棶寮哄ぇ鐨勬ā鎷熷伐鍏枫€�' },
|
|
|
},
|
|
|
- footerSlogan: '你的虚拟电路实验室。',
|
|
|
- quickLinksTitle: '快速链接',
|
|
|
- quickLinks: ['首页', '隐私政策', '使用条款', '订阅条款', '下载 APP'],
|
|
|
- contactTitle: '联系我们',
|
|
|
- contactBody: '有问题或建议吗?我们很期待听到你的声音。',
|
|
|
- copyright: 'Copyright ? 2025 Simubus 保留所有权利。',
|
|
|
- languageButton: '中文',
|
|
|
- iosQrAlt: 'iOS 下载二维码',
|
|
|
- androidQrAlt: 'Android 下载二维码',
|
|
|
- heroPreviewAlt: 'Simubus 接线仿真预览图',
|
|
|
- modalTitle: '登录 Simubus',
|
|
|
- modalPrefix: '继续即表示你同意 Simubus 的',
|
|
|
- modalTerms: '使用条款',
|
|
|
- modalMiddle: '和',
|
|
|
- modalPrivacy: '隐私政策',
|
|
|
- modalSuffix: '。新用户将自动注册。',
|
|
|
- modalGoogle: '使用 Google 继续',
|
|
|
- modalApple: '使用 Apple 继续',
|
|
|
- googleLoading: '正在加载 Google 登录...',
|
|
|
- googleSigningIn: '正在登录...',
|
|
|
- googleInitFailed: 'Google 登录初始化失败。',
|
|
|
- googleLoginFailed: 'Google 登录失败,请重试。',
|
|
|
- googleMissingCredential: 'Google 没有返回登录凭证。',
|
|
|
- appleLoading: '正在加载 Apple 登录...',
|
|
|
- appleSigningIn: '正在通过 Apple 登录...',
|
|
|
- appleLoginFailed: 'Apple 登录失败,请重试。',
|
|
|
- appleMissingCredential: 'Apple 没有返回登录凭证。',
|
|
|
- appleStateMismatch: 'Apple 登录状态校验失败,请重试。',
|
|
|
- logoutTitle: '确定要退出登录吗?',
|
|
|
- logoutAction: '退出当前账号',
|
|
|
- topbarUnlock: '解锁',
|
|
|
- cancel: '取消',
|
|
|
+ footerSlogan: '浣犵殑铏氭嫙鐢佃矾瀹為獙瀹ゃ€�',
|
|
|
+ quickLinksTitle: '蹇�€熼摼鎺�',
|
|
|
+ quickLinks: ['棣栭〉', '闅愮�鏀跨瓥', '浣跨敤鏉℃�', '璁㈤槄鏉℃�', '涓嬭浇 APP'],
|
|
|
+ contactTitle: '鑱旂郴鎴戜滑',
|
|
|
+ contactBody: '鏈夐棶棰樻垨寤鸿�鍚楋紵鎴戜滑寰堟湡寰呭惉鍒颁綘鐨勫0闊炽€�',
|
|
|
+ copyright: 'Copyright ? 2025 Simubus 淇濈暀鎵€鏈夋潈鍒┿€�',
|
|
|
+ languageButton: '涓�枃',
|
|
|
+ iosQrAlt: 'iOS 涓嬭浇浜岀淮鐮�',
|
|
|
+ androidQrAlt: 'Android 涓嬭浇浜岀淮鐮�',
|
|
|
+ heroPreviewAlt: 'Simubus 鎺ョ嚎浠跨湡棰勮�鍥�',
|
|
|
+ modalTitle: '鐧诲綍 Simubus',
|
|
|
+ modalPrefix: '缁х画鍗宠〃绀轰綘鍚屾剰 Simubus 鐨�',
|
|
|
+ modalTerms: '浣跨敤鏉℃�',
|
|
|
+ modalMiddle: '鍜�',
|
|
|
+ modalPrivacy: '闅愮�鏀跨瓥',
|
|
|
+ modalSuffix: '銆傛柊鐢ㄦ埛灏嗚嚜鍔ㄦ敞鍐屻€�',
|
|
|
+ modalGoogle: '浣跨敤 Google 缁х画',
|
|
|
+ modalApple: '浣跨敤 Apple 缁х画',
|
|
|
+ googleLoading: '姝e湪鍔犺浇 Google 鐧诲綍...',
|
|
|
+ googleSigningIn: '姝e湪鐧诲綍...',
|
|
|
+ googleInitFailed: 'Google 鐧诲綍鍒濆�鍖栧け璐ャ€�',
|
|
|
+ googleLoginFailed: 'Google 鐧诲綍澶辫触锛岃�閲嶈瘯銆�',
|
|
|
+ googleMissingCredential: 'Google 娌℃湁杩斿洖鐧诲綍鍑�瘉銆�',
|
|
|
+ appleLoading: '姝e湪鍔犺浇 Apple 鐧诲綍...',
|
|
|
+ appleSigningIn: '姝e湪閫氳繃 Apple 鐧诲綍...',
|
|
|
+ appleLoginFailed: 'Apple 鐧诲綍澶辫触锛岃�閲嶈瘯銆�',
|
|
|
+ appleMissingCredential: 'Apple 娌℃湁杩斿洖鐧诲綍鍑�瘉銆�',
|
|
|
+ appleStateMismatch: 'Apple 鐧诲綍鐘舵€佹牎楠屽け璐ワ紝璇烽噸璇曘€�',
|
|
|
+ logoutTitle: '纭�畾瑕侀€€鍑虹櫥褰曞悧锛�',
|
|
|
+ logoutAction: '閫€鍑哄綋鍓嶈处鍙�',
|
|
|
+ topbarUnlock: '瑙i攣',
|
|
|
+ cancel: '鍙栨秷',
|
|
|
profileName: 'Andy',
|
|
|
profileEmail: '56998882589@gmail.com',
|
|
|
- language: '中文',
|
|
|
- footerTerms: '使用条款',
|
|
|
- footerPrivacy: '隐私政策',
|
|
|
+ language: '涓�枃',
|
|
|
+ footerTerms: '浣跨敤鏉℃�',
|
|
|
+ footerPrivacy: '闅愮�鏀跨瓥',
|
|
|
},
|
|
|
}
|
|
|
|
|
|
@@ -562,7 +560,7 @@ const messages = computed(() => copy[currentLocale.value])
|
|
|
const logoutBodyText = computed(() => {
|
|
|
const email = session.value?.email || messages.value.profileEmail
|
|
|
return currentLocale.value === 'zh'
|
|
|
- ? `你要退出 ${email} 的 Simubus 账号吗?`
|
|
|
+ ? `浣犺�閫€鍑� ${email} 鐨� Simubus 璐﹀彿鍚楋紵`
|
|
|
: `Do you want to log out of Simubus as ${email}?`
|
|
|
})
|
|
|
</script>
|
|
|
@@ -620,9 +618,9 @@ const logoutBodyText = computed(() => {
|
|
|
|
|
|
<p class="login-modal__footer-links">
|
|
|
<a href="/">{{ messages.footerTerms }}</a>
|
|
|
- <span>·</span>
|
|
|
+ <span>路</span>
|
|
|
<a href="/">{{ messages.footerPrivacy }}</a>
|
|
|
- <span>·</span>
|
|
|
+ <span>路</span>
|
|
|
<a href="/">{{ messages.footerPrivacy }}</a>
|
|
|
</p>
|
|
|
</div>
|
|
|
@@ -789,7 +787,7 @@ const logoutBodyText = computed(() => {
|
|
|
|
|
|
<div v-if="loginModalOpen" class="login-modal-backdrop" @click="closeLoginModal">
|
|
|
<section class="login-modal" @click.stop>
|
|
|
- <button class="login-modal__close" type="button" @click="closeLoginModal">×</button>
|
|
|
+ <button class="login-modal__close" type="button" @click="closeLoginModal">脳</button>
|
|
|
|
|
|
<div class="login-modal__brand-block">
|
|
|
<img class="login-modal__brand-image" src="https://www.figma.com/api/mcp/asset/09fe7be0-48bc-4e45-a5f9-d561c79593d5" alt="Simubus" />
|
|
|
@@ -830,7 +828,7 @@ const logoutBodyText = computed(() => {
|
|
|
|
|
|
<div v-if="logoutModalOpen" class="login-modal-backdrop" @click="closeLogoutModal">
|
|
|
<section class="login-modal login-modal--logout" @click.stop>
|
|
|
- <button class="login-modal__close" type="button" @click="closeLogoutModal">×</button>
|
|
|
+ <button class="login-modal__close" type="button" @click="closeLogoutModal">脳</button>
|
|
|
<h2 class="login-modal__panel-title">{{ messages.logoutTitle }}</h2>
|
|
|
<p class="login-modal__panel-copy">{{ logoutBodyText }}</p>
|
|
|
<button class="login-modal__ghost-button" type="button" @click="confirmLogout">{{ messages.logoutAction }}</button>
|