From 734088d96da458ae649f5396b13058e5b009c697 Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Fri, 16 May 2025 16:34:55 +0300 Subject: [PATCH] Feat: room-link copy --- components/base.html | 1 + components/room.html | 1 + handlers/actions.go | 1 + todos.md | 1 + 4 files changed, 4 insertions(+) diff --git a/components/base.html b/components/base.html index babec29..8d5b58a 100644 --- a/components/base.html +++ b/components/base.html @@ -3,6 +3,7 @@ Alias + diff --git a/components/room.html b/components/room.html index b8ef2b7..0ef6702 100644 --- a/components/room.html +++ b/components/room.html @@ -3,6 +3,7 @@

Hello {{.State.Username}};

Room created by {{.Room.CreatorName}};

+

Room link:

Game is running: {{.Room.IsRunning}}

{{if and (eq .State.Username .Room.CreatorName) (not .Room.IsRunning)}} diff --git a/handlers/actions.go b/handlers/actions.go index 054b875..383dfa6 100644 --- a/handlers/actions.go +++ b/handlers/actions.go @@ -19,6 +19,7 @@ func createRoom(ctx context.Context, req *models.RoomReq) (*models.Room, error) return nil, err } room := req.CreateRoom(creator) + room.RoomLink = cfg.BaseURL + "/room-join?id=" + room.ID if err := saveRoom(room); err != nil { return nil, err } diff --git a/todos.md b/todos.md index f9e32ef..8a0eae0 100644 --- a/todos.md +++ b/todos.md @@ -1,6 +1,7 @@ ### feats - auto close room if nothing is going on there (hmm) for ~1h; - words database (file) load and form random 25 words; +- different files for each supported lang; - mark cards (instead of opening them (right click?); - invite link; - login with invite link;