Skip to content

⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.

add chechbox to host selection dropdown

daniel31x1358d756859943
diff --git a/apps/mobile/app/index.tsx b/apps/mobile/app/index.tsx
index 98e0086f..f92cf545 100644
--- a/apps/mobile/app/index.tsx
+++ b/apps/mobile/app/index.tsx
@@ -39,6 +39,7 @@ export default function HomeScreen() {
const theme = rawTheme[colorScheme as ThemeName];
const serverName = displayInstance(auth.instance);
const instance = (auth.instance || cloudInstance).trim().replace(/\/+$/, "");
+ const isCloudInstance = instance === cloudInstance;
const currentInstanceInfo =
instanceInfo.instance === instance ? instanceInfo : null;
const buttonAuths = currentInstanceInfo?.logins?.buttonAuths;
@@ -239,15 +240,25 @@ export default function HomeScreen() {
<DropdownMenu.Content>
<DropdownMenu.Separator />
- {orderedServerOptions.map((option) => (
- <DropdownMenu.Item
- key={option.key}
- onSelect={option.onSelect}
- className={option.className}
- >
- {option.title}
- </DropdownMenu.Item>
- ))}
+ {orderedServerOptions.map((option) => {
+ const isActive =
+ option.key === "cloud"
+ ? isCloudInstance
+ : !isCloudInstance;
+
+ return (
+ <DropdownMenu.CheckboxItem
+ key={option.key}
+ value={isActive}
+ onValueChange={option.onSelect}
+ className={option.className}
+ >
+ <DropdownMenu.ItemTitle>
+ {option.title}
+ </DropdownMenu.ItemTitle>
+ </DropdownMenu.CheckboxItem>
+ );
+ })}
</DropdownMenu.Content>
</DropdownMenu.Root>
</View>