Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature_74827_public_route' into…
Browse files Browse the repository at this point in the history
… feature_74827_public_route
  • Loading branch information
volar committed Jan 8, 2024
2 parents 419711b + 49057b6 commit 3dc3c77
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/locales/en/coreDam/asset.json
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@
"makePublic": "Make public",
"openOnNewTab": "Open",
"copyUrl": "Copy URL",
"copyUrlShort": "LN",
"notify": "URL copied"
},
"status": {
Expand Down
1 change: 0 additions & 1 deletion src/locales/sk/coreDam/asset.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@
"makePublic": "Nastaviť ako verejné",
"openOnNewTab": "Otvoriť",
"copyUrl": "Kopírovať URL",
"copyUrlShort": "LN",
"notify": "URL skopírovaná"
},
"status": {
Expand Down
28 changes: 22 additions & 6 deletions src/views/coreDam/assetFileRoute/components/AssetFileMainRoute.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script setup lang="ts">
import {
ACopyText,
type AssetFile,
type AssetFileMainRouteAware,
ATableCopyIdButton,
type DamAssetType,
type DocId,
useAlerts,
Expand All @@ -12,6 +12,7 @@ import { ref } from 'vue'
import AssetFileRouteMakePublicDialog from '@/views/coreDam/assetFileRoute/components/AssetFileRouteMakePublicDialog.vue'
import { makePrivateFile } from '@/services/api/coreDam/fileApi'
import AssetFileRouteChangeBtn from '@/views/coreDam/assetFileRoute/components/AssetFileRouteChangeBtn.vue'
import { useI18n } from 'vue-i18n'
const props = withDefaults(
defineProps<{
Expand Down Expand Up @@ -51,6 +52,7 @@ const makePrivate = async () => {
}
loading.value = false
}
const { t } = useI18n()
</script>

<template>
Expand Down Expand Up @@ -80,11 +82,25 @@ const makePrivate = async () => {
@after-update="emit('mainRouteChanged')"
/>

<ATableCopyIdButton
<ACopyText
v-if="assetFile.mainRoute"
:id="assetFile.mainRoute.publicUrl"
button-t="coreDam.asset.assetFilePublicLink.actions.copyUrl"
icon-t="coreDam.asset.assetFilePublicLink.actions.copyUrlShort"
notify-t="coreDam.asset.assetFilePublicLink.actions.notify"
/>
:value="assetFile.mainRoute.publicUrl"
>
<template #activator="{ props: copyButtonProps }">
<VBtn
icon
size="x-small"
v-bind="copyButtonProps"
>
<VIcon icon="mdi-content-copy" />
<VTooltip
activator="parent"
location="bottom"
>
{{ t('coreDam.asset.assetFilePublicLink.actions.copyUrl') }}
</VTooltip>
</VBtn>
</template>
</ACopyText>
</template>

0 comments on commit 3dc3c77

Please sign in to comment.