kopia lustrzana https://github.com/elk-zone/elk
				
				
				
			fix: remove emoji in status title (#932)
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>pull/978/head
							rodzic
							
								
									c2850a34ae
								
							
						
					
					
						commit
						c1e89582f8
					
				| 
						 | 
				
			
			@ -20,7 +20,7 @@ const createdAt = useFormattedDateTime(status.createdAt)
 | 
			
		|||
const { t } = useI18n()
 | 
			
		||||
 | 
			
		||||
useHeadFixed({
 | 
			
		||||
  title: () => `${status.account.displayName || status.account.acct} ${t('common.in')} ${t('app_name')}: "${removeHTMLTags(status.content) || ''}"`,
 | 
			
		||||
  title: () => `${getDisplayName(status.account)} ${t('common.in')} ${t('app_name')}: "${removeHTMLTags(status.content) || ''}"`,
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
const isDM = $computed(() => status.visibility === 'direct')
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,7 @@
 | 
			
		|||
import type { mastodon } from 'masto'
 | 
			
		||||
 | 
			
		||||
export function getDisplayName(account?: mastodon.v1.Account, options?: { rich?: boolean }) {
 | 
			
		||||
  const displayName = account?.displayName || account?.username || ''
 | 
			
		||||
export function getDisplayName(account: mastodon.v1.Account, options?: { rich?: boolean }) {
 | 
			
		||||
  const displayName = account.displayName || account.username || account.acct || ''
 | 
			
		||||
  if (options?.rich)
 | 
			
		||||
    return displayName
 | 
			
		||||
  return displayName.replace(/:([\w-]+?):/g, '')
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Ładowanie…
	
		Reference in New Issue