Skip to content

Commit

Permalink
feat: app download CTA
Browse files Browse the repository at this point in the history
  • Loading branch information
RiverTwilight committed Oct 23, 2024
1 parent 2eaf0be commit 28028e9
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 17 deletions.
51 changes: 35 additions & 16 deletions src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,24 @@ import React, { useState, lazy, Suspense } from "react";
import AppBar from "@mui/material/AppBar";
import Typography from "@mui/material/Typography";
import Box from "@mui/material/Box";
import List from "@mui/material/List";
import ListItem from "@mui/material/ListItem";
import Toolbar from "@mui/material/Toolbar";
import Popover from "@mui/material/Popover";
import IconButton from "@mui/material/IconButton";
import MenuTwoToneIcon from "@mui/icons-material/MenuTwoTone";
import useScrollTrigger from "@mui/material/useScrollTrigger";
import {
CheckCircleOutline,
AppsRounded,
PersonOutline,
AccountCircle,
AutoAwesomeRounded,
} from "@mui/icons-material";
import Link from "next/link";
import { Avatar, Theme, useMediaQuery, Grid } from "@mui/material";
import useNotifications from "@/utils/Hooks/useNotification";
import { Theme, useMediaQuery, Grid, Chip, Tooltip } from "@mui/material";
import { useSidebar } from "@/contexts/sidebar";
import siteConfig from "src/site.config";
import { useAccount } from "@/contexts/account";
import { useRouter } from "next/router";
import Image from "next/image";
import Person from "@mui/icons-material/Person";
import { isWeb } from "@/utils/platform";
import Text from "./i18n";

