Skip to content

Commit

Permalink
add dark mode styling for p, add aria-label for drag and drop area
Browse files Browse the repository at this point in the history
  • Loading branch information
lyqht committed Sep 6, 2024
1 parent 0f09b0b commit 1692d05
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"extra-rounded": "extra-rounded",
"dot": "dot",
"Drag and drop a CSV file here or click to select": "Drag and drop a CSV file here or click to select",
"Click to select and upload a CSV file": "Click to select and upload a CSV file",
"{count} link(s) detected": "{count} link(s) detected",
"Invalid CSV": "Invalid CSV",
"Single export": "Single export",
Expand Down
10 changes: 9 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -827,13 +827,16 @@ async function generateBatchQRCodes(format: 'png' | 'svg') {
v-if="!csvFile"
tabindex="0"
class="cursor-pointer rounded-lg border-2 border-dashed border-gray-300 p-8 text-center"
:aria-label="t('Click to select and upload a CSV file')"
@click="fileInput.click()"
@keyup.enter="fileInput.click()"
@keyup.space="fileInput.click()"
@dragover.prevent
@drop.prevent="onCsvFileUpload"
>
<p>{{ $t('Drag and drop a CSV file here or click to select') }}</p>
<p aria-hidden="true">
{{ $t('Drag and drop a CSV file here or click to select') }}
</p>
<input
aria-hidden="true"
ref="fileInput"
Expand Down Expand Up @@ -1136,6 +1139,11 @@ async function generateBatchQRCodes(format: 'png' | 'svg') {
</template>

<style lang="postcss" scoped>
p {
@apply !font-normal;
}
p,
label,
legend {
@apply text-gray-700 dark:text-gray-100 text-lg font-semibold;
Expand Down

0 comments on commit 1692d05

Please sign in to comment.