@meith/theme-phasebook 0.23.1 → 0.23.3
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/package.json +4 -4
- package/src/copy.ts +2 -0
- package/src/messages/en.json +2 -0
- package/src/slots/thread-row.tsx +9 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meith/theme-phasebook",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.3",
|
|
4
4
|
"description": "A theme for Meith with a familiar social shape, built on the default theme's slots.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@meith/theme-default": "^0.23.
|
|
24
|
-
"@meith/theme-kit": "^0.23.
|
|
25
|
-
"@meith/ui": "^0.23.
|
|
23
|
+
"@meith/theme-default": "^0.23.3",
|
|
24
|
+
"@meith/theme-kit": "^0.23.3",
|
|
25
|
+
"@meith/ui": "^0.23.3"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"react": "^19.2.0"
|
package/src/copy.ts
CHANGED
|
@@ -221,6 +221,8 @@ export function threadRowCopy(t: Translator): SlotCopy {
|
|
|
221
221
|
'phasebook.threadRow.latestReply',
|
|
222
222
|
'phasebook.threadRow.locked',
|
|
223
223
|
'phasebook.threadRow.moved',
|
|
224
|
+
'phasebook.threadRow.deleted',
|
|
225
|
+
'phasebook.threadRow.unapproved',
|
|
224
226
|
'phasebook.threadRow.newPosts',
|
|
225
227
|
'phasebook.threadRow.noRepliesYet',
|
|
226
228
|
'phasebook.threadRow.pinned',
|
package/src/messages/en.json
CHANGED
|
@@ -107,6 +107,7 @@
|
|
|
107
107
|
"phasebook.subforumList.thread.other": "threads",
|
|
108
108
|
"phasebook.subforumList.title": "Subforums",
|
|
109
109
|
"phasebook.threadRow.by": "by",
|
|
110
|
+
"phasebook.threadRow.deleted": "Deleted",
|
|
110
111
|
"phasebook.threadRow.latestReply": "Latest reply",
|
|
111
112
|
"phasebook.threadRow.locked": "Locked",
|
|
112
113
|
"phasebook.threadRow.moved": "Moved",
|
|
@@ -116,6 +117,7 @@
|
|
|
116
117
|
"phasebook.threadRow.reply.one": "reply",
|
|
117
118
|
"phasebook.threadRow.reply.other": "replies",
|
|
118
119
|
"phasebook.threadRow.startedBy": "Started by",
|
|
120
|
+
"phasebook.threadRow.unapproved": "Pending",
|
|
119
121
|
"phasebook.threadRow.view.one": "view",
|
|
120
122
|
"phasebook.threadRow.view.other": "views",
|
|
121
123
|
"phasebook.threadView.locked": "Locked — no new replies",
|
package/src/slots/thread-row.tsx
CHANGED
|
@@ -6,10 +6,14 @@ import { Circle, count, MUTED_LINK, NUMERIC, Prefix, plural, Stamp, Tag, UserRef
|
|
|
6
6
|
export function ThreadRow({ thread, select, copy }: ThreadRowSlotModel & { copy: SlotCopy }) {
|
|
7
7
|
const c = (key: string) => fromSlotCopy(copy, `phasebook.threadRow.${key}`)
|
|
8
8
|
|
|
9
|
+
const hidden = thread.visibility === 'deleted' || thread.visibility === 'unapproved'
|
|
10
|
+
const tint = thread.visibility === 'deleted' ? 'bg-thread-deleted/8' : 'bg-thread-unapproved/8'
|
|
11
|
+
|
|
9
12
|
return (
|
|
10
13
|
<li
|
|
11
14
|
data-unread={thread.isUnread ? '' : undefined}
|
|
12
|
-
|
|
15
|
+
data-visibility={hidden ? thread.visibility : undefined}
|
|
16
|
+
className={`overflow-hidden rounded-lg border border-border bg-card text-card-foreground shadow-elevation transition-colors hover:border-input ${hidden ? tint : ''}`}
|
|
13
17
|
>
|
|
14
18
|
<div className="flex items-start gap-3 px-4 py-3">
|
|
15
19
|
{select !== null && (
|
|
@@ -41,6 +45,10 @@ export function ThreadRow({ thread, select, copy }: ThreadRowSlotModel & { copy:
|
|
|
41
45
|
{thread.isSticky && <Tag token="thread-pinned">{c('pinned')}</Tag>}
|
|
42
46
|
{thread.isLocked && <Tag token="thread-locked">{c('locked')}</Tag>}
|
|
43
47
|
{thread.isMoved && <Tag token="thread-moved">{c('moved')}</Tag>}
|
|
48
|
+
{thread.visibility === 'unapproved' && (
|
|
49
|
+
<Tag token="thread-unapproved">{c('unapproved')}</Tag>
|
|
50
|
+
)}
|
|
51
|
+
{thread.visibility === 'deleted' && <Tag token="thread-deleted">{c('deleted')}</Tag>}
|
|
44
52
|
</div>
|
|
45
53
|
|
|
46
54
|
<a
|