Feat: room-link copy
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Alias</title>
|
||||
<script src="/assets/helpers.js"></script>
|
||||
<script src="/assets/htmx.min.js"></script>
|
||||
<script src="/assets/htmx.sse.js"></script>
|
||||
<script src="/assets/tailwind.css"></script>
|
||||
|
@ -3,6 +3,7 @@
|
||||
<div id="meta">
|
||||
<p>Hello {{.State.Username}};</p>
|
||||
<p>Room created by {{.Room.CreatorName}};</p>
|
||||
<p>Room link:</p><p><input id="roomlink" readonly="" onclick="copyText()" value="{{.Room.RoomLink}}"></input></p>
|
||||
<p>Game is running: {{.Room.IsRunning}}</p>
|
||||
<p>
|
||||
{{if and (eq .State.Username .Room.CreatorName) (not .Room.IsRunning)}}
|
||||
|
@ -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
|
||||
}
|
||||
|
1
todos.md
1
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;
|
||||
|
Reference in New Issue
Block a user