From 9d0936ed54debdae458f34ab88d388639052d446 Mon Sep 17 00:00:00 2001 From: Daniel Lautzenheiser Date: Thu, 31 Aug 2023 11:51:03 -0400 Subject: [PATCH] chore: add file relation widget to text proxy backend --- .../backends/proxy/_data/settings.json | 22 +++++++++++++++++-- .../core/dev-test/backends/proxy/config.yml | 20 +++++++++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/packages/core/dev-test/backends/proxy/_data/settings.json b/packages/core/dev-test/backends/proxy/_data/settings.json index 4b8b8e2f..efcaea07 100644 --- a/packages/core/dev-test/backends/proxy/_data/settings.json +++ b/packages/core/dev-test/backends/proxy/_data/settings.json @@ -5,5 +5,23 @@ "front_limit": 4, "author": "Bob", "thumb": "/backends/proxy/assets/upload/kanefreeman_2.jpg" - } -} \ No newline at end of file + }, + "icons": [ + { + "name": "right", + "icon": "/src/icons/right.svg" + }, + { + "name": "left", + "icon": "/src/icons/left.svg" + }, + { + "name": "download", + "icon": "/src/icons/download.svg" + }, + { + "name": "zoom", + "icon": "/src/icons/zoom.svg" + } + ] +} diff --git a/packages/core/dev-test/backends/proxy/config.yml b/packages/core/dev-test/backends/proxy/config.yml index 172f509f..fbebe0db 100644 --- a/packages/core/dev-test/backends/proxy/config.yml +++ b/packages/core/dev-test/backends/proxy/config.yml @@ -74,6 +74,16 @@ collections: name: image widget: image required: false + - name: icons + label: Icon + widget: relation + collection: settings + required: false + file: general + search_fields: ['icons.*.name'] + display_fields: ['icons.*.name'] + options_length: 200 + value_field: icons.*.icon - label: Body name: body widget: markdown @@ -139,6 +149,16 @@ collections: name: thumb widget: image required: false + - label: Icons + name: icons + widget: list + fields: + - name: name + label: Name + widget: string + - name: icon + label: Icon + widget: string - name: authors label: Authors file: packages/core/dev-test/backends/proxy/_data/authors.yml