mirror of
https://github.com/fromchat-messenger/web.git
synced 2026-09-22 19:15:08 +03:00
Implement download table, backend API for downloads
This commit is contained in:
@@ -1,28 +1,29 @@
|
||||
import { MaterialButton } from "@/utils/material";
|
||||
import { MaterialIcon } from "@/utils/material";
|
||||
import styles from "./download-app.module.scss";
|
||||
|
||||
export default function DownloadAppPage() {
|
||||
return (
|
||||
<div className={styles.downloadAppScreen}>
|
||||
<div>
|
||||
<h1>Чтобы пользоваться мессенджером, скачайте приложение</h1>
|
||||
<div className={styles.downloadAppCard}>
|
||||
<h1>Скачайте приложение</h1>
|
||||
<p>
|
||||
Этот сайт <b>не предназначен</b> для работы на маленьких экранах, поэтому
|
||||
вам нужно скачать приложение мессенджера.
|
||||
Этот сайт не предназначен для работы на маленьких экранах.
|
||||
Выберите вашу платформу:
|
||||
</p>
|
||||
|
||||
<a href="https://github.com/fromchat-messenger/app/releases/latest" target="_blank" rel="noopener noreferrer">
|
||||
<MaterialButton>Скачать на GitHub</MaterialButton>
|
||||
</a>
|
||||
|
||||
<div className={styles.downloadAppButtons}>
|
||||
<a href="/download?os=android" className={styles.downloadAppBtn}>
|
||||
<MaterialIcon name="android" />
|
||||
Android
|
||||
</a>
|
||||
<a href="/download?os=ios" className={styles.downloadAppBtn}>
|
||||
<MaterialIcon name="phone_iphone" />
|
||||
iOS
|
||||
</a>
|
||||
</div>
|
||||
<p>
|
||||
Если возникнут сложности или есть вопросы, нажмите кнопку!
|
||||
<a href="https://t.me/denis0001-dev">Написать в поддержку</a>
|
||||
</p>
|
||||
|
||||
<a href="https://t.me/denis0001-dev">
|
||||
<MaterialButton>Написать в поддержку</MaterialButton>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,70 @@
|
||||
@use "../../css/material" as *;
|
||||
|
||||
.downloadAppScreen {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-width: 100vw;
|
||||
min-height: 100vh;
|
||||
padding: 32px;
|
||||
padding: 24px;
|
||||
background-color: $color-dark-surface;
|
||||
}
|
||||
|
||||
.downloadAppCard {
|
||||
max-width: 400px;
|
||||
padding: 40px 32px;
|
||||
background: rgba($color-dark-surface-container, 0.6);
|
||||
border: 1px solid rgba($color-dark-outline, 0.3);
|
||||
border-radius: 24px;
|
||||
text-align: center;
|
||||
|
||||
h1 {
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
margin: 0 0 16px;
|
||||
color: $color-dark-on-surface;
|
||||
}
|
||||
|
||||
p {
|
||||
color: $color-dark-on-surface-variant;
|
||||
margin: 0 0 24px;
|
||||
font-size: 16px;
|
||||
|
||||
a {
|
||||
color: $color-dark-primary;
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.downloadAppButtons {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.downloadAppBtn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 16px 24px;
|
||||
background: rgba($color-dark-primary, 0.2);
|
||||
border: 1px solid rgba($color-dark-primary, 0.5);
|
||||
border-radius: 12px;
|
||||
color: $color-dark-on-surface;
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
transition: all 0.2s ease;
|
||||
|
||||
&:hover {
|
||||
background: rgba($color-dark-primary, 0.3);
|
||||
border-color: $color-dark-primary;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
import { Link } from "react-router-dom";
|
||||
import { MaterialIcon } from "@/utils/material";
|
||||
import { GitHubLink, GITHUB_WEB, GITHUB_APP, GITHUB_LICENSE } from "./homeLinks";
|
||||
import styles from "./home-footer.module.scss";
|
||||
|
||||
export function HomeFooter() {
|
||||
return (
|
||||
<footer className={styles.homepageFooter}>
|
||||
<div className={styles.footerBrand}>
|
||||
<div className={styles.footerLogoRow}>
|
||||
<div className={styles.footerLogo} />
|
||||
<span className={styles.footerBrandName}>FromChat</span>
|
||||
</div>
|
||||
<p className={styles.footerCopyright}>FromChat © 2026</p>
|
||||
</div>
|
||||
<div className={styles.footerLinks}>
|
||||
<div className={styles.footerSection}>
|
||||
<Link to="/download" className={styles.footerLink}>
|
||||
<MaterialIcon name="download" className={styles.footerLinkIcon} />
|
||||
Скачать приложение
|
||||
</Link>
|
||||
<Link to="/login" className={styles.footerLink}>
|
||||
<MaterialIcon name="language" className={styles.footerLinkIcon} />
|
||||
Веб-версия
|
||||
</Link>
|
||||
<a
|
||||
href={`${GITHUB_WEB}/actions/workflows/build.yml`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={styles.footerLink}
|
||||
>
|
||||
<MaterialIcon name="computer" className={styles.footerLinkIcon} />
|
||||
ПК-клиент
|
||||
</a>
|
||||
</div>
|
||||
<div className={styles.footerSection}>
|
||||
<a
|
||||
href={`${GITHUB_APP}/tree/main`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={styles.footerLink}
|
||||
>
|
||||
<MaterialIcon name="android" className={styles.footerLinkIcon} />
|
||||
Исходный код приложения
|
||||
</a>
|
||||
<GitHubLink className={styles.footerLink}>
|
||||
<MaterialIcon name="code" className={styles.footerLinkIcon} />
|
||||
Исходный код веб-версии
|
||||
</GitHubLink>
|
||||
<a
|
||||
href={GITHUB_LICENSE}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={styles.footerLink}
|
||||
>
|
||||
<MaterialIcon name="description" className={styles.footerLinkIcon} />
|
||||
Лицензия
|
||||
</a>
|
||||
</div>
|
||||
<div className={styles.footerSection}>
|
||||
<a
|
||||
href="https://t.me/fromchat_ch"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={styles.footerLink}
|
||||
>
|
||||
<span
|
||||
className={`${styles.footerLinkIcon} ${styles.footerLinkIconSvg} ${styles.footerLinkIconSvgTelegram}`}
|
||||
/>
|
||||
Telegram
|
||||
</a>
|
||||
<a
|
||||
href="https://max.ru/join/c5t6LfnCCPetQSAOshmouEvq9vsjHZT_Lt63kw8YCg0"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={styles.footerLink}
|
||||
>
|
||||
<span
|
||||
className={`${styles.footerLinkIcon} ${styles.footerLinkIconSvg} ${styles.footerLinkIconSvgMax}`}
|
||||
/>
|
||||
MAX
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { useUserStore } from "@/state/user";
|
||||
import useDownloadAppScreen from "@/core/hooks/useDownloadAppScreen";
|
||||
import { MaterialButton, MaterialIconButton } from "@/utils/material";
|
||||
import { GitHubLink, SupportLink } from "./homeLinks";
|
||||
import styles from "./home-header.module.scss";
|
||||
|
||||
export function HomeHeader() {
|
||||
const navigate = useNavigate();
|
||||
const { user } = useUserStore();
|
||||
const { isMobile } = useDownloadAppScreen();
|
||||
const isLoggedIn = user.authToken && user.currentUser;
|
||||
|
||||
function handleGetStarted() {
|
||||
if (isMobile) {
|
||||
navigate("/download-app");
|
||||
} else if (isLoggedIn) {
|
||||
navigate("/chat");
|
||||
} else {
|
||||
navigate("/login");
|
||||
}
|
||||
}
|
||||
|
||||
const openBtn = (
|
||||
<MaterialButton
|
||||
variant="filled"
|
||||
onClick={handleGetStarted}
|
||||
icon={
|
||||
isMobile ? "download" : isLoggedIn ? "open_in_new" : "login"
|
||||
}
|
||||
className={styles.headerDownloadButton}
|
||||
>
|
||||
{isMobile ? "Скачать" : isLoggedIn ? "Открыть" : "Войти"}
|
||||
</MaterialButton>
|
||||
);
|
||||
|
||||
return (
|
||||
<header className={styles.homepageHeader}>
|
||||
<div className={styles.headerInner}>
|
||||
<div className={styles.headerContent}>
|
||||
<div className={styles.logo}>
|
||||
<div className={styles.logoIcon} />
|
||||
<h1>FromChat</h1>
|
||||
</div>
|
||||
<div className={styles.headerCenterLinks}>
|
||||
<GitHubLink>
|
||||
<MaterialButton variant="text" icon="code">GitHub</MaterialButton>
|
||||
</GitHubLink>
|
||||
<SupportLink>
|
||||
<MaterialButton variant="text" icon="support">Поддержка</MaterialButton>
|
||||
</SupportLink>
|
||||
</div>
|
||||
<div className={styles.headerButton}>
|
||||
{openBtn}
|
||||
{isMobile ? (
|
||||
<MaterialIconButton
|
||||
variant="filled"
|
||||
onClick={() => navigate("/download-app")}
|
||||
icon="download"
|
||||
className={styles.headerSmallButton}
|
||||
/>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
);
|
||||
}
|
||||
@@ -1,53 +1,13 @@
|
||||
import { Link, useNavigate } from "react-router-dom";
|
||||
import { useUserStore } from "@/state/user";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import type { ReactNode } from "react";
|
||||
import styles from "./home.module.scss";
|
||||
import useDownloadAppScreen from "@/core/hooks/useDownloadAppScreen";
|
||||
import { MaterialButton, MaterialIcon, MaterialIconButton } from "@/utils/material";
|
||||
import { MaterialButton, MaterialIcon } from "@/utils/material";
|
||||
import generalChatScreenshot from "../../images/screenshots/general-chat.png";
|
||||
import dmScreenshot from "../../images/screenshots/dm.png";
|
||||
import type { ReactNode } from "react";
|
||||
|
||||
const GITHUB_WEB = "https://github.com/fromchat-messenger/web";
|
||||
const GITHUB_APP = "https://github.com/fromchat-messenger/app";
|
||||
const GITHUB_LICENSE = `${GITHUB_WEB}/blob/main/LICENSE`;
|
||||
|
||||
function GitHubLink({
|
||||
children,
|
||||
className,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
className?: string;
|
||||
}) {
|
||||
return (
|
||||
<a
|
||||
href={`${GITHUB_WEB}/tree/main`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={className}
|
||||
>
|
||||
{children}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
|
||||
function SupportLink({
|
||||
children,
|
||||
className,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
className?: string;
|
||||
}) {
|
||||
return (
|
||||
<a
|
||||
href="https://t.me/denis0001-dev"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={className}
|
||||
>
|
||||
{children}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
import { HomeHeader } from "./HomeHeader";
|
||||
import { HomeFooter } from "./HomeFooter";
|
||||
import { OS_CONFIG, ALL_OS } from "@/core/downloads/os";
|
||||
|
||||
interface FeatureSectionProps {
|
||||
title: ReactNode;
|
||||
@@ -85,64 +45,11 @@ function FeatureSection({
|
||||
|
||||
export default function HomePage() {
|
||||
const navigate = useNavigate();
|
||||
const { user } = useUserStore();
|
||||
const { isMobile } = useDownloadAppScreen();
|
||||
const isLoggedIn = user.authToken && user.currentUser;
|
||||
|
||||
function handleGetStarted() {
|
||||
if (isMobile) {
|
||||
navigate("/download-app");
|
||||
} else if (isLoggedIn) {
|
||||
navigate("/chat");
|
||||
} else {
|
||||
navigate("/login");
|
||||
}
|
||||
}
|
||||
|
||||
const openBtn = (
|
||||
<MaterialButton
|
||||
variant="filled"
|
||||
onClick={handleGetStarted}
|
||||
icon={
|
||||
isMobile ? "download" : isLoggedIn ? "open_in_new" : "login"
|
||||
}
|
||||
className={styles.headerDownloadButton}
|
||||
>
|
||||
{isMobile ? "Скачать" : isLoggedIn ? "Открыть" : "Войти"}
|
||||
</MaterialButton>
|
||||
);
|
||||
|
||||
return (
|
||||
<div className={styles.homepage}>
|
||||
<header className={styles.homepageHeader}>
|
||||
<div className={styles.headerInner}>
|
||||
<div className={styles.headerContent}>
|
||||
<div className={styles.logo}>
|
||||
<div className={styles.logoIcon} />
|
||||
<h1>FromChat</h1>
|
||||
</div>
|
||||
<div className={styles.headerCenterLinks}>
|
||||
<GitHubLink>
|
||||
<MaterialButton variant="text" icon="code">GitHub</MaterialButton>
|
||||
</GitHubLink>
|
||||
<SupportLink>
|
||||
<MaterialButton variant="text" icon="support">Поддержка</MaterialButton>
|
||||
</SupportLink>
|
||||
</div>
|
||||
<div className={styles.headerButton}>
|
||||
{openBtn}
|
||||
{isMobile ? (
|
||||
<MaterialIconButton
|
||||
variant="filled"
|
||||
onClick={() => navigate("/download-app")}
|
||||
icon="download"
|
||||
className={styles.headerSmallButton}
|
||||
/>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<HomeHeader />
|
||||
|
||||
<main>
|
||||
<section className={styles.title}>
|
||||
@@ -155,9 +62,9 @@ export default function HomePage() {
|
||||
</div>
|
||||
<div className={styles.titleButtons}>
|
||||
{isMobile ? null : (
|
||||
<MaterialButton
|
||||
variant="filled"
|
||||
onClick={() => navigate("/auth?mode=login")}
|
||||
<MaterialButton
|
||||
variant="filled"
|
||||
onClick={() => navigate("/auth?mode=login")}
|
||||
icon="devices"
|
||||
>
|
||||
Открыть веб-версию
|
||||
@@ -193,77 +100,42 @@ export default function HomePage() {
|
||||
<div className={styles.downloadContent}>
|
||||
<h3>Скачайте приложение</h3>
|
||||
<p>
|
||||
Для лучшего опыта используйте настольное приложение с уведомлениями
|
||||
и автономной работой или мобильное приложение для Android.
|
||||
Настольное приложение с уведомлениями и автономной работой
|
||||
или мобильное приложение для Android и iOS.
|
||||
</p>
|
||||
<div className={styles.downloadPlatforms}>
|
||||
{!isMobile ? (
|
||||
<>
|
||||
<a
|
||||
href={`${GITHUB_WEB}/actions/workflows/build.yml`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={styles.downloadCard}
|
||||
>
|
||||
<MaterialIcon name="computer" className={styles.downloadCardIcon} />
|
||||
<span className={styles.downloadCardTitle}>Для ПК</span>
|
||||
<span className={styles.downloadCardDesc}>Windows, macOS, Linux</span>
|
||||
<MaterialButton variant="filled" className={styles.downloadCardBtn}>
|
||||
<MaterialIcon name="download" slot="icon" />
|
||||
Скачать
|
||||
</MaterialButton>
|
||||
</a>
|
||||
<a
|
||||
href={`${GITHUB_APP}/releases/latest`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={styles.downloadCard}
|
||||
>
|
||||
<MaterialIcon name="android" className={styles.downloadCardIcon} />
|
||||
<span className={styles.downloadCardTitle}>Android</span>
|
||||
<span className={styles.downloadCardDesc}>APK на GitHub</span>
|
||||
<MaterialButton variant="outlined" className={styles.downloadCardBtn}>
|
||||
<MaterialIcon name="download" slot="icon" />
|
||||
Скачать
|
||||
</MaterialButton>
|
||||
</a>
|
||||
<div className={styles.downloadCard}>
|
||||
<div className={styles.downloadTable}>
|
||||
<div className={styles.downloadTableHeader}>
|
||||
<span>Платформа</span>
|
||||
<span>Описание</span>
|
||||
<span />
|
||||
</div>
|
||||
{ALL_OS.map((os) => (
|
||||
<div key={os} className={styles.downloadTableRow}>
|
||||
<div className={styles.downloadTableOs}>
|
||||
<MaterialIcon
|
||||
name="language"
|
||||
className={styles.downloadCardIcon}
|
||||
name={OS_CONFIG[os].icon}
|
||||
className={styles.downloadTableIcon}
|
||||
/>
|
||||
<span className={styles.downloadCardTitle}>
|
||||
Веб-версия
|
||||
</span>
|
||||
<span className={styles.downloadCardDesc}>
|
||||
Без установки
|
||||
</span>
|
||||
<MaterialButton
|
||||
variant="outlined"
|
||||
className={styles.downloadCardBtn}
|
||||
onClick={() => navigate("/login")}
|
||||
>
|
||||
<MaterialIcon name="open_in_new" slot="icon" />
|
||||
Открыть
|
||||
</MaterialButton>
|
||||
<span>{OS_CONFIG[os].label}</span>
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
<a
|
||||
href={`${GITHUB_APP}/releases/latest`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={styles.downloadCard}
|
||||
>
|
||||
<MaterialIcon name="android" className={styles.downloadCardIcon} />
|
||||
<span className={styles.downloadCardTitle}>Android</span>
|
||||
<span className={styles.downloadCardDesc}>Скачайте APK на GitHub</span>
|
||||
<MaterialButton variant="filled" className={styles.downloadCardBtn}>
|
||||
<MaterialIcon name="download" slot="icon" />
|
||||
Скачать приложение
|
||||
</MaterialButton>
|
||||
</a>
|
||||
)}
|
||||
<span className={styles.downloadTableDesc}>
|
||||
{OS_CONFIG[os].description}
|
||||
</span>
|
||||
<div className={styles.downloadTableAction}>
|
||||
<a
|
||||
href={`/api/download/${os}`}
|
||||
className={styles.downloadTableActionLink}
|
||||
>
|
||||
<MaterialButton
|
||||
variant="outlined"
|
||||
icon="download"
|
||||
>
|
||||
Скачать
|
||||
</MaterialButton>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -302,84 +174,7 @@ export default function HomePage() {
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer className={styles.homepageFooter}>
|
||||
<div className={styles.footerBrand}>
|
||||
<div className={styles.footerLogoRow}>
|
||||
<div className={styles.footerLogo} />
|
||||
<span className={styles.footerBrandName}>FromChat</span>
|
||||
</div>
|
||||
<p className={styles.footerCopyright}>FromChat © 2026</p>
|
||||
</div>
|
||||
<div className={styles.footerLinks}>
|
||||
<div className={styles.footerSection}>
|
||||
<Link to="/download-app" className={styles.footerLink}>
|
||||
<MaterialIcon name="download" className={styles.footerLinkIcon} />
|
||||
Скачать приложение
|
||||
</Link>
|
||||
<Link to="/login" className={styles.footerLink}>
|
||||
<MaterialIcon name="language" className={styles.footerLinkIcon} />
|
||||
Веб-версия
|
||||
</Link>
|
||||
<a
|
||||
href={`${GITHUB_WEB}/actions/workflows/build.yml`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={styles.footerLink}
|
||||
>
|
||||
<MaterialIcon name="computer" className={styles.footerLinkIcon} />
|
||||
ПК-клиент
|
||||
</a>
|
||||
</div>
|
||||
<div className={styles.footerSection}>
|
||||
<a
|
||||
href={`${GITHUB_APP}/tree/main`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={styles.footerLink}
|
||||
>
|
||||
<MaterialIcon name="android" className={styles.footerLinkIcon} />
|
||||
Исходный код приложения
|
||||
</a>
|
||||
<GitHubLink className={styles.footerLink}>
|
||||
<MaterialIcon name="code" className={styles.footerLinkIcon} />
|
||||
Исходный код веб-версии
|
||||
</GitHubLink>
|
||||
<a
|
||||
href={GITHUB_LICENSE}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={styles.footerLink}
|
||||
>
|
||||
<MaterialIcon name="description" className={styles.footerLinkIcon} />
|
||||
Лицензия
|
||||
</a>
|
||||
</div>
|
||||
<div className={styles.footerSection}>
|
||||
<a
|
||||
href="https://t.me/fromchat_ch"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={styles.footerLink}
|
||||
>
|
||||
<span
|
||||
className={`${styles.footerLinkIcon} ${styles.footerLinkIconSvg} ${styles.footerLinkIconSvgTelegram}`}
|
||||
/>
|
||||
Telegram
|
||||
</a>
|
||||
<a
|
||||
href="https://max.ru/join/c5t6LfnCCPetQSAOshmouEvq9vsjHZT_Lt63kw8YCg0"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={styles.footerLink}
|
||||
>
|
||||
<span
|
||||
className={`${styles.footerLinkIcon} ${styles.footerLinkIconSvg} ${styles.footerLinkIconSvgMax}`}
|
||||
/>
|
||||
MAX
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<HomeFooter />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
@use "../../css/material" as *;
|
||||
|
||||
$gradient-rainbow: linear-gradient(45deg, #9333EA, #6366F1, #3B82F6, #A855F7, #D946EF, #EC4899, #7E22CE);
|
||||
$glow-purple: rgba(147, 51, 234, 0.5);
|
||||
|
||||
@mixin gradient-text {
|
||||
background: $gradient-rainbow;
|
||||
background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
text-shadow: 0 0 20px $glow-purple;
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
@use "../../css/material" as *;
|
||||
@use "home-shared" as shared;
|
||||
|
||||
.homepageFooter {
|
||||
padding: 0 16px;
|
||||
background: $color-dark-surface;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 32px;
|
||||
max-width: 1000px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding-bottom: 48px;
|
||||
|
||||
@media (max-width: 635px) {
|
||||
flex-direction: column-reverse;
|
||||
align-items: flex-start;
|
||||
padding: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
.footerBrand {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.footerLogoRow {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.footerLogo {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background-image: url('../../images/logo_square.svg');
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.footerBrandName {
|
||||
font-size: 32px;
|
||||
font-weight: 700;
|
||||
@include shared.gradient-text;
|
||||
}
|
||||
|
||||
.footerCopyright {
|
||||
font-size: 14px;
|
||||
color: $color-dark-on-surface-variant;
|
||||
opacity: 0.8;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.footerLinks {
|
||||
display: flex;
|
||||
gap: 32px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.footerSection {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.footerLink {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
color: $color-dark-on-surface-variant;
|
||||
text-decoration: none;
|
||||
font-size: 15px;
|
||||
transition: color 0.2s ease, transform 0.15s ease;
|
||||
-webkit-user-drag: none;
|
||||
user-select: none;
|
||||
|
||||
&:hover {
|
||||
color: $color-dark-on-surface;
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: scale(0.92);
|
||||
}
|
||||
}
|
||||
|
||||
.footerLinkIcon {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
min-width: 24px;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.footerLinkIconSvg {
|
||||
display: inline-block;
|
||||
background-color: currentColor;
|
||||
mask-size: contain;
|
||||
mask-repeat: no-repeat;
|
||||
mask-position: center;
|
||||
-webkit-mask-size: contain;
|
||||
-webkit-mask-repeat: no-repeat;
|
||||
-webkit-mask-position: center;
|
||||
}
|
||||
|
||||
.footerLinkIconSvgTelegram {
|
||||
mask-image: url('../../images/telegram.svg');
|
||||
-webkit-mask-image: url('../../images/telegram.svg');
|
||||
}
|
||||
|
||||
.footerLinkIconSvgMax {
|
||||
mask-image: url('../../images/max.svg');
|
||||
-webkit-mask-image: url('../../images/max.svg');
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
@use "../../css/material" as *;
|
||||
@use "home-shared" as shared;
|
||||
|
||||
.homepageHeader {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 16px;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.headerInner {
|
||||
max-width: 960px;
|
||||
width: 100%;
|
||||
padding: 16px 24px;
|
||||
background: rgba($color-dark-surface, 0.8);
|
||||
backdrop-filter: blur(10px);
|
||||
border-radius: 30px;
|
||||
}
|
||||
|
||||
.headerContent {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.logoIcon {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background-image: url('../../images/logo_square.svg');
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.logo h1 {
|
||||
font-size: 32px;
|
||||
font-weight: 700;
|
||||
margin: 0;
|
||||
@include shared.gradient-text;
|
||||
}
|
||||
|
||||
.headerCenterLinks {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
|
||||
@media (max-width: 730px) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.headerButton {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.headerDownloadButton {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.headerSmallButton {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (max-width: 450px) {
|
||||
.headerSmallButton {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.headerDownloadButton {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
@use "../../css/material" as *;
|
||||
@use "home-shared" as shared;
|
||||
|
||||
// Shared variables
|
||||
$gradient-rainbow: linear-gradient(45deg, #9333EA, #6366F1, #3B82F6, #A855F7, #D946EF, #EC4899, #7E22CE);
|
||||
// Shared variables (home-specific)
|
||||
$gradient-conic: conic-gradient(
|
||||
from 0deg,
|
||||
rgba(147, 51, 234, 0.5) 0%,
|
||||
@@ -14,23 +14,15 @@ $gradient-conic: conic-gradient(
|
||||
rgba(126, 34, 206, 0.6) 87.5%,
|
||||
rgba(147, 51, 234, 0.5) 100%
|
||||
);
|
||||
$glow-purple: rgba(147, 51, 234, 0.5);
|
||||
$radius-card: 20px;
|
||||
$radius-pill: 9999px;
|
||||
|
||||
// Mixins
|
||||
@mixin gradient-text {
|
||||
background: $gradient-rainbow;
|
||||
background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
text-shadow: 0 0 20px $glow-purple;
|
||||
}
|
||||
|
||||
@mixin section-heading {
|
||||
font-size: 40px;
|
||||
font-weight: 700;
|
||||
margin-bottom: 24px;
|
||||
@include gradient-text;
|
||||
@include shared.gradient-text;
|
||||
}
|
||||
|
||||
@mixin section-content {
|
||||
@@ -54,6 +46,8 @@ $radius-pill: 9999px;
|
||||
|
||||
.homepage {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
color: $color-dark-on-background;
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
position: relative;
|
||||
@@ -66,94 +60,9 @@ $radius-pill: 9999px;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
header.homepageHeader {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 16px;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
|
||||
.headerInner {
|
||||
max-width: 960px;
|
||||
width: 100%;
|
||||
padding: 16px 24px;
|
||||
background: rgba($color-dark-surface, 0.8);
|
||||
backdrop-filter: blur(10px);
|
||||
border-radius: 30px;
|
||||
|
||||
.headerContent {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
|
||||
.logoIcon {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background-image: url('../../images/logo_square.svg');
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 32px;
|
||||
font-weight: 700;
|
||||
margin: 0;
|
||||
@include gradient-text;
|
||||
}
|
||||
}
|
||||
|
||||
.headerCenterLinks {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
|
||||
@media (max-width: 730px) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.headerButton {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.headerDownloadButton {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.headerSmallButton {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (max-width: 450px) {
|
||||
.headerSmallButton {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.headerDownloadButton {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
main {
|
||||
flex: 1;
|
||||
|
||||
.title {
|
||||
padding: 60px 0;
|
||||
display: flex;
|
||||
@@ -201,7 +110,7 @@ $radius-pill: 9999px;
|
||||
font-weight: 700;
|
||||
margin-top: 10px;
|
||||
padding: 0 80px;
|
||||
@include gradient-text;
|
||||
@include shared.gradient-text;
|
||||
}
|
||||
|
||||
.titleDesc {
|
||||
@@ -247,7 +156,7 @@ $radius-pill: 9999px;
|
||||
font-size: 30pt;
|
||||
font-weight: 700;
|
||||
line-height: normal;
|
||||
@include gradient-text;
|
||||
@include shared.gradient-text;
|
||||
}
|
||||
|
||||
.featureDesc {
|
||||
@@ -302,55 +211,66 @@ $radius-pill: 9999px;
|
||||
@include section-heading;
|
||||
}
|
||||
|
||||
.downloadPlatforms {
|
||||
display: flex;
|
||||
gap: 24px;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.downloadCard {
|
||||
.downloadTable {
|
||||
width: 100%;
|
||||
max-width: 720px;
|
||||
margin: 0 auto;
|
||||
border-radius: 20px;
|
||||
background: rgba($color-dark-surface-container, 0.8);
|
||||
border: 1px solid rgba($color-dark-outline, 0.3);
|
||||
padding: 8px 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.downloadTableHeader {
|
||||
display: grid;
|
||||
grid-template-columns: 2fr 2fr auto;
|
||||
padding: 8px 4px;
|
||||
font-size: 12px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.08em;
|
||||
color: $color-dark-on-surface-variant;
|
||||
}
|
||||
|
||||
.downloadTableRow {
|
||||
display: grid;
|
||||
grid-template-columns: 2fr 2fr auto;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 32px 24px;
|
||||
min-width: 200px;
|
||||
max-width: 260px;
|
||||
background: rgba($color-dark-surface-container, 0.6);
|
||||
border: 1px solid rgba($color-dark-outline, 0.3);
|
||||
border-radius: $radius-card;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
padding: 8px 4px;
|
||||
border-radius: 12px;
|
||||
&:hover {
|
||||
background: rgba($color-dark-surface-container-high, 0.8);
|
||||
border-color: rgba($color-dark-primary, 0.5);
|
||||
box-shadow: 0 0 24px rgba($color-dark-primary, 0.2);
|
||||
}
|
||||
|
||||
.downloadCardIcon {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
color: $color-dark-primary;
|
||||
}
|
||||
|
||||
.downloadCardTitle {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
@include gradient-text;
|
||||
}
|
||||
|
||||
.downloadCardDesc {
|
||||
font-size: 14px;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.downloadCardBtn {
|
||||
margin-top: 8px;
|
||||
background-color: rgba($color-dark-surface-container-high, 0.8);
|
||||
}
|
||||
}
|
||||
|
||||
.downloadTableOs {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.downloadTableIcon {
|
||||
font-size: 20px;
|
||||
color: $color-dark-primary;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.downloadTableDesc {
|
||||
font-size: 14px;
|
||||
color: $color-dark-on-surface-variant;
|
||||
}
|
||||
|
||||
.downloadTableAction {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.downloadTableActionLink {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -378,124 +298,6 @@ $radius-pill: 9999px;
|
||||
}
|
||||
}
|
||||
|
||||
footer.homepageFooter {
|
||||
padding: 0 16px;
|
||||
background: $color-dark-surface;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 32px;
|
||||
max-width: 1000px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding-bottom: 48px;
|
||||
|
||||
.footerBrand {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 12px;
|
||||
|
||||
.footerLogoRow {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.footerLogo {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background-image: url('../../images/logo_square.svg');
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.footerBrandName {
|
||||
font-size: 32px;
|
||||
font-weight: 700;
|
||||
@include gradient-text;
|
||||
}
|
||||
|
||||
.footerCopyright {
|
||||
font-size: 14px;
|
||||
color: $color-dark-on-surface-variant;
|
||||
opacity: 0.8;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.footerLinks {
|
||||
display: flex;
|
||||
gap: 32px;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.footerSection {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 12px;
|
||||
|
||||
.footerLink {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
color: $color-dark-on-surface-variant;
|
||||
text-decoration: none;
|
||||
font-size: 15px;
|
||||
transition: color 0.2s ease, transform 0.15s ease;
|
||||
-webkit-user-drag: none;
|
||||
user-select: none;
|
||||
|
||||
&:hover {
|
||||
color: $color-dark-on-surface;
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: scale(0.92);
|
||||
}
|
||||
|
||||
.footerLinkIcon {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
min-width: 24px;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.footerLinkIconSvg {
|
||||
display: inline-block;
|
||||
background-color: currentColor;
|
||||
mask-size: contain;
|
||||
mask-repeat: no-repeat;
|
||||
mask-position: center;
|
||||
-webkit-mask-size: contain;
|
||||
-webkit-mask-repeat: no-repeat;
|
||||
-webkit-mask-position: center;
|
||||
}
|
||||
|
||||
.footerLinkIconSvgTelegram {
|
||||
mask-image: url('../../images/telegram.svg');
|
||||
-webkit-mask-image: url('../../images/telegram.svg');
|
||||
}
|
||||
|
||||
.footerLinkIconSvgMax {
|
||||
mask-image: url('../../images/max.svg');
|
||||
-webkit-mask-image: url('../../images/max.svg');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 635px) {
|
||||
flex-direction: column-reverse;
|
||||
align-items: flex-start;
|
||||
padding: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 635px) {
|
||||
main {
|
||||
.title {
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
const GITHUB_WEB = "https://github.com/fromchat-messenger/web";
|
||||
const GITHUB_APP = "https://github.com/fromchat-messenger/app";
|
||||
export const GITHUB_LICENSE = `${GITHUB_WEB}/blob/main/LICENSE`;
|
||||
|
||||
export function GitHubLink({
|
||||
children,
|
||||
className,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
className?: string;
|
||||
}) {
|
||||
return (
|
||||
<a
|
||||
href={`${GITHUB_WEB}/tree/main`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={className}
|
||||
>
|
||||
{children}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
|
||||
export function SupportLink({
|
||||
children,
|
||||
className,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
className?: string;
|
||||
}) {
|
||||
return (
|
||||
<a
|
||||
href="https://t.me/denis0001-dev"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={className}
|
||||
>
|
||||
{children}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
|
||||
export { GITHUB_WEB, GITHUB_APP };
|
||||
@@ -17,6 +17,7 @@ import 'mdui/components/button';
|
||||
import 'mdui/components/text-field';
|
||||
import 'mdui/components/button-icon';
|
||||
import 'mdui/components/switch';
|
||||
import 'mdui/components/ripple';
|
||||
import 'mdui/components/chip';
|
||||
import 'mdui/components/badge';
|
||||
import "mdui/mdui.css";
|
||||
@@ -29,6 +30,7 @@ import type { Switch } from 'mdui/components/switch';
|
||||
import type { Override } from '@/core/types';
|
||||
import type { Button } from 'mdui/components/button';
|
||||
import type { ButtonIcon } from 'mdui/components/button-icon';
|
||||
import type { Ripple } from 'mdui/components/ripple';
|
||||
import type { Icon } from 'mdui/components/icon';
|
||||
import type { Fab } from 'mdui/components/fab';
|
||||
import type { Tabs } from 'mdui/components/tabs';
|
||||
@@ -58,6 +60,7 @@ export type MDUISwitch = Override<HTMLElement, Switch>;
|
||||
export type MDUIButton = Override<HTMLElement, Button>;
|
||||
export type MDUIButtonIcon = Override<HTMLElement, ButtonIcon>;
|
||||
export type MDUIIcon = Override<HTMLElement, Icon>;
|
||||
export type MDUIRipple = Override<HTMLElement, Ripple>;
|
||||
export type MDUIFab = Override<HTMLElement, Fab>;
|
||||
export type MDUITabs = Override<HTMLElement, Tabs>;
|
||||
export type MDUITab = Override<HTMLElement, Tab>;
|
||||
@@ -140,4 +143,10 @@ export function MaterialCircularProgress(props: MaterialCircularProgressProps) {
|
||||
export type MaterialBottomAppBarProps = BasePropCustomization<"mdui-bottom-app-bar", MDUIBottomAppBar>;
|
||||
export function MaterialBottomAppBar(props: MaterialBottomAppBarProps) {
|
||||
return <mdui-bottom-app-bar {...props as ComponentProps<"mdui-bottom-app-bar">} />
|
||||
}
|
||||
|
||||
export type MaterialRippleProps = BasePropCustomization<"div", MDUIRipple>;
|
||||
export function MaterialRipple(props: MaterialRippleProps) {
|
||||
// Wrapper component for future custom ripple usage; MDUI buttons already include real ripple.
|
||||
return <div {...props as ComponentProps<"div">} />;
|
||||
}
|
||||
Reference in New Issue
Block a user