Skip to content
Merged
4 changes: 4 additions & 0 deletions resources/css/components/assets.css
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@
box-shadow: 0 0 0 1px theme('colors.blue.DEFAULT');
}

.asset-tile.is-invalid {
@apply bg-gray-100 dark:bg-dark-650 border-gray-300 dark:border-dark-200 text-gray-600 dark:text-gray-400 cursor-default;
}

.asset-thumbnail {
@apply border border-white dark:border-dark-950;
}
Expand Down
2 changes: 1 addition & 1 deletion resources/css/components/items.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

&.invalid {
.item-inner {
@apply border-red-300 dark:border-dark-red bg-red-100 dark:bg-red-400 text-red-500 dark:text-red-950;
@apply border-gray-300 dark:border-dark-200 bg-gray-100 dark:bg-dark-650 text-gray-600 dark:text-gray-400;
}
}

Expand Down
9 changes: 8 additions & 1 deletion resources/js/components/fieldtypes/assets/Asset.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,17 @@ export default {
},

label() {
return this.asset.basename;
return this.asset.invalid ? this.asset.id : this.asset.basename;
},

needsAlt() {
if (this.asset.invalid) return false;

return (this.asset.isImage || this.asset.isSvg) && !this.asset.values.alt;
},

invalidLabel() {
return __('messages.relationship_item_unavailable');
}
},

