-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feature #74657 after gold 3 features. * feature #74657 security fix * feature #74657 animation support * feature #74657 fixes prettyBps * feature #74657 vue search input warning fix. * feature #74657 vue search input warning fix. --------- Co-authored-by: Tomas Hermanek <[email protected]>
- Loading branch information
1 parent
d337631
commit 6737d8f
Showing
32 changed files
with
380 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"model": { | ||
"audioAttributes": { | ||
"codecName": "Codec", | ||
"duration": "Duration" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"model": { | ||
"videoAttributes": { | ||
"codecName": "Codec", | ||
"duration": "Duration", | ||
"bitrate": "Bitrate" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"model": { | ||
"audioAttributes": { | ||
"codecName": "Kodek", | ||
"duration": "Dĺžka" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"model": { | ||
"videoAttributes": { | ||
"codecName": "Kodek", | ||
"duration": "Dĺžka", | ||
"bitrate": "Bitrate" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import dayjs from 'dayjs' | ||
|
||
export const prettyBps = (bytes: number, decimals = 2): string => { | ||
const sizes = ['bps', 'kbps', 'Mbps', 'Gbps'] | ||
|
||
if (bytes === 0) { | ||
return '0 ' + sizes[0] | ||
} | ||
|
||
const k = 1024 | ||
const dm = decimals < 0 ? 0 : decimals | ||
const i = Math.floor(Math.log(bytes) / Math.log(k)) | ||
|
||
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i] | ||
} | ||
|
||
export const prettyDuration = (seconds: number): string => { | ||
const duration = dayjs.duration(seconds * 1000) | ||
|
||
return duration.format('HH:mm:ss') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/views/coreDam/asset/components/AssetMetadataAudioAttributes.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<script lang="ts" setup> | ||
import { useI18n } from 'vue-i18n' | ||
import type { AudioFile } from '@/types/coreDam/File' | ||
import { prettyDuration } from '@/utils/file' | ||
withDefaults( | ||
defineProps<{ | ||
file: AudioFile | ||
}>(), | ||
{} | ||
) | ||
const { t } = useI18n() | ||
</script> | ||
|
||
<template> | ||
<VRow> | ||
<VCol>{{ t('coreDam.audioFile.model.audioAttributes.duration') }}</VCol> | ||
<VCol cols="9"> | ||
{{ prettyDuration(file.audioAttributes.duration) }} | ||
</VCol> | ||
</VRow> | ||
<VRow> | ||
<VCol>{{ t('coreDam.audioFile.model.audioAttributes.codecName') }}</VCol> | ||
<VCol cols="9"> | ||
{{ file.audioAttributes.codecName }} | ||
</VCol> | ||
</VRow> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.