Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

chore: language button

ascarbek09445411a3f7
diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/layout/HeaderPanel/LanguageButton.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/layout/HeaderPanel/LanguageButton.tsx
new file mode 100644
index 0000000000..fc11c20c6b
--- /dev/null
+++ b/frontend/appflowy_tauri/src/appflowy_app/components/layout/HeaderPanel/LanguageButton.tsx
@@ -0,0 +1,15 @@
+import { EarthSvg } from '$app/components/_shared/svg/EarthSvg';
+import { useState } from 'react';
+import { LanguageSelectPopup } from '$app/components/_shared/LanguageSelectPopup';
+
+export const LanguageButton = () => {
+ const [showPopup, setShowPopup] = useState(false);
+ return (
+ <>
+ <button onClick={() => setShowPopup(!showPopup)} className={'h-5 w-5'}>
+ <EarthSvg></EarthSvg>
+ </button>
+ {showPopup && <LanguageSelectPopup onClose={() => setShowPopup(false)}></LanguageSelectPopup>}
+ </>
+ );
+};
diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/layout/HeaderPanel/PageOptions.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/layout/HeaderPanel/PageOptions.tsx
index 2690af57f0..72ff8a5cfe 100644
--- a/frontend/appflowy_tauri/src/appflowy_app/components/layout/HeaderPanel/PageOptions.tsx
+++ b/frontend/appflowy_tauri/src/appflowy_app/components/layout/HeaderPanel/PageOptions.tsx
@@ -2,6 +2,7 @@ import { Button } from '../../_shared/Button';
import { Details2Svg } from '../../_shared/svg/Details2Svg';
import { usePageOptions } from './PageOptions.hooks';
import { OptionsPopup } from './OptionsPopup';
+import { LanguageButton } from '$app/components/layout/HeaderPanel/LanguageButton';
export const PageOptions = () => {
const { showOptionsPopup, onOptionsClick, onClose, onSignOutClick } = usePageOptions();
@@ -13,7 +14,9 @@ export const PageOptions = () => {
Share
</Button>
- <button id='option-button' className={'relative h-8 w-8'} onClick={onOptionsClick} >
+ <LanguageButton></LanguageButton>
+
+ <button id='option-button' className={'relative h-8 w-8'} onClick={onOptionsClick}>
<Details2Svg></Details2Svg>
</button>
</div>