Skip to content

Commit ca4a7ab

Browse files
committed
fix: move store column to left
1 parent fb545e7 commit ca4a7ab

5 files changed

Lines changed: 75 additions & 75 deletions

File tree

web/src/ChatListPage.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -300,21 +300,6 @@ class ChatListPage extends BaseListPage {
300300
// width: "90px",
301301
// sorter: (a, b) => a.owner.localeCompare(b.owner),
302302
// },
303-
{
304-
title: i18next.t("general:Name"),
305-
dataIndex: "name",
306-
key: "name",
307-
width: "100px",
308-
sorter: (a, b) => a.name.localeCompare(b.name),
309-
...this.getColumnSearchProps("name"),
310-
render: (text, record, index) => {
311-
return (
312-
<Link to={`chats/${text}`}>
313-
{text}
314-
</Link>
315-
);
316-
},
317-
},
318303
{
319304
title: i18next.t("general:Store"),
320305
dataIndex: "store",
@@ -333,6 +318,21 @@ class ChatListPage extends BaseListPage {
333318
);
334319
},
335320
},
321+
{
322+
title: i18next.t("general:Name"),
323+
dataIndex: "name",
324+
key: "name",
325+
width: "100px",
326+
sorter: (a, b) => a.name.localeCompare(b.name),
327+
...this.getColumnSearchProps("name"),
328+
render: (text, record, index) => {
329+
return (
330+
<Link to={`chats/${text}`}>
331+
{text}
332+
</Link>
333+
);
334+
},
335+
},
336336
// {
337337
// title: i18next.t("general:Created time"),
338338
// dataIndex: "createdTime",

web/src/FileListPage.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,21 @@ class FileListPage extends BaseListPage {
135135

136136
renderTable(files) {
137137
const columns = [
138+
{
139+
title: i18next.t("general:Store"),
140+
dataIndex: "store",
141+
key: "store",
142+
width: "130px",
143+
sorter: (a, b) => a.store.localeCompare(b.store),
144+
...this.getColumnSearchProps("store"),
145+
render: (text, record, index) => {
146+
return (
147+
<Link to={`/stores/${record.owner}/${text}`}>
148+
{text}
149+
</Link>
150+
);
151+
},
152+
},
138153
{
139154
title: i18next.t("general:Name"),
140155
dataIndex: "name",
@@ -168,21 +183,6 @@ class FileListPage extends BaseListPage {
168183
return Setting.getFormattedSize(text);
169184
},
170185
},
171-
{
172-
title: i18next.t("general:Store"),
173-
dataIndex: "store",
174-
key: "store",
175-
width: "130px",
176-
sorter: (a, b) => a.store.localeCompare(b.store),
177-
...this.getColumnSearchProps("store"),
178-
render: (text, record, index) => {
179-
return (
180-
<Link to={`/stores/${record.owner}/${text}`}>
181-
{text}
182-
</Link>
183-
);
184-
},
185-
},
186186
{
187187
title: i18next.t("store:Storage provider"),
188188
dataIndex: "storageProvider",

web/src/MessageListPage.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,24 @@ class MessageListPage extends BaseListPage {
219219
// width: "90px",
220220
// sorter: (a, b) => a.owner.localeCompare(b.owner),
221221
// },
222+
{
223+
title: i18next.t("general:Store"),
224+
dataIndex: "store",
225+
key: "store",
226+
width: "130px",
227+
sorter: (a, b) => (a.store || "").localeCompare(b.store || ""),
228+
...this.getColumnSearchProps("store"),
229+
render: (text, record, index) => {
230+
if (!text) {
231+
return null;
232+
}
233+
return (
234+
<Link to={`/stores/${record.owner}/${text}`}>
235+
{text}
236+
</Link>
237+
);
238+
},
239+
},
222240
{
223241
title: i18next.t("general:Name"),
224242
dataIndex: "name",
@@ -263,24 +281,6 @@ class MessageListPage extends BaseListPage {
263281
);
264282
},
265283
},
266-
{
267-
title: i18next.t("general:Store"),
268-
dataIndex: "store",
269-
key: "store",
270-
width: "130px",
271-
sorter: (a, b) => (a.store || "").localeCompare(b.store || ""),
272-
...this.getColumnSearchProps("store"),
273-
render: (text, record, index) => {
274-
if (!text) {
275-
return null;
276-
}
277-
return (
278-
<Link to={`/stores/${record.owner}/${text}`}>
279-
{text}
280-
</Link>
281-
);
282-
},
283-
},
284284
{
285285
title: i18next.t("general:Chat"),
286286
dataIndex: "chat",

web/src/StoreListPage.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -256,18 +256,6 @@ class StoreListPage extends BaseListPage {
256256

257257
renderTable(stores) {
258258
const columns = [
259-
{
260-
title: i18next.t("general:Avatar"),
261-
dataIndex: "avatar",
262-
key: "avatar",
263-
width: "72px",
264-
align: "center",
265-
render: (_, record) => {
266-
return (
267-
<Avatar src={record.avatar || Setting.getDefaultAiAvatar()} size={40} />
268-
);
269-
},
270-
},
271259
{
272260
title: i18next.t("general:Owner"),
273261
dataIndex: "owner",
@@ -310,6 +298,18 @@ class StoreListPage extends BaseListPage {
310298
sorter: (a, b) => a.displayName.localeCompare(b.displayName),
311299
...this.getColumnSearchProps("displayName"),
312300
},
301+
{
302+
title: i18next.t("general:Avatar"),
303+
dataIndex: "avatar",
304+
key: "avatar",
305+
width: "72px",
306+
align: "center",
307+
render: (_, record) => {
308+
return (
309+
<Avatar src={record.avatar || Setting.getDefaultAiAvatar()} size={40} />
310+
);
311+
},
312+
},
313313
{
314314
title: i18next.t("store:Is default"),
315315
dataIndex: "isDefault",

web/src/VectorListPage.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,21 @@ class VectorListPage extends BaseListPage {
115115

116116
renderTable(vectors) {
117117
const columns = [
118+
{
119+
title: i18next.t("general:Store"),
120+
dataIndex: "store",
121+
key: "store",
122+
width: "130px",
123+
sorter: (a, b) => a.store.localeCompare(b.store),
124+
...this.getColumnSearchProps("store"),
125+
render: (text, record, index) => {
126+
return (
127+
<Link to={`/stores/${record.owner}/${text}`}>
128+
{text}
129+
</Link>
130+
);
131+
},
132+
},
118133
{
119134
title: i18next.t("general:Name"),
120135
dataIndex: "name",
@@ -137,21 +152,6 @@ class VectorListPage extends BaseListPage {
137152
// width: "200px",
138153
// sorter: (a, b) => a.displayName.localeCompare(b.displayName),
139154
// },
140-
{
141-
title: i18next.t("general:Store"),
142-
dataIndex: "store",
143-
key: "store",
144-
width: "130px",
145-
sorter: (a, b) => a.store.localeCompare(b.store),
146-
...this.getColumnSearchProps("store"),
147-
render: (text, record, index) => {
148-
return (
149-
<Link to={`/stores/${record.owner}/${text}`}>
150-
{text}
151-
</Link>
152-
);
153-
},
154-
},
155155
{
156156
title: i18next.t("general:Provider"),
157157
dataIndex: "provider",

0 commit comments

Comments
 (0)