Skip to content

Commit 2af19a2

Browse files
authored
fix: Reset username input fields in JoinNameOverlay and ShareDialog components
1 parent 992a624 commit 2af19a2

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

components/canvas/join_name_overlay.cl.jac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""JoinNameOverlay — name prompt shown when opening a collaboration link."""
22

33
def:pub JoinNameOverlay(on_join: any) -> any {
4-
has name_value: str = localStorage.getItem("jasketch_username") or "";
4+
has name_value: str = "";
55

66
def handle_join() -> None {
77
name = name_value.strip() or "Anonymous";

components/layout/share_dialog.cl.jac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def:pub ShareDialog(is_open: bool, on_close: any, elements_ref: any, room_state:
1313
has collab_link: str = "";
1414
has copied: bool = False;
1515
has crypto_available: bool = True;
16-
has username_input: str = localStorage.getItem("jasketch_username") or "Anonymous";
16+
has username_input: str = "";
1717
has username_set: bool = False;
1818
has confirm_end_session: bool = False;
1919
has _generating: bool = False;
@@ -240,7 +240,7 @@ def:pub ShareDialog(is_open: bool, on_close: any, elements_ref: any, room_state:
240240
value={username_input}
241241
onChange={lambda e: any -> None { handle_username_change(e.target.value); }}
242242
className="w-full px-3 py-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
243-
placeholder="Enter your name (optional)"
243+
placeholder="Enter your name"
244244
/>
245245
</div>
246246
<button

0 commit comments

Comments
 (0)