diff --git a/index.html b/index.html index cdd0520..121f524 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ - + MiaoDirectory diff --git a/src/hooks/init.ts b/src/hooks/init.ts index ac28ef5..8364c27 100644 --- a/src/hooks/init.ts +++ b/src/hooks/init.ts @@ -98,4 +98,21 @@ export default function init() { return false } ) + pluginCenter.registerComponent( + "miaoImages", + "图片浏览", + async () => (await import("@/views/miaoImages.vue")).default, + (vDirs, vFiles) => { + if (vDirs.length === 0 && vFiles.length === 0) { + return false; + } + miao: for (let vf of vFiles) + for (let end of [".xbm", ".tif", "pjp", ".svgz", "jpg", "jpeg", "ico", "tiff", ".gif", "svg", ".jfif", ".webp", ".png", ".bmp", "pjpeg", ".avif"]) { + if (vf.name.endsWith(end)) { + continue miao; + } + } + return true; + } + ); } diff --git a/src/views/miaoImages.vue b/src/views/miaoImages.vue new file mode 100644 index 0000000..d3c9e95 --- /dev/null +++ b/src/views/miaoImages.vue @@ -0,0 +1,167 @@ + + + + +