(feat): add cache package
(feat): improve local storage security (feat): move settings to dedicated settings package
This commit is contained in:
parent
fb095db7a6
commit
790a1db788
54 changed files with 1984 additions and 947 deletions
46
packages/settings/src/pages/chat.tsx
Normal file
46
packages/settings/src/pages/chat.tsx
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
import { storageDefaults } from "@tensamin/shared/data";
|
||||
import { useStorage } from "@tensamin/storage/context";
|
||||
import { Button, Kbd } from "@tensamin/ui";
|
||||
import { List, Switch } from "../components";
|
||||
|
||||
export default function Page() {
|
||||
const { save } = useStorage();
|
||||
return (
|
||||
<div className="flex flex-col gap-2">
|
||||
<Switch
|
||||
label={
|
||||
<p>
|
||||
Change <Kbd>Enter</Kbd> behavior to <Kbd>Shift</Kbd> +{" "}
|
||||
<Kbd>Enter</Kbd>
|
||||
</p>
|
||||
}
|
||||
id="settings.reverse_enter_behavior"
|
||||
/>
|
||||
<Switch
|
||||
label="Enable read confirmations"
|
||||
id="settings.read_confirmations"
|
||||
/>
|
||||
<Switch
|
||||
label="Enable receive confirmations"
|
||||
id="settings.receive_confirmations"
|
||||
/>
|
||||
<Switch
|
||||
label="Sidebar message preview"
|
||||
id="settings.show_start_of_last_message_in_sidebar"
|
||||
/>
|
||||
<p className="text-destructive pt-6">
|
||||
Trusted embed domains can get your IP-Address! Only add domains if you
|
||||
really trust them!
|
||||
</p>
|
||||
<div>
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={() => void save("reactions", storageDefaults.reactions)}
|
||||
>
|
||||
Reset Emoji Ranks
|
||||
</Button>
|
||||
</div>
|
||||
<List label="Trusted embed domains" id="chat_trusted_domains" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Loading…
Reference in a new issue