File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22< html >
33 < head >
44 < meta name ="viewport " content ="width=device-width, initial-scale=1 ">
5+ < meta name ="theme-color " content ="#111 ">
56 < title > npipe</ title >
67 < link rel ="stylesheet " href ="/style.css ">
8+ < link rel ="manifest " href ="/manifest.json ">
79 </ head >
810 < body >
911 < main >
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " npipe" ,
3+ "short_name" : " npipe" ,
4+ "description" : " Share files on your network" ,
5+ "start_url" : " /" ,
6+ "display" : " standalone" ,
7+ "background_color" : " #111" ,
8+ "theme_color" : " #111"
9+ }
Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ var styleCSS string
2020//go:embed public/app.js
2121var appJS string
2222
23+ //go:embed public/manifest.json
24+ var manifestJSON string
25+
2326var commit = getCommit ()
2427
2528func getCommit () string {
@@ -66,6 +69,11 @@ func setupRoutes() {
6669 w .Write ([]byte (appJS ))
6770 })
6871
72+ http .HandleFunc ("/manifest.json" , func (w http.ResponseWriter , r * http.Request ) {
73+ w .Header ().Set ("Content-Type" , "application/manifest+json" )
74+ w .Write ([]byte (manifestJSON ))
75+ })
76+
6977 http .HandleFunc ("/files" , func (w http.ResponseWriter , r * http.Request ) {
7078 ip := getClientIP (r )
7179 files := store .List (ip )
You can’t perform that action at this time.
0 commit comments