memi-board 0.56.0 → 0.56.2

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.
@@ -7,6 +7,12 @@ const props = defineProps<{
7
7
  boardId?: string
8
8
  title: string
9
9
  description?: string
10
+ /** 만든 사람/관리자/스태프 메뉴 중 "프로필 보기" 링크. */
11
+ authorProfileTo?: (authorUid: string) => string | undefined
12
+ /** 만든 사람/관리자/스태프 메뉴 중 "작성글 보기" 링크. */
13
+ authorPostsTo?: (authorUid: string) => string | undefined
14
+ /** 만든 사람/관리자/스태프 메뉴 중 "작성한 댓글 보기" 링크. */
15
+ authorCommentsTo?: (authorUid: string) => string | undefined
10
16
  }>()
11
17
 
12
18
  const { getBoard } = useMemiBoardSettings()
@@ -51,7 +57,12 @@ const hasInfo = computed(() => !!(props.description || managers.value.length ||
51
57
  {{ t('list.boardInfo.creator') }}
52
58
  </dt>
53
59
  <dd class="flex flex-wrap items-center gap-x-2 gap-y-1">
54
- <MemiBoardInfoPerson :uid="creatorUid" />
60
+ <MemiBoardInfoPerson
61
+ :uid="creatorUid"
62
+ :author-profile-to="authorProfileTo"
63
+ :author-posts-to="authorPostsTo"
64
+ :author-comments-to="authorCommentsTo"
65
+ />
55
66
  <span
56
67
  v-if="createdAt"
57
68
  class="text-xs text-muted"
@@ -72,6 +83,9 @@ const hasInfo = computed(() => !!(props.description || managers.value.length ||
72
83
  v-for="uid in managers"
73
84
  :key="uid"
74
85
  :uid="uid"
86
+ :author-profile-to="authorProfileTo"
87
+ :author-posts-to="authorPostsTo"
88
+ :author-comments-to="authorCommentsTo"
75
89
  />
76
90
  </dd>
77
91
  </div>
@@ -87,6 +101,9 @@ const hasInfo = computed(() => !!(props.description || managers.value.length ||
87
101
  v-for="uid in staff"
88
102
  :key="uid"
89
103
  :uid="uid"
104
+ :author-profile-to="authorProfileTo"
105
+ :author-posts-to="authorPostsTo"
106
+ :author-comments-to="authorCommentsTo"
90
107
  />
91
108
  </dd>
92
109
  </div>
@@ -1,19 +1,25 @@
1
1
  <script setup lang="ts">
2
2
  import { toRef } from 'vue'
3
- import { useMemiBoardI18n, useMemiBoardUserProfile } from 'memi-board/runtime'
3
+ import { useMemiBoardUserProfile } from 'memi-board/runtime'
4
+ import MemiBoardAuthorMenu from './AuthorMenu.vue'
4
5
 
5
- const props = defineProps<{ uid: string }>()
6
- const { t } = useMemiBoardI18n()
6
+ const props = defineProps<{
7
+ uid: string
8
+ authorProfileTo?: (authorUid: string) => string | undefined
9
+ authorPostsTo?: (authorUid: string) => string | undefined
10
+ authorCommentsTo?: (authorUid: string) => string | undefined
11
+ }>()
7
12
  const { profile } = useMemiBoardUserProfile(toRef(props, 'uid'))
8
13
  </script>
9
14
 
10
15
  <template>
11
- <div class="flex min-w-0 items-center gap-2">
12
- <UAvatar
13
- :src="profile?.photoURL ?? undefined"
14
- :alt="profile?.displayName ?? t('common.label.anonymous')"
15
- size="2xs"
16
- />
17
- <span class="truncate text-sm">{{ profile?.displayName ?? t('common.label.anonymous') }}</span>
18
- </div>
16
+ <MemiBoardAuthorMenu
17
+ :author-uid="uid"
18
+ :author-name="profile?.displayName"
19
+ :author-photo="profile?.photoURL"
20
+ :author-profile-to="authorProfileTo"
21
+ :author-posts-to="authorPostsTo"
22
+ :author-comments-to="authorCommentsTo"
23
+ :show-avatar="true"
24
+ />
19
25
  </template>
@@ -142,6 +142,8 @@ onUnmounted(() => {
142
142
  @paste="imageField?.handlePaste($event)"
143
143
  :placeholder="parent ? t('commentForm.replyTo', { name: parent.authorName || t('common.label.user') }) : t('commentForm.placeholder')"
144
144
  :rows="2"
145
+ autoresize
146
+ :maxrows="10"
145
147
  :disabled="submitting || aiBusy || isWriteRestricted"
146
148
  :maxlength="COMMENT_BODY_MAX_LENGTH"
147
149
  />
@@ -213,6 +213,8 @@ async function toggleLike() {
213
213
  v-model="editBody"
214
214
  @paste="imageField?.handlePaste($event)"
215
215
  :rows="2"
216
+ autoresize
217
+ :maxrows="10"
216
218
  :maxlength="COMMENT_BODY_MAX_LENGTH"
217
219
  :disabled="saving || aiBusy"
218
220
  autofocus
@@ -226,6 +226,9 @@ function postTo(post: PostModel): string | undefined {
226
226
  :board-id="resolvedBoardId"
227
227
  :title="title"
228
228
  :description="listDescription"
229
+ :author-profile-to="authorProfileTo"
230
+ :author-posts-to="authorPostsTo"
231
+ :author-comments-to="authorCommentsTo"
229
232
  />
230
233
  <div class="flex shrink-0 items-center gap-2">
231
234
  <UButton
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memi-board",
3
- "version": "0.56.0",
3
+ "version": "0.56.2",
4
4
  "type": "module",
5
5
  "description": "Board (forum) module for Nuxt 4 + Nuxt UI + VueFire/Firebase",
6
6
  "license": "MIT",