Skip to content

Commit

Permalink
perf(global): no data tips (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinHsu authored Aug 31, 2023
1 parent 7929c18 commit 0962ce5
Show file tree
Hide file tree
Showing 4 changed files with 241 additions and 161 deletions.
11 changes: 7 additions & 4 deletions src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
globalNotify: {
refresh: {
succeed: 'Refresh Successful!\nEnjoy the feeling',
flowFailed: 'Refresh flow of {name} failed',
flowFailed: 'Refresh flow of {name} failed!',
failed: 'Refresh Failed\n',
loading: 'Refreshing Data...',
},
Expand Down Expand Up @@ -36,7 +36,7 @@ export default {
'Upload your subscriptions to a private Gist, which can be accessed at any time on devices that do not run the Sub Store (e.g. routers, etc.).',
},
subEditor: {
title: 'Download no subscription',
title: 'Download no subscription?',
content: 'Try replacing UA· Download. The default isQuanX UA',
},
moreSetting: {
Expand Down Expand Up @@ -69,9 +69,12 @@ export default {
},
loadFailed: {
title: 'Load data failed',
desc: 'Please check MITMRewrite and others in Proxy Tool',
desc: 'Please check MITM, Rewrite and others in Proxy Tool',
btn: 'Retry',
doc: 'Visit Sub-Store Docs',
followOfficialChannel:
'You can also follow Sub-Store official channel and join the group to ask questions',
officialChannel: 'Official channel:',
},
collectionItem: {
noSub: 'Not contains subscription',
Expand Down Expand Up @@ -119,7 +122,7 @@ export default {
helpContent:
'Proxy node actions will be executed in order, and you can drag and drop to sort them.\n\nThe preview switch is used to control whether the action takes effect in the instant preview.\n\nPlease note that node actions will be saved and take effect regardless of whether the preview switch is on or off.',
helpBtn: 'I Understand',
errorTitle: 'Submit Error',
errorTitle: 'Submit Error!',
errorBtn: 'OK',
succeedMsg: 'Save Successfully!',
deleteTitle: 'Delete Confirm',
Expand Down
12 changes: 7 additions & 5 deletions src/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default {
},
subEditor: {
title: '下载不了订阅?',
content: '尝试更换 UA 下载试试,默认为QuanX UA',
content: '尝试更换 UA 下载试试,默认为 QuanX UA',
},
moreSetting: {
title: '遇到问题?',
Expand Down Expand Up @@ -72,6 +72,8 @@ export default {
desc: '请检查代理工具的 MITM、Rewrite 等配置',
btn: '重试',
doc: '查看 Sub-Store 教程',
followOfficialChannel: '或关注 Sub-Store 官方频道并进群提问',
officialChannel: '官方频道:',
},
collectionItem: {
noSub: '没有包含子订阅',
Expand Down Expand Up @@ -521,21 +523,21 @@ export default {
other: '其他设置',
auto: '启动时自动下载 Gist 配置',
desc: `注意事项:开启此开关会在打开 SubStore 时自动下载 Gist 远程配置并刷新。
刷新操作会覆盖当前配置,为防止数据丢失,可在修改后手动上传配置。
刷新操作会覆盖当前配置,为防止数据丢失,可在修改后手动上传配置。
打开开关不会上传,只有在重启后才会下载配置。`,
simple: '简洁模式',
islr: '卡片右滑呼出',
isIC: '使用订阅图标原始颜色',
isEditorCommon: '展示编辑页常用配置',
isSimpleReicon: '展示订阅刷新按钮',
tabBar: '隐藏 “Gist 同步” 页',
tabBar: '隐藏“Gist 同步”页',
auto2: '自定义设置 Key',
hostapi: '自定义后端 API',
currentHostApi: '当前后端 API',
yhostapi: '默认:https://sub.store ',
serverDesc: `配置后端服务器地址, 例如 VPS 或 Render 上搭建的后端服务。
serverDesc: `配置后端服务器地址例如 VPS 或 Render 上搭建的后端服务。
配置后需要重启 Sub Store 以生效。如需删除 api,
使用原本的 ’默认后端‘ 需要手动删除地址后点击保存。可以跳转链接 查看 小一佬的后端搭建教程:`,
使用原本的’默认后端‘需要手动删除地址后点击保存。可以跳转链接 查看 小一佬的后端搭建教程:`,
InputHostApi: {
title: '链接验证失败 或无效链接',
content:
Expand Down
11 changes: 10 additions & 1 deletion src/views/Sub.vue
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,19 @@

<!--数据加载失败-->
<div v-if="!isLoading && !fetchResult" class="no-data-wrapper">
<nut-empty image="error">
<nut-empty image="error" style="padding: 32px 30px">
<template #description>
<h3>{{ $t(`subPage.loadFailed.title`) }}</h3>
<p>{{ $t(`subPage.loadFailed.desc`) }}</p>
<p>{{ $t(`subPage.loadFailed.followOfficialChannel`) }}</p>
<p>
{{ $t(`subPage.loadFailed.officialChannel`) }}
<a
href="https://t.me/cool_scripts"
style="color: var(--primary-color)"
>Cool Scripts</a
>
</p>
</template>
</nut-empty>
<nut-button icon="refresh" type="primary" @click="refresh">{{
Expand Down
Loading

0 comments on commit 0962ce5

Please sign in to comment.