Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
Add label definition type for standalone time
mm212f7d061ef12c
diff --git a/src/public/app/services/promoted_attribute_definition_parser.js b/src/public/app/services/promoted_attribute_definition_parser.jsindex 81d097c420..5ab5e94adb 100644--- a/src/public/app/services/promoted_attribute_definition_parser.js+++ b/src/public/app/services/promoted_attribute_definition_parser.js@@ -6,7 +6,7 @@ function parse(value) {if (token === 'promoted') {defObj.isPromoted = true;}- else if (['text', 'number', 'boolean', 'date', 'datetime', 'url'].includes(token)) {+ else if (['text', 'number', 'boolean', 'date', 'datetime', 'time', 'url'].includes(token)) {defObj.labelType = token;}else if (['single', 'multi'].includes(token)) {diff --git a/src/public/app/widgets/attribute_widgets/attribute_detail.js b/src/public/app/widgets/attribute_widgets/attribute_detail.jsindex 46f1d2e6ab..10d779d67d 100644--- a/src/public/app/widgets/attribute_widgets/attribute_detail.js+++ b/src/public/app/widgets/attribute_widgets/attribute_detail.js@@ -125,6 +125,7 @@ const TPL = `<option value="boolean">${t('attribute_detail.boolean')}</option><option value="date">${t('attribute_detail.date')}</option><option value="datetime">${t('attribute_detail.date_time')}</option>+ <option value="time">${t('attribute_detail.time')}</option><option value="url">${t('attribute_detail.url')}</option></select></td>diff --git a/src/public/app/widgets/ribbon_widgets/promoted_attributes.js b/src/public/app/widgets/ribbon_widgets/promoted_attributes.jsindex 5c91b4223d..4be9900674 100644--- a/src/public/app/widgets/ribbon_widgets/promoted_attributes.js+++ b/src/public/app/widgets/ribbon_widgets/promoted_attributes.js@@ -225,6 +225,9 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget {else if (definition.labelType === 'datetime') {$input.prop('type', 'datetime-local')}+ else if (definition.labelType === 'time') {+ $input.prop('type', 'time')+ }else if (definition.labelType === 'url') {$input.prop("placeholder", t("promoted_attributes.url_placeholder"));diff --git a/src/public/translations/cn/translation.json b/src/public/translations/cn/translation.jsonindex 0f875af1ff..6c5aeb8b94 100644--- a/src/public/translations/cn/translation.json+++ b/src/public/translations/cn/translation.json@@ -304,6 +304,7 @@"boolean": "布尔值","date": "日期","date_time": "日期和时间",+ "time": "时间","url": "网址","precision_title": "值设置界面中浮点数后的位数。","precision": "精度",diff --git a/src/public/translations/de/translation.json b/src/public/translations/de/translation.jsonindex 406e25aad8..55df50b2d8 100644--- a/src/public/translations/de/translation.json+++ b/src/public/translations/de/translation.json@@ -310,6 +310,7 @@"boolean": "Boolescher Wert","date": "Datum","date_time": "Datum und Uhrzeit",+ "time": "Uhrzeit","url": "URL","precision_title": "Wie viele Nachkommastellen im Wert-Einstellungs-Interface verfügbar sein sollen.","precision": "Präzision",diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.jsonindex fa18f9ee49..040e676851 100644--- a/src/public/translations/en/translation.json+++ b/src/public/translations/en/translation.json@@ -315,6 +315,7 @@"boolean": "Boolean","date": "Date","date_time": "Date & Time",+ "time": "Time","url": "URL","precision_title": "What number of digits after floating point should be available in the value setting interface.","precision": "Precision",diff --git a/src/public/translations/es/translation.json b/src/public/translations/es/translation.jsonindex 4bf01df74e..d22c314c47 100644--- a/src/public/translations/es/translation.json+++ b/src/public/translations/es/translation.json@@ -311,6 +311,7 @@"boolean": "Booleano","date": "Fecha","date_time": "Fecha y hora",+ "time": "Hora","url": "URL","precision_title": "Cantidad de dígitos después del punto flotante que deben estar disponibles en la interfaz de configuración del valor.","precision": "Precisión",diff --git a/src/public/translations/fr/translation.json b/src/public/translations/fr/translation.jsonindex 38596a619c..276c6147ba 100644--- a/src/public/translations/fr/translation.json+++ b/src/public/translations/fr/translation.json@@ -311,6 +311,7 @@"boolean": "Booléen","date": "Date","date_time": "Date et heure",+ "time": "Heure","url": "URL","precision_title": "Nombre de chiffres après la virgule devant être disponible dans l'interface définissant la valeur.","precision": "Précision",diff --git a/src/public/translations/ro/translation.json b/src/public/translations/ro/translation.jsonindex 698b234933..ab39601295 100644--- a/src/public/translations/ro/translation.json+++ b/src/public/translations/ro/translation.json@@ -127,6 +127,7 @@"custom_resource_provider": "a se vedea <a href=\"javascript:\" data-help-page=\"custom-request-handler.html\">Custom request handler</a>","date": "Dată","date_time": "Dată și timp",+ "time": "Timp","delete": "Șterge","digits": "număr de zecimale","disable_inclusion": "script-urile cu această etichetă nu vor fi incluse în execuția scriptului părinte.",diff --git a/src/services/promoted_attribute_definition_parser.ts b/src/services/promoted_attribute_definition_parser.tsindex ac066c788a..1b9a73a80a 100644--- a/src/services/promoted_attribute_definition_parser.ts+++ b/src/services/promoted_attribute_definition_parser.ts@@ -8,7 +8,7 @@ function parse(value: string): DefinitionObject {if (token === 'promoted') {defObj.isPromoted = true;}- else if (['text', 'number', 'boolean', 'date', 'datetime', 'url'].includes(token)) {+ else if (['text', 'number', 'boolean', 'date', 'datetime', 'time', 'url'].includes(token)) {defObj.labelType = token;}else if (['single', 'multi'].includes(token)) {