Skip to content

Commit

Permalink
feat: attachments supports sorting by display name (#5494)
Browse files Browse the repository at this point in the history
#### What type of PR is this?

/area ui
/kind feature
/milestone 2.14.0

#### What this PR does / why we need it:

附件管理的排序功能支持按照文件名排序。

#### Which issue(s) this PR fixes:

Fixes #5028

#### Special notes for your reviewer:

测试方式:

1. 上传若干附件。
2. 测试根据文件名降序/升序功能是否符合预期。

#### Does this PR introduce a user-facing change?

```release-note
附件管理的排序功能支持按照文件名排序。
```
  • Loading branch information
ruibaby committed Mar 11, 2024
1 parent b4729b9 commit 014625f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
12 changes: 12 additions & 0 deletions ui/console-src/modules/contents/attachments/AttachmentList.vue
Expand Up @@ -372,6 +372,18 @@ onMounted(() => {
),
value: 'metadata.creationTimestamp,asc',
},
{
label: t(
'core.attachment.filters.sort.items.display_name_desc'
),
value: 'spec.displayName,desc',
},
{
label: t(
'core.attachment.filters.sort.items.display_name_asc'
),
value: 'spec.displayName,asc',
},
{
label: t(
'core.attachment.filters.sort.items.size_desc'
Expand Down
4 changes: 3 additions & 1 deletion ui/src/locales/en.yaml
Expand Up @@ -40,7 +40,7 @@ core:
buttons:
sending: sending
send: Send Code
countdown: "resend after {timer} seconds"
countdown: resend after {timer} seconds
toast_success: verification code sent
toast_email_empty: please enter your email address
password:
Expand Down Expand Up @@ -545,6 +545,8 @@ core:
create_time_asc: Earliest uploaded
size_desc: Descending order by file size
size_asc: Ascending order by file size
display_name_asc: Ascending order by display name
display_name_desc: Descending order by display name
view_type:
items:
grid: Grid Mode
Expand Down
2 changes: 2 additions & 0 deletions ui/src/locales/zh-CN.yaml
Expand Up @@ -533,6 +533,8 @@ core:
create_time_asc: 较晚上传
size_desc: 文件大小降序
size_asc: 文件大小升序
display_name_asc: 文件名升序
display_name_desc: 文件名降序
view_type:
items:
grid: 网格模式
Expand Down
2 changes: 2 additions & 0 deletions ui/src/locales/zh-TW.yaml
Expand Up @@ -521,6 +521,8 @@ core:
create_time_asc: 較晚上傳
size_desc: 文件大小降序
size_asc: 文件大小升序
display_name_asc: 文件名升序
display_name_desc: 文件名降序
view_type:
items:
grid: 網格模式
Expand Down

0 comments on commit 014625f

Please sign in to comment.