mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 03:29:02 +01:00 
			
		
		
		
	Add label definition type for standalone time
This commit is contained in:
		
							parent
							
								
									aa01161a40
								
							
						
					
					
						commit
						2f7d061ef1
					
				| @ -6,7 +6,7 @@ function parse(value) { | |||||||
|         if (token === 'promoted') { |         if (token === 'promoted') { | ||||||
|             defObj.isPromoted = true; |             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; |             defObj.labelType = token; | ||||||
|         } |         } | ||||||
|         else if (['single', 'multi'].includes(token)) { |         else if (['single', 'multi'].includes(token)) { | ||||||
|  | |||||||
| @ -125,6 +125,7 @@ const TPL = ` | |||||||
|                   <option value="boolean">${t('attribute_detail.boolean')}</option> |                   <option value="boolean">${t('attribute_detail.boolean')}</option> | ||||||
|                   <option value="date">${t('attribute_detail.date')}</option> |                   <option value="date">${t('attribute_detail.date')}</option> | ||||||
|                   <option value="datetime">${t('attribute_detail.date_time')}</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> |                   <option value="url">${t('attribute_detail.url')}</option> | ||||||
|                 </select> |                 </select> | ||||||
|             </td> |             </td> | ||||||
|  | |||||||
| @ -225,6 +225,9 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget { | |||||||
|             else if (definition.labelType === 'datetime') { |             else if (definition.labelType === 'datetime') { | ||||||
|                 $input.prop('type', 'datetime-local') |                 $input.prop('type', 'datetime-local') | ||||||
|             } |             } | ||||||
|  |             else if (definition.labelType === 'time') { | ||||||
|  |                 $input.prop('type', 'time') | ||||||
|  |             } | ||||||
|             else if (definition.labelType === 'url') { |             else if (definition.labelType === 'url') { | ||||||
|                 $input.prop("placeholder", t("promoted_attributes.url_placeholder")); |                 $input.prop("placeholder", t("promoted_attributes.url_placeholder")); | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -304,6 +304,7 @@ | |||||||
|     "boolean": "布尔值", |     "boolean": "布尔值", | ||||||
|     "date": "日期", |     "date": "日期", | ||||||
|     "date_time": "日期和时间", |     "date_time": "日期和时间", | ||||||
|  |     "time": "时间", | ||||||
|     "url": "网址", |     "url": "网址", | ||||||
|     "precision_title": "值设置界面中浮点数后的位数。", |     "precision_title": "值设置界面中浮点数后的位数。", | ||||||
|     "precision": "精度", |     "precision": "精度", | ||||||
|  | |||||||
| @ -310,6 +310,7 @@ | |||||||
|     "boolean": "Boolescher Wert", |     "boolean": "Boolescher Wert", | ||||||
|     "date": "Datum", |     "date": "Datum", | ||||||
|     "date_time": "Datum und Uhrzeit", |     "date_time": "Datum und Uhrzeit", | ||||||
|  |     "time": "Uhrzeit", | ||||||
|     "url": "URL", |     "url": "URL", | ||||||
|     "precision_title": "Wie viele Nachkommastellen im Wert-Einstellungs-Interface verfügbar sein sollen.", |     "precision_title": "Wie viele Nachkommastellen im Wert-Einstellungs-Interface verfügbar sein sollen.", | ||||||
|     "precision": "Präzision", |     "precision": "Präzision", | ||||||
|  | |||||||
| @ -315,6 +315,7 @@ | |||||||
|     "boolean": "Boolean", |     "boolean": "Boolean", | ||||||
|     "date": "Date", |     "date": "Date", | ||||||
|     "date_time": "Date & Time", |     "date_time": "Date & Time", | ||||||
|  |     "time": "Time", | ||||||
|     "url": "URL", |     "url": "URL", | ||||||
|     "precision_title": "What number of digits after floating point should be available in the value setting interface.", |     "precision_title": "What number of digits after floating point should be available in the value setting interface.", | ||||||
|     "precision": "Precision", |     "precision": "Precision", | ||||||
|  | |||||||
| @ -311,6 +311,7 @@ | |||||||
|     "boolean": "Booleano", |     "boolean": "Booleano", | ||||||
|     "date": "Fecha", |     "date": "Fecha", | ||||||
|     "date_time": "Fecha y hora", |     "date_time": "Fecha y hora", | ||||||
|  |     "time": "Hora", | ||||||
|     "url": "URL", |     "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_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", |     "precision": "Precisión", | ||||||
|  | |||||||
| @ -311,6 +311,7 @@ | |||||||
|     "boolean": "Booléen", |     "boolean": "Booléen", | ||||||
|     "date": "Date", |     "date": "Date", | ||||||
|     "date_time": "Date et heure", |     "date_time": "Date et heure", | ||||||
|  |     "time": "Heure", | ||||||
|     "url": "URL", |     "url": "URL", | ||||||
|     "precision_title": "Nombre de chiffres après la virgule devant être disponible dans l'interface définissant la valeur.", |     "precision_title": "Nombre de chiffres après la virgule devant être disponible dans l'interface définissant la valeur.", | ||||||
|     "precision": "Précision", |     "precision": "Précision", | ||||||
|  | |||||||
| @ -127,6 +127,7 @@ | |||||||
|     "custom_resource_provider": "a se vedea <a href=\"javascript:\" data-help-page=\"custom-request-handler.html\">Custom request handler</a>", |     "custom_resource_provider": "a se vedea <a href=\"javascript:\" data-help-page=\"custom-request-handler.html\">Custom request handler</a>", | ||||||
|     "date": "Dată", |     "date": "Dată", | ||||||
|     "date_time": "Dată și timp", |     "date_time": "Dată și timp", | ||||||
|  |     "time": "Timp", | ||||||
|     "delete": "Șterge", |     "delete": "Șterge", | ||||||
|     "digits": "număr de zecimale", |     "digits": "număr de zecimale", | ||||||
|     "disable_inclusion": "script-urile cu această etichetă nu vor fi incluse în execuția scriptului părinte.", |     "disable_inclusion": "script-urile cu această etichetă nu vor fi incluse în execuția scriptului părinte.", | ||||||
|  | |||||||
| @ -8,7 +8,7 @@ function parse(value: string): DefinitionObject { | |||||||
|         if (token === 'promoted') { |         if (token === 'promoted') { | ||||||
|             defObj.isPromoted = true; |             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; |             defObj.labelType = token; | ||||||
|         } |         } | ||||||
|         else if (['single', 'multi'].includes(token)) { |         else if (['single', 'multi'].includes(token)) { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 mm21
						mm21