Skip to content

Commit

Permalink
feat: 增加支持订阅外链跳转,订阅、文件、同步新增按钮位置默认左下角
Browse files Browse the repository at this point in the history
  • Loading branch information
hsingyin committed Nov 12, 2024
1 parent 05d7c7f commit 89de425
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 6 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.291",
"version": "2.14.292",
"private": true,
"scripts": {
"dev": "vite --host",
Expand Down
19 changes: 18 additions & 1 deletion src/components/SubListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
<div class="sub-item-title-wrapper">
<h3 v-if="!appearanceSetting.isSimpleMode" class="sub-item-title">
{{ displayName || name }}
<span v-if="appOpenBtnVisible" class="app-url" @click="openAppUrl">
<font-awesome-icon icon="fa-solid fa-square-arrow-up-right" />
</span>
<span v-for="i in tag" :key="i" class="tag">
<nut-tag>{{ i }}</nut-tag>
</span>
Expand All @@ -67,6 +70,9 @@
style="color: var(--primary-text-color); font-size: 16px"
>
{{ displayName || name }}
<span v-if="appOpenBtnVisible" class="app-url" @click="openAppUrl">
<font-awesome-icon icon="fa-solid fa-square-arrow-up-right" />
</span>
<span v-for="i in tag" :key="i" class="tag">
<nut-tag>{{ i }}</nut-tag>
</span>
Expand Down Expand Up @@ -348,6 +354,7 @@ const remarkText = computed(() => {
}
});
const { flows } = storeToRefs(subsStore);
const icon = computed(() => {
return appearanceSetting.value.isDefaultIcon ? logoIcon : logoRedIcon;
});
Expand Down Expand Up @@ -520,7 +527,13 @@ const closeCompare = () => {
router.back();
};
const appOpenBtnVisible = computed(() => {
return props.type === 'sub' && typeof flow.value === 'object' && flow.value?.appUrl;
});
const openAppUrl = () => {
console.log('flow', flow.value);
if (typeof flow.value === 'object' && flow.value?.appUrl) {
window.open(flow.value.appUrl);
}
Expand Down Expand Up @@ -784,8 +797,12 @@ const onClickRefresh = async () => {
overflow: hidden;
font-size: 16px;
color: var(--primary-text-color);
vertical-align: middle;
}
.app-url {
font-size: 14px !important;
margin: 0 2px;
}
.tag {
margin: 0 2px;
}
Expand Down
4 changes: 3 additions & 1 deletion src/plugin/awesomeIcon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ import {
faFileImport,
faFileExport,
faShareNodes,
faLink
faLink,
faSquareArrowUpRight,
} from '@fortawesome/free-solid-svg-icons';

library.add(faFileImport);
Expand Down Expand Up @@ -65,3 +66,4 @@ library.add(faT);
library.add(faICursor);
library.add(faShareNodes);
library.add(faLink);
library.add(faSquareArrowUpRight);
2 changes: 1 addition & 1 deletion src/views/File.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}"
:style="{
cursor: 'pointer',
right: '16px',
left: '16px',
bottom: `${
bottomSafeArea +
48 +
Expand Down
2 changes: 1 addition & 1 deletion src/views/Sub.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
}"
:style="{
cursor: 'pointer',
right: '16px',
left: '16px',
bottom: `${
bottomSafeArea +
48 +
Expand Down
2 changes: 1 addition & 1 deletion src/views/Sync.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}"
:style="{
cursor: 'pointer',
right: '16px',
left: '16px',
bottom: `${
bottomSafeArea +
48 +
Expand Down

0 comments on commit 89de425

Please sign in to comment.