resolve conflicts

pull/16900/head
crazywoola 1 year ago
parent 2cad98f01f
commit b4dbc051f4

@ -100,6 +100,7 @@ app_partial_fields = {
"updated_at": TimestampField,
"tags": fields.List(fields.Nested(tag_fields)),
"access_mode": fields.String,
"create_user_name": fields.String,
}

@ -294,6 +294,15 @@ class App(Base):
return tags or []
@property
def create_user_name(self):
if self.created_by:
account = db.session.query(Account).filter(Account.id == self.created_by).first()
if account:
return account.name
return None
class AppModelConfig(Base):
__tablename__ = "app_model_configs"

@ -317,8 +317,9 @@ const AppCard = ({ app, onRefresh }: AppCardProps) => {
<AppTypeIcon type={app.mode} wrapperClassName='absolute -bottom-0.5 -right-0.5 w-4 h-4 shadow-sm' className='h-3 w-3' />
</div>
<div className='w-0 grow py-[1px]'>
<div className='flex items-center text-sm font-semibold leading-5 text-text-secondary'>
<div className='flex items-center justify-between text-sm font-semibold leading-5 text-text-secondary'>
<div className='truncate' title={app.name}>{app.name}</div>
<div className='truncate'>{app.create_user_name}</div>
</div>
<div className='flex items-center text-[10px] font-medium leading-[18px] text-text-tertiary'>
{app.mode === 'advanced-chat' && <div className='truncate'>{t('app.types.advanced').toUpperCase()}</div>}

@ -316,6 +316,8 @@ export type App = {
name: string
/** Description */
description: string
/** UserName */
create_user_name: string;
/**
* Icon Type

Loading…
Cancel
Save