File tree Expand file tree Collapse file tree 2 files changed +10
-29
lines changed Expand file tree Collapse file tree 2 files changed +10
-29
lines changed Original file line number Diff line number Diff line change 2929 }
3030 }
3131
32- export function truncateText(node : HTMLElement , text ? : string ) {
33- let originalText = text ?? node .textContent ;
32+ export function truncateText(node : HTMLElement ) {
33+ let originalText = node .textContent ;
3434
3535 function checkOverflow() {
3636 node .textContent = originalText ;
7070 window .addEventListener (' resize' , debouncedCheck );
7171
7272 return {
73- update(newText ? : string ) {
74- originalText = newText ?? node .textContent ;
73+ update() {
74+ originalText = node .textContent ;
7575 addToBatch (checkOverflow );
7676 },
7777 destroy() {
Original file line number Diff line number Diff line change 2121 </script >
2222
2323{#if region }
24- <Copy value ={getProjectEndpoint ()} copyText ={` Copy endpoint (${region ? .name }) ` }>
24+ <Copy value ={getProjectEndpoint ()} copyText ={` Copy endpoint (${region .name }) ` }>
2525 <Tag size =" xs" variant =" code" >
26- <Layout .Stack direction =" row" gap =" s" alignItems =" center" inline >
27- <Icon icon ={IconDuplicate } size =" s" slot =" start" />
28- <span class =" endpoint-label" >API endpoint</span >
29-
30- {#if flagSrc }
31- <img
32- width ={16 }
33- height ={12 }
34- src ={flagSrc }
35- alt ={region ?.name }
36- class =" region-flag"
37- style:border-radius =" 2.5px" />
38- {/if }
39-
40- <span
41- style:white-space =" nowrap"
42- class =" text u-line-height-1-5"
43- style:overflow =" hidden"
44- style:word-break =" break-all"
45- use:truncateText ={region ?.name }
46- style:font-family =" unset" >
47- {region ?.name }
48- </span >
49- </Layout .Stack >
26+ <Icon icon ={IconDuplicate } size =" s" slot =" start" />
27+ <span class =" endpoint-label" > API endpoint </span >
28+ {#if flagSrc }
29+ <img class ="region-flag" src ={flagSrc } alt ={region ?.name } />
30+ {/if }
5031 </Tag >
5132 </Copy >
5233{/if }
You can’t perform that action at this time.
0 commit comments