Skip to content

Commit

Permalink
feat: 文件功能(后端 > 2.14.143)
Browse files Browse the repository at this point in the history
  • Loading branch information
xream committed Jan 11, 2024
1 parent e330044 commit fbb75e1
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sub-store-front-end",
"version": "2.14.34",
"version": "2.14.35",
"private": true,
"scripts": {
"dev": "vite --host",
Expand Down
18 changes: 4 additions & 14 deletions src/components/FileListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
class="sub-item-wrapper"
:style="{ padding: isSimpleMode ? '9px' : '16px' }"
>
<div
<a
:href="`${host}/api/file/${encodeURIComponent(name)}`"
target="_blank"
class="sub-img-wrappers"
:style="{ 'margin-top': isSimpleMode ? '5px' : '0' }"
>
Expand All @@ -32,7 +34,7 @@
bg-color=""
/>
</div>
</div>
</a>
<div class="sub-item-content">
<div class="sub-item-title-wrapper">

Expand Down Expand Up @@ -287,18 +289,6 @@
router.back();
};
const compareSub = async () => {
Toast.loading('生成节点对比中...', { id: 'compare', cover: true, duration: 1500 });
const res = await useSubsApi().compareSub(
props.type,
props.sub ?? props.collection
);
if (res?.data?.status === 'success') {
compareData.value = res.data.data;
compareTableIsVisible.value = true;
Toast.hide('compare');
}
};
const swipeClose = () => {
swipe.value.close();
};
Expand Down
7 changes: 6 additions & 1 deletion src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ export default {
},
content: {
placeholder: 'The content of the file'
}
},
emptySub: {
title: 'You have no File yet',
desc: 'After adding you can enjoy the love of YM Peng',
btn: 'Create File Now',
},
},
// subscription management page
subPage: {
Expand Down
7 changes: 6 additions & 1 deletion src/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@ export default {
copyNotify: {
succeed: '复制文件链接成功',
failed: '复制文件链接失败\n{e}',
}
},
emptySub: {
title: '你还没有添加文件',
desc: '添加后开始使用文件',
btn: '立即添加',
},
},
// 订阅管理页
subPage: {
Expand Down
6 changes: 3 additions & 3 deletions src/views/File.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@
>
<nut-empty image="empty">
<template #description>
<h3>{{ $t(`subPage.emptySub.title`) }}</h3>
<p>{{ $t(`subPage.emptySub.desc`) }}</p>
<h3>{{ $t(`filePage.emptySub.title`) }}</h3>
<p>{{ $t(`filePage.emptySub.desc`) }}</p>
</template>
</nut-empty>
<router-link to="/edit/files/UNTITLED" class="router-link">
<nut-button type="primary">
{{ $t(`subPage.emptySub.btn`) }}
{{ $t(`filePage.emptySub.btn`) }}
</nut-button>
</router-link>
</div>
Expand Down

0 comments on commit fbb75e1

Please sign in to comment.