@meith/web 0.26.1 → 0.27.0

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/web",
3
- "version": "0.26.1",
3
+ "version": "0.27.0",
4
4
  "description": "The board itself: the Next.js app, and the forum-web bin that materializes it into an external board workspace.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -43,53 +43,53 @@
43
43
  "react-dom": "19.2.8",
44
44
  "tailwindcss": "^4.3.3",
45
45
  "typescript": "7.0.2",
46
- "@meith/accounts": "0.26.1",
47
- "@meith/admin": "0.26.1",
48
- "@meith/antispam": "0.26.1",
49
- "@meith/api": "0.26.1",
50
- "@meith/attachments": "0.26.1",
51
- "@meith/authorization": "0.26.1",
52
- "@meith/avatars": "0.26.1",
53
- "@meith/core": "0.26.1",
54
- "@meith/db": "0.26.1",
55
- "@meith/demo": "0.26.1",
56
- "@meith/drafts": "0.26.1",
57
- "@meith/drivers": "0.26.1",
58
- "@meith/events": "0.26.1",
59
- "@meith/forums": "0.26.1",
60
- "@meith/groups": "0.26.1",
61
- "@meith/i18n": "0.26.1",
62
- "@meith/import": "0.26.1",
63
- "@meith/install": "0.26.1",
64
- "@meith/mail": "0.26.1",
65
- "@meith/markdown": "0.26.1",
66
- "@meith/marketplace": "0.26.1",
67
- "@meith/messages": "0.26.1",
68
- "@meith/moderation": "0.26.1",
69
- "@meith/notifications": "0.26.1",
70
- "@meith/plugin-calendar": "0.26.1",
71
- "@meith/plugin-dues": "0.26.1",
72
- "@meith/plugin-kit": "0.26.1",
73
- "@meith/polls": "0.26.1",
74
- "@meith/posts": "0.26.1",
75
- "@meith/profile-fields": "0.26.1",
76
- "@meith/relations": "0.26.1",
77
- "@meith/reputation": "0.26.1",
78
- "@meith/runtime": "0.26.1",
79
- "@meith/search": "0.26.1",
80
- "@meith/settings": "0.26.1",
81
- "@meith/signatures": "0.26.1",
82
- "@meith/subscriptions": "0.26.1",
83
- "@meith/tasks": "0.26.1",
84
- "@meith/theme-clubhouse": "0.26.1",
85
- "@meith/theme-default": "0.26.1",
86
- "@meith/theme-kit": "0.26.1",
87
- "@meith/theme-midnight": "0.26.1",
88
- "@meith/theme-phasebook": "0.26.1",
89
- "@meith/theme-raidframe": "0.26.1",
90
- "@meith/threads": "0.26.1",
91
- "@meith/ui": "0.26.1",
92
- "@meith/upgrade": "0.26.1"
46
+ "@meith/accounts": "0.27.0",
47
+ "@meith/admin": "0.27.0",
48
+ "@meith/antispam": "0.27.0",
49
+ "@meith/api": "0.27.0",
50
+ "@meith/attachments": "0.27.0",
51
+ "@meith/authorization": "0.27.0",
52
+ "@meith/avatars": "0.27.0",
53
+ "@meith/core": "0.27.0",
54
+ "@meith/db": "0.27.0",
55
+ "@meith/demo": "0.27.0",
56
+ "@meith/drafts": "0.27.0",
57
+ "@meith/drivers": "0.27.0",
58
+ "@meith/events": "0.27.0",
59
+ "@meith/forums": "0.27.0",
60
+ "@meith/groups": "0.27.0",
61
+ "@meith/i18n": "0.27.0",
62
+ "@meith/import": "0.27.0",
63
+ "@meith/install": "0.27.0",
64
+ "@meith/mail": "0.27.0",
65
+ "@meith/markdown": "0.27.0",
66
+ "@meith/marketplace": "0.27.0",
67
+ "@meith/messages": "0.27.0",
68
+ "@meith/moderation": "0.27.0",
69
+ "@meith/notifications": "0.27.0",
70
+ "@meith/plugin-calendar": "0.27.0",
71
+ "@meith/plugin-dues": "0.27.0",
72
+ "@meith/plugin-kit": "0.27.0",
73
+ "@meith/polls": "0.27.0",
74
+ "@meith/posts": "0.27.0",
75
+ "@meith/profile-fields": "0.27.0",
76
+ "@meith/relations": "0.27.0",
77
+ "@meith/reputation": "0.27.0",
78
+ "@meith/runtime": "0.27.0",
79
+ "@meith/search": "0.27.0",
80
+ "@meith/settings": "0.27.0",
81
+ "@meith/signatures": "0.27.0",
82
+ "@meith/subscriptions": "0.27.0",
83
+ "@meith/tasks": "0.27.0",
84
+ "@meith/theme-clubhouse": "0.27.0",
85
+ "@meith/theme-default": "0.27.0",
86
+ "@meith/theme-kit": "0.27.0",
87
+ "@meith/theme-midnight": "0.27.0",
88
+ "@meith/theme-phasebook": "0.27.0",
89
+ "@meith/theme-raidframe": "0.27.0",
90
+ "@meith/threads": "0.27.0",
91
+ "@meith/ui": "0.27.0",
92
+ "@meith/upgrade": "0.27.0"
93
93
  },
