Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x] Optimize hover titles of asset edit buttons #10603

Merged
merged 2 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions resources/js/components/fieldtypes/assets/AssetRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
v-if="showFilename"
@click="editOrOpen"
class="flex items-center flex-1 rtl:mr-3 ltr:ml-3 text-xs rtl:text-right ltr:text-left truncate w-full"
:title="__('Edit')"
:aria-label="__('Edit Asset')"
>
{{ asset.basename }}
Expand All @@ -43,6 +44,7 @@
<button
class="flex items-center p-1 w-6 h-8 text-lg antialiased text-gray-600 dark:text-dark-150 hover:text-gray-900 dark:hover:text-dark-100"
@click="remove"
:title="__('Remove')"
:aria-label="__('Remove Asset')"
>
×
Expand Down
12 changes: 6 additions & 6 deletions resources/js/components/fieldtypes/assets/AssetTile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'is-svg': canShowSvg,
'is-file': !isImage && !canShowSvg,
}"
:title="asset.filename"
:title="label"
>
<asset-editor
v-if="editing"
Expand All @@ -29,7 +29,7 @@
<img :src="thumbnail" v-if="isImage" :title="label" />

<template v-else>
<img v-if="canShowSvg" :src="asset.url" class="p-4" />
<img v-if="canShowSvg" :src="asset.url" :title="label" class="p-4" />
<file-icon
v-else
:extension="asset.extension"
Expand All @@ -40,11 +40,11 @@

<div class="asset-controls" v-if="!readOnly">
<div class="h-full w-full flex items-center justify-center space-x-1 rtl:space-x-reverse">
<button @click="edit" class="btn btn-icon" :alt="__('Edit')">
<button @click="edit" class="btn btn-icon" :title="__('Edit')">
<svg-icon name="micro/sharp-pencil" class="h-4 my-2" />
</button>

<button @click="remove" class="btn btn-icon" :alt="__('Remove')">
<button @click="remove" class="btn btn-icon" :title="__('Remove')">
<span class="text-lg antialiased w-4">×</span>
</button>
</div>
Expand All @@ -55,7 +55,7 @@
v-if="asset.url && asset.isMedia && this.canDownload"
@click="open"
class="btn btn-icon"
:alt="__('Open in a new window')"
:title="__('Open in a new window')"
>
<svg-icon name="light/external-link" class="h-4 my-2" />
</button>
Expand All @@ -64,7 +64,7 @@
v-if="asset.allowDownloading && this.canDownload"
@click="download"
class="btn btn-icon"
:alt="__('Download file')"
:title="__('Download file')"
>
<svg-icon name="download" class="h-4 my-2" />
</button>
Expand Down
Loading