halo/ui/console-src/modules/contents
Takagi e5bc699fb2
feat: support filtering attachments in the library by file media type (#5893)
#### What type of PR is this?

/kind feature
/area core
/area ui

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

为 `/apis/api.console.halo.run/v1alpha1/attachments` 接口增加了 `accepts` 可选参数,用于根据附件的 `MediaType` 进行筛选。

为附件库增加通过文件的 MediaType 类型进行筛选的筛选项。

同时支持使用了 `CoreSelectorProvider` 组件的文件选择框的筛选。现在只会显示 `accepts` 所支持的文件。

#### How to test it?

测试 ui 端文件选择框的类型筛选是否正确有效。
测试使用了 `CoreSelectorProvider` 组件的 `accepts` 是否有效。

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

Fixes #5054

#### Does this PR introduce a user-facing change?
```release-note
附件库支持按文件类型进行过滤
```
2024-05-16 02:32:35 +00:00
..
_components Move folder console to ui 2024-02-02 22:22:51 +08:00
attachments feat: support filtering attachments in the library by file media type (#5893) 2024-05-16 02:32:35 +00:00
comments refactor: using index mechanisms to optimize comment queries (#5453) 2024-03-08 13:32:06 +00:00
pages feat: add cleanup feature for post snapshots (#5822) 2024-04-29 08:41:08 +00:00
posts feat: add cleanup feature for post snapshots (#5822) 2024-04-29 08:41:08 +00:00