lipre

Stream text files for live (coding) representations
Log | Files | Refs

commit 07c3cbdfe5cb46a7eead04e5630818267951681c
parent 6096596f37187ed14cf17a01f1004a520d6e2145
Author: Vetle Haflan <vetle@haflan.dev>
Date:   Mon, 25 Jan 2021 13:25:30 +0100

Make it usable (I think)

Diffstat:
Mlipre.go | 2+-
Mpredir.py | 2+-
Mui/src/App.vue | 39++++++++++++++++++++++-----------------
3 files changed, 24 insertions(+), 19 deletions(-)

diff --git a/lipre.go b/lipre.go @@ -122,5 +122,5 @@ func main() { router.HandleFunc("/pres/{roomCode}", presentHandler) router.HandleFunc("/view/{roomCode}", viewHandler) http.Handle("/", router) - log.Fatal(http.ListenAndServe(fmt.Sprintf(":%v", 8080), nil)) + log.Fatal(http.ListenAndServe(fmt.Sprintf(":%v", 8088), nil)) } diff --git a/predir.py b/predir.py @@ -39,7 +39,7 @@ if len(sys.argv) <= 1: exit(1) room_code = sys.argv[1] -HOST='localhost:8080' +HOST='localhost:8088' IGNOREFILE='.lpignore' ws = websocket.WebSocket() diff --git a/ui/src/App.vue b/ui/src/App.vue @@ -1,18 +1,23 @@ <template> <v-app> - <v-badge v-show="status"/>{{status}} - <v-tabs v-model="tab"> - <v-tab v-for="filename in filenames" - :key="filename" - style="text-transform: none !important"> - {{filename}} - </v-tab> - </v-tabs> - <v-tabs-items v-model="tab"> - <v-tab-item v-for="filename in filenames" - style="font-family: monospace; white-space: pre-wrap; font-size:12px" - :key="filename">{{files[filename]}}</v-tab-item> - </v-tabs-items> + <v-app-bar app> + <v-tabs v-model="tab"> + <v-tab v-for="filename in filenames" + :key="filename" + style="text-transform: none !important"> + {{filename}} + </v-tab> + </v-tabs> + <v-space/> + <v-badge v-show="status"/> + </v-app-bar> + <v-content> + <v-tabs-items v-model="tab"> + <v-tab-item v-for="filename in filenames" + style="font-family: monospace; white-space: pre; font-size:12px; margin: 1em" + :key="filename">{{files[filename]}}</v-tab-item> + </v-tabs-items> + </v-content> </v-app> </template> @@ -25,7 +30,8 @@ export default { files: {}, filenames: [], status: "", - ws: null + ws: null, + follow: true } }, methods: { @@ -52,7 +58,7 @@ export default { if (!this.filenames.includes(fileReceived.name)) { this.filenames.push(fileReceived.name) } - if (this.tab === null) { + if (this.tab === null || this.follow) { this.tab = fileReceived.name } } @@ -74,4 +80,4 @@ export default { <style> -</style>- \ No newline at end of file +</style>