Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Tweaks to the Image Details page (#1112)

Krystle Salazarab53a6f8043d
diff --git a/src/components/VContentReport/VContentReportForm.vue b/src/components/VContentReport/VContentReportForm.vue
index f60e1d7f7..59ec3a503 100644
--- a/src/components/VContentReport/VContentReportForm.vue
+++ b/src/components/VContentReport/VContentReportForm.vue
@@ -60,12 +60,12 @@
<div class="mb-4 min-h-[7rem]">
<VDmcaNotice
- v-if="selectedReason === reasons.DMCA"
+ v-if="media.foreign_landing_url && selectedReason === reasons.DMCA"
:provider="providerName"
:foreign-landing-url="media.foreign_landing_url"
/>
<VReportDescForm
- v-else
+ v-if="selectedReason !== reasons.DMCA"
key="other"
v-model="description"
:reason="selectedReason"
diff --git a/src/components/VLicenseElements.vue b/src/components/VLicenseElements.vue
index 185472a17..4d3da500a 100644
--- a/src/components/VLicenseElements.vue
+++ b/src/components/VLicenseElements.vue
@@ -3,7 +3,7 @@
<li
v-for="element in elements"
:key="element"
- class="flex items-center gap-3 mt-2"
+ class="flex items-center gap-3 mb-2 text-sm md:text-base"
>
<VIcon
view-box="0 0 30 30"
diff --git a/src/components/VMediaInfo/VCopyLicense.vue b/src/components/VMediaInfo/VCopyLicense.vue
index 2d2c384a5..796891d71 100644
--- a/src/components/VMediaInfo/VCopyLicense.vue
+++ b/src/components/VMediaInfo/VCopyLicense.vue
@@ -30,10 +30,10 @@
:aria-labelledby="tab"
role="tabpanel"
tabindex="0"
- class="border border-dark-charcoal-20 p-4 md:p-6 text-sm md:text-base foxus:border-tx focus:outline-none focus:shadow-[0_0_0_1.5px_#c52b9b_inset] h-[190px] flex flex-col justify-between items-start"
+ class="border border-dark-charcoal-20 p-4 md:p-6 text-sm md:text-base focus:border-tx focus:outline-none focus:shadow-[0_0_0_1.5px_#c52b9b_inset] h-[190px] flex flex-col justify-between items-start"
:class="{ hidden: activeTab !== tab }"
>
- <div class="flex-grow-1 overflow-y-scroll w-full">
+ <div class="overflow-y-scroll">
<i18n
v-if="tab === 'rich'"
id="attribution-rich"
@@ -73,17 +73,14 @@
>{{ period }}
</template>
</i18n>
- <label v-if="tab === 'html'" for="attribution-html" class="w-full">
- <div
- id="attribution-html"
- class="w-full font-mono h-auto w-full resize-none"
- :value="attributionHtml"
- dir="ltr"
- readonly
- >
- {{ attributionHtml }}
- </div>
- </label>
+ <p
+ v-if="tab === 'html'"
+ id="attribution-html"
+ class="font-mono break-all"
+ dir="ltr"
+ >
+ {{ attributionHtml }}
+ </p>
<i18n
v-if="tab === 'plain'"
id="attribution-plain"
diff --git a/src/components/VMediaInfo/VMediaLicense.vue b/src/components/VMediaInfo/VMediaLicense.vue
index 851840371..721e4034b 100644
--- a/src/components/VMediaInfo/VMediaLicense.vue
+++ b/src/components/VMediaInfo/VMediaLicense.vue
@@ -3,47 +3,33 @@
<h5 class="mb-4 text-base md:text-2xl font-semibold">
{{ headerText }}
</h5>
+
<template v-if="isLicense">
<i18n
path="media-details.reuse.attribution"
tag="span"
- class="block text-sm md:text-base"
+ class="block text-sm md:text-base mb-2"
>
<template #link>
- <VLink class="uppercase text-pink" :href="licenseUrl">
+ <VLink class="uppercase" :href="licenseUrl">
{{ fullLicenseName }}
</VLink>
</template>
</i18n>
- <VLicenseElements v-if="license" :license="license" class="md:py-4" />
- <i18n
- v-if="!isLicense"
- path="media-details.reuse.license.content"
- tag="span"
- class="caption font-semibold"
- >
- <template #link>
- <VLink
- :aria-label="$t('media-details.aria.attribution.license')"
- :href="licenseUrl"
- class="text-pink"
- >{{ $t('media-details.reuse.license.link') }}</VLink
- >
- </template>
- </i18n>
+ <VLicenseElements v-if="license" :license="license" />
</template>
+
<template v-else>
- <VLicenseElements v-if="license" :license="license" class="md:py-4" />
+ <VLicenseElements v-if="license" :license="license" />
<i18n
path="media-details.reuse.tool.content"
tag="span"
- class="caption font-semibold"
+ class="text-sm font-semibold"
>
<template #link>
<VLink
:aria-label="$t('media-details.aria.attribution.tool')"
:href="licenseUrl"
- class="text-pink"
>{{ $t('media-details.reuse.tool.link') }}</VLink
>
</template>
diff --git a/src/locales/en.json b/src/locales/en.json
index 3b51563a8..83c8329c0 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -411,10 +411,6 @@
"tool-header": "Public Domain",
"audio": "Audio",
"image": "Image",
- "license": {
- "content": "Read more about the license {link}",
- "link": "here"
- },
"tool": {
"content": "Read more about the tool {link}.",
"link": "here"
diff --git a/src/locales/po-files/openverse.pot b/src/locales/po-files/openverse.pot
index 326b58707..b9a2faef0 100644
--- a/src/locales/po-files/openverse.pot
+++ b/src/locales/po-files/openverse.pot
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Openverse \n"
"Report-Msgid-Bugs-To: https://github.com/wordpress/openverse/issues \n"
-"POT-Creation-Date: 2022-03-12T04:28:50+00:00\n"
+"POT-Creation-Date: 2022-03-16T22:36:48+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -587,12 +587,11 @@ msgctxt "media-details.aria.creator-url"
msgid "author ###name###"
msgstr ""
-#: src/components/VMediaInfo/VMediaLicense.vue:27
msgctxt "media-details.aria.attribution.license"
msgid "read more about the license"
msgstr ""
-#: src/components/VMediaInfo/VMediaLicense.vue:44
+#: src/components/VMediaInfo/VMediaLicense.vue:31
msgctxt "media-details.aria.attribution.tool"
msgid "read more about the tool"
msgstr ""
@@ -619,7 +618,7 @@ msgid "Image"
msgstr ""
#. Do not translate words between ### ###.
-#: src/components/VMediaInfo/VMediaLicense.vue:7
+#: src/components/VMediaInfo/VMediaLicense.vue:8
msgctxt "media-details.reuse.attribution"
msgid "This image was marked with a ###link### license:"
msgstr ""
@@ -674,43 +673,32 @@ msgid "is licensed under"
msgstr ""
#. Do not translate words between ### ###.
-#: src/components/VMediaInfo/VCopyLicense.vue:111
+#: src/components/VMediaInfo/VCopyLicense.vue:108
msgctxt "media-details.reuse.credit.view-legal-text"
msgid ". To view ###terms-copy###visit ###URL###"
msgstr ""
-#: src/components/VMediaInfo/VCopyLicense.vue:115
+#: src/components/VMediaInfo/VCopyLicense.vue:112
msgctxt "media-details.reuse.credit.terms-text"
msgid "the terms,"
msgstr ""
-#: src/components/VMediaInfo/VCopyLicense.vue:116
+#: src/components/VMediaInfo/VCopyLicense.vue:113
msgctxt "media-details.reuse.credit.copy-text"
msgid "a copy of this license,"
msgstr ""
#. Do not translate words between ### ###.
-#: src/components/VMediaInfo/VMediaLicense.vue:37
+#: src/components/VMediaInfo/VMediaLicense.vue:24
msgctxt "media-details.reuse.tool.content"
msgid "Read more about the tool ###link###."
msgstr ""
-#: src/components/VMediaInfo/VMediaLicense.vue:47
+#: src/components/VMediaInfo/VMediaLicense.vue:33
msgctxt "media-details.reuse.tool.link"
msgid "here"
msgstr ""
-#. Do not translate words between ### ###.
-#: src/components/VMediaInfo/VMediaLicense.vue:19
-msgctxt "media-details.reuse.license.content"
-msgid "Read more about the license ###link###"
-msgstr ""
-
-#: src/components/VMediaInfo/VMediaLicense.vue:30
-msgctxt "media-details.reuse.license.link"
-msgid "here"
-msgstr ""
-
msgctxt "browse-page.all-no-results"
msgid "No results"
msgstr ""