Studio: UX-improvements after user testing

This commit is contained in:
Pieter Vander Vennet 2023-10-21 09:35:54 +02:00
parent 2041a9245d
commit 44c1548e89
19 changed files with 100 additions and 35 deletions

View file

@ -20,17 +20,17 @@
const isTranslation = schema.hints.typehint === "translation" || schema.hints.typehint === "rendered" || ConfigMetaUtils.isTranslation(schema);
let type = schema.hints.typehint ?? "string";
let rendervalue = schema.type === "boolean" ? undefined : ((schema.hints.inline ?? schema.path.join(".")) + " <b>{translated(value)}</b>")
let helperArgs = undefined
let inline = schema.hints.inline !== undefined
let rendervalue = schema.type === "boolean" ? undefined : ((schema.hints.inline ?? schema.path.join(".")) + " <b>{translated(value)}</b>");
let helperArgs = schema.hints.typehelper?.split(",");
let inline = schema.hints.inline !== undefined;
if (isTranslation) {
type = "translation";
if(schema.hints.inline){
const inlineValue = schema.hints.inline
rendervalue = inlineValue
inline = false
helperArgs = [inlineValue.substring(0, inlineValue.indexOf("{")), inlineValue.substring(inlineValue.indexOf("}") + 1)]
if (schema.hints.inline) {
const inlineValue = schema.hints.inline;
rendervalue = inlineValue;
inline = false;
helperArgs = [inlineValue.substring(0, inlineValue.indexOf("{")), inlineValue.substring(inlineValue.indexOf("}") + 1)];
}
}
if (type.endsWith("[]")) {
@ -164,6 +164,8 @@
<div class="alert">{msg.message}</div>
{/each}
{/if}
<span class="subtle">{schema.path.join(".")}</span>
{#if window.location.hostname === "127.0.0.1"}
<span class="subtle">{schema.path.join(".")}</span>
{/if}
</div>
{/if}