TootBottomSheet: fix title may have multiple lines
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				/ depoly (push) Successful in 1m4s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	/ depoly (push) Successful in 1m4s
				
			This commit is contained in:
		
							parent
							
								
									49b7f2891b
								
							
						
					
					
						commit
						70649e97e6
					
				
					 1 changed files with 26 additions and 8 deletions
				
			
		| 
						 | 
					@ -109,13 +109,11 @@ const TootBottomSheet: Component = (props) => {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const tootTitle = () => {
 | 
					  const tootDisplayName = () => {
 | 
				
			||||||
    const t = toot();
 | 
					    const t = toot();
 | 
				
			||||||
    if (t) {
 | 
					    if (t) {
 | 
				
			||||||
      const name = resolveCustomEmoji(t.account.displayName, t.account.emojis);
 | 
					      return resolveCustomEmoji(t.account.displayName, t.account.emojis);
 | 
				
			||||||
      return `${name}'s toot`;
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return "Someone's toot";
 | 
					 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const actSession = () => {
 | 
					  const actSession = () => {
 | 
				
			||||||
| 
						 | 
					@ -196,6 +194,18 @@ const TootBottomSheet: Component = (props) => {
 | 
				
			||||||
    .name :global(img) {
 | 
					    .name :global(img) {
 | 
				
			||||||
      max-height: 1em;
 | 
					      max-height: 1em;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    .name {
 | 
				
			||||||
 | 
					      display: grid;
 | 
				
			||||||
 | 
					      grid-template-columns: 1fr auto;
 | 
				
			||||||
 | 
					      height: calc(var(--title-size) * var(--title-line-height));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      > :first-child {
 | 
				
			||||||
 | 
					        overflow: hidden;
 | 
				
			||||||
 | 
					        white-space: nowrap;
 | 
				
			||||||
 | 
					        text-overflow: ellipsis;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
  `;
 | 
					  `;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return (
 | 
					  return (
 | 
				
			||||||
| 
						 | 
					@ -217,11 +227,19 @@ const TootBottomSheet: Component = (props) => {
 | 
				
			||||||
              {pushedCount() > 0 ? <BackIcon /> : <CloseIcon />}
 | 
					              {pushedCount() > 0 ? <BackIcon /> : <CloseIcon />}
 | 
				
			||||||
            </IconButton>
 | 
					            </IconButton>
 | 
				
			||||||
            <Title
 | 
					            <Title
 | 
				
			||||||
 | 
					              component="div"
 | 
				
			||||||
              class="name"
 | 
					              class="name"
 | 
				
			||||||
 | 
					              use:solid-styled
 | 
				
			||||||
 | 
					            >
 | 
				
			||||||
 | 
					              <span
 | 
				
			||||||
                ref={(e: HTMLElement) =>
 | 
					                ref={(e: HTMLElement) =>
 | 
				
			||||||
                createRenderEffect(() => (e.innerHTML = tootTitle()))
 | 
					                  createRenderEffect(
 | 
				
			||||||
 | 
					                    () => (e.innerHTML = tootDisplayName() ?? "Someone"),
 | 
				
			||||||
 | 
					                  )
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            ></Title>
 | 
					              ></span>
 | 
				
			||||||
 | 
					              <span>'s toot</span>
 | 
				
			||||||
 | 
					            </Title>
 | 
				
			||||||
          </Toolbar>
 | 
					          </Toolbar>
 | 
				
			||||||
        </AppBar>
 | 
					        </AppBar>
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue