mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-26 02:05:31 +00:00
Mark desktop, web, and mobile in the homepage plugins subtitle (#10799)
Each client the subtitle names has its own color and an icon. The locale strings tag the three names so each translation places them.
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
Gem,
|
||||
GitFork,
|
||||
GitPullRequest,
|
||||
Globe,
|
||||
Laptop,
|
||||
Lock,
|
||||
Merge,
|
||||
@@ -387,7 +388,7 @@ function FeatureSection({
|
||||
}: {
|
||||
eyebrow?: string;
|
||||
title: string;
|
||||
description: string;
|
||||
description: React.ReactNode;
|
||||
badge?: string;
|
||||
links?: ReadonlyArray<{ href: string; label: string }>;
|
||||
children: React.ReactNode;
|
||||
@@ -941,9 +942,50 @@ function HubSection() {
|
||||
);
|
||||
}
|
||||
|
||||
/** A client that runs plugins, named in the section lede with its icon. */
|
||||
function PluginClient({
|
||||
icon: Icon,
|
||||
className,
|
||||
iconClassName = "mr-[0.3em]",
|
||||
children,
|
||||
}: {
|
||||
icon: LucideIcon;
|
||||
className: string;
|
||||
iconClassName?: string;
|
||||
children?: React.ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<span className={`whitespace-nowrap ${className}`}>
|
||||
<Icon
|
||||
aria-hidden="true"
|
||||
className={`inline-block size-[1em] align-[-0.15em] ${iconClassName}`}
|
||||
strokeWidth={1.75}
|
||||
/>
|
||||
{children}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
const PLUGIN_CLIENT_COMPONENTS = {
|
||||
desktop: <PluginClient icon={Monitor} className="text-sky-300" />,
|
||||
web: <PluginClient icon={Globe} className="text-emerald-300" />,
|
||||
// Optical: the phone glyph is narrower than its box, so pull both sides in.
|
||||
mobile: (
|
||||
<PluginClient
|
||||
icon={Smartphone}
|
||||
className="text-purple-300"
|
||||
iconClassName="-ml-[0.12em] mr-[0.18em]"
|
||||
/>
|
||||
),
|
||||
};
|
||||
|
||||
function ExtensibleSection({ pluginCount }: { pluginCount?: number | null }) {
|
||||
const { t } = useTranslation();
|
||||
const pluginActions = React.useMemo(() => <PluginActions />, []);
|
||||
const description = React.useMemo(
|
||||
() => <Trans i18nKey="landing.plugins.description" components={PLUGIN_CLIENT_COMPONENTS} />,
|
||||
[],
|
||||
);
|
||||
const libraryTitle =
|
||||
pluginCount && pluginCount > 0
|
||||
? t("landing.plugins.libraryTitleCount", { count: pluginCount })
|
||||
@@ -952,7 +994,7 @@ function ExtensibleSection({ pluginCount }: { pluginCount?: number | null }) {
|
||||
<FeatureSection
|
||||
eyebrow={t("landing.eyebrows.plugins")}
|
||||
title={t("landing.plugins.title")}
|
||||
description={t("landing.plugins.description")}
|
||||
description={description}
|
||||
>
|
||||
<div className="space-y-6">
|
||||
<SelfModifyDemo />
|
||||
|
||||
@@ -410,7 +410,7 @@
|
||||
},
|
||||
"plugins": {
|
||||
"title": "Ask Paseo to change Paseo",
|
||||
"description": "Build or install a plugin once on your server, and it works across desktop, web, and native mobile with no restart.",
|
||||
"description": "Build or install a plugin once on your server, and it works across <desktop>desktop</desktop>, <web>web</web>, and <mobile>native mobile</mobile> with no restart.",
|
||||
"request": "Add a sidebar panel with the PRs waiting on my review.",
|
||||
"plan": "I'll build it as a local plugin and install it.",
|
||||
"done": "Review queue is in your sidebar.",
|
||||
|
||||
@@ -410,7 +410,7 @@
|
||||
},
|
||||
"plugins": {
|
||||
"title": "让 Paseo 修改 Paseo",
|
||||
"description": "插件只需在你的服务器上构建或安装一次,即可在桌面端、Web 端和原生移动端运行,无需重启。",
|
||||
"description": "插件只需在你的服务器上构建或安装一次,即可在 <desktop>桌面端</desktop>、<web>Web 端</web>和 <mobile>原生移动端</mobile>运行,无需重启。",
|
||||
"request": "在侧边栏加一个面板,列出等待我审查的 PR。",
|
||||
"plan": "我会把它做成本地插件并安装。",
|
||||
"done": "审查队列已出现在你的侧边栏。",
|
||||
|
||||
Reference in New Issue
Block a user