@xleddyl/nuxt-cms 0.1.50 → 0.1.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
>
|
|
55
55
|
<CmsIcon name="bars-2" class="size-4" />
|
|
56
56
|
</button>
|
|
57
|
-
<span class="cms-block-bar-name" :title="
|
|
57
|
+
<span class="cms-block-bar-name" :title="barTitle(item)">{{ barLabel(item) }}</span>
|
|
58
58
|
<div class="cms-block-bar-actions">
|
|
59
59
|
<CmsButton
|
|
60
60
|
icon="trash"
|
|
@@ -143,6 +143,7 @@
|
|
|
143
143
|
<script setup>
|
|
144
144
|
import {
|
|
145
145
|
isTranslatableMediaField,
|
|
146
|
+
mediaFilename,
|
|
146
147
|
mediaIconFor,
|
|
147
148
|
mediaPublicUrl,
|
|
148
149
|
mediaTypeForKey,
|
|
@@ -174,6 +175,13 @@ function blockOf(item) {
|
|
|
174
175
|
function labelOf(item) {
|
|
175
176
|
return blockOf(item)?.label ?? String(item.type);
|
|
176
177
|
}
|
|
178
|
+
function barLabel(item) {
|
|
179
|
+
const key = mediaKeyOf(item);
|
|
180
|
+
return key ? mediaFilename(key) : labelOf(item);
|
|
181
|
+
}
|
|
182
|
+
function barTitle(item) {
|
|
183
|
+
return mediaKeyOf(item) ?? labelOf(item);
|
|
184
|
+
}
|
|
177
185
|
function mediaKeyOf(item) {
|
|
178
186
|
const locale = props.locale ?? i18n.defaultLocale;
|
|
179
187
|
for (const [key, field] of Object.entries(blockOf(item)?.fields ?? {})) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xleddyl/nuxt-cms",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.51",
|
|
4
4
|
"description": "Lightweight CMS that ships with your Nuxt app: runs on the Nitro server, content types defined in code, /cms admin panel, GraphQL API, SQLite or Postgres. No external CMS needed!",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Edoardo Alberti (https://github.com/xleddyl)",
|