@@ -252,13 +252,13 @@ export const toggleUpdateRelationBtn = (menuItemsElement: HTMLElement, avId: str
252
252
} ;
253
253
254
254
const updateCopyRelatedItems = ( menuElement : Element ) => {
255
- const inputElement = menuElement . querySelector ( ".b3-form__icona .b3-text-field" ) ;
255
+ const inputElement = menuElement . querySelector ( ".b3-form__icona .b3-text-field" ) as HTMLInputElement ;
256
256
if ( menuElement . querySelector ( ".b3-menu__icon.fn__grab" ) ) {
257
257
inputElement . nextElementSibling . classList . remove ( "fn__none" ) ;
258
- inputElement . classList . add ( "b3-form__icona-input" ) ;
258
+ inputElement . style . paddingRight = "26px" ;
259
259
} else {
260
260
inputElement . nextElementSibling . classList . add ( "fn__none" ) ;
261
- inputElement . classList . remove ( "b3-form__icona-input" ) ;
261
+ inputElement . style . paddingRight = "" ;
262
262
}
263
263
} ;
264
264
@@ -326,13 +326,14 @@ draggable="true">${genSelectItemHTML({
326
326
} ) ;
327
327
}
328
328
} ) ;
329
+ const refElement = menuElement . querySelector ( ".popover__block" ) ;
329
330
menuElement . querySelector ( ".b3-menu__items" ) . innerHTML = `${ selectHTML }
330
331
<button class="b3-menu__separator"></button>
331
332
${ html }
332
333
${ keyword ? genSelectItemHTML ( {
333
334
type : "empty" ,
334
335
newName : Lute . EscapeHTMLStr ( keyword ) ,
335
- text : menuElement . querySelector ( ".popover__block" ) . outerHTML
336
+ text : `<span style="color: var(--b3-protyle-inline-blockref-color);" data-id=" ${ refElement . getAttribute ( "data-id" ) } "> ${ refElement . textContent } </span>` ,
336
337
} ) : ( html ? "" : genSelectItemHTML ( { type : "empty" } ) ) } `;
337
338
menuElement . querySelector ( ".b3-menu__items .b3-menu__item:not(.fn__none)" ) . classList . add ( "b3-menu__item--current" ) ;
338
339
updateCopyRelatedItems ( menuElement ) ;
@@ -410,7 +411,7 @@ ${html || genSelectItemHTML({type: "empty"})}`;
410
411
event . stopPropagation ( ) ;
411
412
filterItem ( options . menuElement , options . cellElements [ 0 ] , inputElement . value ) ;
412
413
} ) ;
413
- updateCopyRelatedItems ( options . menuElement )
414
+ updateCopyRelatedItems ( options . menuElement ) ;
414
415
options . menuElement . querySelector ( '[data-type="copyRelatedItems"]' ) . addEventListener ( "click" , ( ) => {
415
416
let copyText = "" ;
416
417
const selectedElements = options . menuElement . querySelectorAll ( '.b3-menu__item[draggable="true"]' ) ;
@@ -444,9 +445,9 @@ export const getRelationHTML = (data: IAV, cellElements?: HTMLElement[]) => {
444
445
if ( colRelationData && colRelationData . avID ) {
445
446
return `<div data-av-id="${ colRelationData . avID } " class="fn__flex-column">
446
447
<div class="b3-menu__item" data-type="nobg">
447
- <div class="b3-form__icona">
448
- <input class="b3-text-field fn__flex-1 b3-form__icona-input fn__size200 "/>
449
- <svg class="b3-form__icona-icon ariaLabel" data-position="north" data-type="copyRelatedItems" aria-label="${ window . siyuan . languages . copy } ${ window . siyuan . languages . relatedItems } "><use xlink:href="#iconCopy"></use></svg>
448
+ <div class="b3-form__icona fn__flex-1 ">
449
+ <input class="b3-text-field fn__block" style="min-width: 190px "/>
450
+ <svg class="b3-form__icona-icon ariaLabel fn__none " data-position="north" data-type="copyRelatedItems" aria-label="${ window . siyuan . languages . copy } ${ window . siyuan . languages . relatedItems } "><use xlink:href="#iconCopy"></use></svg>
450
451
</div>
451
452
<span class="fn__space"></span>
452
453
<span style="color: var(--b3-protyle-inline-blockref-color);max-width: 200px" data-id="" class="popover__block fn__pointer fn__ellipsis"></span>
0 commit comments