diff --git a/README.md b/README.md
index 810bd2f..1a6f99d 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,14 @@
+# anian-plugin-photos
+
+> 基于原作者v1.5.1代码修改
+
+#### v1.5.1-1
+1. 新增对视频的支持
+
+
+
+
+
# plugin-photos
Halo 2.0 的相册管理插件, 支持在 Console 进行管理以及为主题端提供 `/photos` 页面路由。
@@ -352,4 +363,4 @@ List<[#PhotoVo](#photovo)>
| 对应模型 | group | kind |
| ---------- | ---------------- | ---------- |
| 图库 | core.halo.run | Photo |
-| 图库分组 | core.halo.run | PhotoGroup |
\ No newline at end of file
+| 图库分组 | core.halo.run | PhotoGroup |
diff --git a/build.gradle b/build.gradle
index aa88ec6..2a4e69e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -18,7 +18,7 @@ repositories {
}
dependencies {
- implementation platform('run.halo.tools.platform:plugin:2.17.0-SNAPSHOT')
+ implementation platform('run.halo.tools.platform:plugin:2.20.11')
compileOnly 'run.halo.app:api'
testImplementation 'run.halo.app:api'
diff --git a/console/src/components/LazyImage.vue b/console/src/components/LazyImage.vue
index 91e3645..98721d3 100644
--- a/console/src/components/LazyImage.vue
+++ b/console/src/components/LazyImage.vue
@@ -1,5 +1,5 @@
+
loading...
- error
+
+ 加载失败
+
+
+
+
-
+
\ No newline at end of file
diff --git a/console/src/views/PhotoList.vue b/console/src/views/PhotoList.vue
index f2a58ad..f83e49b 100644
--- a/console/src/views/PhotoList.vue
+++ b/console/src/views/PhotoList.vue
@@ -240,26 +240,28 @@ const onAttachmentsSelect = async (attachments: AttachmentLike[]) => {
type?: string;
}[];
- for (const photo of photos) {
- const type = photo.type;
- if (!type) {
- Toast.error("只支持选择图片");
- nextTick(() => {
- attachmentModal.value = true;
- });
+for (const photo of photos) {
+ const type = photo.type;
- return;
- }
- const fileType = type.split("/")[0];
- if (fileType !== "image") {
- Toast.error("只支持选择图片");
- nextTick(() => {
- attachmentModal.value = true;
- });
- return;
- }
+ if (!type) {
+ Toast.error("只支持选择图片或视频");
+ nextTick(() => {
+ attachmentModal.value = true;
+ });
+ return;
}
+ const fileType = type.split("/")[0];
+
+ if (fileType !== "image" && fileType !== "video") {
+ Toast.error("只支持选择图片或视频");
+ nextTick(() => {
+ attachmentModal.value = true;
+ });
+ return;
+ }
+}
+
const createRequests = photos.map((photo) => {
return axiosInstance.post("/apis/core.halo.run/v1alpha1/photos", {
metadata: {
@@ -310,7 +312,7 @@ const onEditingModalClose = () => {
-
+
@@ -383,7 +385,7 @@ const onEditingModalClose = () => {
@click="handleOpenEditingModal(photo)"
>
-
+
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index 8d0c7be..39f80c5 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1 +1 @@
-version=1.0.0-SNAPSHOT
+version=1.5.1-1
diff --git a/src/main/resources/plugin.yaml b/src/main/resources/plugin.yaml
index 2e556cf..18fa534 100644
--- a/src/main/resources/plugin.yaml
+++ b/src/main/resources/plugin.yaml
@@ -8,7 +8,6 @@ metadata:
"store.halo.run/app-id": "app-BmQJW"
spec:
enabled: true
- version: 1.0.0
requires: ">=2.21.0"
author:
name: Halo