Expand All @@ -66,6 +72,7 @@ export default {

edit() {
if (this.readOnly) return;
if (this.asset.invalid) return;

this.editing = true;
},
Expand Down
9 changes: 6 additions & 3 deletions resources/js/components/fieldtypes/assets/AssetRow.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<tr class="cursor-grab bg-white dark:bg-dark-750 hover:bg-gray-100 dark:hover:bg-dark-700">
<tr class="cursor-grab bg-white dark:bg-dark-750 hover:bg-gray-100 dark:hover:bg-dark-700" :class="{ 'is-invalid': asset.invalid }">
<td class="flex items-center h-full">
<div
v-if="canShowSvg"
Expand All @@ -24,10 +24,11 @@
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')"
:class="{ 'text-gray-600 dark:text-gray-400': asset.invalid }"
:title="asset.invalid ? invalidLabel : __('Edit')"
:aria-label="__('Edit Asset')"
>
{{ asset.basename }}
{{ label }}
</button>

<button
Expand Down Expand Up @@ -71,6 +72,8 @@ export default {

methods: {
editOrOpen() {
if (this.asset.invalid) return;

return this.readOnly ? this.open() : this.edit();
}
},
Expand Down
5 changes: 3 additions & 2 deletions resources/js/components/fieldtypes/assets/AssetTile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
'is-image': isImage && !canShowSvg,
'is-svg': canShowSvg,
'is-file': !isImage && !canShowSvg,
'is-invalid': asset.invalid,
}"
:title="label"
:title="asset.invalid ? invalidLabel : label"
>
<asset-editor
v-if="editing"
Expand Down Expand Up @@ -41,7 +42,7 @@
<div class="asset-controls">
<div class="flex items-center justify-center space-x-1 rtl:space-x-reverse">
<template v-if="!readOnly">
<button @click="edit" class="btn btn-icon" :title="__('Edit')">
<button v-if="!asset.invalid" @click="edit" class="btn btn-icon" :title="__('Edit')">
<svg-icon name="micro/sharp-pencil" class="h-4 my-2" />
</button>

Expand Down
3 changes: 2 additions & 1 deletion resources/js/components/inputs/relationship/Item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

<div
v-if="item.invalid"
v-tooltip.top="__('An item with this ID could not be found')"
v-tooltip.top="__('messages.relationship_item_unavailable')"
class="truncate"
v-text="__(item.title)" />

<a v-if="!item.invalid && editable" @click.prevent="edit" v-text="__(item.title)" class="truncate" v-tooltip="item.title" :href="item.edit_url" />
Expand Down
1 change: 0 additions & 1 deletion resources/lang/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
"Always show": "عرض دائمًا",
"Always Show Set Button": "دائمًا عرض زر المجموعة",
"An entry will be deleted|:count entries will be deleted": "سيتم حذف إدخال واحد|:count إدخالات سيتم حذفها",
"An item with this ID could not be found": "لم يتم العثور على عنصر بهذا المعرف",
"and": "و",
"and :count more": "و :count المزيد",
"Antlers": "Antlers",
Expand Down
1 change: 1 addition & 0 deletions resources/lang/ar/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
'publish_actions_publish' => 'سيتم تطبيق التغييرات على النسخة الحالية وسيتم نشرها على الفور.',
'publish_actions_schedule' => 'سيتم تطبيق التغييرات على النسخة الحالية وسيتم نشرها في التاريخ المحدد.',
'publish_actions_unpublish' => 'ستتم إزالة النشر عن المراجعة الحالية.',
'relationship_item_unavailable' => 'هذا العنصر غير متاح. ربما تم حذفه، أو قد لا تملك صلاحية عرضه.',
'reset_password_notification_body' => 'تتلقى هذا البريد الإلكتروني لأننا تلقينا طلبًا لإعادة تعيين كلمة المرور لحسابك.',
'reset_password_notification_no_action' => 'إذا لم تطلب إعادة تعيين كلمة المرور، فلا يلزم اتخاذ أي إجراء آخر.',
'reset_password_notification_subject' => 'إشعار إعادة تعيين كلمة المرور',
Expand Down
1 change: 0 additions & 1 deletion resources/lang/az.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
"Always show": "Həmişə göstər",
"Always Show Set Button": "Həmişə Dəst Düyməsini Göstər",
"An entry will be deleted|:count entries will be deleted": "Bir giriş silinəcək|:count giriş silinəcək",
"An item with this ID could not be found": "Bu ID ilə element tapılmadı",
"and": "və",
"and :count more": "və :count daha",
"Antlers": "Antlers",
Expand Down
1 change: 1 addition & 0 deletions resources/lang/az/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
'publish_actions_publish' => 'İşləyən nüsxədəki dəyişikliklər qeydə tətbiq ediləcək və dərhal dərc ediləcək.',
'publish_actions_schedule' => 'İşləyən nüsxədəki dəyişikliklər qeydə tətbiq ediləcək və seçilmiş tarixdə dərc ediləcək.',
'publish_actions_unpublish' => 'Cari təkrar dərc edilməyəcək.',
'relationship_item_unavailable' => 'Bu element əlçatan deyil. Silinmiş ola bilər və ya onu görməyə icazəniz olmaya bilər.',
'reset_password_notification_body' => 'Bu e-poçtu şifrə sıfırlama tələbi aldığımız üçün alırsınız.',
'reset_password_notification_no_action' => 'Əgər şifrə sıfırlama tələbi etməmisinizsə, heç bir əlavə tədbir görülməlidir.',
'reset_password_notification_subject' => 'Şifrə Sıfırlama Bildirişi',
Expand Down
1 change: 0 additions & 1 deletion resources/lang/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
"Always show": "Vždy zobrazit",
"Always Show Set Button": "Vždy zobrazit tlačítko Set",
"An entry will be deleted|:count entries will be deleted": "Záznam bude smazán|:count záznamů bude smazáno",
"An item with this ID could not be found": "Položka s tímto ID nebyla nalezena",
"and": "a",
"and :count more": "a :count dalších",
"Antlers": "Parohy",
Expand Down
1 change: 1 addition & 0 deletions resources/lang/cs/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
'publish_actions_publish' => 'Publikovat',
'publish_actions_schedule' => 'Naplánovat',
'publish_actions_unpublish' => 'Zrušit publikaci',
'relationship_item_unavailable' => 'Tato položka není dostupná. Mohla být smazána nebo nemáte oprávnění ji zobrazit.',
'reset_password_notification_body' => 'Vaše heslo bylo změněno. Pokud jste nezměnili heslo, prosím kontaktujte správce webu.',
'reset_password_notification_no_action' => 'Toto je automatická zpráva. Prosím neodpovídejte na ni.',
'reset_password_notification_subject' => 'Změna hesla',
Expand Down
1 change: 0 additions & 1 deletion resources/lang/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
"Always show": "Vis altid",
"Always Show Set Button": "Vis altid knappen Set",
"An entry will be deleted|:count entries will be deleted": "En post slettes | :count poster slettes",
"An item with this ID could not be found": "Side med dette id kunne ikke findes",
"and": "og",
"and :count more": "og :count mere",
"Antlers": "Gevir",
Expand Down
1 change: 1 addition & 0 deletions resources/lang/da/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
'publish_actions_publish' => 'Ændringer i arbejdskopien anvendes og den offentliggøres straks.',
'publish_actions_schedule' => 'Ændringer i arbejdskopien anvendes og den vises offentliggjort på den valgte dato.',
'publish_actions_unpublish' => 'Den aktuelle revision vil ikke blive offentliggjort.',
'relationship_item_unavailable' => 'Dette element er ikke tilgængeligt. Det er muligvis blevet slettet, eller du har måske ikke tilladelse til at se det.',
'reset_password_notification_body' => 'Du modtager denne e-mail, fordi vi modtog en anmodning om nulstilling af adgangskode til din konto.',
'reset_password_notification_no_action' => 'Hvis du ikke anmodede om nulstilling af adgangskode, er der ikke behov for yderligere handling.',
'reset_password_notification_subject' => 'Nulstil adgangskode besked',
Expand Down
1 change: 0 additions & 1 deletion resources/lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
"Always show": "Immer einblenden",
"Always Show Set Button": "Set Button immer anzeigen",
"An entry will be deleted|:count entries will be deleted": "Ein Eintrag wird gelöscht|:count Einträge werden gelöscht",
"An item with this ID could not be found": "Ein Eintrag mit dieser ID wurde nicht gefunden",
"and": "und",
"and :count more": "und :count mehr",
"Antlers": "Antlers",
Expand Down
1 change: 1 addition & 0 deletions resources/lang/de/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
'publish_actions_publish' => 'Die Änderungen in der Arbeitskopie werden auf den Eintrag angewendet und dieser wird sofort veröffentlicht.',
'publish_actions_schedule' => 'Die Änderungen in der Arbeitskopie werden auf den Eintrag angewendet und dieser wird am gewünschten Datum veröffentlicht.',
'publish_actions_unpublish' => 'Die aktuelle Überarbeitung wird nicht veröffentlicht.',
'relationship_item_unavailable' => 'Dieses Element ist nicht verfügbar. Möglicherweise wurde es gelöscht oder du hast keine Berechtigung, es anzusehen.',
'reset_password_notification_body' => 'Du bekommst diese E-Mail, weil wir für dein Konto eine Anfrage zum Zurücksetzen des Passworts erhalten haben.',
'reset_password_notification_no_action' => 'Sollte die Anfrage zum Zurücksetzen des Passworts nicht von dir stammen, sind keine weiteren Maßnahmen erforderlich.',
'reset_password_notification_subject' => 'Passwort zurücksetzen',
Expand Down
1 change: 0 additions & 1 deletion resources/lang/de_CH.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
"Always show": "Immer einblenden",
"Always Show Set Button": "Set Button immer anzeigen",
"An entry will be deleted|:count entries will be deleted": "Ein Eintrag wird gelöscht|:count Einträge werden gelöscht",
"An item with this ID could not be found": "Ein Eintrag mit dieser ID wurde nicht gefunden",
"and": "und",
"and :count more": "und :count mehr",
"Antlers": "Antlers",
Expand Down
1 change: 1 addition & 0 deletions resources/lang/de_CH/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
'publish_actions_publish' => 'Die Änderungen in der Arbeitskopie werden auf den Eintrag angewendet und dieser wird sofort veröffentlicht.',
'publish_actions_schedule' => 'Die Änderungen in der Arbeitskopie werden auf den Eintrag angewendet und dieser wird am gewünschten Datum veröffentlicht.',
'publish_actions_unpublish' => 'Die aktuelle Überarbeitung wird nicht veröffentlicht.',
'relationship_item_unavailable' => 'Dieses Element ist nicht verfügbar. Möglicherweise wurde es gelöscht oder du hast keine Berechtigung, es anzusehen.',
'reset_password_notification_body' => 'Du bekommst dieses E-Mail, weil wir für dein Konto eine Anfrage zum Zurücksetzen des Passworts erhalten haben.',
'reset_password_notification_no_action' => 'Sollte die Anfrage zum Zurücksetzen des Passworts nicht von dir stammen, sind keine weiteren Massnahmen erforderlich.',
'reset_password_notification_subject' => 'Passwort zurücksetzen',
Expand Down
1 change: 1 addition & 0 deletions resources/lang/en/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
'publish_actions_publish' => 'Changes to the working copy will applied to the entry and it will be published immediately.',
'publish_actions_schedule' => 'Changes to the working copy will applied to the entry and it will be appear published on the selected date.',
'publish_actions_unpublish' => 'The current revision will be unpublished.',
'relationship_item_unavailable' => 'This item is unavailable. It may have been deleted, or you may not have permission to view it.',
'reset_password_notification_body' => 'You are receiving this email because we received a password reset request for your account.',
'reset_password_notification_no_action' => 'If you did not request a password reset, no further action is required.',
'reset_password_notification_subject' => 'Reset Password Notification',
Expand Down
1 change: 0 additions & 1 deletion resources/lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
"Always show": "Mostrar siempre",
"Always Show Set Button": "Mostrar siempre el botón Establecer",
"An entry will be deleted|:count entries will be deleted": "Una entrada será eliminada | :count entradas de :count se eliminarán",
"An item with this ID could not be found": "No se pudo encontrar un elemento con este ID",
"and": "y",
"and :count more": "y :count más",
"Antlers": "Cornamenta",
Expand Down
1 change: 1 addition & 0 deletions resources/lang/es/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
'publish_actions_publish' => 'Los cambios en la copia de trabajo se aplicarán a la entrada y se publicarán de inmediato.',
'publish_actions_schedule' => 'Los cambios en la copia de trabajo se aplicarán a la entrada y aparecerá publicada en la fecha seleccionada.',
'publish_actions_unpublish' => 'La revisión actual se ocultará.',
'relationship_item_unavailable' => 'Este elemento no está disponible. Es posible que se haya eliminado o que no tengas permiso para verlo.',
'reset_password_notification_body' => 'Te enviamos este correo electrónico porque recibimos una solicitud de restablecimiento de contraseña para tu cuenta.',
'reset_password_notification_no_action' => 'Si no solicitaste un restablecimiento de contraseña, tienes que hacer nada más.',
'reset_password_notification_subject' => 'Notificación de restablecimiento de contraseña',
Expand Down
1 change: 0 additions & 1 deletion resources/lang/et.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
"Always show": "Näita alati",
"Always Show Set Button": "Kuva alati komplekti nupp",
"An entry will be deleted|:count entries will be deleted": "Kirje kustutatakse|:count kirjet kustutatakse",
"An item with this ID could not be found": "Selle ID-ga üksust ei leitud",
"and": "ja",
"and :count more": "ja veel :count",
"Antlers": "Antlers",
Expand Down
1 change: 1 addition & 0 deletions resources/lang/et/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
'publish_actions_publish' => 'Töökoopia muudatused rakendatakse kirjele ja see avaldatakse kohe.',
'publish_actions_schedule' => 'Töökoopia muudatused rakendatakse kirjele ja see avaldatakse valitud kuupäeval.',
'publish_actions_unpublish' => 'Praegune redaktsioon muudetakse mustandiks.',
'relationship_item_unavailable' => 'See üksus pole saadaval. Võimalik, et see on kustutatud või sul pole õigust seda vaadata.',
'reset_password_notification_body' => 'Saite selle e-kirja, kuna saime sinu konto parooli lähtestamise taotluse.',
'reset_password_notification_no_action' => 'Kui sa parooli lähtestamist ei taotlenud, pole edasisi toiminguid vaja.',
'reset_password_notification_subject' => 'Parooli lähtestamise teavitus',
Expand Down
1 change: 0 additions & 1 deletion resources/lang/fa.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
"Always show": "همواره نمایان باشد",
"Always Show Set Button": "همواره دکمه‌ی مجموعه نمایان باشد",
"An entry will be deleted|:count entries will be deleted": "این مطلب حذف خواهد شد|:count مطلب حذف خواهد شد",
"An item with this ID could not be found": "آیتمی با این شناسه موجود نیست",
"and": "و",
"and :count more": "و :count عدد دیگر",
"Antlers": "Antlers",
Expand Down
1 change: 1 addition & 0 deletions resources/lang/fa/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
'publish_actions_publish' => 'تغییرات در نسخه فعلی اعمال شده و بلافاصله منتشر می‌شود.',
'publish_actions_schedule' => 'تغییرات در نسخه فعلی اعمال می‌شود و در تاریخ انتخاب شده منتشر می‌شود.',
'publish_actions_unpublish' => 'نسخه‌ی فعلی منتشر نخواهد شد.',
'relationship_item_unavailable' => 'این مورد در دسترس نیست. ممکن است حذف شده باشد یا اجازه مشاهده آن را نداشته باشید.',
'reset_password_notification_body' => 'شما این ایمیل را دریافت کرده‌اید زیرا یک درخواست بازنشانی گذرواژه برای حساب کاربری شما دریافت شده است.',
'reset_password_notification_no_action' => 'درصورتی که بازنشانی گذرواژه توسط شما درخواست نشده است نیازی نیست اقدامی انجام دهید.',
'reset_password_notification_subject' => 'ناتیفیکیشن برای بازنشانی گذرواژه',
Expand Down
1 change: 0 additions & 1 deletion resources/lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@
"Always Show Set Button": "Toujours afficher le bouton Ensemble",
"AM\/PM": "AM\/PM",
"An entry will be deleted|:count entries will be deleted": "Une entrée sera supprimée|:count entrées seront supprimées",
"An item with this ID could not be found": "Un élément avec cet ID n'a pas pu être trouvé",
"and": "et",
"and :count more": "et :count de plus",
"Antlers": "Antlers",
Expand Down
1 change: 1 addition & 0 deletions resources/lang/fr/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
'publish_actions_publish' => 'Les modifications apportées à la copie de travail s’appliqueront à l’entrée et celle-ci sera publiée immédiatement.',
'publish_actions_schedule' => 'Les modifications apportées à la copie de travail s’appliqueront à l’entrée et celle-ci paraîtra publiée à la date sélectionnée.',
'publish_actions_unpublish' => 'La révision actuelle sera dépubliée.',
'relationship_item_unavailable' => 'Cet élément n\'est pas disponible. Il a peut-être été supprimé, ou vous n\'avez pas l\'autorisation de le voir.',
'reset_password_notification_body' => 'Vous recevez cet email car nous avons reçu une demande de réinitialisation du mot de passe pour votre compte.',
'reset_password_notification_no_action' => 'Si vous n’avez pas demandé de réinitialisation de mot de passe, aucune autre action n’est requise.',
'reset_password_notification_subject' => 'Notification de réinitialisation du mot de passe',
Expand Down
1 change: 0 additions & 1 deletion resources/lang/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
"Always show": "Mindig mutasd",
"Always Show Set Button": "Mindig mutasd a Szett gombot",
"An entry will be deleted|:count entries will be deleted": "Egy bejegyzés törlésre kerül|:count bejegyzés törlésre kerül",
"An item with this ID could not be found": "Ezzel az azonosítóval rendelkező elem nem található",
"and": "és",
"and :count more": "és :count további",
"Antlers": "Agancs",
Expand Down
1 change: 1 addition & 0 deletions resources/lang/hu/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
'publish_actions_publish' => 'A munkapéldány módosításai a bejegyzésre alkalmazódnak, és azonnal közzétételre kerülnek.',
'publish_actions_schedule' => 'A munkapéldány módosításai a bejegyzésre alkalmazódnak, és a kiválasztott napon megjelennek.',
'publish_actions_unpublish' => 'A jelenlegi revízió közzététele visszavonásra kerül.',
'relationship_item_unavailable' => 'Ez az elem nem érhető el. Lehet, hogy törölték, vagy nincs jogosultsága a megtekintéséhez.',
'reset_password_notification_body' => 'Azért kapta ezt az e-mailt, mert jelszó-visszaállítási kérést kaptunk fiókjához.',
'reset_password_notification_no_action' => 'Ha nem kérte a jelszó visszaállítását, nincs szükség további teendőkre.',
'reset_password_notification_subject' => 'Jelszó-visszaállítási kérés',
Expand Down
1 change: 0 additions & 1 deletion resources/lang/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
"Always show": "Selalu tunjukkan",
"Always Show Set Button": "Selalu Tunjukkan Tombol Set",
"An entry will be deleted|:count entries will be deleted": "Entri akan dihapus|:count entri akan dihapus",
"An item with this ID could not be found": "Item dengan ID ini tidak dapat ditemukan",
"and": "dan",
"and :count more": "dan :count lainnya",
"Antlers": "Tanduk",
Expand Down
Loading
Loading