Skip to content

Commit

Permalink
fix: SonarQube issues
Browse files Browse the repository at this point in the history
  • Loading branch information
yk-lab committed Feb 23, 2025
1 parent dd27a35 commit 0f5b2f0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sonar.organization=yk-lab


# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
#sonar.sources=.
sonar.sources=src/

# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8
13 changes: 9 additions & 4 deletions src/components/FileList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,18 @@
>
<div class="flex items-center space-x-4">
<GripVertical class="handle cursor-ns-resize" role="img" aria-label="Drag file" />
<img v-if="file.type === 'application/pdf'" :src="pdfIcon" class="size-8" />
<img
v-if="file.type === 'application/pdf'"
:src="pdfIcon"
class="size-8"
role="img"
aria-hidden="true"
/>
{{ file.name }}
<span class="text-sm">({{ filesize(file.size) }})</span>
</div>
<button @click="removeFile(id)" class="text-red-500 ml-4" aria-label="Remove file">
<Delete class="size-6" role="img" />
<Delete class="size-6" />
<span class="sr-only"> Remove</span>
</button>
</li>
Expand All @@ -26,8 +32,7 @@

<script lang="ts" setup>
import { useSortable } from '@vueuse/integrations/useSortable';
import { Delete } from 'lucide-vue-next';
import { GripVertical } from 'lucide-vue-next';
import { Delete, GripVertical } from 'lucide-vue-next';
import pdfIcon from '@/assets/icons/pdf.svg?url';
import { useTemplateRef, computed } from 'vue';
Expand Down
11 changes: 1 addition & 10 deletions src/components/MainArea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,8 @@
role="button"
tabindex="0"
aria-label="PDFファイルをアップロード"
@keypress.enter="$refs.fileInput.click()"
>
<input
ref="fileInput"
type="file"
class="hidden"
multiple
@change="handleFiles"
accept=".pdf"
aria-hidden="true"
/>
<input type="file" class="hidden" multiple @change="handleFiles" accept=".pdf" />
<div class="text-cyan-600">
<Upload class="size-8 mx-auto" aria-hidden="true" />
</div>
Expand Down

0 comments on commit 0f5b2f0

Please sign in to comment.