@meith/theme-midnight 0.23.1 → 0.23.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.
- package/package.json +3 -3
- package/src/copy.ts +2 -0
- package/src/messages/en.json +2 -0
- package/src/slots/thread-row.tsx +13 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meith/theme-midnight",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.2",
|
|
4
4
|
"description": "A dark theme for Meith, built on the default theme's slots.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@meith/theme-default": "^0.23.
|
|
24
|
-
"@meith/theme-kit": "^0.23.
|
|
23
|
+
"@meith/theme-default": "^0.23.2",
|
|
24
|
+
"@meith/theme-kit": "^0.23.2"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"react": "^19.2.0"
|
package/src/copy.ts
CHANGED
|
@@ -151,6 +151,8 @@ export function threadRowCopy(t: Translator): SlotCopy {
|
|
|
151
151
|
'midnight.threadRow.pinned',
|
|
152
152
|
'midnight.threadRow.locked',
|
|
153
153
|
'midnight.threadRow.moved',
|
|
154
|
+
'midnight.threadRow.deleted',
|
|
155
|
+
'midnight.threadRow.unapproved',
|
|
154
156
|
'midnight.threadRow.by',
|
|
155
157
|
])
|
|
156
158
|
}
|
package/src/messages/en.json
CHANGED
|
@@ -68,10 +68,12 @@
|
|
|
68
68
|
"midnight.shell.skipToContent": "Skip to content",
|
|
69
69
|
"midnight.subforumList.ariaLabel": "Subforums",
|
|
70
70
|
"midnight.threadRow.by": "by",
|
|
71
|
+
"midnight.threadRow.deleted": "Deleted",
|
|
71
72
|
"midnight.threadRow.locked": "locked",
|
|
72
73
|
"midnight.threadRow.moved": "moved",
|
|
73
74
|
"midnight.threadRow.newPosts": "(new posts)",
|
|
74
75
|
"midnight.threadRow.pinned": "pinned",
|
|
76
|
+
"midnight.threadRow.unapproved": "Pending",
|
|
75
77
|
"midnight.threadView.in": "in",
|
|
76
78
|
"midnight.threadView.markRead": "mark read",
|
|
77
79
|
"midnight.threadView.reply": "reply",
|
package/src/slots/thread-row.tsx
CHANGED
|
@@ -6,8 +6,14 @@ import { UserRef } from '../shared'
|
|
|
6
6
|
export function ThreadRow({ thread, select, copy }: ThreadRowSlotModel & { copy: SlotCopy }) {
|
|
7
7
|
const c = (key: string) => fromSlotCopy(copy, `midnight.threadRow.${key}`)
|
|
8
8
|
|
|
9
|
+
const hidden = thread.visibility === 'deleted' || thread.visibility === 'unapproved'
|
|
10
|
+
const tint = thread.visibility === 'deleted' ? 'bg-thread-deleted/15' : 'bg-thread-unapproved/15'
|
|
11
|
+
|
|
9
12
|
return (
|
|
10
|
-
<tr
|
|
13
|
+
<tr
|
|
14
|
+
data-visibility={hidden ? thread.visibility : undefined}
|
|
15
|
+
className={`border-t border-border align-top ${hidden ? tint : 'odd:bg-card even:bg-muted/40'}`}
|
|
16
|
+
>
|
|
11
17
|
<td className="px-3 py-2">
|
|
12
18
|
<div className="flex flex-wrap items-baseline gap-2">
|
|
13
19
|
{select !== null && (
|
|
@@ -43,6 +49,12 @@ export function ThreadRow({ thread, select, copy }: ThreadRowSlotModel & { copy:
|
|
|
43
49
|
{thread.isMoved && (
|
|
44
50
|
<span className="font-mono text-xs text-thread-moved">{c('moved')}</span>
|
|
45
51
|
)}
|
|
52
|
+
{thread.visibility === 'unapproved' && (
|
|
53
|
+
<span className="font-mono text-xs text-thread-unapproved">{c('unapproved')}</span>
|
|
54
|
+
)}
|
|
55
|
+
{thread.visibility === 'deleted' && (
|
|
56
|
+
<span className="font-mono text-xs text-thread-deleted">{c('deleted')}</span>
|
|
57
|
+
)}
|
|
46
58
|
</div>
|
|
47
59
|
<p className="mt-0.5 font-mono text-xs text-muted-foreground">
|
|
48
60
|
<UserRef user={thread.author} className="hover:text-foreground" />
|