Insights placeholders and defaults

This commit is contained in:
Ben Haynes
2021-05-31 18:56:12 -04:00
parent 6c2014976f
commit 85f42dbe5d
5 changed files with 22 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
<template>
<v-select :value="value" :disabled="disabled" :items="items" @input="$emit('input', $event)" />
<v-select :value="value" :disabled="disabled" :items="items" @input="$emit('input', $event)" :placeholder="$t('select_a_collection')" />
</template>
<script lang="ts">

View File

@@ -12,7 +12,7 @@
:value="value"
:disabled="disabled"
:items="selectItems"
:placeholder="placeholder"
:placeholder="$t('select_a_field')"
/>
</template>

View File

@@ -363,6 +363,7 @@ relationship_not_setup: The relationship hasn't been configured correctly
display_template_not_setup: The display template option is misconfigured
collection_field_not_setup: The collection field option is misconfigured
select_a_collection: Select a Collection
select_a_field: Select a Field
active: Active
users: Users
activity: Activity
@@ -549,11 +550,16 @@ insights: Insights
dashboard: Dashboard
panel: Panel
panel_header: Panel Header
panel_name_placeholder: Name this panel...
panel_note_placeholder: Optional details about this panel...
panel_delete_confirm: Are you sure you want to delete this panel? This action can not be undone.
dashboard_delete_confirm: Are you sure you want to delete this dashboard? This action can not be undone.
edit_dashboard: Edit Dashboard
delete_dashboard: Delete Dashboard
visible: Visible
prefix_placeholder: Text before value...
suffix_placeholder: Text after value...
decimals_placeholder: Number of decimal places...
no_dashboards: No Dashboards
no_dashboards_copy: You dont have any Dashboards yet.
create_dashboard: Create Dashboard

View File

@@ -40,7 +40,7 @@
<div class="field half-right">
<p class="type-label">{{ $t('name') }}</p>
<v-input :nullable="false" v-model="edits.name" :disabled="edits.show_header !== true" />
<v-input :nullable="false" v-model="edits.name" :disabled="edits.show_header !== true" :placeholder="$t('panel_name_placeholder')" />
</div>
<div class="field half-left">
@@ -55,7 +55,7 @@
<div class="field full">
<p class="type-label">{{ $t('note') }}</p>
<v-input v-model="edits.note" :disabled="edits.show_header !== true" />
<v-input v-model="edits.note" :disabled="edits.show_header !== true" :placeholder="$t('panel_note_placeholder')" />
</div>
</div>
</div>
@@ -85,7 +85,7 @@ export default defineComponent({
name: props.panel?.name,
note: props.panel?.note,
icon: props.panel?.icon ?? 'insert_chart',
color: props.panel?.color,
color: props.panel?.color ?? '#00C897',
width: props.panel?.width ?? undefined,
height: props.panel?.height ?? undefined,
position_x: props.panel?.position_x ?? 1,

View File

@@ -71,6 +71,9 @@ export default definePanel({
meta: {
interface: 'input',
width: 'half',
options: {
placeholder: '$t:decimals_placeholder',
},
},
schema: {
default_value: 2,
@@ -116,8 +119,10 @@ export default definePanel({
name: '$t:filter',
meta: {
interface: 'code',
note: '[Learn More: Filter Rules](/admin/docs/reference/filter-rules)',
options: {
language: 'json',
placeholder: '{\n\t<field>: {\n\t\t<operator>: <value>\n\t}\n}',
},
},
},
@@ -128,6 +133,9 @@ export default definePanel({
meta: {
interface: 'input',
width: 'half',
options: {
placeholder: '$t:prefix_placeholder',
},
},
},
{
@@ -137,6 +145,9 @@ export default definePanel({
meta: {
interface: 'input',
width: 'half',
options: {
placeholder: '$t:suffix_placeholder',
},
},
},
],