mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 21:11:30 +08:00 
			
		
		
		
	style(next): promoted attributes widget: tweak buttons
This commit is contained in:
		
							parent
							
								
									0c88c4c3ee
								
							
						
					
					
						commit
						e93d47f664
					
				| @ -16,7 +16,7 @@ const TPL = ` | |||||||
|         flex-shrink: 0.4; |         flex-shrink: 0.4; | ||||||
|         overflow: auto; |         overflow: auto; | ||||||
|     } |     } | ||||||
|      | 
 | ||||||
|     .promoted-attributes-container { |     .promoted-attributes-container { | ||||||
|         margin: 0 1.5em; |         margin: 0 1.5em; | ||||||
|         overflow: auto; |         overflow: auto; | ||||||
| @ -39,7 +39,7 @@ const TPL = ` | |||||||
|         display: table-cell; |         display: table-cell; | ||||||
|         padding: 1px 0; |         padding: 1px 0; | ||||||
|     } |     } | ||||||
|      | 
 | ||||||
|     .promoted-attribute-cell div.input-group { |     .promoted-attribute-cell div.input-group { | ||||||
|         margin-left: 10px; |         margin-left: 10px; | ||||||
|         display: flex; |         display: flex; | ||||||
| @ -54,9 +54,9 @@ const TPL = ` | |||||||
|         flex-grow: 0; |         flex-grow: 0; | ||||||
|         width: unset; |         width: unset; | ||||||
|     } |     } | ||||||
|      | 
 | ||||||
|     </style> |     </style> | ||||||
|      | 
 | ||||||
|     <div class="promoted-attributes-container"></div> |     <div class="promoted-attributes-container"></div> | ||||||
| </div>`; | </div>`; | ||||||
| 
 | 
 | ||||||
| @ -272,7 +272,7 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget { | |||||||
| 
 | 
 | ||||||
|         if (definition.multiplicity === "multi") { |         if (definition.multiplicity === "multi") { | ||||||
|             const $addButton = $("<span>") |             const $addButton = $("<span>") | ||||||
|                 .addClass("bx bx-plus pointer") |                 .addClass("bx bx-plus pointer tn-tool-button") | ||||||
|                 .prop("title", t("promoted_attributes.add_new_attribute")) |                 .prop("title", t("promoted_attributes.add_new_attribute")) | ||||||
|                 .on("click", async () => { |                 .on("click", async () => { | ||||||
|                     const $new = await this.createPromotedAttributeCell( |                     const $new = await this.createPromotedAttributeCell( | ||||||
| @ -292,7 +292,7 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget { | |||||||
|                 }); |                 }); | ||||||
| 
 | 
 | ||||||
|             const $removeButton = $("<span>") |             const $removeButton = $("<span>") | ||||||
|                 .addClass("bx bx-trash pointer") |                 .addClass("bx bx-trash pointer tn-tool-button") | ||||||
|                 .prop("title", t("promoted_attributes.remove_this_attribute")) |                 .prop("title", t("promoted_attributes.remove_this_attribute")) | ||||||
|                 .on("click", async () => { |                 .on("click", async () => { | ||||||
|                     const attributeId = $input.attr("data-attribute-id"); |                     const attributeId = $input.attr("data-attribute-id"); | ||||||
|  | |||||||
| @ -1876,4 +1876,11 @@ div.promoted-attribute-cell div.input-group { | |||||||
| div.promoted-attribute-cell input { | div.promoted-attribute-cell input { | ||||||
|     padding: 2px 8px; |     padding: 2px 8px; | ||||||
|     font-weight: 500; |     font-weight: 500; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | div.promoted-attribute-cell .multiplicity { | ||||||
|  |     --icon-button-size: 28px; | ||||||
|  | 
 | ||||||
|  |     margin-left: 8px; | ||||||
|  |     font-size: 0; /* Prevent whitespaces creating a gap between buttons */ | ||||||
| } | } | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Adorian Doran
						Adorian Doran