function ElevationScroll(props: Props) {
const { children } = props;
Expand Down Expand Up @@ -63,37 +59,37 @@ function AppsMenu() {
{
name: "ClipMemo",
icon: "https://www.ygeeker.com/image/product/clipmemo.png",
link: "https://clipmemo.ygeeker.com",
link: "https://www.ygeeker.com/clipmemo",
description: "Effortlessly capture and organize your ideas",
},
{
name: "Dali",
icon: "https://www.ygeeker.com/image/product/dali.png",
link: "https://dali.ygeeker.com",
link: "https://www.ygeeker.com/dali",
description: "Create stunning AI-generated artwork",
},
{
name: "I Didn't",
icon: "https://www.ygeeker.com/image/product/ididnt.png",
link: "https://ididnt.ygeeker.com",
link: "https://www.ygeeker.com/ididnt",
description: "Track habits you want to break",
},
{
name: "FlowFerry",
icon: "https://www.ygeeker.com/image/product/flowferry.png",
link: "https://flowferry.ygeeker.com",
link: "https://www.ygeeker.com/flowferry",
description: "Streamline your workflow automation",
},
{
name: "Currates",
icon: "https://www.ygeeker.com/image/product/currates.png",
link: "https://currates.ygeeker.com",
link: "https://www.ygeeker.com/currates",
description: "Curate and share your favorite content",
},
{
name: "Timeline",
icon: "https://www.ygeeker.com/image/product/timeline.png",
link: "https://timeline.ygeeker.com",
link: "https://www.ygeeker.com/timeline",
description: "Visualize your personal or project history",
},
];
Expand Down Expand Up @@ -171,7 +167,7 @@ function AppsMenu() {
overflow: "hidden",
marginBottom: "8px",
boxShadow: (theme) =>
theme.shadows[1], // Added small shadow for product icon
theme.shadows[1],
}}
>
<Image
Expand Down Expand Up @@ -216,13 +212,15 @@ export default (props: { title: string; PageAction; repo: string }) => {

const { sidebar, setSidebar } = useSidebar();
const [showLoginDialog, setShowLoginDialog] = useState(false);
const { account } = useAccount();
const hidden = useMediaQuery((theme: Theme) =>
theme.breakpoints.down("sm")
);
const isXs = useMediaQuery((theme: Theme) => theme.breakpoints.only("xs"));
const router = useRouter();
const isRootRoute = router.pathname === "/";

const [showGetAppChip, setShowGetAppChip] = useState(true);

return (
<>
<ElevationScroll {...props}>
Expand Down Expand Up @@ -279,6 +277,27 @@ export default (props: { title: string; PageAction; repo: string }) => {

<Box sx={{ flexGrow: 1 }} />

{!isXs && showGetAppChip && isWeb() && (
<Tooltip
title={<Text k="navbar.downloadApp.tooltip" />}
>
<Chip
icon={<AutoAwesomeRounded />}
label={
<Text k="navbar.downloadApp.label" />
}
onDelete={() => setShowGetAppChip(false)}
clickable
sx={{ mr: 2 }}
onClick={() => {
window.open(
"https://www.ygeeker.com/geekits",
"_blank"
);
}}
/>
</Tooltip>
)}
{PageAction}

{(isRootRoute || !hidden) && <AppsMenu />}
Expand Down
2 changes: 1 addition & 1 deletion src/data/i18n.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"zh-CN":{"homePage.meta.description":"轻盈好用的在线工具,无需下载即可免费使用 30+ 工具,解决生活学习工作中的大小问题","homePage.meta.title":"首页","homePage.appSection.Media":"图片视频","homePage.searchBarAriaLabel":"在此键入以搜索","homePage.searchBarPlaceholder":"搜索(Ctrl+F)","navbar.home":"首页","navbar.donation":"免费捐赠","navbar.about":"关于","navbar.settings":"设置","navbar.feedback":"反馈","navbar.copyright.subtitle":"Geekits 完全开源和免费","navbar.copyright.title":"YGeeker 出品","navbar.log":"更新日志","channel.life":"生活常用","channel.ai":"人工智能","channel.image":"图片视频","channel.developer":"编程开发","channel.external":"第三方APP","channel.wip":"开发中","appMenu.github":"在 GitHub 上编辑","appMenu.bookmark":"收藏","appMenu.bookmark.undo":"移除收藏","settings.language.title":"语言","settings.language.auto":"跟随系统","settings.language.zh_cn":"简体中文","settings.language.en_us":"English","donation.paid.title":"付费方式","feedback.send":"提交","feedback.hero":"我们会阅读每一条反馈","feedback.subtitle":"你可以畅所欲言","feedback.debug":"发送错误日志","feedback.content.placeholder":"输入内容","feedback.contact.placeholder":"适合我们联系你的方式","general.chooseFile":"选择文件","general.confirm":"确认","general.save":"保存","general.download":"下载","qrcode.basic.title":"基本","qrcode.basic.placeholder":"链接或文本","qrcode.basic.type":"类型","qrcode.basic.wifi":"WI-FI","qrcode.basic.text":"文本","qrcode.advanced.title":"高级","qrcode.advanced.icon":"图标","qrcode.advanced.light":"亮色","qrcode.advanced.dark":"暗色","aboutPage.meta.title":"关于","app.decision.addOption":"添加选项","app.decision.savePreset":"保存预设","app.decision.currentOption":"当前备选项","app.roman.inputHint":"输入整数","app.urlcleaner.confirmBtn":"净化","app.urlcleaner.ruleTitle":"规则"},"en-US":{"homePage.meta.description":"Your all-in-one digital toolkit. 30+ free tools including AI chat, calculators, converters, and creative utilities. Solve daily challenges effortlessly.","homePage.meta.title":"Home","homePage.appSection.Media":"Media","homePage.searchBarAriaLabel":"Type to Search","homePage.searchBarPlaceholder":"Search (Ctrl+F)","navbar.home":"Home","navbar.donation":"Free Donation","navbar.about":"About","navbar.settings":"Settings","navbar.feedback":"Feedback","navbar.copyright.subtitle":"Geekits is 100% open source and free","navbar.copyright.title":"Created by YGeeker","navbar.log":"What’s New","channel.life":"Lifestyle","channel.ai":"AI","channel.image":"Media Process","channel.developer":"Developer","channel.external":"External App","channel.wip":"WIP","appMenu.github":"Edit on GitHub","appMenu.bookmark":"Bookmark","appMenu.bookmark.undo":"Remove Bookmark","settings.language.title":"Language","settings.language.auto":"Auto","settings.language.zh_cn":"简体中文","settings.language.en_us":"English","donation.paid.title":"Paid Option","feedback.send":"Submit","feedback.hero":"We Read Every Feedback","feedback.subtitle":"New app request, bug report, or anything you want to tell us.","feedback.debug":"Send Error Log","feedback.content.placeholder":"Write something you want to tell us","feedback.contact.placeholder":"How can we contact you?","general.chooseFile":"Choose File","general.confirm":"Confirm","general.save":"Save","general.download":"Download","qrcode.basic.title":"Basic","qrcode.basic.placeholder":"URL or Text","qrcode.basic.type":"Type","qrcode.basic.wifi":"WI-FI","qrcode.basic.text":"Text","qrcode.advanced.title":"Advanced","qrcode.advanced.icon":"Icon","qrcode.advanced.light":"Light Color","qrcode.advanced.dark":"Dark Color","aboutPage.meta.title":"About","app.decision.addOption":"Add Option","app.decision.savePreset":"Save Preset","app.decision.currentOption":"Current Options","app.roman.inputHint":"Input integer","app.urlcleaner.confirmBtn":"Clean URL","app.urlcleaner.ruleTitle":"Rules"},"zh-HK":{"homePage.searchBarPlaceholder":"搜寻"}}
{"zh-CN":{"homePage.meta.description":"轻盈好用的在线工具,无需下载即可免费使用 30+ 工具,解决生活学习工作中的大小问题","homePage.meta.title":"首页","homePage.appSection.Media":"图片视频","homePage.searchBarAriaLabel":"在此键入以搜索","homePage.searchBarPlaceholder":"搜索(Ctrl+F)","navbar.home":"首页","navbar.donation":"免费捐赠","navbar.about":"关于","navbar.settings":"设置","navbar.downloadApp.tooltip":"Geekits APP 带来更快的速度,离线使用,以及更好的体验","navbar.downloadApp.label":"试试 Geekits APP","navbar.feedback":"反馈","navbar.copyright.subtitle":"Geekits 完全开源和免费","navbar.copyright.title":"YGeeker 出品","navbar.log":"更新日志","channel.life":"生活常用","channel.ai":"人工智能","channel.image":"图片视频","channel.developer":"编程开发","channel.external":"第三方APP","channel.wip":"开发中","appMenu.github":"在 GitHub 上编辑","appMenu.bookmark":"收藏","appMenu.bookmark.undo":"移除收藏","settings.language.title":"语言","settings.language.auto":"跟随系统","settings.language.zh_cn":"简体中文","settings.language.en_us":"English","donation.paid.title":"付费方式","feedback.send":"提交","feedback.hero":"我们会阅读每一条反馈","feedback.subtitle":"你可以畅所欲言","feedback.debug":"发送错误日志","feedback.content.placeholder":"输入内容","feedback.contact.placeholder":"适合我们联系你的方式","general.chooseFile":"选择文件","general.confirm":"确认","general.save":"保存","general.download":"下载","qrcode.basic.title":"基本","qrcode.basic.placeholder":"链接或文本","qrcode.basic.type":"类型","qrcode.basic.wifi":"WI-FI","qrcode.basic.text":"文本","qrcode.advanced.title":"高级","qrcode.advanced.icon":"图标","qrcode.advanced.light":"亮色","qrcode.advanced.dark":"暗色","aboutPage.meta.title":"关于","app.decision.addOption":"添加选项","app.decision.savePreset":"保存预设","app.decision.currentOption":"当前备选项","app.roman.inputHint":"输入整数","app.urlcleaner.confirmBtn":"净化","app.urlcleaner.ruleTitle":"规则"},"en-US":{"homePage.meta.description":"Your all-in-one digital toolkit. 30+ free tools including AI chat, calculators, converters, and creative utilities. Solve daily challenges effortlessly.","homePage.meta.title":"Home","homePage.appSection.Media":"Media","homePage.searchBarAriaLabel":"Type to Search","homePage.searchBarPlaceholder":"Search (Ctrl+F)","navbar.home":"Home","navbar.donation":"Free Donation","navbar.about":"About","navbar.settings":"Settings","navbar.downloadApp.tooltip":"Geekits app allows faster access, offline use, and more.","navbar.downloadApp.label":"Try Geekits App","navbar.feedback":"Feedback","navbar.copyright.subtitle":"Geekits is 100% open source and free","navbar.copyright.title":"Created by YGeeker","navbar.log":"What’s New","channel.life":"Lifestyle","channel.ai":"AI","channel.image":"Media Process","channel.developer":"Developer","channel.external":"External App","channel.wip":"WIP","appMenu.github":"Edit on GitHub","appMenu.bookmark":"Bookmark","appMenu.bookmark.undo":"Remove Bookmark","settings.language.title":"Language","settings.language.auto":"Auto","settings.language.zh_cn":"简体中文","settings.language.en_us":"English","donation.paid.title":"Paid Option","feedback.send":"Submit","feedback.hero":"We Read Every Feedback","feedback.subtitle":"New app request, bug report, or anything you want to tell us.","feedback.debug":"Send Error Log","feedback.content.placeholder":"Write something you want to tell us","feedback.contact.placeholder":"How can we contact you?","general.chooseFile":"Choose File","general.confirm":"Confirm","general.save":"Save","general.download":"Download","qrcode.basic.title":"Basic","qrcode.basic.placeholder":"URL or Text","qrcode.basic.type":"Type","qrcode.basic.wifi":"WI-FI","qrcode.basic.text":"Text","qrcode.advanced.title":"Advanced","qrcode.advanced.icon":"Icon","qrcode.advanced.light":"Light Color","qrcode.advanced.dark":"Dark Color","aboutPage.meta.title":"About","app.decision.addOption":"Add Option","app.decision.savePreset":"Save Preset","app.decision.currentOption":"Current Options","app.roman.inputHint":"Input integer","app.urlcleaner.confirmBtn":"Clean URL","app.urlcleaner.ruleTitle":"Rules"},"zh-HK":{"homePage.searchBarPlaceholder":"搜寻"}}
Binary file modified src/data/i18n.numbers
Binary file not shown.
Binary file modified src/data/i18n.xlsx
Binary file not shown.

0 comments on commit 28028e9

Please sign in to comment.