diff --git a/app/components/Icons/LanguageIcon.tsx b/app/components/Icons/LanguageIcon.tsx
new file mode 100644
index 000000000..286b94594
--- /dev/null
+++ b/app/components/Icons/LanguageIcon.tsx
@@ -0,0 +1,32 @@
+import * as React from "react";
+
+export function LanguageIcon({ className }: { className?: string }) {
+ return (
+
+ );
+}
diff --git a/app/components/LanguagePrompt.tsx b/app/components/LanguagePrompt.tsx
index c84c6b6ec..616b4b875 100644
--- a/app/components/LanguagePrompt.tsx
+++ b/app/components/LanguagePrompt.tsx
@@ -1,6 +1,7 @@
+import { m } from "framer-motion";
import find from "lodash/find";
import * as React from "react";
-import { Trans, useTranslation } from "react-i18next";
+import { useTranslation } from "react-i18next";
import styled from "styled-components";
import { languages, languageOptions } from "@shared/i18n";
import ButtonLink from "~/components/ButtonLink";
@@ -9,37 +10,8 @@ import env from "~/env";
import useCurrentUser from "~/hooks/useCurrentUser";
import useStores from "~/hooks/useStores";
import { detectLanguage } from "~/utils/language";
-
-function Icon({ className }: { className?: string }) {
- return (
-
- );
-}
+import { LanguageIcon } from "./Icons/LanguageIcon";
+import Text from "./Text";
export default function LanguagePrompt() {
const { ui } = useStores();
@@ -47,11 +19,11 @@ export default function LanguagePrompt() {
const user = useCurrentUser();
const language = detectLanguage();
- if (language === "en_US" || language === user.language) {
- return null;
- }
-
- if (!languages.includes(language)) {
+ if (
+ language === "en_US" ||
+ language === user.language ||
+ !languages.includes(language)
+ ) {
return null;
}
@@ -60,17 +32,18 @@ export default function LanguagePrompt() {
const appName = env.APP_NAME;
return (
-
-
+
+
-
- {{ appName }} is available in your language{" "}
- {{
- optionLabel,
- }}
- , would you like to change?
-
+
+ {appName} is available in your language – {optionLabel}, would you
+ like to change?
+
{
@@ -88,16 +61,17 @@ export default function LanguagePrompt() {
);
}
-const Wrapper = styled.p`
- background: ${(props) => props.theme.brand.marine};
- color: ${(props) => props.theme.almostBlack};
- padding: 10px 12px;
- margin-top: 24px;
- border-radius: 4px;
+const Wrapper = styled(m.p)`
+ color: ${(props) => props.theme.text};
+ border: 1px solid ${(props) => props.theme.divider};
+ padding: 20px;
+ margin-top: 12px;
+ border-radius: 8px;
position: relative;
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
a {
- color: ${(props) => props.theme.almostBlack};
+ color: ${(props) => props.theme.text};
font-weight: 500;
}
@@ -107,14 +81,11 @@ const Wrapper = styled.p`
`;
const Link = styled(ButtonLink)`
- color: ${(props) => props.theme.almostBlack};
+ cursor: var(--cursor-pointer);
+ color: ${(props) => props.theme.text};
font-weight: 500;
&:hover {
text-decoration: underline;
}
`;
-
-const LanguageIcon = styled(Icon)`
- margin-right: 12px;
-`;
diff --git a/app/scenes/Home.tsx b/app/scenes/Home.tsx
index 411054848..cd2af7303 100644
--- a/app/scenes/Home.tsx
+++ b/app/scenes/Home.tsx
@@ -12,6 +12,7 @@ import InputSearchPage from "~/components/InputSearchPage";
import LanguagePrompt from "~/components/LanguagePrompt";
import PaginatedDocumentList from "~/components/PaginatedDocumentList";
import PinnedDocuments from "~/components/PinnedDocuments";
+import { ResizingHeightContainer } from "~/components/ResizingHeightContainer";
import Scene from "~/components/Scene";
import Tab from "~/components/Tab";
import Tabs from "~/components/Tabs";
@@ -47,7 +48,9 @@ function Home() {
}
>
- {!ui.languagePromptDismissed && }
+
+ {!ui.languagePromptDismissed && }
+
{t("Home")}
diff --git a/shared/i18n/locales/en_US/translation.json b/shared/i18n/locales/en_US/translation.json
index 6fdc00300..aaff28e2e 100644
--- a/shared/i18n/locales/en_US/translation.json
+++ b/shared/i18n/locales/en_US/translation.json
@@ -232,7 +232,6 @@
"View only": "View only",
"No access": "No access",
"Default access": "Default access",
- "{{appName}} is available in your language {{optionLabel}}, would you like to change?": "{{appName}} is available in your language {{optionLabel}}, would you like to change?",
"Change Language": "Change Language",
"Dismiss": "Dismiss",
"You’re offline.": "You’re offline.",