Sfoglia il codice sorgente

Fix/workspace logo style (#17164)

tags/1.2.0
NFish 7 mesi fa
parent
commit
161724fb17
Nessun account collegato all'indirizzo email del committer

+ 7
- 3
web/app/components/base/logo/logo-embedded-chat-header.tsx Vedi File

import classNames from '@/utils/classnames'
import type { FC } from 'react' import type { FC } from 'react'


type LogoEmbeddedChatHeaderProps = { type LogoEmbeddedChatHeaderProps = {
const LogoEmbeddedChatHeader: FC<LogoEmbeddedChatHeaderProps> = ({ const LogoEmbeddedChatHeader: FC<LogoEmbeddedChatHeaderProps> = ({
className, className,
}) => { }) => {
return (
return <picture>
<source media="(resolution: 1x)" srcSet='/logo/logo-embedded-chat-header.png' />
<source media="(resolution: 2x)" srcSet='/logo/logo-embedded-chat-header@2x.png' />
<source media="(resolution: 3x)" srcSet='/logo/logo-embedded-chat-header@3x.png' />
<img <img
src='/logo/logo-embedded-chat-header.png' src='/logo/logo-embedded-chat-header.png'
className={`block h-6 w-auto ${className}`}
alt='logo' alt='logo'
className={classNames('block h-6 w-auto', className)}
/> />
)
</picture>
} }


export default LogoEmbeddedChatHeader export default LogoEmbeddedChatHeader

+ 8
- 4
web/app/components/header/account-dropdown/workplace-selector/index.tsx Vedi File

gap-1.5 p-0.5 hover:bg-state-base-hover ${open && 'bg-state-base-hover'} rounded-[10px] gap-1.5 p-0.5 hover:bg-state-base-hover ${open && 'bg-state-base-hover'} rounded-[10px]
`, `,
)}> )}>
<div className='flex h-7 w-7 items-center justify-center rounded-lg bg-[#EFF4FF] text-xs font-medium text-primary-600'>{currentWorkspace?.name[0].toLocaleUpperCase()}</div>
<div className='flex h-6 w-6 items-center justify-center rounded-md bg-components-icon-bg-blue-solid text-[13px]'>
<span className='bg-gradient-to-r from-components-avatar-shape-fill-stop-0 to-components-avatar-shape-fill-stop-100 bg-clip-text font-semibold uppercase text-shadow-shadow-1 opacity-90'>{currentWorkspace?.name[0]?.toLocaleUpperCase()}</span>
</div>
<div className='flex flex-row'> <div className='flex flex-row'>
<div className={'system-sm-medium max-w-[80px] truncate text-text-secondary'}>{currentWorkspace?.name}</div> <div className={'system-sm-medium max-w-[80px] truncate text-text-secondary'}>{currentWorkspace?.name}</div>
<RiArrowDownSLine className='h-4 w-4 text-text-secondary' /> <RiArrowDownSLine className='h-4 w-4 text-text-secondary' />
<MenuItems <MenuItems
className={cn( className={cn(
` `
shadows-shadow-lg absolute left-[-15px] mt-1 flex w-[280px] flex-col items-start rounded-xl
shadows-shadow-lg absolute left-[-15px] mt-1 flex w-[280px] flex-col items-start rounded-xl bg-components-panel-bg-blur backdrop-blur-[5px]
`, `,
)} )}
> >
<div className="flex w-full flex-col items-start self-stretch rounded-xl border-[0.5px] border-components-panel-border bg-components-panel-bg-blur p-1 pb-2 shadow-lg ">
<div className="flex w-full flex-col items-start self-stretch rounded-xl border-[0.5px] border-components-panel-border p-1 pb-2 shadow-lg ">
<div className='flex items-start self-stretch px-3 pb-0.5 pt-1'> <div className='flex items-start self-stretch px-3 pb-0.5 pt-1'>
<span className='system-xs-medium-uppercase flex-1 text-text-tertiary'>{t('common.userProfile.workspace')}</span> <span className='system-xs-medium-uppercase flex-1 text-text-tertiary'>{t('common.userProfile.workspace')}</span>
</div> </div>
{ {
workspaces.map(workspace => ( workspaces.map(workspace => (
<div className='flex items-center gap-2 self-stretch rounded-lg py-1 pl-3 pr-2 hover:bg-state-base-hover' key={workspace.id} onClick={() => handleSwitchWorkspace(workspace.id)}> <div className='flex items-center gap-2 self-stretch rounded-lg py-1 pl-3 pr-2 hover:bg-state-base-hover' key={workspace.id} onClick={() => handleSwitchWorkspace(workspace.id)}>
<div className='flex h-6 w-6 items-center justify-center rounded-md bg-[#EFF4FF] text-xs font-medium text-primary-600'>{workspace.name[0].toLocaleUpperCase()}</div>
<div className='flex h-6 w-6 items-center justify-center rounded-md bg-components-icon-bg-blue-solid text-[13px]'>
<span className='bg-gradient-to-r from-components-avatar-shape-fill-stop-0 to-components-avatar-shape-fill-stop-100 bg-clip-text font-semibold uppercase text-shadow-shadow-1 opacity-90'>{workspace?.name[0]?.toLocaleUpperCase()}</span>
</div>
<div className='system-md-regular line-clamp-1 grow cursor-pointer overflow-hidden text-ellipsis text-text-secondary'>{workspace.name}</div> <div className='system-md-regular line-clamp-1 grow cursor-pointer overflow-hidden text-ellipsis text-text-secondary'>{workspace.name}</div>
<PlanBadge plan={workspace.plan as Plan} /> <PlanBadge plan={workspace.plan as Plan} />
</div> </div>

+ 3
- 2
web/app/components/header/account-setting/members-page/index.tsx Vedi File

import { useAppContext } from '@/context/app-context' import { useAppContext } from '@/context/app-context'
import Avatar from '@/app/components/base/avatar' import Avatar from '@/app/components/base/avatar'
import type { InvitationResult } from '@/models/common' import type { InvitationResult } from '@/models/common'
import LogoEmbeddedChatHeader from '@/app/components/base/logo/logo-embedded-chat-header'
import { useProviderContext } from '@/context/provider-context' import { useProviderContext } from '@/context/provider-context'
import { Plan } from '@/app/components/billing/type' import { Plan } from '@/app/components/billing/type'
import Button from '@/app/components/base/button' import Button from '@/app/components/base/button'
<> <>
<div className='flex flex-col'> <div className='flex flex-col'>
<div className='mb-4 flex items-center gap-3 rounded-xl border-l-[0.5px] border-t-[0.5px] border-divider-subtle bg-gradient-to-r from-background-gradient-bg-fill-chat-bg-2 to-background-gradient-bg-fill-chat-bg-1 p-3 pr-5'> <div className='mb-4 flex items-center gap-3 rounded-xl border-l-[0.5px] border-t-[0.5px] border-divider-subtle bg-gradient-to-r from-background-gradient-bg-fill-chat-bg-2 to-background-gradient-bg-fill-chat-bg-1 p-3 pr-5'>
<LogoEmbeddedChatHeader className='!h-12 !w-12' />
<div className='flex h-12 w-12 items-center justify-center rounded-xl bg-components-icon-bg-blue-solid text-[20px]'>
<span className='bg-gradient-to-r from-components-avatar-shape-fill-stop-0 to-components-avatar-shape-fill-stop-100 bg-clip-text font-semibold uppercase text-shadow-shadow-1 opacity-90'>{currentWorkspace?.name[0]?.toLocaleUpperCase()}</span>
</div>
<div className='grow'> <div className='grow'>
<div className='system-md-semibold text-text-secondary'>{currentWorkspace?.name}</div> <div className='system-md-semibold text-text-secondary'>{currentWorkspace?.name}</div>
{enableBilling && ( {enableBilling && (

BIN
web/public/logo/logo-embedded-chat-header.png Vedi File


BIN
web/public/logo/logo-embedded-chat-header@2x.png Vedi File


BIN
web/public/logo/logo-embedded-chat-header@3x.png Vedi File


Loading…
Annulla
Salva