Skip to content

Commit

Permalink
refactor: minor code cleanup and simplification
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
  • Loading branch information
pedrolamas committed Nov 25, 2024
1 parent 18aed07 commit 84ae1e1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
13 changes: 8 additions & 5 deletions src/components/widgets/filesystem/FileSystemBrowser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@
</v-icon>
<img
v-else
:style="{'max-width': `${thumbnailSize}px`, 'max-height': `${thumbnailSize}px`}"
:style="{
'max-width': `${thumbnailSize}px`,
'max-height': `${thumbnailSize}px`
}"
:src="getThumbUrl(item, root, item.path, thumbnailSize > 16, item.modified)"
>
</v-layout>
Expand Down Expand Up @@ -144,7 +147,7 @@
{{
value != null
? $filters.getReadableLengthString(value)
:'--'
: '--'
}}
</template>

Expand Down Expand Up @@ -184,7 +187,7 @@
{{
value != null
? $filters.formatCounterSeconds(value)
:'--'
: '--'
}}
</template>

Expand Down Expand Up @@ -219,7 +222,7 @@
{{
value != null
? $filters.formatDateTime(value * 1000)
:'--'
: '--'
}}
</template>

Expand Down Expand Up @@ -384,7 +387,7 @@ export default class FileSystemBrowser extends Mixins(FilesMixin) {
return readonly ? '$fileZipLock' : '$fileZip'
} else if (
SupportedImageFormats.includes(`.${item.extension}`) ||
SupportedVideoFormats.includes(`.${item.extension}`)
SupportedVideoFormats.includes(`.${item.extension}`)
) {
return readonly ? '$fileImageLock' : '$fileImage'
} else {
Expand Down
9 changes: 6 additions & 3 deletions src/components/widgets/spoolman/SpoolSelectionDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,10 @@
@update:sort-by="handleSortOrderKeyChange"
@update:sort-desc="handleSortOrderDescChange"
>
<template #item="{ headers, item, index}">
<template #item="{ headers, item }">
<app-data-table-row
:headers="headers"
:item="item"
:index="index"
:is-selected="item.id === selectedSpool"
class="px-1"
@click.prevent="selectedSpool = selectedSpool === item.id ? null : item.id"
Expand Down Expand Up @@ -184,7 +183,11 @@
color="primary"
@click="handleSelectSpool"
>
{{ filename ? $t('app.general.btn.print') : $tc('app.spoolman.btn.select', targetMacro ? 2 : 1, { macro: targetMacro }) }}
{{
filename
? $t('app.general.btn.print')
: $tc('app.spoolman.btn.select', targetMacro ? 2 : 1, { macro: targetMacro })
}}
</app-btn>
</template>
Expand Down

0 comments on commit 84ae1e1

Please sign in to comment.