From 7966ae8e383bb88244b1e62b43f789f23a9c2abc Mon Sep 17 00:00:00 2001 From: AtHeartEngineer <1675654+AtHeartEngineer@users.noreply.github.com> Date: Wed, 8 Nov 2023 19:08:39 +0300 Subject: [PATCH] code formatting --- .prettierrc | 11 +- src/app.html | 32 ++- src/lib/components/ActionPoints/AP.svelte | 25 ++- .../ActionPoints/ActionPoints.svelte | 6 +- src/lib/components/Explainers/RLN.svelte | 69 ++++++ .../components/Explainers/Semaphore.svelte | 67 ++++++ .../components/Gateways/EthereumGroup.svelte | 11 +- src/lib/components/Gateways/InviteCode.svelte | 5 +- src/lib/components/Gateways/Jubmojis.svelte | 9 +- .../components/Identity/BackupIdentity.svelte | 21 +- .../components/Identity/DeleteIdentity.svelte | 6 +- .../Identity/RestoreIdentity.svelte | 5 +- src/lib/components/Onboarding/Demo.svelte | 11 - src/lib/components/Onboarding/Gateways.svelte | 11 +- .../components/Onboarding/Introduction.svelte | 41 +++- .../Security/SetPasswordContainer.svelte | 6 +- .../Security/SetPasswordInput.svelte | 10 +- src/lib/components/Server/SelectServer.svelte | 12 +- src/lib/components/Utils/Button.svelte | 6 +- src/routes/+error.svelte | 6 +- src/routes/+layout.svelte | 23 +- src/routes/+page.svelte | 10 +- src/routes/AppHeader.svelte | 43 ++-- src/routes/Footer.svelte | 47 +++-- src/routes/Sidebar.svelte | 46 +++- src/routes/about/+page.svelte | 78 +++---- src/routes/about/explainers/+page.svelte | 9 + src/routes/admin/+page.svelte | 27 ++- src/routes/admin/invite/+page.svelte | 44 +++- src/routes/admin/join/+page.svelte | 17 +- src/routes/admin/newroom/1_RoomName.svelte | 37 ++-- .../admin/newroom/2_MembershipType.svelte | 125 ++++++----- src/routes/admin/newroom/3_RateLimit.svelte | 28 +-- .../admin/newroom/4_MessageLimit.svelte | 32 +-- src/routes/admin/newroom/5_ClaimCodes.svelte | 29 +-- src/routes/admin/newroom/6_RoomType.svelte | 38 ++-- src/routes/chat/+page.svelte | 5 +- src/routes/chat/ChatRoom.svelte | 36 +++- src/routes/chat/ChatRoomHeader.svelte | 30 ++- src/routes/chat/Conversation.svelte | 12 +- src/routes/chat/ExperienceMenu.svelte | 5 +- src/routes/chat/Sidebar.svelte | 5 +- src/routes/console/Console.svelte | 5 +- src/routes/menu/+page.svelte | 6 +- src/routes/settings/debug/+page.svelte | 17 +- .../settings/ui/ActionRepresentation.svelte | 21 +- src/routes/settings/ui/AnxietyBar.svelte | 29 ++- src/routes/signup/+page.svelte | 28 ++- static/idcNullifier/verification_key.json | 197 +++++++++--------- svelte.config.js | 1 - 50 files changed, 987 insertions(+), 413 deletions(-) create mode 100644 src/lib/components/Explainers/RLN.svelte create mode 100644 src/lib/components/Explainers/Semaphore.svelte delete mode 100644 src/lib/components/Onboarding/Demo.svelte create mode 100644 src/routes/about/explainers/+page.svelte diff --git a/.prettierrc b/.prettierrc index a77fdde..cad3ce3 100644 --- a/.prettierrc +++ b/.prettierrc @@ -5,5 +5,14 @@ "printWidth": 100, "plugins": ["prettier-plugin-svelte"], "pluginSearchDirs": ["."], - "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] + "overrides": [ + { + "files": "*.svelte", + "options": { + "parser": "svelte" + } + } + ], + "singleAttributePerLine": true, + "svelteBracketNewLine": false } diff --git a/src/app.html b/src/app.html index a281af5..596d25b 100644 --- a/src/app.html +++ b/src/app.html @@ -1,13 +1,33 @@ - + - - - + + + %sveltekit.head% - -
%sveltekit.body%
+ +
+ %sveltekit.body% +
diff --git a/src/lib/components/ActionPoints/AP.svelte b/src/lib/components/ActionPoints/AP.svelte index f066176..64f252f 100644 --- a/src/lib/components/ActionPoints/AP.svelte +++ b/src/lib/components/ActionPoints/AP.svelte @@ -10,13 +10,28 @@ {#if $configStore.actionRepresentation == ActionRepresentationE.AP} - + {:else if $configStore.actionRepresentation == ActionRepresentationE.Hearts} - + {:else if $configStore.actionRepresentation == ActionRepresentationE.Shields} - + {:else if $configStore.actionRepresentation == ActionRepresentationE.Battery} - + {:else} - + {/if} diff --git a/src/lib/components/ActionPoints/ActionPoints.svelte b/src/lib/components/ActionPoints/ActionPoints.svelte index 613e185..16b535d 100644 --- a/src/lib/components/ActionPoints/ActionPoints.svelte +++ b/src/lib/components/ActionPoints/ActionPoints.svelte @@ -10,7 +10,11 @@ $: emptycircles = maxHealth - health; - + diff --git a/src/lib/components/Explainers/RLN.svelte b/src/lib/components/Explainers/RLN.svelte new file mode 100644 index 0000000..0d41192 --- /dev/null +++ b/src/lib/components/Explainers/RLN.svelte @@ -0,0 +1,69 @@ + + + + RLN Simplified +
+
+
+

I can prove to you that

+
+
+
+ +
()
+
+

I know some secret whose fingerprint

+
+ +
+
∈
+

is in

+
+ +
+
+

Some Group of fingerprints

+
+ +
+

and

+
+
+ +

+ RLN (Rate-Limiting Nullifier) is a zk-gadget/protocol that enables spam prevention mechanism + for anonymous environments +

+

+ Read more about RLN. +

+
+
+ + diff --git a/src/lib/components/Explainers/Semaphore.svelte b/src/lib/components/Explainers/Semaphore.svelte new file mode 100644 index 0000000..7fbb3a5 --- /dev/null +++ b/src/lib/components/Explainers/Semaphore.svelte @@ -0,0 +1,67 @@ + + + + Semaphore Simplified +
+
+
+

I can prove to you that

+
+
+
+ +
()
+
+

I know some secret whose fingerprint

+
+ +
+
∈
+

is in

+
+ +
+
+

Some Group of fingerprints

+
+
+ +

+ Semaphore is a zero-knowledge protocol that allows you to cast a signal (for example, a vote + or endorsement) as a provable group member without revealing your identity. Additionally, it + provides a simple mechanism to prevent double-signaling. Use cases include private voting, + whistleblowing, anonymous DAOs and mixers. +

+

+ Read more about Semaphore. +

+
+
+ + diff --git a/src/lib/components/Gateways/EthereumGroup.svelte b/src/lib/components/Gateways/EthereumGroup.svelte index 7a0ea95..7e504d3 100644 --- a/src/lib/components/Gateways/EthereumGroup.svelte +++ b/src/lib/components/Gateways/EthereumGroup.svelte @@ -82,7 +82,10 @@

Step 1: Connect your wallet

- +
{#if isConnected}
@@ -100,7 +103,11 @@ Step 2: Sign your Identity Commitment to prove ownership of this address - +
{:else if loadingRooms}

Loading rooms...

diff --git a/src/lib/components/Gateways/InviteCode.svelte b/src/lib/components/Gateways/InviteCode.svelte index 3ae5195..56f6e63 100644 --- a/src/lib/components/Gateways/InviteCode.svelte +++ b/src/lib/components/Gateways/InviteCode.svelte @@ -88,7 +88,10 @@ {#if !hideInput} -