From 9cce97967de85916f8abaee8bae370762077540f Mon Sep 17 00:00:00 2001 From: Cooper Ransom Date: Thu, 29 Feb 2024 13:56:49 -0500 Subject: [PATCH] i am done with the icons i promise --- src/assets/locales/en.json | 6 +++--- src/components/UserIcon.tsx | 10 ++++++---- src/components/form/IconPicker.tsx | 3 ++- src/components/utils/Lightbar.tsx | 16 ++++++++-------- src/pages/parts/auth/PassphraseGeneratePart.tsx | 9 +++++++-- 5 files changed, 26 insertions(+), 18 deletions(-) diff --git a/src/assets/locales/en.json b/src/assets/locales/en.json index ecfaa618..9f1fde9c 100644 --- a/src/assets/locales/en.json +++ b/src/assets/locales/en.json @@ -25,7 +25,7 @@ "deviceNameLabel": "Device name", "deviceNamePlaceholder": "Personal phone", "generate": { - "description": "Your passphrase acts as your username and password. Make sure to keep it safe as you will need to enter it to login to your account", + "description": "Your passphrase acts as your username and password. Make sure to keep it safe as you will need to enter it to login to your account. Do NOT lose your passphrase!", "next": "I have saved my passphrase", "passphraseFrameLabel": "Passphrase", "title": "Your passphrase" @@ -44,7 +44,7 @@ "information": { "color1": "Profile color one", "color2": "Profile color two", - "header": "Enter a name for your device and pick colours and a user icon of your choosing", + "header": "Enter a name for your device then pick colors and a user icon of your choosing!", "icon": "User icon", "next": "Next", "title": "Account information" @@ -57,7 +57,7 @@ }, "noHostTitle": "Server not configured!", "noHost": "The server has not been configured, therefore you cannot create an account", - "host": "You are connecting to <0>{{hostname}} - please confirm you trust it before making an account", + "host": "You are connecting to <0>{{hostname}} - please confirm you trust it before making an account...", "no": "Go back", "title": "Do you trust this server?", "yes": "I trust this server 🤞" diff --git a/src/components/UserIcon.tsx b/src/components/UserIcon.tsx index bf91e430..8c7e8c2b 100644 --- a/src/components/UserIcon.tsx +++ b/src/components/UserIcon.tsx @@ -4,12 +4,13 @@ import { Icon, Icons } from "@/components/Icon"; export enum UserIcons { CAT = "cat", + DESKTOP = "desktop", + WEED = "weed", STORM = "storm", USER_GROUP = "userGroup", COUCH = "couch", MOBILE = "mobile", TICKET = "ticket", - HANDCUFFS = "handcuffs", } export interface UserIconProps { @@ -18,13 +19,14 @@ export interface UserIconProps { } const iconList: Record = { - cat: ` `, - storm: ` `, + cat: ` `, + desktop: ` `, + weed: ``, + storm: ` `, userGroup: ``, couch: ``, mobile: ``, ticket: ``, - handcuffs: ``, }; export const UserIcon = memo((props: UserIconProps) => { diff --git a/src/components/form/IconPicker.tsx b/src/components/form/IconPicker.tsx index 67db4b28..245dc4d0 100644 --- a/src/components/form/IconPicker.tsx +++ b/src/components/form/IconPicker.tsx @@ -4,12 +4,13 @@ import { UserIcon, UserIcons } from "../UserIcon"; const icons = [ UserIcons.CAT, + UserIcons.DESKTOP, + UserIcons.WEED, UserIcons.STORM, UserIcons.USER_GROUP, UserIcons.COUCH, UserIcons.MOBILE, UserIcons.TICKET, - UserIcons.HANDCUFFS, ]; export const initialIcon = icons[0]; diff --git a/src/components/utils/Lightbar.tsx b/src/components/utils/Lightbar.tsx index 3abae0ce..65683dd7 100644 --- a/src/components/utils/Lightbar.tsx +++ b/src/components/utils/Lightbar.tsx @@ -144,7 +144,7 @@ function ParticlesCanvas() { canvas.height = canvas.scrollHeight; // Basic particle config - const particleCount = 250; + const particleCount = 260; let imageParticleCount = particleCount; // Holiday overrides @@ -190,7 +190,7 @@ function ParticlesCanvas() { } // Fish easter egg - const shouldShowFishie = Math.floor(Math.random() * 73) > 69; + const shouldShowFishie = Math.floor(Math.random() * 75) > 69; if (shouldShowFishie) { imageOverride = [ { @@ -202,14 +202,14 @@ function ParticlesCanvas() { sizeRange: [48, 56] as [number, number], }, ]; - imageParticleCount = particleCount * 0.09; + imageParticleCount = particleCount * 0.085; } // Weed easter egg const month3 = date.getMonth() + 1; const day3 = date.getDate(); const shouldShowZa = - (month3 === 4 && day3 === 20) || Math.floor(Math.random() * 435) > 420; + (month3 === 4 && day3 === 20) || Math.floor(Math.random() * 433) > 420; if (shouldShowZa) { imageOverride = [ { @@ -217,19 +217,19 @@ function ParticlesCanvas() { sizeRange: [29, 33] as [number, number], }, ]; - imageParticleCount = particleCount / 6.345; + imageParticleCount = particleCount / 6.34; } // Kitty easter egg - const shouldShowCat = Math.floor(Math.random() * 50) > 45; + const shouldShowCat = Math.floor(Math.random() * 100) < 18; if (shouldShowCat) { imageOverride = [ { image: "/lightbar-images/cat.png", - sizeRange: [28, 34] as [number, number], + sizeRange: [30, 36] as [number, number], }, ]; - imageParticleCount = particleCount / 6.5; + imageParticleCount = particleCount / 6.7; } // HOIST THE SAIL (of particles)! diff --git a/src/pages/parts/auth/PassphraseGeneratePart.tsx b/src/pages/parts/auth/PassphraseGeneratePart.tsx index bb9c6a9a..d05ee8c3 100644 --- a/src/pages/parts/auth/PassphraseGeneratePart.tsx +++ b/src/pages/parts/auth/PassphraseGeneratePart.tsx @@ -1,5 +1,5 @@ import { useMemo } from "react"; -import { useTranslation } from "react-i18next"; +import { Trans, useTranslation } from "react-i18next"; import { genMnemonic } from "@/backend/accounts/crypto"; import { Button } from "@/components/buttons/Button"; @@ -25,7 +25,12 @@ export function PassphraseGeneratePart(props: PassphraseGeneratePartProps) { title={t("auth.generate.title")} icon={} > - {t("auth.generate.description")} + , + }} + />