memi-board 0.38.1 → 0.39.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/composables/useMemiBoardModeration.d.ts +3 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +24 -7
- package/dist/index.js.map +1 -1
- package/dist/runtime/components/CategorySettings.vue +11 -1
- package/dist/runtime/components/Editor.vue +58 -29
- package/dist/runtime/components/Settings.vue +15 -1
- package/dist/types.d.ts +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -416,7 +416,7 @@ const router = useRouter()
|
|
|
416
416
|
|
|
417
417
|
### 보드 (구 카테고리)
|
|
418
418
|
|
|
419
|
-
- 문서: `memiBoardSettings/{boardId}` → `{ label, listView, writeRole, commentWriteRole, visibility, allowedStaffUids, order, updatedAt }`
|
|
419
|
+
- 문서: `memiBoardSettings/{boardId}` → `{ label, listView, editorType, writeRole, commentWriteRole, visibility, allowedStaffUids, order, updatedAt }`
|
|
420
420
|
- 설정이 없으면 빈 목록이며 기본 보드를 자동 생성하지 않음
|
|
421
421
|
- `MemiBoardSettings`에서 관리자가 보드별 저장·삭제·순서·리스트뷰·글쓰기 최소 역할 관리
|
|
422
422
|
- `boardId`는 문서 ID이자 각 글(`memiBoardPosts`)의 `boardId` 참조값이므로 생성 후 변경하지 않는 것을 권장
|
|
@@ -5,6 +5,8 @@ import { ModerationResult } from '../types';
|
|
|
5
5
|
* 콘텐츠 차단(local/ai) 시 board users 경고 누적.
|
|
6
6
|
*/
|
|
7
7
|
export declare function useMemiBoardModeration(): {
|
|
8
|
-
checkText: (text: string
|
|
8
|
+
checkText: (text: string, opts?: {
|
|
9
|
+
skipFilter?: boolean;
|
|
10
|
+
}) => Promise<ModerationResult>;
|
|
9
11
|
checkImage: (file: File) => Promise<ModerationResult>;
|
|
10
12
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export type { VersionHistoryEntry } from './data/versionHistory';
|
|
|
34
34
|
export { formatDate, formatFullDate, formatRelativeDate, formatTimestampDetails } from './utils/formatDate';
|
|
35
35
|
export { slugify } from './utils/slugify';
|
|
36
36
|
export { DEFAULT_BLOCK_BAN_THRESHOLD, DEFAULT_BLOCK_BAN_DECAY_MS, effectiveModerationBlockCount, isModerationWriteRestricted, moderationWriteRestrictedUntilMs, formatRestrictedUntilLabel, } from './utils/moderation-strike';
|
|
37
|
-
export type { Attachment, EditorImageEntry, ModerationStatus, PostModel, PostDetail, UserPostModel, CommentModel, BoardUserRole, BoardUserModel, BoardUserPrivateModel, AuthorMemoModel, AuthorMemoSentiment, BoardCategory, BoardModel, BoardListView, BoardWriteRole, BoardVisibility, BoardSettingsModel, BoardLikeModel, BoardLikeTarget, BoardReportModel, BoardReportReason, BoardReportStatus, BoardReportTarget, BoardSection, BoardSectionCols, BoardSectionHeight, BoardSectionKind, BoardSectionSort, BoardSectionLayout, ModerationResult, } from './types';
|
|
37
|
+
export type { Attachment, EditorImageEntry, ModerationStatus, PostModel, PostDetail, UserPostModel, CommentModel, BoardUserRole, BoardUserModel, BoardUserPrivateModel, AuthorMemoModel, AuthorMemoSentiment, BoardCategory, BoardModel, BoardListView, BoardEditorType, BoardWriteRole, BoardVisibility, BoardSettingsModel, BoardLikeModel, BoardLikeTarget, BoardReportModel, BoardReportReason, BoardReportStatus, BoardReportTarget, BoardSection, BoardSectionCols, BoardSectionHeight, BoardSectionKind, BoardSectionSort, BoardSectionLayout, ModerationResult, } from './types';
|
|
38
38
|
export { plainTextFromHtml, hasBodyText, hasBodyImage, isContentEmpty, titleFromBody, } from './utils/postBody';
|
|
39
39
|
export { extractEditorImageUrls } from './utils/extractEditorImageUrls';
|
|
40
40
|
export { useMemiBoardWritingAssistant, WRITING_ASSISTANT_DAILY_LIMIT, } from './composables/useMemiBoardWritingAssistant';
|
package/dist/index.js
CHANGED
|
@@ -580,6 +580,7 @@ function Et(e, t, n) {
|
|
|
580
580
|
description: (typeof t.description == "string" ? t.description : "") || "",
|
|
581
581
|
visibility: Tt(t.visibility),
|
|
582
582
|
listView: t.listView ?? "default",
|
|
583
|
+
editorType: t.editorType ?? (t.listView === "image" ? "image" : "default"),
|
|
583
584
|
writeRole: t.writeRole ?? "user",
|
|
584
585
|
commentWriteRole: t.commentWriteRole ?? "user",
|
|
585
586
|
allowedStaffUids: Array.isArray(t.allowedStaffUids) ? t.allowedStaffUids : []
|
|
@@ -630,6 +631,7 @@ function Dt() {
|
|
|
630
631
|
description: (e.description ?? "").trim(),
|
|
631
632
|
visibility: Tt(e.visibility),
|
|
632
633
|
listView: e.listView ?? "default",
|
|
634
|
+
editorType: e.editorType ?? (e.listView === "image" ? "image" : "default"),
|
|
633
635
|
writeRole: e.writeRole ?? "user",
|
|
634
636
|
commentWriteRole: e.commentWriteRole ?? "user",
|
|
635
637
|
allowedStaffUids: e.allowedStaffUids ?? [],
|
|
@@ -696,6 +698,7 @@ function Dt() {
|
|
|
696
698
|
label: t,
|
|
697
699
|
visibility: "public",
|
|
698
700
|
listView: "default",
|
|
701
|
+
editorType: "default",
|
|
699
702
|
writeRole: "user",
|
|
700
703
|
commentWriteRole: "user",
|
|
701
704
|
order: f.value.length
|
|
@@ -749,7 +752,7 @@ function At(e) {
|
|
|
749
752
|
return !i(l());
|
|
750
753
|
}
|
|
751
754
|
function m() {
|
|
752
|
-
return a(l())?.
|
|
755
|
+
return a(l())?.editorType === "image";
|
|
753
756
|
}
|
|
754
757
|
function h(e) {
|
|
755
758
|
let t = m(), n = gt(e.content), r = _t(e.content, e.attachments);
|
|
@@ -1927,26 +1930,30 @@ function mn() {
|
|
|
1927
1930
|
return console.warn("[memi-board] record moderation strike failed", t instanceof Error ? t.message : t), l(e);
|
|
1928
1931
|
}
|
|
1929
1932
|
}
|
|
1930
|
-
async function f(t) {
|
|
1933
|
+
async function f(t, i) {
|
|
1931
1934
|
if (n.value) return {
|
|
1932
1935
|
flagged: !0,
|
|
1933
1936
|
category: "other",
|
|
1934
1937
|
reason: r.value || "콘텐츠 경고가 누적되어 글·댓글 작성이 잠시 제한됐어요.",
|
|
1935
1938
|
via: "restricted"
|
|
1936
1939
|
};
|
|
1937
|
-
let
|
|
1938
|
-
if (!
|
|
1940
|
+
let a = t.trim();
|
|
1941
|
+
if (!a) return {
|
|
1939
1942
|
...pn,
|
|
1940
1943
|
via: "empty"
|
|
1941
1944
|
};
|
|
1942
|
-
|
|
1943
|
-
|
|
1945
|
+
if (i?.skipFilter) return {
|
|
1946
|
+
...pn,
|
|
1947
|
+
via: "admin-override"
|
|
1948
|
+
};
|
|
1949
|
+
let l = o(a);
|
|
1950
|
+
if (l) return d(l);
|
|
1944
1951
|
if (e.enabled === !1) return {
|
|
1945
1952
|
...pn,
|
|
1946
1953
|
via: "disabled"
|
|
1947
1954
|
};
|
|
1948
1955
|
try {
|
|
1949
|
-
let e = fn((await s().generateContent(`심사할 텍스트:\n"""${
|
|
1956
|
+
let e = fn((await s().generateContent(`심사할 텍스트:\n"""${a.slice(0, 4e3)}"""`)).response.text());
|
|
1950
1957
|
if (!e) return c();
|
|
1951
1958
|
let t = {
|
|
1952
1959
|
flagged: e.flagged,
|
|
@@ -2249,6 +2256,16 @@ function Gn(e) {
|
|
|
2249
2256
|
//#endregion
|
|
2250
2257
|
//#region src/data/versionHistory.ts
|
|
2251
2258
|
var Kn = [
|
|
2259
|
+
{
|
|
2260
|
+
version: "0.39.1",
|
|
2261
|
+
date: "2026-08-27",
|
|
2262
|
+
highlights: ["관리자는 글쓰기 하단 스위치로 비속어 필터를 끄고 글을 올릴 수 있어요"]
|
|
2263
|
+
},
|
|
2264
|
+
{
|
|
2265
|
+
version: "0.39.0",
|
|
2266
|
+
date: "2026-08-21",
|
|
2267
|
+
highlights: ["사진 글에서 원하는 사진을 대표로 고를 수 있어요", "목록 모양과 글쓰기 폼을 각각 선택할 수 있어요"]
|
|
2268
|
+
},
|
|
2252
2269
|
{
|
|
2253
2270
|
version: "0.38.1",
|
|
2254
2271
|
date: "2026-08-21",
|