Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

reorder web settings tiles and icons

Prateek Sunal71409eb8bad8
diff --git a/web/apps/ensu/src/components/chat/ChatDialogs.tsx b/web/apps/ensu/src/components/chat/ChatDialogs.tsx
index ff61046650..abb3da6d9f 100644
--- a/web/apps/ensu/src/components/chat/ChatDialogs.tsx
+++ b/web/apps/ensu/src/components/chat/ChatDialogs.tsx
@@ -2,9 +2,13 @@ import {
ArrowRight01Icon,
Bug01Icon,
Cancel01Icon,
+ InformationCircleIcon,
Key01Icon,
+ LegalDocument01Icon,
Login01Icon,
+ Logout01Icon,
Settings01Icon,
+ Shield02Icon,
SlidersHorizontalIcon,
} from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/react";
@@ -240,16 +244,22 @@ export const ChatDialogs = memo(
<ListItemButton
onClick={() => {
closeSettingsModal();
- void saveLogs();
+ if (typeof window !== "undefined") {
+ window.open(
+ "https://ente.io/blog/ensu/",
+ "_blank",
+ "noopener,noreferrer",
+ );
+ }
}}
sx={settingsItemSx}
>
<HugeiconsIcon
- icon={Bug01Icon}
+ icon={InformationCircleIcon}
{...compactIconProps}
/>
<Typography variant="small" sx={{ flex: 1 }}>
- Save logs
+ About
</Typography>
<HugeiconsIcon
icon={ArrowRight01Icon}
@@ -257,62 +267,12 @@ export const ChatDialogs = memo(
/>
</ListItemButton>
- {isLoggedIn && (
- <ListItemButton
- onClick={() => {
- closeSettingsModal();
- openPasskeysFromChat();
- }}
- sx={settingsItemSx}
- >
- <HugeiconsIcon
- icon={Key01Icon}
- {...compactIconProps}
- />
- <Typography
- variant="small"
- sx={{ flex: 1 }}
- >
- Passkeys
- </Typography>
- <HugeiconsIcon
- icon={ArrowRight01Icon}
- {...smallIconProps}
- />
- </ListItemButton>
- )}
-
- {!isLoggedIn && (
- <ListItemButton
- onClick={() => {
- closeSettingsModal();
- openLoginFromChat();
- }}
- sx={settingsItemSx}
- >
- <HugeiconsIcon
- icon={Login01Icon}
- {...compactIconProps}
- />
- <Typography
- variant="small"
- sx={{ flex: 1, fontWeight: 600 }}
- >
- Sign In to Backup
- </Typography>
- <HugeiconsIcon
- icon={ArrowRight01Icon}
- {...smallIconProps}
- />
- </ListItemButton>
- )}
-
<ListItemButton
onClick={() => {
closeSettingsModal();
if (typeof window !== "undefined") {
window.open(
- "https://ente.io/blog/ensu/",
+ "https://ente.io/privacy",
"_blank",
"noopener,noreferrer",
);
@@ -320,8 +280,12 @@ export const ChatDialogs = memo(
}}
sx={settingsItemSx}
>
+ <HugeiconsIcon
+ icon={Shield02Icon}
+ {...compactIconProps}
+ />
<Typography variant="small" sx={{ flex: 1 }}>
- About
+ Privacy Policy
</Typography>
<HugeiconsIcon
icon={ArrowRight01Icon}
@@ -334,7 +298,7 @@ export const ChatDialogs = memo(
closeSettingsModal();
if (typeof window !== "undefined") {
window.open(
- "https://ente.io/privacy",
+ "https://ente.io/terms",
"_blank",
"noopener,noreferrer",
);
@@ -342,8 +306,12 @@ export const ChatDialogs = memo(
}}
sx={settingsItemSx}
>
+ <HugeiconsIcon
+ icon={LegalDocument01Icon}
+ {...compactIconProps}
+ />
<Typography variant="small" sx={{ flex: 1 }}>
- Privacy Policy
+ Terms of Service
</Typography>
<HugeiconsIcon
icon={ArrowRight01Icon}
@@ -354,18 +322,16 @@ export const ChatDialogs = memo(
<ListItemButton
onClick={() => {
closeSettingsModal();
- if (typeof window !== "undefined") {
- window.open(
- "https://ente.io/terms",
- "_blank",
- "noopener,noreferrer",
- );
- }
+ void saveLogs();
}}
sx={settingsItemSx}
>
+ <HugeiconsIcon
+ icon={Bug01Icon}
+ {...compactIconProps}
+ />
<Typography variant="small" sx={{ flex: 1 }}>
- Terms of Service
+ Save logs
</Typography>
<HugeiconsIcon
icon={ArrowRight01Icon}
@@ -373,6 +339,56 @@ export const ChatDialogs = memo(
/>
</ListItemButton>
+ {isLoggedIn && (
+ <ListItemButton
+ onClick={() => {
+ closeSettingsModal();
+ openPasskeysFromChat();
+ }}
+ sx={settingsItemSx}
+ >
+ <HugeiconsIcon
+ icon={Key01Icon}
+ {...compactIconProps}
+ />
+ <Typography
+ variant="small"
+ sx={{ flex: 1 }}
+ >
+ Passkeys
+ </Typography>
+ <HugeiconsIcon
+ icon={ArrowRight01Icon}
+ {...smallIconProps}
+ />
+ </ListItemButton>
+ )}
+
+ {!isLoggedIn && (
+ <ListItemButton
+ onClick={() => {
+ closeSettingsModal();
+ openLoginFromChat();
+ }}
+ sx={settingsItemSx}
+ >
+ <HugeiconsIcon
+ icon={Login01Icon}
+ {...compactIconProps}
+ />
+ <Typography
+ variant="small"
+ sx={{ flex: 1, fontWeight: 600 }}
+ >
+ Sign In to Backup
+ </Typography>
+ <HugeiconsIcon
+ icon={ArrowRight01Icon}
+ {...smallIconProps}
+ />
+ </ListItemButton>
+ )}
+
{isLoggedIn && (
<ListItemButton
onClick={() => {
@@ -384,6 +400,10 @@ export const ChatDialogs = memo(
{ color: "critical.main" },
]}
>
+ <HugeiconsIcon
+ icon={Logout01Icon}
+ {...compactIconProps}
+ />
<Typography
variant="small"
sx={{ flex: 1, fontWeight: 600 }}