94
94
  "scripts": {
95
95
  "dev": "next dev",
@@ -1,6 +1,6 @@
1
1
  'use client'
2
2
 
3
- import { useActionState } from 'react'
3
+ import { useActionState, useEffect, useState } from 'react'
4
4
 
5
5
  import type { MatrixCell, MatrixRow } from '@meith/authorization'
6
6
  import { cn, Disclosure } from '@meith/ui'
@@ -301,10 +301,19 @@ export function ForumPermissionRowForm({
301
301
  copy: Copy
302
302
  }) {
303
303
  const [state, action] = useActionState(saveForumPermissionsAction, EMPTY_STATE)
304
+ const [dirty, setDirty] = useState(false)
305
+
306
+ useEffect(() => {
307
+ if (state.notice === 'saved') setDirty(false)
308
+ }, [state])
304
309
 
305
310
  return (
306
- <Disclosure summary={row.groupTitle} aside={overridesAside(row, copy)}>
307
- <form action={action} className="flex flex-col gap-5">
311
+ <Disclosure
312
+ summary={row.groupTitle}
313
+ aside={overridesAside(row, copy)}
314
+ className="overflow-visible"
315
+ >
316
+ <form action={action} className="flex flex-col gap-5" onChange={() => setDirty(true)}>
308
317
  <FormError message={state.error} />
309
318
  <input type="hidden" name="forumId" value={forumId} />
310
319
  <input type="hidden" name="groupId" value={row.groupId} />
@@ -333,14 +342,20 @@ export function ForumPermissionRowForm({
333
342
  </section>
334
343
  ))}
335
344
 
336
- <div className="flex items-center gap-3">
337
- <SubmitButton>
345
+ <div className="sticky bottom-0 -mx-4 -mb-4 flex items-center gap-3 rounded-b-lg border-t border-border bg-card/95 px-4 py-3 supports-[backdrop-filter]:bg-card/80 supports-[backdrop-filter]:backdrop-blur">
346
+ <SubmitButton className="w-auto">
338
347
  {formatFromCopy(copy, 'adminForum.saveGroup', { group: row.groupTitle })}
339
348
  </SubmitButton>
340
- {state.notice === 'saved' && (
341
- <span className="text-xs font-medium text-moderation-approved">
342
- {fromCopy(copy, 'admin.saved')}
349
+ {dirty ? (
350
+ <span className="text-xs font-medium text-muted-foreground">
351
+ {fromCopy(copy, 'adminForum.unsavedChanges')}
343
352
  </span>
353
+ ) : (
354
+ state.notice === 'saved' && (
355
+ <span className="text-xs font-medium text-moderation-approved">
356
+ {fromCopy(copy, 'admin.saved')}
357
+ </span>
358
+ )
344
359
  )}
345
360
  </div>
346
361
  </form>
@@ -131,7 +131,10 @@ export function MarkdownEditor({
131
131
  const element = field.current
132
132
  if (element === null) return
133
133
  element.style.height = 'auto'
134
- element.style.height = `${element.scrollHeight}px`
134
+ const max = Math.max(240, Math.round(window.innerHeight * 0.6))
135
+ const overflowing = element.scrollHeight > max
136
+ element.style.height = `${overflowing ? max : element.scrollHeight}px`
137
+ element.style.overflowY = overflowing ? 'auto' : 'hidden'
135
138
  }, [])
136
139
 
137
140
  useEffect(() => {
@@ -6,7 +6,7 @@ import { planUpgrade, type UpgradeState, upgradeNotice } from '@meith/upgrade'
6
6
 
7
7
  import { activeDefinitions } from './plugin-host'
8
8
 
9
- export const CODE_VERSION = '0.26.1'
9
+ export const CODE_VERSION = '0.27.0'
10
10
 
11
11
  export async function pendingUpgradeNotice(): Promise<string | null> {
12
12
  if (env.DATA_SOURCE !== 'postgres') return null
@@ -63,6 +63,7 @@ export function forumAdminCopy(t: Translator = untranslated()): Readonly<Record<
63
63
  'adminForum.permGroup.approvals',
64
64
  'adminForum.permGroup.other',
65
65
  'adminForum.inheritsAll',
66
+ 'adminForum.unsavedChanges',
66
67
  'adminForum.copied',
67
68
  'adminForum.copyNote',
68
69
  'adminForum.topLevel',
@@ -13,7 +13,6 @@ export const GROUP_LABELS: Record<SettingGroup, string> = {
13
13
  antispam: 'Anti-spam',
14
14
  push: 'Push',
15
15
  legal: 'Legal',
16
- marketplace: 'Marketplace',
17
16
  }
18
17
 
19
18
  export const GROUP_ORDER: readonly SettingGroup[] = [
@@ -29,7 +28,6 @@ export const GROUP_ORDER: readonly SettingGroup[] = [
29
28
  'antispam',
30
29
  'push',
31
30
  'legal',
32
- 'marketplace',
33
31
  ]
34
32
 
35
33
  export const DEFAULT_SETTING_GROUP: SettingGroup = GROUP_ORDER[0]!