Skip to content

Commit

Permalink
chore: fix merge error
Browse files Browse the repository at this point in the history
  • Loading branch information
jingsam committed Sep 10, 2024
1 parent 652a884 commit f79580e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 124 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,27 +143,15 @@ const FunctionsList = ({
className="table-fixed overflow-x-auto"
head={
<>
<<<<<<< HEAD
<Table.th key="name">名称</Table.th>
<Table.th key="arguments" className="hidden md:table-cell">
参数
</Table.th>
<Table.th key="return_type" className="hidden lg:table-cell">
返回类型
</Table.th>
<Table.th key="security" className="hidden lg:table-cell w-[100px]">
安全
=======
<Table.th key="name">Name</Table.th>
<Table.th key="arguments" className="table-cell">
Arguments
参数
</Table.th>
<Table.th key="return_type" className="table-cell">
Return type
返回值类型
</Table.th>
<Table.th key="security" className="table-cell w-[100px]">
Security
>>>>>>> upstream/master
调用方式
</Table.th>
<Table.th key="buttons" className="w-1/6"></Table.th>
</>
Expand Down
32 changes: 2 additions & 30 deletions apps/studio/components/interfaces/Database/Indexes/Indexes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,39 +99,12 @@ const Indexes = () => {
<>
<div className="pb-8">
<div className="flex flex-col gap-y-4">
<<<<<<< HEAD
<div className="flex items-center justify-between">
<div className="flex items-center space-x-2">
{isLoadingSchemas && <ShimmeringLoader className="w-[260px]" />}
{isErrorSchemas && (
<div className="w-[260px] text-foreground-light text-sm border px-3 py-1.5 rounded flex items-center space-x-2">
<IconAlertCircle strokeWidth={2} size={16} />
<p>加载模式失败</p>
</div>
)}
{isSuccessSchemas && (
<SchemaSelector
className="w-[260px]"
size="small"
showError={false}
selectedSchemaName={selectedSchema}
onSelectSchema={setSelectedSchema}
/>
)}
<Input
size="small"
value={search}
className="w-64"
onChange={(e) => setSearch(e.target.value)}
placeholder="查找索引"
icon={<IconSearch size={14} />}
=======
<div className="flex items-center gap-2 flex-wrap">
{isLoadingSchemas && <ShimmeringLoader className="w-[260px]" />}
{isErrorSchemas && (
<div className="w-[260px] text-foreground-light text-sm border px-3 py-1.5 rounded flex items-center space-x-2">
<AlertCircle strokeWidth={2} size={16} />
<p>Failed to load schemas</p>
<p>加载模式失败</p>
</div>
)}
{isSuccessSchemas && (
Expand All @@ -141,15 +114,14 @@ const Indexes = () => {
showError={false}
selectedSchemaName={selectedSchema}
onSelectSchema={setSelectedSchema}
>>>>>>> upstream/master
/>
)}
<Input
size="small"
value={search}
className="w-64"
onChange={(e) => setSearch(e.target.value)}
placeholder="Search for an index"
placeholder="查找索引"
icon={<Search size={14} />}
/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,8 @@ const ProtectedSchemaWarning = ({ schema, entity }: { schema: string; entity: st
return (
<>
<Alert_Shadcn_>
<<<<<<< HEAD
<IconAlertCircle strokeWidth={2} />
<AlertTitle_Shadcn_>当前正在一个受保护的模式下查看{entity}</AlertTitle_Shadcn_>
=======
<AlertCircle strokeWidth={2} />
<AlertTitle_Shadcn_>Currently viewing {entity} from a protected schema</AlertTitle_Shadcn_>
>>>>>>> upstream/master
<AlertTitle_Shadcn_>当前正在一个受保护的模式下查看 {entity}</AlertTitle_Shadcn_>
<AlertDescription_Shadcn_>
<p className="mb-2">
模式 <code className="text-xs">{schema}</code> 是由系统管理的,当前被设置为只读,无法通过本界面进行编辑。
Expand Down
7 changes: 1 addition & 6 deletions apps/studio/components/interfaces/Database/Roles/RoleRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,8 @@ const RoleRow = ({ role, disabled = false, onSelectDelete }: RoleRowProps) => {
onSelectDelete(role)
}}
>
<<<<<<< HEAD
<IconTrash className="text-red-800" size="tiny" strokeWidth={2} />
<p>删除</p>
=======
<Trash className="text-red-800" size="14" strokeWidth={2} />
<p>Delete</p>
>>>>>>> upstream/master
<p>删除</p>
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
Expand Down
72 changes: 5 additions & 67 deletions apps/studio/components/interfaces/Database/Tables/TableList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,67 +209,10 @@ const TableList = ({
className="py-4 px-2"
icon={<Filter />}
/>
<<<<<<< HEAD
<Popover_Shadcn_>
<PopoverTrigger_Shadcn_ asChild>
<Button
type={visibleTypes.length !== 5 ? 'default' : 'dashed'}
className="py-4 px-2"
icon={<Filter />}
/>
</PopoverTrigger_Shadcn_>
<PopoverContent_Shadcn_ className="p-0 w-56" side="bottom" align="center">
<div className="px-3 pt-3 pb-2 flex flex-col gap-y-2">
<p className="text-xs">显示的实体类型</p>
<div className="flex flex-col">
{Object.entries(ENTITY_TYPE).map(([key, value]) => (
<div key={key} className="group flex items-center justify-between py-0.5">
<div className="flex items-center gap-x-2">
<Checkbox_Shadcn_
id={key}
name={key}
checked={visibleTypes.includes(value)}
onCheckedChange={() => {
if (visibleTypes.includes(value)) {
setVisibleTypes(visibleTypes.filter((y) => y !== value))
} else {
setVisibleTypes(visibleTypes.concat([value]))
}
}}
/>
<Label_Shadcn_ htmlFor={key} className="capitalize text-xs">
{ENTITY_TYPE_LABELS[value]}
</Label_Shadcn_>
</div>
<Button
size="tiny"
type="default"
onClick={() => setVisibleTypes([value])}
className="transition opacity-0 group-hover:opacity-100 h-auto px-1 py-0.5"
>
单选
</Button>
</div>
))}
</div>
</div>
</PopoverContent_Shadcn_>
</Popover_Shadcn_>
</div>
<Input
size="small"
className="w-64"
placeholder="查找表"
value={filterString}
onChange={(e: any) => setFilterString(e.target.value)}
icon={<Search size={12} />}
/>
</div>
=======
</PopoverTrigger_Shadcn_>
<PopoverContent_Shadcn_ className="p-0 w-56" side="bottom" align="center">
<div className="px-3 pt-3 pb-2 flex flex-col gap-y-2">
<p className="text-xs">Show entity types</p>
<p className="text-xs">显示的实体类型</p>
<div className="flex flex-col">
{Object.entries(ENTITY_TYPE).map(([key, value]) => (
<div key={key} className="group flex items-center justify-between py-0.5">
Expand All @@ -287,7 +230,7 @@ const TableList = ({
}}
/>
<Label_Shadcn_ htmlFor={key} className="capitalize text-xs">
{key.toLowerCase().replace('_', ' ')}
{ENTITY_TYPE_LABELS[value]}
</Label_Shadcn_>
</div>
<Button
Expand All @@ -296,7 +239,7 @@ const TableList = ({
onClick={() => setVisibleTypes([value])}
className="transition opacity-0 group-hover:opacity-100 h-auto px-1 py-0.5"
>
Select only
单选
</Button>
</div>
))}
Expand All @@ -308,12 +251,11 @@ const TableList = ({
<Input
size="small"
className="w-64"
placeholder="Search for a table"
placeholder="查找表"
value={filterString}
onChange={(e: any) => setFilterString(e.target.value)}
icon={<Search size={12} />}
/>
>>>>>>> upstream/master

{!isLocked && (
<ButtonTooltip
Expand All @@ -322,14 +264,10 @@ const TableList = ({
disabled={!canUpdateTables}
onClick={() => onAddTable()}
tooltip={{
<<<<<<< HEAD
content: { side: 'bottom', text: '需要创建表的额外权限' },
=======
content: {
side: 'bottom',
text: 'You need additional permissions to create tables',
text: '您需要额外的权限才能创建表',
},
>>>>>>> upstream/master
}}
>
新建表
Expand Down

0 comments on commit f79580e

Please sign in to comment.