diff --git a/backend/pyproject.toml b/backend/pyproject.toml index 543b6c3..c8b57ab 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "ds-chat" -version = "0.1.0" +version = "1.0.0" description = "DS Chat backend service" license = { text = "AGPL-3.0-or-later" } requires-python = ">=3.11" diff --git a/frontend/package.json b/frontend/package.json index ab4cf99..e483b35 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "frontend", "private": true, - "version": "0.0.0", + "version": "1.0.0", "license": "AGPL-3.0-or-later", "type": "module", "scripts": { diff --git a/frontend/public/LICENSE b/frontend/public/LICENSE new file mode 120000 index 0000000..30cff74 --- /dev/null +++ b/frontend/public/LICENSE @@ -0,0 +1 @@ +../../LICENSE \ No newline at end of file diff --git a/frontend/src/components/AboutModal.css b/frontend/src/components/AboutModal.css new file mode 100644 index 0000000..39e55cc --- /dev/null +++ b/frontend/src/components/AboutModal.css @@ -0,0 +1,27 @@ +.about-modal-brand { + display: flex; + align-items: center; + gap: var(--sp-3); + margin-bottom: var(--sp-4); +} + +.about-modal-logo { + width: 40px; + height: 40px; + flex: none; +} + +.about-modal-name { + font-weight: 700; + font-size: 1.05rem; +} + +.about-modal-version { + color: var(--ds-muted); + font-size: 0.85rem; +} + +.about-modal-line { + margin: 0 0 var(--sp-2); + font-size: 0.9rem; +} diff --git a/frontend/src/components/AboutModal.tsx b/frontend/src/components/AboutModal.tsx new file mode 100644 index 0000000..bb0eab3 --- /dev/null +++ b/frontend/src/components/AboutModal.tsx @@ -0,0 +1,56 @@ +import logo from '../assets/logo.png' +import './Modal.css' +import './AboutModal.css' + +interface AboutModalProps { + onClose: () => void +} + +// AGPL-3.0 itself recommends this: "if your software can interact with +// users remotely through a computer network, you should also make sure +// that it provides a way for users to get its source... its interface +// could display a 'Source' link" -- this modal is that link, not just a +// courtesy credits screen. +const SOURCE_URL = 'https://git.darksingularity.org/DarkSingularity/ds-chat' + +export function AboutModal({ onClose }: AboutModalProps) { + return ( +
+
e.stopPropagation()}> +
+

About

+ +
+ +
+ +
+
DS Chat
+
Version {__APP_VERSION__}
+
+
+ +

+ Licensed under the{' '} + + GNU Affero General Public License v3.0 (or later) + + . +

+

+ + Source code + +

+ +
+ +
+
+
+ ) +} diff --git a/frontend/src/components/TopBar.tsx b/frontend/src/components/TopBar.tsx index 2d9d7ca..22f523c 100644 --- a/frontend/src/components/TopBar.tsx +++ b/frontend/src/components/TopBar.tsx @@ -12,6 +12,7 @@ import { setDesktopNotificationsEnabled, } from '../lib/desktopBridge' import { getPushSubscriptionStatus, isPushSupported, subscribeToPush, unsubscribeFromPush } from '../lib/push' +import { AboutModal } from './AboutModal' import { ProfileModal } from './ProfileModal' import { UserAvatar } from './UserAvatar' import './TopBar.css' @@ -27,6 +28,7 @@ export function TopBar() { const navigate = useNavigate() const [menuOpen, setMenuOpen] = useState(false) const [profileModalOpen, setProfileModalOpen] = useState(false) + const [aboutModalOpen, setAboutModalOpen] = useState(false) const [pushSubscribed, setPushSubscribed] = useState(false) const [pushBusy, setPushBusy] = useState(false) const [pushError, setPushError] = useState(null) @@ -132,6 +134,16 @@ export function TopBar() { > Help +