@nexttylabs/echo 0.10.0 → 0.12.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/CHANGELOG.md +35 -0
- package/app/(auth)/login/page.tsx +3 -3
- package/app/(auth)/register/page.tsx +3 -3
- package/app/(dashboard)/admin/feedback/new/page.tsx +11 -11
- package/app/(dashboard)/settings/organizations/[orgId]/members/page.tsx +3 -3
- package/app/(dashboard)/settings/organizations/new/page.tsx +3 -3
- package/components/landing/hero.tsx +16 -16
- package/components/layout/sidebar.tsx +3 -16
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @nexttylabs/echo
|
|
2
2
|
|
|
3
|
+
## 0.12.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- fc3d8f1: support light/dark theme
|
|
8
|
+
- cc04d9f: Use the organization member role uniformly.
|
|
9
|
+
- 5cfdeb7: feat: support editing user profile
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 76fda4d: fix organizational setting i18n
|
|
14
|
+
- 7dba561: remove legacy changeset files
|
|
15
|
+
- 158b254: show current orgnization
|
|
16
|
+
- 1e798f1: remove unuse tables and published files
|
|
17
|
+
- e3c4e1c: fix workflow errors
|
|
18
|
+
- d315d85: Fix the theme display issue.
|
|
19
|
+
- daf9abb: first release
|
|
20
|
+
|
|
21
|
+
## 0.11.0
|
|
22
|
+
|
|
23
|
+
### Minor Changes
|
|
24
|
+
|
|
25
|
+
- fc3d8f1: support light/dark theme
|
|
26
|
+
- cc04d9f: Use the organization member role uniformly.
|
|
27
|
+
- 5cfdeb7: feat: support editing user profile
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- 76fda4d: fix organizational setting i18n
|
|
32
|
+
- 7dba561: remove legacy changeset files
|
|
33
|
+
- 158b254: show current orgnization
|
|
34
|
+
- 1e798f1: remove unuse tables and published files
|
|
35
|
+
- e3c4e1c: fix workflow errors
|
|
36
|
+
- daf9abb: first release
|
|
37
|
+
|
|
3
38
|
## 0.10.0
|
|
4
39
|
|
|
5
40
|
### Minor Changes
|
|
@@ -36,13 +36,13 @@ export default async function LoginPage() {
|
|
|
36
36
|
const t = await getTranslations("auth.login");
|
|
37
37
|
|
|
38
38
|
return (
|
|
39
|
-
<div className="min-h-screen bg-
|
|
39
|
+
<div className="min-h-screen bg-background px-4 py-12">
|
|
40
40
|
<div className="mx-auto flex w-full max-w-md flex-col gap-6">
|
|
41
41
|
<div className="text-center">
|
|
42
|
-
<h1 className="text-3xl font-semibold tracking-tight text-
|
|
42
|
+
<h1 className="text-3xl font-semibold tracking-tight text-foreground">
|
|
43
43
|
{t("pageTitle")}
|
|
44
44
|
</h1>
|
|
45
|
-
<p className="mt-2 text-sm text-
|
|
45
|
+
<p className="mt-2 text-sm text-muted-foreground">
|
|
46
46
|
{t("pageSubtitle")}
|
|
47
47
|
</p>
|
|
48
48
|
</div>
|
|
@@ -31,13 +31,13 @@ export default async function RegisterPage() {
|
|
|
31
31
|
const t = await getTranslations("auth.register");
|
|
32
32
|
|
|
33
33
|
return (
|
|
34
|
-
<div className="min-h-screen bg-
|
|
34
|
+
<div className="min-h-screen bg-background px-4 py-12">
|
|
35
35
|
<div className="mx-auto flex w-full max-w-md flex-col gap-6">
|
|
36
36
|
<div className="text-center">
|
|
37
|
-
<h1 className="text-3xl font-semibold tracking-tight text-
|
|
37
|
+
<h1 className="text-3xl font-semibold tracking-tight text-foreground">
|
|
38
38
|
{t("pageTitle")}
|
|
39
39
|
</h1>
|
|
40
|
-
<p className="mt-2 text-sm text-
|
|
40
|
+
<p className="mt-2 text-sm text-muted-foreground">
|
|
41
41
|
{t("pageSubtitle")}
|
|
42
42
|
</p>
|
|
43
43
|
</div>
|
|
@@ -39,11 +39,11 @@ export default async function NewFeedbackPage() {
|
|
|
39
39
|
|
|
40
40
|
if (!organization) {
|
|
41
41
|
return (
|
|
42
|
-
<div className="min-h-screen bg-
|
|
42
|
+
<div className="min-h-screen bg-background px-4 py-12">
|
|
43
43
|
<div className="mx-auto flex w-full max-w-2xl flex-col gap-6">
|
|
44
|
-
<div className="rounded-lg border border-amber-200 bg-amber-50 p-6">
|
|
45
|
-
<h1 className="text-xl font-semibold text-amber-800">未找到组织</h1>
|
|
46
|
-
<p className="mt-2 text-sm text-amber-700">
|
|
44
|
+
<div className="rounded-lg border border-amber-200 bg-amber-50 p-6 dark:border-amber-800 dark:bg-amber-950">
|
|
45
|
+
<h1 className="text-xl font-semibold text-amber-800 dark:text-amber-200">未找到组织</h1>
|
|
46
|
+
<p className="mt-2 text-sm text-amber-700 dark:text-amber-300">
|
|
47
47
|
请先加入组织后再代客户提交反馈。
|
|
48
48
|
</p>
|
|
49
49
|
</div>
|
|
@@ -58,11 +58,11 @@ export default async function NewFeedbackPage() {
|
|
|
58
58
|
|
|
59
59
|
if (!hasSubmitOnBehalfPermission) {
|
|
60
60
|
return (
|
|
61
|
-
<div className="min-h-screen bg-
|
|
61
|
+
<div className="min-h-screen bg-background px-4 py-12">
|
|
62
62
|
<div className="mx-auto flex w-full max-w-2xl flex-col gap-6">
|
|
63
|
-
<div className="rounded-lg border border-red-200 bg-red-50 p-6">
|
|
64
|
-
<h1 className="text-xl font-semibold text-red-800">权限不足</h1>
|
|
65
|
-
<p className="mt-2 text-sm text-red-600">
|
|
63
|
+
<div className="rounded-lg border border-red-200 bg-red-50 p-6 dark:border-red-800 dark:bg-red-950">
|
|
64
|
+
<h1 className="text-xl font-semibold text-red-800 dark:text-red-200">权限不足</h1>
|
|
65
|
+
<p className="mt-2 text-sm text-red-600 dark:text-red-300">
|
|
66
66
|
您没有代客户提交反馈的权限。请联系管理员获取相应权限。
|
|
67
67
|
</p>
|
|
68
68
|
</div>
|
|
@@ -72,13 +72,13 @@ export default async function NewFeedbackPage() {
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
return (
|
|
75
|
-
<div className="min-h-screen bg-
|
|
75
|
+
<div className="min-h-screen bg-background px-4 py-12">
|
|
76
76
|
<div className="mx-auto flex w-full max-w-2xl flex-col gap-6">
|
|
77
77
|
<div>
|
|
78
|
-
<h1 className="text-3xl font-semibold tracking-tight text-
|
|
78
|
+
<h1 className="text-3xl font-semibold tracking-tight text-foreground">
|
|
79
79
|
代客户提交反馈
|
|
80
80
|
</h1>
|
|
81
|
-
<p className="mt-2 text-sm text-
|
|
81
|
+
<p className="mt-2 text-sm text-muted-foreground">
|
|
82
82
|
以客服身份代表客户提交反馈,系统将同时记录客服和客户信息
|
|
83
83
|
</p>
|
|
84
84
|
</div>
|
|
@@ -46,13 +46,13 @@ export default async function OrganizationMembersPage({
|
|
|
46
46
|
: [];
|
|
47
47
|
|
|
48
48
|
return (
|
|
49
|
-
<div className="min-h-screen bg-
|
|
49
|
+
<div className="min-h-screen bg-background px-4 py-12">
|
|
50
50
|
<div className="mx-auto flex w-full max-w-3xl flex-col gap-6">
|
|
51
51
|
<div>
|
|
52
|
-
<h1 className="text-3xl font-semibold tracking-tight text-
|
|
52
|
+
<h1 className="text-3xl font-semibold tracking-tight text-foreground">
|
|
53
53
|
成员管理
|
|
54
54
|
</h1>
|
|
55
|
-
<p className="mt-2 text-sm text-
|
|
55
|
+
<p className="mt-2 text-sm text-muted-foreground">
|
|
56
56
|
管理当前组织成员并发送新的邀请
|
|
57
57
|
</p>
|
|
58
58
|
</div>
|
|
@@ -19,13 +19,13 @@ import { OrganizationForm } from "@/components/settings/organization-form";
|
|
|
19
19
|
|
|
20
20
|
export default function NewOrganizationPage() {
|
|
21
21
|
return (
|
|
22
|
-
<div className="min-h-screen bg-
|
|
22
|
+
<div className="min-h-screen bg-background px-4 py-12">
|
|
23
23
|
<div className="mx-auto flex w-full max-w-2xl flex-col gap-6">
|
|
24
24
|
<div>
|
|
25
|
-
<h1 className="text-3xl font-semibold tracking-tight text-
|
|
25
|
+
<h1 className="text-3xl font-semibold tracking-tight text-foreground">
|
|
26
26
|
创建组织
|
|
27
27
|
</h1>
|
|
28
|
-
<p className="mt-2 text-sm text-
|
|
28
|
+
<p className="mt-2 text-sm text-muted-foreground">
|
|
29
29
|
为新的团队或项目创建独立空间
|
|
30
30
|
</p>
|
|
31
31
|
</div>
|
|
@@ -25,11 +25,11 @@ export function Hero() {
|
|
|
25
25
|
const t = useTranslations("hero");
|
|
26
26
|
|
|
27
27
|
return (
|
|
28
|
-
<div className="min-h-screen bg-
|
|
28
|
+
<div className="min-h-screen bg-background">
|
|
29
29
|
<header className="container mx-auto flex items-center justify-between px-4 py-6">
|
|
30
30
|
<div className="flex items-center gap-2">
|
|
31
31
|
<MessageSquare className="size-8 text-primary" />
|
|
32
|
-
<span className="text-2xl font-bold text-
|
|
32
|
+
<span className="text-2xl font-bold text-foreground">{t("title")}</span>
|
|
33
33
|
</div>
|
|
34
34
|
<nav className="flex items-center gap-4">
|
|
35
35
|
<LanguageSwitcher variant="icon" />
|
|
@@ -44,13 +44,13 @@ export function Hero() {
|
|
|
44
44
|
|
|
45
45
|
<main className="container mx-auto px-4 py-20">
|
|
46
46
|
<section className="mx-auto max-w-4xl text-center">
|
|
47
|
-
<h1 className="text-5xl font-bold tracking-tight text-
|
|
47
|
+
<h1 className="text-5xl font-bold tracking-tight text-foreground sm:text-6xl">
|
|
48
48
|
{t("headline")}
|
|
49
49
|
</h1>
|
|
50
|
-
<p className="mt-6 text-xl text-
|
|
50
|
+
<p className="mt-6 text-xl text-muted-foreground">
|
|
51
51
|
{t("description")}
|
|
52
52
|
<br />
|
|
53
|
-
<span className="font-medium text-
|
|
53
|
+
<span className="font-medium text-foreground/80">{t("subtitle")}</span>
|
|
54
54
|
</p>
|
|
55
55
|
<div className="mt-10 flex flex-wrap items-center justify-center gap-4">
|
|
56
56
|
<Button size="lg" asChild>
|
|
@@ -63,7 +63,7 @@ export function Hero() {
|
|
|
63
63
|
</section>
|
|
64
64
|
|
|
65
65
|
<section className="mx-auto mt-32 max-w-5xl">
|
|
66
|
-
<h2 className="text-center text-3xl font-bold text-
|
|
66
|
+
<h2 className="text-center text-3xl font-bold text-foreground">{t("coreValues")}</h2>
|
|
67
67
|
<div className="mt-12 grid gap-8 sm:grid-cols-2 lg:grid-cols-4">
|
|
68
68
|
<FeatureCard
|
|
69
69
|
icon={<Zap className="size-6" />}
|
|
@@ -89,8 +89,8 @@ export function Hero() {
|
|
|
89
89
|
</section>
|
|
90
90
|
|
|
91
91
|
<section className="mx-auto mt-32 max-w-3xl text-center">
|
|
92
|
-
<h2 className="text-3xl font-bold text-
|
|
93
|
-
<p className="mt-4 text-lg text-
|
|
92
|
+
<h2 className="text-3xl font-bold text-foreground">{t("ready.title")}</h2>
|
|
93
|
+
<p className="mt-4 text-lg text-muted-foreground">
|
|
94
94
|
{t("ready.description")}
|
|
95
95
|
</p>
|
|
96
96
|
<div className="mt-8 flex flex-wrap items-center justify-center gap-4">
|
|
@@ -104,21 +104,21 @@ export function Hero() {
|
|
|
104
104
|
</section>
|
|
105
105
|
</main>
|
|
106
106
|
|
|
107
|
-
<footer className="container mx-auto border-t border-
|
|
107
|
+
<footer className="container mx-auto border-t border-border px-4 py-8">
|
|
108
108
|
<div className="flex flex-col items-center justify-between gap-4 sm:flex-row">
|
|
109
|
-
<div className="flex items-center gap-2 text-sm text-
|
|
109
|
+
<div className="flex items-center gap-2 text-sm text-muted-foreground">
|
|
110
110
|
<MessageSquare className="size-4" />
|
|
111
111
|
<span>{t("footer.title")}</span>
|
|
112
112
|
</div>
|
|
113
|
-
<div className="flex gap-6 text-sm text-
|
|
114
|
-
<Link href="/docs" className="hover:text-
|
|
113
|
+
<div className="flex gap-6 text-sm text-muted-foreground">
|
|
114
|
+
<Link href="/docs" className="hover:text-foreground">
|
|
115
115
|
{t("footer.docs")}
|
|
116
116
|
</Link>
|
|
117
117
|
<a
|
|
118
118
|
href="https://github.com"
|
|
119
119
|
target="_blank"
|
|
120
120
|
rel="noopener noreferrer"
|
|
121
|
-
className="hover:text-
|
|
121
|
+
className="hover:text-foreground"
|
|
122
122
|
>
|
|
123
123
|
GitHub
|
|
124
124
|
</a>
|
|
@@ -139,12 +139,12 @@ function FeatureCard({
|
|
|
139
139
|
description: string;
|
|
140
140
|
}) {
|
|
141
141
|
return (
|
|
142
|
-
<div className="rounded-xl border border-
|
|
142
|
+
<div className="rounded-xl border border-border bg-card p-6 shadow-sm">
|
|
143
143
|
<div className="flex size-12 items-center justify-center rounded-lg bg-primary/10 text-primary">
|
|
144
144
|
{icon}
|
|
145
145
|
</div>
|
|
146
|
-
<h3 className="mt-4 font-semibold text-
|
|
147
|
-
<p className="mt-2 text-sm text-
|
|
146
|
+
<h3 className="mt-4 font-semibold text-card-foreground">{title}</h3>
|
|
147
|
+
<p className="mt-2 text-sm text-muted-foreground">{description}</p>
|
|
148
148
|
</div>
|
|
149
149
|
);
|
|
150
150
|
}
|
|
@@ -78,7 +78,6 @@ export function Sidebar({ user, organizations = [], currentOrgId, onClose }: Sid
|
|
|
78
78
|
const locale = useLocale() as AppLocale;
|
|
79
79
|
const [isPending, startTransition] = useTransition();
|
|
80
80
|
const pendingOrgIdRef = useRef<string | null>(null);
|
|
81
|
-
const pendingLocaleRef = useRef<AppLocale | null>(null);
|
|
82
81
|
|
|
83
82
|
const navItems = [
|
|
84
83
|
{ href: "/dashboard", label: t("dashboard"), icon: LayoutDashboard },
|
|
@@ -118,26 +117,14 @@ export function Sidebar({ user, organizations = [], currentOrgId, onClose }: Sid
|
|
|
118
117
|
pendingOrgIdRef.current = orgId;
|
|
119
118
|
};
|
|
120
119
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
const nextLocale = pendingLocaleRef.current;
|
|
124
|
-
if (!nextLocale) return;
|
|
125
|
-
if (nextLocale === locale) {
|
|
126
|
-
startTransition(() => {
|
|
127
|
-
pendingLocaleRef.current = null;
|
|
128
|
-
});
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
120
|
+
const handleLocaleChange = (nextLocale: AppLocale) => {
|
|
121
|
+
if (nextLocale === locale) return;
|
|
131
122
|
const secure = window.location.protocol === "https:" ? ";secure" : "";
|
|
123
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
132
124
|
document.cookie = `${LOCALE_COOKIE_NAME}=${nextLocale};path=/;max-age=${60 * 60 * 24 * 365};samesite=lax${secure}`;
|
|
133
125
|
startTransition(() => {
|
|
134
126
|
router.refresh();
|
|
135
|
-
pendingLocaleRef.current = null;
|
|
136
127
|
});
|
|
137
|
-
}, [locale, router]);
|
|
138
|
-
|
|
139
|
-
const handleLocaleChange = (nextLocale: AppLocale) => {
|
|
140
|
-
pendingLocaleRef.current = nextLocale;
|
|
141
128
|
};
|
|
142
129
|
|
|
143
130
|
const currentOrg = organizations.find((org) => org.id === currentOrgId);
|