Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
volar committed Dec 5, 2023
1 parent a465c74 commit 3f7a446
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import { useI18n } from 'vue-i18n'
import { type AssetFileProperties, DamAssetType } from '@/types/coreDam/Asset'
import {
DIMENSIONS_CONFIG,
ICON_LOW,
ICON_LOW, ICON_RSS, ICON_SLOTS,
LOW_DIMENSION
} from '@/components/damImage/uploadQueue/composables/assetImageIconsConfig'
import { useDamConfigState } from '@/components/damImage/uploadQueue/composables/damConfigState'
const props = withDefaults(
defineProps<{
Expand All @@ -27,7 +28,7 @@ const checkDimensions = (icons: string[], titles: string[]) => {
}
if (props.assetFileProperties.width < LOW_DIMENSION || props.assetFileProperties.height < LOW_DIMENSION) {
icons.push(ICON_LOW)
titles.push(t('coreDam.asset.metaIcons.low'))
titles.push(t('common.damImage.asset.metaIcons.low'))
return
}
if (props.assetType !== DamAssetType.Video) return
Expand Down Expand Up @@ -61,11 +62,11 @@ const data = computed(() => {
if (props.assetFileProperties.slotNames.length > 1) {
icons.push(ICON_SLOTS)
titles.push(t('coreDam.asset.metaIcons.slots'))
titles.push(t('common.damImage.asset.metaIcons.slots'))
}
if (props.assetFileProperties.fromRss) {
icons.push(ICON_RSS)
titles.push(t('coreDam.asset.metaIcons.rss'))
titles.push(t('common.damImage.asset.metaIcons.rss'))
}
checkDimensions(icons, titles)
checkDistributions(icons, titles)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const { t } = useI18n()
dark
type="warning"
>
{{ t('coreDam.asset.detail.info.status.duplicate') }}
{{ t('common.damImage.asset.detail.info.status.duplicate') }}
</VAlert>
</div>
<div
Expand All @@ -39,7 +39,7 @@ const { t } = useI18n()
dark
type="error"
>
{{ t('coreDam.asset.detail.info.status.failed') }}
{{ t('common.damImage.asset.detail.info.status.failed') }}
<div v-if="assetMainFileFailReason">
<br>
<AssetFileFailReasonChip :reason="assetMainFileFailReason" />
Expand All @@ -54,7 +54,7 @@ const { t } = useI18n()
dark
type="error"
>
{{ t('coreDam.asset.detail.info.status.deleting') }}
{{ t('common.damImage.asset.detail.info.status.deleting') }}
</VAlert>
</div>
<div
Expand All @@ -65,7 +65,7 @@ const { t } = useI18n()
dark
type="warning"
>
{{ t('coreDam.asset.detail.info.status.draft') }}
{{ t('common.damImage.asset.detail.info.status.draft') }}
</VAlert>
</div>
</template>
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ const onSaveAndApply = async () => {
v-if="isUploading"
class="text-subtitle-2 d-flex align-center"
>
{{ t('common.damImage.asset.upload.title') }}
{{ t('common.damImage.upload.title') }}
</div>
<div
v-else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ onMounted(() => {
color="error"
/>
<div class="text-error">
{{ t('coreDam.asset.queueItem.error') }}
{{ t('common.damImage.queueItem.error') }}
</div>
<div
v-if="item && item.error.message.length"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ const showCancel = computed(() => {
color="error"
/>
<div class="text-error">
{{ t('coreDam.asset.queueItem.error') }}
{{ t('common.damImage.queueItem.error') }}
</div>
<div
v-if="item.error.message.length"
Expand Down Expand Up @@ -200,17 +200,15 @@ const showCancel = computed(() => {
variant="text"
:disabled="!item.canEditMetadata"
>
{{ t('coreDam.asset.queueItem.edit') }}
{{ t('common.damImage.queueItem.edit') }}
</VBtn>
</div>
<div>
<div v-if="item.isDuplicate">
isDuplicate
</div>
<div v-if="item.isDuplicate" />
<ATableCopyIdButton
v-if="item.assetId"
:id="item.assetId"
button-t="coreDam.asset.queueItem.copyAssetId"
button-t="common.damImage.queueItem.copyAssetId"
size="small"
/>
<VBtn
Expand Down Expand Up @@ -244,7 +242,7 @@ const showCancel = computed(() => {
class="my-2 mb-3 mt-0 text-caption"
>
<VCol class="pt-0">
{{ t('coreDam.asset.queueItem.displayTitle') }}: {{ item.displayTitle }}
{{ t('common.damImage.queueItem.displayTitle') }}: {{ item.displayTitle }}
<span v-if="item.file?.size">&nbsp;({{ prettyBytes(item.file.size) }})</span>
</VCol>
</VRow>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@ export function useAssetFileFailReason() {
const assetFileFailReasonOptions = ref<ValueObjectOption<AssetFileFailReason>[]>([
{
value: AssetFileFailReason.None,
title: t('coreDam.asset.assetFileFailReason.none'),
title: t('common.damImage.asset.assetFileFailReason.none'),
},
{
value: AssetFileFailReason.Unknown,
title: t('coreDam.asset.assetFileFailReason.unknown'),
title: t('common.damImage.asset.assetFileFailReason.unknown'),
},
{
value: AssetFileFailReason.InvalidChecksum,
title: t('coreDam.asset.assetFileFailReason.invalidChecksum'),
title: t('common.damImage.asset.assetFileFailReason.invalidChecksum'),
},
{
value: AssetFileFailReason.InvalidMimeType,
title: t('coreDam.asset.assetFileFailReason.invalidMimeType'),
title: t('common.damImage.asset.assetFileFailReason.invalidMimeType'),
},
{
value: AssetFileFailReason.DownloadFailed,
title: t('coreDam.asset.assetFileFailReason.downloadFailed'),
title: t('common.damImage.asset.assetFileFailReason.downloadFailed'),
},
{
value: AssetFileFailReason.InvalidSize,
title: t('coreDam.asset.assetFileFailReason.invalidSize'),
title: t('common.damImage.asset.assetFileFailReason.invalidSize'),
},
])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,31 @@ import svgrss from '@/assets/dam-meta-icons/rss.svg'

export const DIMENSIONS_CONFIG = [
{
titleT: 'coreDam.asset.metaIcons.fullHd',
titleT: 'common.damImage.asset.metaIcons.fullHd',
width: 1920,
height: 1080,
svgSrc: svgfhd,
},
{
titleT: 'coreDam.asset.metaIcons.2k',
titleT: 'common.damImage.asset.metaIcons.2k',
width: 2048,
height: 1080,
svgSrc: svg2k,
},
{
titleT: 'coreDam.asset.metaIcons.qhd',
titleT: 'common.damImage.asset.metaIcons.qhd',
width: 2560,
height: 1440,
svgSrc: svgqhd,
},
{
titleT: 'coreDam.asset.metaIcons.4k',
titleT: 'common.damImage.asset.metaIcons.4k',
width: 3840,
height: 2160,
svgSrc: svg4k,
},
{
titleT: 'coreDam.asset.metaIcons.8k',
titleT: 'common.damImage.asset.metaIcons.8k',
width: 7680,
height: 4320,
svgSrc: svg8k,
Expand Down
30 changes: 30 additions & 0 deletions src/locales/sk/common/damImage.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
"addFromDam": "Pridať z DAM"
}
},
"queueItem": {
"edit": "Upraviť",
"displayTitle": "Meno originálu",
"error": "Chyba",
"copyAssetId": "Kopírovať asset ID"
},
"asset": {
"model": {
"authors": "Autori",
Expand All @@ -37,6 +43,12 @@
"roi": "Fókus"
},
"info": {
"status": {
"duplicate": "Hlavný súbor je duplikát.",
"draft": "Neobsahuje žiaden súbor.",
"deleting": "Čoskoro bude zmazaný.",
"failed": "Spracovávanie súboru zlyhalo."
},
"metadata": "Metaúdaje",
"file": "Info o súbore",
"field": {
Expand Down Expand Up @@ -72,6 +84,24 @@
"replaceAll": "Nahradiť všetko",
"clearForm": "Vyčistiť",
"general": "Hlavné"
},
"metaIcons": {
"low": "Nízka kvalita",
"slots": "Sloty",
"rss": "RSS",
"fullHd": "FullHD",
"2k": "2K",
"qhd": "QHD",
"4k": "4K",
"8k": "8K"
},
"assetFileFailReason": {
"none": "Žiadny",
"unknown": "Neznámy",
"invalidChecksum": "Neplatný kontrolný súčet",
"invalidMimeType": "Neplatný typ súboru",
"downloadFailed": "Sťahovanie zlyhalo",
"invalidSize": "Neplatná veľkosť"
}
},
"upload": {
Expand Down

0 comments on commit 3f7a446

Please sign in to comment.