File tree Expand file tree Collapse file tree 9 files changed +38
-28
lines changed Expand file tree Collapse file tree 9 files changed +38
-28
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: Release
22
33on :
44 release :
5- branches : [ main ]
5+ branches : [main]
66 types :
77 - created
88
1616 strategy :
1717 fail-fast : false
1818 matrix :
19- arch : [ amd64, arm64 ]
19+ arch : [amd64, arm ]
2020 steps :
2121 - name : Checkout
2222 uses : actions/checkout@v4
4141 - name : Bun build
4242 working-directory : ./frontend
4343 run : |
44- bun run build
44+ bun --env-file=.env.production run build
4545 mkdir -p ../${{env.ASSET_NAME}} && cp -r dist ../${{env.ASSET_NAME}}/dist
4646
4747 - name : Set up Go
@@ -58,13 +58,17 @@ jobs:
5858 working-directory : ./backend
5959 env :
6060 GOOS : linux
61+ GOARM : 6
6162 GOARCH : ${{matrix.arch}}
6263 CGO_ENABLED : 0
6364 run : |
6465 go build -o pifi -ldflags="-s -w -X github.com/czQery/pifi/hp.Build=${{github.event.release.tag_name}}"
6566 cp -r pifi ../${{env.ASSET_NAME}}
6667 cp .config.toml ../${{env.ASSET_NAME}}/config.toml
6768
69+ - name : Include portals
70+ run : cp -r portal ../${{env.ASSET_NAME}}/portal
71+
6872 - name : Compress release
6973 uses :
thedoctor0/[email protected] 7074 with :
7781 with :
7882 allowUpdates : true
7983 replacesArtifacts : true
84+ makeLatest : false
85+ omitName : true
8086 artifacts : " ${{env.ASSET_NAME}}.tar.gz"
81- token : ${{ secrets.GITHUB_TOKEN }}
87+ token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 11<p align =" center " style =" text-align : center " >
2- <img src =" https://github.com/czQery/pifi /blob/main/assets/dash.png?raw=true " alt =" Banner " >
2+ <img src =" https://github.com/czQery/PiFi /blob/main/assets/dash.png?raw=true " alt =" Banner " >
33 <br >
4- <a href =" https://goreportcard.com/report/github.com/czQery/pifi /backend " >
5- <img src="https://goreportcard.com/badge/github.com/czQery/pifi /backend" alt="report"/>
4+ <a href =" https://goreportcard.com/report/github.com/czQery/PiFi /backend " >
5+ <img src="https://goreportcard.com/badge/github.com/czQery/PiFi /backend" alt="report"/>
66 </a >
7- <a href =" https://github.com/czQery/pifi /actions " style =" text-decoration : none " >
8- <img src="https://img.shields.io/github/actions/workflow/status/czQery/pifi /release.yml" alt="build"/>
7+ <a href =" https://github.com/czQery/PiFi /actions " style =" text-decoration : none " >
8+ <img src="https://img.shields.io/github/actions/workflow/status/czQery/PiFi /release.yml" alt="build"/>
99 </a >
10- <a href =" https://github.com/czQery/pifi /releases/latest " style =" text-decoration : none " >
11- <img src="https://img.shields.io/github/v/release/czQery/pifi " alt="release"/>
10+ <a href =" https://github.com/czQery/PiFi /releases/latest " style =" text-decoration : none " >
11+ <img src="https://img.shields.io/github/v/release/czQery/PiFi " alt="release"/>
1212 </a >
1313 <br >
1414</p >
1515
16- # ⚠️ In Early development!
16+ # ⚠️ In Early development!
Original file line number Diff line number Diff line change 11package api
22
33import (
4+ "strings"
5+
46 "github.com/gofiber/fiber/v2"
57 "github.com/sirupsen/logrus"
6- "strings"
78)
89
910func Portal (c * fiber.Ctx ) error {
@@ -14,9 +15,11 @@ func Portal(c *fiber.Ctx) error {
1415 data = append (data , name + "='" + value + "'" )
1516 }
1617
17- logrus .WithFields (logrus.Fields {
18- "data" : "[" + strings .Join (data , "," ) + "]" ,
19- }).Info ("portal - received" )
18+ if len (data ) != 0 {
19+ logrus .WithFields (logrus.Fields {
20+ "data" : "[" + strings .Join (data , "," ) + "]" ,
21+ }).Info ("portal - received" )
22+ }
2023
2124 return c .Status (200 ).JSON (Response {Message : "success" })
2225}
Original file line number Diff line number Diff line change @@ -29,5 +29,5 @@ require (
2929 github.com/valyala/bytebufferpool v1.0.0 // indirect
3030 github.com/valyala/fasthttp v1.55.0 // indirect
3131 github.com/valyala/tcplisten v1.0.0 // indirect
32- golang.org/x/sys v0.24 .0 // indirect
32+ golang.org/x/sys v0.25 .0 // indirect
3333)
Original file line number Diff line number Diff line change @@ -58,8 +58,8 @@ github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7Fw
5858golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 /go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg =
5959golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab /go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg =
6060golang.org/x/sys v0.6.0 /go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg =
61- golang.org/x/sys v0.24 .0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg =
62- golang.org/x/sys v0.24 .0 /go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA =
61+ golang.org/x/sys v0.25 .0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34 =
62+ golang.org/x/sys v0.25 .0 /go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA =
6363gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 /go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0 =
6464gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c /go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM =
6565gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA =
Original file line number Diff line number Diff line change @@ -3,12 +3,13 @@ package main
33import (
44 "encoding/json"
55 "errors"
6- "github.com/mitchellh/mapstructure"
76 "io"
87 "os"
98 "strings"
109 "time"
1110
11+ "github.com/mitchellh/mapstructure"
12+
1213 "github.com/czQery/PiFi/backend/api"
1314 "github.com/czQery/PiFi/backend/cmd"
1415 "github.com/czQery/PiFi/backend/hp"
@@ -109,7 +110,7 @@ func main() {
109110
110111 // API
111112 rAPI := r .Group ("/api" , func (c * fiber.Ctx ) error {
112- if ! api .VerifyToken (c ) {
113+ if c . Path () != "/ api/portal" && ! api .VerifyToken (c ) { // require password for all api endpoints except /api/portal
113114 return & api.Error {Code : 401 , Func : "api/settings" , Message : "unauthorized" }
114115 }
115116 return c .Next ()
Original file line number Diff line number Diff line change 1111 "license" : " MIT" ,
1212 "devDependencies" : {
1313 "typescript" : " ^5.5.4" ,
14- "vite" : " ^5.4.2 " ,
14+ "vite" : " ^5.4.3 " ,
1515 "vite-plugin-solid" : " ^2.10.2"
1616 },
1717 "dependencies" : {
18- "@ark-ui/solid" : " ^3.9 .0" ,
18+ "@ark-ui/solid" : " ^3.10 .0" ,
1919 "@solidjs/router" : " ^0.14.3" ,
20- "@types/node" : " ^22.5.0 " ,
20+ "@types/node" : " ^22.5.4 " ,
2121 "browserslist" : " ^4.23.3" ,
2222 "fast-sha256" : " ^1.3.0" ,
2323 "lightningcss" : " ^1.26.0" ,
24- "lucide-solid" : " ^0.429 .0" ,
25- "solid-js" : " ^1.8.21 "
24+ "lucide-solid" : " ^0.439 .0" ,
25+ "solid-js" : " ^1.8.22 "
2626 }
2727}
Original file line number Diff line number Diff line change @@ -54,8 +54,8 @@ const App: Component = (props: { children }) => {
5454 < div id = "header-menu-list" >
5555 < Tabs . Trigger value = { "dash" } > < LucideLayoutDashboard /> </ Tabs . Trigger >
5656 < Tabs . Trigger value = { "settings" } > < LucideSettings /> </ Tabs . Trigger >
57- < Tabs . Trigger value = { "scan" } > < LucideRadar /> </ Tabs . Trigger >
58- < Tabs . Trigger value = { "portal" } > < LucideFileCog /> </ Tabs . Trigger >
57+ { /* <Tabs.Trigger value={"scan"}><LucideRadar/></Tabs.Trigger>
58+ <Tabs.Trigger value={"portal"}><LucideFileCog/></Tabs.Trigger>*/ }
5959 < Tabs . Indicator />
6060 </ div >
6161 < button id = "header-menu-logout" onClick = { async ( ) => {
You can’t perform that action at this time.
0 commit comments