@meith/theme-default 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meith/theme-default",
3
- "version": "0.23.1",
3
+ "version": "0.23.2",
4
4
  "description": "Meith's default theme — every slot and every token, and the reference for what a complete theme fills.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -20,8 +20,8 @@
20
20
  "access": "public"
21
21
  },
22
22
  "dependencies": {
23
- "@meith/theme-kit": "^0.23.1",
24
- "@meith/ui": "^0.23.1"
23
+ "@meith/theme-kit": "^0.23.2",
24
+ "@meith/ui": "^0.23.2"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "react": "^19.2.0"
package/src/copy.ts CHANGED
@@ -276,6 +276,8 @@ export function threadRowCopy(t: Translator): SlotCopy {
276
276
  'default.threadRow.latestReply',
277
277
  'default.threadRow.locked',
278
278
  'default.threadRow.moved',
279
+ 'default.threadRow.deleted',
280
+ 'default.threadRow.unapproved',
279
281
  'default.threadRow.newPosts',
280
282
  'default.threadRow.noRepliesYet',
281
283
  'default.threadRow.pinned',
@@ -143,6 +143,7 @@
143
143
  "default.subforumList.thread.other": "threads",
144
144
  "default.subforumList.threadsLabel": "Threads",
145
145
  "default.threadRow.by": "by",
146
+ "default.threadRow.deleted": "Deleted",
146
147
  "default.threadRow.dot": "·",
147
148
  "default.threadRow.latestReply": "Latest reply",
148
149
  "default.threadRow.locked": "Locked",
@@ -154,6 +155,7 @@
154
155
  "default.threadRow.reply.one": "reply",
155
156
  "default.threadRow.reply.other": "replies",
156
157
  "default.threadRow.startedBy": "Started by",
158
+ "default.threadRow.unapproved": "Pending",
157
159
  "default.threadRow.view.one": "view",
158
160
  "default.threadRow.view.other": "views",
159
161
  "default.threadRow.viewsLabel": "Views",
@@ -7,10 +7,14 @@ import { Counts, LINK, Prefix, ReadSpacer, Stamp, UnreadDot, UserRef } from '../
7
7
  export function ThreadRow({ thread, select, copy }: ThreadRowSlotModel & { copy: SlotCopy }) {
8
8
  const c = (key: string) => fromSlotCopy(copy, `default.threadRow.${key}`)
9
9
 
10
+ const hidden = thread.visibility === 'deleted' || thread.visibility === 'unapproved'
11
+ const tint = thread.visibility === 'deleted' ? 'bg-thread-deleted/8' : 'bg-thread-unapproved/8'
12
+
10
13
  return (
11
14
  <li
12
15
  data-unread={thread.isUnread ? '' : undefined}
13
- className="grid grid-cols-[auto_minmax(0,1fr)] gap-x-2.5 gap-y-2 px-4 py-3 transition-colors hover:bg-muted/60 md:grid-cols-[auto_minmax(0,1fr)_9rem_14rem] md:items-center md:gap-x-4"
16
+ data-visibility={hidden ? thread.visibility : undefined}
17
+ className={`grid grid-cols-[auto_minmax(0,1fr)] gap-x-2.5 gap-y-2 px-4 py-3 transition-colors hover:bg-muted/60 md:grid-cols-[auto_minmax(0,1fr)_9rem_14rem] md:items-center md:gap-x-4 ${hidden ? tint : ''}`}
14
18
  >
15
19
  <span className="flex items-start gap-2">
16
20
  {select !== null && (
@@ -35,6 +39,8 @@ export function ThreadRow({ thread, select, copy }: ThreadRowSlotModel & { copy:
35
39
  {thread.isSticky && <Badge tone="pinned">{c('pinned')}</Badge>}
36
40
  {thread.isLocked && <Badge tone="locked">{c('locked')}</Badge>}
37
41
  {thread.isMoved && <Badge tone="moved">{c('moved')}</Badge>}
42
+ {thread.visibility === 'unapproved' && <Badge tone="unapproved">{c('unapproved')}</Badge>}
43
+ {thread.visibility === 'deleted' && <Badge tone="deleted">{c('deleted')}</Badge>}
38
44
 
39
45
  <a
40
46
  href={thread.href}