Skip to content
This repository was archived by the owner on Jan 6, 2024. It is now read-only.

chore: code style #149

Merged
merged 1 commit into from
Jul 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions packages/client/components/AssetListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,15 @@ const props = defineProps<{
}>()

const icon = computed(() => {
if (props.asset.type === 'image')
return 'i-carbon-image'
if (props.asset.type === 'video')
return 'i-carbon-video'
if (props.asset.type === 'audio')
return 'i-carbon-volume-up'
if (props.asset.type === 'font')
return 'i-carbon-text-small-caps'
if (props.asset.type === 'text')
return 'i-carbon-document'
if (props.asset.type === 'json')
return 'i-carbon-json'
return 'i-carbon-document-blank'
const assets = {
image: 'i-carbon-image',
video: 'i-carbon-video',
audio: 'i-carbon-volume-up',
font: 'i-carbon-text-small-caps',
text: 'i-carbon-document',
json: 'i-carbon-json',
}
return assets[props.asset.type] ?? 'i-carbon-document-blank'
})
</script>

Expand Down