Skip to content

Commit fcb94fd

Browse files
committed
Merge branch 'main' of https://github.com/JunaYa/ddu
2 parents c628367 + df865ad commit fcb94fd

File tree

4 files changed

+9
-82
lines changed

4 files changed

+9
-82
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ jobs:
2020
args: "--target aarch64-apple-darwin"
2121
- platform: "macos-latest" # for Intel based macs.
2222
args: "--target x86_64-apple-darwin"
23-
- platform: "ubuntu-22.04" # for Tauri v1 you could replace this with ubuntu-20.04.
24-
args: ""
25-
- platform: "windows-latest"
26-
args: ""
2723

2824
runs-on: ${{ matrix.platform }}
2925
steps:
@@ -40,16 +36,8 @@ jobs:
4036
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
4137
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
4238

43-
- name: install dependencies (ubuntu only)
44-
if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above.
45-
run: |
46-
sudo apt-get update
47-
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
48-
# webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2.
49-
# You can remove the one that doesn't apply to your app to speed up the workflow a bit.
50-
5139
- name: install frontend dependencies
52-
run: pnpm install # change this to npm, pnpm or bun depending on which one you use.
40+
run: npm i -g pnpm && pnpm i # change this to npm, pnpm or bun depending on which one you use.
5341

5442
- uses: tauri-apps/tauri-action@v0
5543
env:
@@ -60,4 +48,4 @@ jobs:
6048
releaseBody: "See the assets to download this version and install."
6149
releaseDraft: true
6250
prerelease: false
63-
args: ${{ matrix.args }}
51+
args: ${{ matrix.args }}

.github/workflows/test-build-only.yml

Lines changed: 0 additions & 62 deletions
This file was deleted.

src/components/SnapVault.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const isAscending = ref(false)
1414
async function loadData() {
1515
const val = await store.get<{ value: string }>('screenshot_path')
1616
17-
const entries = await readDir(`${val?.value}/images` ?? '')
17+
const entries = await readDir(val?.value ? `${val?.value}/images` : '')
1818
1919
list.value = entries.filter(entry => entry.isFile && FileSizeFormatter.isPictureFile(entry.name)).map(entry => ({
2020
id: entry.name,

src/components/SnapVaultItem.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,26 @@
22
import { confirm } from '@tauri-apps/plugin-dialog'
33
import { remove } from '@tauri-apps/plugin-fs'
44
import { useElementHover } from '@vueuse/core'
5-
import { ref } from 'vue'
5+
import { defineEmits, defineProps, ref } from 'vue'
66
import Button from '~/components/Button.vue'
77
import FileInfo from './FileInfo.vue'
88
import PictureReview from './PictureReview.vue'
99
1010
defineProps<{
1111
item: { id: string, image: string }
12-
change?: () => void
1312
}>()
13+
1414
const emit = defineEmits<{
1515
(e: 'change'): void
1616
}>()
17+
1718
const snapHoverableElement = ref()
1819
const isHovered = useElementHover(snapHoverableElement)
1920
2021
const deleteLoading = ref(false)
2122
2223
async function handleDelete(path: string) {
24+
console.log(path)
2325
deleteLoading.value = true
2426
const confirmation = await confirm(
2527
'是否确认删除该文件?',
@@ -34,11 +36,10 @@ async function handleDelete(path: string) {
3436
</script>
3537

3638
<template>
37-
<div ref="snapHoverableElement" class="relative rounded-md bg-card p-2">
39+
<div ref="snapHoverableElement" class="relative rounded-md bg-card p-2">
3840
<PictureReview :image-path="item.image" />
39-
<!-- button group delete | rename | copy -->
4041
<div v-if="isHovered" class="absolute right-3 top-3 z-11 flex flex-row gap-2">
41-
<Button class="btn-action-icon" anim @click="handleDelete(item.image)">
42+
<Button class="btn-action-icon" anim @click="()=>handleDelete(item.image)">
4243
<i class="h-4 w-4">
4344
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32"><path d="M12 12h2v12h-2z" fill="currentColor" /><path d="M18 12h2v12h-2z" fill="currentColor" /><path d="M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6zm4 22V8h16v20z" fill="currentColor" /><path d="M12 2h8v2h-8z" fill="currentColor" /></svg>
4445
</i>

0 commit comments

Comments
 (0)