-
-
Notifications
You must be signed in to change notification settings - Fork 921
Expand file tree
/
Copy pathabout.tsx
More file actions
113 lines (103 loc) · 4.73 KB
/
about.tsx
File metadata and controls
113 lines (103 loc) · 4.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
// Copyright 2026, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0
import Logo from "@/app/asset/logo.svg";
import { OnboardingGradientBg } from "@/app/onboarding/onboarding-common";
import { atoms } from "@/app/store/global";
import { modalsModel } from "@/app/store/modalmodel";
import { RpcApi } from "@/app/store/wshclientapi";
import { TabRpcClient } from "@/app/store/wshrpcutil";
import { isDev } from "@/util/isdev";
import { fireAndForget } from "@/util/util";
import { useAtomValue } from "jotai";
import { useEffect } from "react";
import { Modal } from "./modal";
interface AboutModalVProps {
versionString: string;
updaterChannel: string;
onClose: () => void;
}
const AboutModalV = ({ versionString, updaterChannel, onClose }: AboutModalVProps) => {
const currentDate = new Date();
return (
<Modal className="pt-[34px] pb-[34px] overflow-hidden w-[450px]" onClose={onClose}>
<OnboardingGradientBg />
<div className="flex flex-col gap-[26px] w-full relative z-10">
<div className="flex flex-col items-center justify-center gap-4 self-stretch w-full text-center">
<Logo />
<div className="text-[25px]">Wave Terminal</div>
<div className="leading-5">
Open-Source AI-Integrated Terminal
<br />
Built for Seamless Workflows
</div>
</div>
<div className="items-center gap-4 self-stretch w-full text-center">
Client Version {versionString}
<br />
Update Channel: {updaterChannel}
</div>
<div className="grid grid-cols-2 gap-[10px] self-stretch w-full">
<a
href="https://github.com/wavetermdev/waveterm?ref=about"
target="_blank"
rel="noopener"
className="inline-flex items-center justify-center px-4 py-2 rounded border border-border hover:bg-hoverbg transition-colors duration-200"
>
<i className="fa-brands fa-github mr-2"></i>GitHub
</a>
<a
href="https://www.waveterm.dev/?ref=about"
target="_blank"
rel="noopener"
className="inline-flex items-center justify-center px-4 py-2 rounded border border-border hover:bg-hoverbg transition-colors duration-200"
>
<i className="fa-sharp fa-light fa-globe mr-2"></i>Website
</a>
<a
href="https://github.com/wavetermdev/waveterm/blob/main/ACKNOWLEDGEMENTS.md"
target="_blank"
rel="noopener"
className="inline-flex items-center justify-center px-4 py-2 rounded border border-border hover:bg-hoverbg transition-colors duration-200"
>
<i className="fa-sharp fa-light fa-book mr-2"></i>Open Source
</a>
<a
href="https://github.com/sponsors/wavetermdev"
target="_blank"
rel="noopener"
className="inline-flex items-center justify-center px-4 py-2 rounded border border-border hover:bg-hoverbg transition-colors duration-200"
>
<i className="fa-sharp fa-light fa-heart mr-2"></i>Sponsor
</a>
</div>
<div className="items-center gap-4 self-stretch w-full text-center">
© {currentDate.getFullYear()} Command Line Inc.
</div>
</div>
</Modal>
);
};
AboutModalV.displayName = "AboutModalV";
const AboutModal = () => {
const fullConfig = useAtomValue(atoms.fullConfigAtom);
const versionString = `${fullConfig?.version ?? ""} (${isDev() ? "dev-" : ""}${fullConfig?.buildtime ?? ""})`;
const updaterChannel = fullConfig?.settings?.["autoupdate:channel"] ?? "latest";
useEffect(() => {
fireAndForget(async () => {
RpcApi.RecordTEventCommand(
TabRpcClient,
{ event: "action:other", props: { "action:type": "about" } },
{ noresponse: true }
);
});
}, []);
return (
<AboutModalV
versionString={versionString}
updaterChannel={updaterChannel}
onClose={() => modalsModel.popModal()}
/>
);
};
AboutModal.displayName = "AboutModal";
export { AboutModal, AboutModalV };