@adens/openwa 0.1.4 → 0.1.6
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/adens-openwa-0.1.5.tgz +0 -0
- package/package.json +3 -1
- package/server/index.js +30 -12
- package/web/.next/BUILD_ID +1 -0
- package/web/.next/build-manifest.json +43 -0
- package/web/.next/cache/.previewinfo +1 -0
- package/web/.next/cache/.rscinfo +1 -0
- package/web/.next/cache/webpack/client-production/0.pack +0 -0
- package/web/.next/cache/webpack/client-production/1.pack +0 -0
- package/web/.next/cache/webpack/client-production/10.pack +0 -0
- package/web/.next/cache/webpack/client-production/11.pack +0 -0
- package/web/.next/cache/webpack/client-production/12.pack +0 -0
- package/web/.next/cache/webpack/client-production/13.pack +0 -0
- package/web/.next/cache/webpack/client-production/14.pack +0 -0
- package/web/.next/cache/webpack/client-production/15.pack +0 -0
- package/web/.next/cache/webpack/client-production/16.pack +0 -0
- package/web/.next/cache/webpack/client-production/17.pack +0 -0
- package/web/.next/cache/webpack/client-production/18.pack +0 -0
- package/web/.next/cache/webpack/client-production/19.pack +0 -0
- package/web/.next/cache/webpack/client-production/2.pack +0 -0
- package/web/.next/cache/webpack/client-production/20.pack +0 -0
- package/web/.next/cache/webpack/client-production/21.pack +0 -0
- package/web/.next/cache/webpack/client-production/22.pack +0 -0
- package/web/.next/cache/webpack/client-production/23.pack +0 -0
- package/web/.next/cache/webpack/client-production/24.pack +0 -0
- package/web/.next/cache/webpack/client-production/25.pack +0 -0
- package/web/.next/cache/webpack/client-production/26.pack +0 -0
- package/web/.next/cache/webpack/client-production/27.pack +0 -0
- package/web/.next/cache/webpack/client-production/3.pack +0 -0
- package/web/.next/cache/webpack/client-production/4.pack +0 -0
- package/web/.next/cache/webpack/client-production/5.pack +0 -0
- package/web/.next/cache/webpack/client-production/6.pack +0 -0
- package/web/.next/cache/webpack/client-production/7.pack +0 -0
- package/web/.next/cache/webpack/client-production/8.pack +0 -0
- package/web/.next/cache/webpack/client-production/9.pack +0 -0
- package/web/.next/cache/webpack/client-production/index.pack +0 -0
- package/web/.next/cache/webpack/client-production/index.pack.old +0 -0
- package/web/.next/cache/webpack/edge-server-production/0.pack +0 -0
- package/web/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/web/.next/cache/webpack/edge-server-production/index.pack.old +0 -0
- package/web/.next/cache/webpack/server-production/0.pack +0 -0
- package/web/.next/cache/webpack/server-production/1.pack +0 -0
- package/web/.next/cache/webpack/server-production/10.pack +0 -0
- package/web/.next/cache/webpack/server-production/11.pack +0 -0
- package/web/.next/cache/webpack/server-production/12.pack +0 -0
- package/web/.next/cache/webpack/server-production/13.pack +0 -0
- package/web/.next/cache/webpack/server-production/14.pack +0 -0
- package/web/.next/cache/webpack/server-production/15.pack +0 -0
- package/web/.next/cache/webpack/server-production/16.pack +0 -0
- package/web/.next/cache/webpack/server-production/17.pack +0 -0
- package/web/.next/cache/webpack/server-production/18.pack +0 -0
- package/web/.next/cache/webpack/server-production/19.pack +0 -0
- package/web/.next/cache/webpack/server-production/2.pack +0 -0
- package/web/.next/cache/webpack/server-production/20.pack +0 -0
- package/web/.next/cache/webpack/server-production/3.pack +0 -0
- package/web/.next/cache/webpack/server-production/4.pack +0 -0
- package/web/.next/cache/webpack/server-production/5.pack +0 -0
- package/web/.next/cache/webpack/server-production/6.pack +0 -0
- package/web/.next/cache/webpack/server-production/7.pack +0 -0
- package/web/.next/cache/webpack/server-production/8.pack +0 -0
- package/web/.next/cache/webpack/server-production/9.pack +0 -0
- package/web/.next/cache/webpack/server-production/index.pack +0 -0
- package/web/.next/cache/webpack/server-production/index.pack.old +0 -0
- package/web/.next/diagnostics/build-diagnostics.json +6 -0
- package/web/.next/diagnostics/framework.json +1 -0
- package/web/.next/dynamic-css-manifest.json +1 -0
- package/web/.next/export-marker.json +6 -0
- package/web/.next/images-manifest.json +58 -0
- package/web/.next/next-minimal-server.js.nft.json +1 -0
- package/web/.next/next-server.js.nft.json +1 -0
- package/web/.next/package.json +1 -0
- package/web/.next/prerender-manifest.json +11 -0
- package/web/.next/react-loadable-manifest.json +14 -0
- package/web/.next/required-server-files.json +343 -0
- package/web/.next/routes-manifest.json +79 -0
- package/web/.next/server/chunks/276.js +19 -0
- package/web/.next/server/chunks/508.js +1 -0
- package/web/.next/server/chunks/891.js +6 -0
- package/web/.next/server/dynamic-css-manifest.js +1 -0
- package/web/.next/server/functions-config-manifest.json +4 -0
- package/web/.next/server/interception-route-rewrite-manifest.js +1 -0
- package/web/.next/server/middleware-build-manifest.js +1 -0
- package/web/.next/server/middleware-manifest.json +6 -0
- package/web/.next/server/middleware-react-loadable-manifest.js +1 -0
- package/web/.next/server/next-font-manifest.js +1 -0
- package/web/.next/server/next-font-manifest.json +1 -0
- package/web/.next/server/pages/404.html +1 -0
- package/web/.next/server/pages/500.html +1 -0
- package/web/.next/server/pages/_app.js +1 -0
- package/web/.next/server/pages/_app.js.nft.json +1 -0
- package/web/.next/server/pages/_document.js +1 -0
- package/web/.next/server/pages/_document.js.nft.json +1 -0
- package/web/.next/server/pages/_error.js +1 -0
- package/web/.next/server/pages/_error.js.nft.json +1 -0
- package/web/.next/server/pages/dashboard.html +1 -0
- package/web/.next/server/pages/dashboard.js.nft.json +1 -0
- package/web/.next/server/pages/index.html +1 -0
- package/web/.next/server/pages/index.js.nft.json +1 -0
- package/web/.next/server/pages-manifest.json +8 -0
- package/web/.next/server/webpack-runtime.js +1 -0
- package/web/.next/static/FqMH7OdKFqTxzPemOh9_6/_buildManifest.js +1 -0
- package/web/.next/static/FqMH7OdKFqTxzPemOh9_6/_ssgManifest.js +1 -0
- package/web/.next/static/chunks/112-1bb8aeaa7c3fd57f.js +1 -0
- package/web/.next/static/chunks/131.2b0db2ec21a47401.js +1 -0
- package/web/.next/static/chunks/1d0474cf-ced9eb4c00bbcd99.js +1 -0
- package/web/.next/static/chunks/750.caaf5a9ddd46b267.js +1 -0
- package/web/.next/static/chunks/framework-9ad035430eed8b2b.js +1 -0
- package/web/.next/static/chunks/main-a5ca0156a62da1bd.js +1 -0
- package/web/.next/static/chunks/pages/_app-37894446f6ae5afe.js +1 -0
- package/web/.next/static/chunks/pages/_error-8e5b843ec9d413fc.js +1 -0
- package/web/.next/static/chunks/pages/dashboard-ce0d55d3fea9e308.js +1 -0
- package/web/.next/static/chunks/pages/index-8d94234d8de13682.js +1 -0
- package/web/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- package/web/.next/static/chunks/webpack-ea849f90a4c65253.js +1 -0
- package/web/.next/static/css/de4e0852dfebd52f.css +3 -0
- package/web/.next/trace +2 -0
- package/web/.next/types/routes.d.ts +62 -0
- package/web/.next/types/validator.ts +16 -0
- package/web/components/AppHead.js +0 -14
- package/web/components/AuthCard.js +0 -170
- package/web/components/BrandLogo.js +0 -11
- package/web/components/ChatWindow.js +0 -875
- package/web/components/ChatWindow.js.tmp +0 -0
- package/web/components/ContactList.js +0 -97
- package/web/components/ContactsPanel.js +0 -90
- package/web/components/EmojiPicker.js +0 -108
- package/web/components/MediaPreviewModal.js +0 -146
- package/web/components/MessageActionMenu.js +0 -155
- package/web/components/SessionSidebar.js +0 -167
- package/web/components/SettingsModal.js +0 -266
- package/web/components/Skeletons.js +0 -73
- package/web/jsconfig.json +0 -10
- package/web/lib/api.js +0 -33
- package/web/lib/socket.js +0 -9
- package/web/pages/_app.js +0 -5
- package/web/pages/dashboard.js +0 -541
- package/web/pages/index.js +0 -62
- package/web/postcss.config.js +0 -10
- package/web/store/useAppStore.js +0 -209
- package/web/styles/globals.css +0 -52
- package/web/tailwind.config.js +0 -36
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import { useMemo, useState } from "react";
|
|
2
|
-
import { BrandLogo } from "@/components/BrandLogo";
|
|
3
|
-
|
|
4
|
-
const initialValues = {
|
|
5
|
-
name: "",
|
|
6
|
-
email: "",
|
|
7
|
-
password: ""
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const featureCopy = [
|
|
11
|
-
"Multi-user workspace for multiple team accounts.",
|
|
12
|
-
"Multi-device sessions with local QR pairing.",
|
|
13
|
-
"Chat, media, and realtime updates in one CLI package."
|
|
14
|
-
];
|
|
15
|
-
|
|
16
|
-
export function AuthCard({ mode, onModeChange, onSubmit, error, busy }) {
|
|
17
|
-
const [values, setValues] = useState(initialValues);
|
|
18
|
-
const title = useMemo(() => (mode === "login" ? "Sign in to OpenWA" : "Create your OpenWA workspace"), [mode]);
|
|
19
|
-
const subtitle = useMemo(
|
|
20
|
-
() =>
|
|
21
|
-
mode === "login"
|
|
22
|
-
? "Continue to your WhatsApp-style dashboard and manage every session from one place."
|
|
23
|
-
: "Create the first account to start using the OpenWA inbox, device manager, and session workspace.",
|
|
24
|
-
[mode]
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
const submit = async (event) => {
|
|
28
|
-
event.preventDefault();
|
|
29
|
-
await onSubmit(values);
|
|
30
|
-
setValues((current) => ({ ...current, password: "" }));
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<section className="mx-auto grid w-full max-w-[1180px] overflow-hidden rounded-[36px] border border-white/10 bg-[#0f1a20] shadow-[0_24px_90px_rgba(0,0,0,0.35)] lg:grid-cols-[1.05fr_0.95fr]">
|
|
35
|
-
<div className="relative hidden min-h-[720px] overflow-hidden bg-[radial-gradient(circle_at_top_left,rgba(37,211,102,0.28),transparent_36%),linear-gradient(180deg,#0b141a_0%,#111b21_100%)] px-10 py-10 lg:flex lg:flex-col">
|
|
36
|
-
<div className="absolute inset-0 bg-[linear-gradient(135deg,transparent_0%,rgba(255,255,255,0.03)_45%,transparent_100%)]" />
|
|
37
|
-
<div className="relative z-10 flex items-center justify-between">
|
|
38
|
-
<div>
|
|
39
|
-
<BrandLogo variant="long" alt="OpenWA" className="h-12 w-auto max-w-[220px]" />
|
|
40
|
-
<p className="mt-5 text-xs uppercase tracking-[0.35em] text-brand-100/70">OpenWA Workspace</p>
|
|
41
|
-
<h1 className="mt-3 text-4xl font-semibold leading-tight text-white">
|
|
42
|
-
Self-hosted WhatsApp workspace,
|
|
43
|
-
<br />
|
|
44
|
-
packed into one CLI.
|
|
45
|
-
</h1>
|
|
46
|
-
</div>
|
|
47
|
-
<div className="rounded-full border border-white/10 bg-white/5 px-4 py-2 text-sm font-medium text-white/80">Local-first</div>
|
|
48
|
-
</div>
|
|
49
|
-
|
|
50
|
-
<div className="relative z-10 mt-10 grid gap-4">
|
|
51
|
-
{featureCopy.map((item) => (
|
|
52
|
-
<div key={item} className="rounded-[28px] border border-white/10 bg-white/[0.04] px-5 py-4 backdrop-blur">
|
|
53
|
-
<p className="text-sm leading-7 text-white/78">{item}</p>
|
|
54
|
-
</div>
|
|
55
|
-
))}
|
|
56
|
-
</div>
|
|
57
|
-
|
|
58
|
-
<div className="relative z-10 mt-auto rounded-[32px] border border-white/10 bg-white/[0.05] p-6 backdrop-blur">
|
|
59
|
-
<div className="mb-5 flex items-center gap-3">
|
|
60
|
-
<div className="flex h-12 w-12 items-center justify-center rounded-2xl bg-white p-2 shadow-[0_12px_30px_rgba(0,0,0,0.18)]">
|
|
61
|
-
<BrandLogo variant="square" alt="OpenWA icon" className="h-full w-full rounded-xl" />
|
|
62
|
-
</div>
|
|
63
|
-
<div>
|
|
64
|
-
<p className="text-sm font-semibold text-white">Production-style control center</p>
|
|
65
|
-
<p className="text-sm text-white/50">Session manager, dashboard auth, media tools, and realtime sockets.</p>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
|
|
69
|
-
<div className="grid gap-3 sm:grid-cols-3">
|
|
70
|
-
<div className="rounded-2xl bg-[#111b21] px-4 py-4">
|
|
71
|
-
<p className="text-[11px] uppercase tracking-[0.22em] text-white/35">Frontend</p>
|
|
72
|
-
<p className="mt-2 text-lg font-semibold text-white">55111</p>
|
|
73
|
-
</div>
|
|
74
|
-
<div className="rounded-2xl bg-[#111b21] px-4 py-4">
|
|
75
|
-
<p className="text-[11px] uppercase tracking-[0.22em] text-white/35">Backend</p>
|
|
76
|
-
<p className="mt-2 text-lg font-semibold text-white">55222</p>
|
|
77
|
-
</div>
|
|
78
|
-
<div className="rounded-2xl bg-[#111b21] px-4 py-4">
|
|
79
|
-
<p className="text-[11px] uppercase tracking-[0.22em] text-white/35">Mode</p>
|
|
80
|
-
<p className="mt-2 text-lg font-semibold text-white">Local</p>
|
|
81
|
-
</div>
|
|
82
|
-
</div>
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
|
-
|
|
86
|
-
<div className="flex items-center justify-center bg-[#f7f8fa] px-6 py-8 sm:px-10">
|
|
87
|
-
<section className="w-full max-w-[470px] rounded-[32px] bg-white p-8 shadow-[0_20px_60px_rgba(17,27,33,0.12)] ring-1 ring-black/5 sm:p-10">
|
|
88
|
-
<div className="mb-8 flex items-start justify-between gap-4">
|
|
89
|
-
<div>
|
|
90
|
-
<BrandLogo variant="long" alt="OpenWA" className="mb-4 h-10 w-auto max-w-[180px]" />
|
|
91
|
-
<p className="text-[11px] font-semibold uppercase tracking-[0.28em] text-[#00a884]">OpenWA Access</p>
|
|
92
|
-
<h2 className="mt-3 text-3xl font-semibold leading-tight text-[#111b21]">{title}</h2>
|
|
93
|
-
<p className="mt-3 text-sm leading-7 text-[#667781]">{subtitle}</p>
|
|
94
|
-
</div>
|
|
95
|
-
<div className="rounded-full bg-[#f0f2f5] px-3 py-1 text-xs font-semibold uppercase tracking-[0.16em] text-[#54656f]">CLI</div>
|
|
96
|
-
</div>
|
|
97
|
-
|
|
98
|
-
<div className="mb-7 grid grid-cols-2 gap-2 rounded-full bg-[#f0f2f5] p-1.5">
|
|
99
|
-
{["login", "register"].map((value) => (
|
|
100
|
-
<button
|
|
101
|
-
key={value}
|
|
102
|
-
type="button"
|
|
103
|
-
className={`rounded-full px-4 py-3 text-sm font-semibold transition ${
|
|
104
|
-
mode === value ? "bg-white text-[#111b21] shadow-sm" : "text-[#667781] hover:text-[#111b21]"
|
|
105
|
-
}`}
|
|
106
|
-
onClick={() => onModeChange(value)}
|
|
107
|
-
>
|
|
108
|
-
{value === "login" ? "Login" : "Register"}
|
|
109
|
-
</button>
|
|
110
|
-
))}
|
|
111
|
-
</div>
|
|
112
|
-
|
|
113
|
-
<form className="space-y-4" onSubmit={submit}>
|
|
114
|
-
{mode === "register" ? (
|
|
115
|
-
<label className="block">
|
|
116
|
-
<span className="mb-2 block text-sm font-medium text-[#54656f]">Name</span>
|
|
117
|
-
<input
|
|
118
|
-
className="w-full rounded-2xl border border-[#d1d7db] bg-[#f7f8fa] px-4 py-3.5 text-[#111b21] outline-none transition placeholder:text-[#8696a0] focus:border-[#00a884] focus:bg-white"
|
|
119
|
-
value={values.name}
|
|
120
|
-
onChange={(event) => setValues((current) => ({ ...current, name: event.target.value }))}
|
|
121
|
-
placeholder="Your name"
|
|
122
|
-
required
|
|
123
|
-
/>
|
|
124
|
-
</label>
|
|
125
|
-
) : null}
|
|
126
|
-
|
|
127
|
-
<label className="block">
|
|
128
|
-
<span className="mb-2 block text-sm font-medium text-[#54656f]">Email</span>
|
|
129
|
-
<input
|
|
130
|
-
type="email"
|
|
131
|
-
className="w-full rounded-2xl border border-[#d1d7db] bg-[#f7f8fa] px-4 py-3.5 text-[#111b21] outline-none transition placeholder:text-[#8696a0] focus:border-[#00a884] focus:bg-white"
|
|
132
|
-
value={values.email}
|
|
133
|
-
onChange={(event) => setValues((current) => ({ ...current, email: event.target.value }))}
|
|
134
|
-
placeholder="you@example.com"
|
|
135
|
-
required
|
|
136
|
-
/>
|
|
137
|
-
</label>
|
|
138
|
-
|
|
139
|
-
<label className="block">
|
|
140
|
-
<span className="mb-2 block text-sm font-medium text-[#54656f]">Password</span>
|
|
141
|
-
<input
|
|
142
|
-
type="password"
|
|
143
|
-
className="w-full rounded-2xl border border-[#d1d7db] bg-[#f7f8fa] px-4 py-3.5 text-[#111b21] outline-none transition placeholder:text-[#8696a0] focus:border-[#00a884] focus:bg-white"
|
|
144
|
-
value={values.password}
|
|
145
|
-
onChange={(event) => setValues((current) => ({ ...current, password: event.target.value }))}
|
|
146
|
-
placeholder="Minimum 1 character"
|
|
147
|
-
required
|
|
148
|
-
/>
|
|
149
|
-
</label>
|
|
150
|
-
|
|
151
|
-
{error ? <div className="rounded-2xl border border-red-300 bg-red-50 px-4 py-3 text-sm text-red-600">{error}</div> : null}
|
|
152
|
-
|
|
153
|
-
<button
|
|
154
|
-
type="submit"
|
|
155
|
-
className="w-full rounded-2xl bg-[#00a884] px-4 py-3.5 font-semibold text-white transition hover:bg-[#019273] disabled:cursor-not-allowed disabled:opacity-60"
|
|
156
|
-
disabled={busy}
|
|
157
|
-
>
|
|
158
|
-
{busy ? "Processing..." : mode === "login" ? "Enter dashboard" : "Create account and get started"}
|
|
159
|
-
</button>
|
|
160
|
-
</form>
|
|
161
|
-
|
|
162
|
-
<div className="mt-8 rounded-[24px] bg-[#f7f8fa] px-4 py-4">
|
|
163
|
-
<p className="text-xs uppercase tracking-[0.22em] text-[#8696a0]">Setup flow</p>
|
|
164
|
-
<p className="mt-2 text-sm leading-7 text-[#54656f]">Install once with npm, run `openwa`, sign in to the dashboard, and connect multiple WhatsApp devices from your local browser.</p>
|
|
165
|
-
</div>
|
|
166
|
-
</section>
|
|
167
|
-
</div>
|
|
168
|
-
</section>
|
|
169
|
-
);
|
|
170
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const sources = {
|
|
2
|
-
long: "/logo-long.png",
|
|
3
|
-
square: "/logo-square.png"
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
export function BrandLogo({ variant = "long", alt = "OpenWA", className = "" }) {
|
|
7
|
-
const src = sources[variant] || sources.long;
|
|
8
|
-
const fitClassName = variant === "square" ? "object-cover" : "object-contain";
|
|
9
|
-
|
|
10
|
-
return <img src={src} alt={alt} className={`${fitClassName} ${className}`.trim()} />;
|
|
11
|
-
}
|