Skip to content

Commit

Permalink
chore: 优化同步样式
Browse files Browse the repository at this point in the history
  • Loading branch information
xream committed Mar 9, 2024
1 parent cc881bc commit ae406f4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 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.153",
"version": "2.14.156",
"private": true,
"scripts": {
"dev": "vite --host",
Expand Down
27 changes: 21 additions & 6 deletions src/components/ArtifactsListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@
<font-awesome-icon
icon="fa-solid fa-clone"
></font-awesome-icon>
<button
</button>
<button
class="copy-sub-link"
@click.stop="swipeController"
v-if="!isMobile()"
ref="moreAction"
>
<font-awesome-icon icon="fa-solid fa-angles-right" />
</button>
<font-awesome-icon icon="fa-solid fa-angles-right" />
</button>
</div>
<span v-if="!isSimpleMode">
Expand Down Expand Up @@ -413,14 +413,14 @@ const swipeController = () => {
if (swipeIsOpen.value) {
swipe.value.close();
swipeIsOpen.value = false;
moreAction.value.style.transform = "rotate(0deg)";
if(moreAction.value) moreAction.value.style.transform = "rotate(0deg)";
} else {
if (isLeftRight.value) {
swipe.value.open("right");
} else {
swipe.value.open("left");
swipeIsOpen.value = true;
moreAction.value.style.transform = "rotate(180deg)";
if(moreAction.value) moreAction.value.style.transform = "rotate(180deg)";
}
}
};
Expand All @@ -435,10 +435,23 @@ const onClickCopyLink = async () => {
};
const onDeleteConfirm = async () => {
const shouldShowToast = artifact.value.updated
if (shouldShowToast) {
Toast.loading("正在删除...", {
cover: true,
id: "delete-toast",
});
}
await artifactsStore.deleteArtifact(artifact.value.name);
if (shouldShowToast) {
Toast.hide("delete-toast");
}
};
const onClickSync = async () => {
swipeController()
swipe.value.close();
Toast.loading("同步中...", {
cover: true,
Expand All @@ -449,6 +462,7 @@ const onClickSync = async () => {
};
const onClickEdit = () => {
swipeController()
swipe.value.close();
emit("edit", artifact.value);
};
Expand All @@ -458,6 +472,7 @@ const onclose = () => {
};
const onClickDelete = () => {
swipeController()
Dialog({
title: t("syncPage.deleteArt.title"),
content: createVNode(
Expand Down Expand Up @@ -642,7 +657,7 @@ watch(isSyncOpen, async () => {
display: inline-flex;
justify-content: center;
align-items: center;
margin-left: 12px;
// margin-left: 12px;
svg {
width: 16px;
Expand Down

0 comments on commit ae406f4

Please sign in to comment.