Skip to content

Commit 1161bfa

Browse files
authored
Fix plugin viewport #patch (#418)
## v1.0.14 **Fixes** - Fix viewport size for plugins - Fix pending devices vs guest ap
1 parent c4a355f commit 1161bfa

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

RELEASE-NOTES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# Secure Programmable Router (SPR) Release Notes
2+
## v1.0.14
3+
**Fixes**
4+
- Fix viewport size for plugins
5+
- Fix pending devices vs guest ap
6+
27
## v1.0.13
38
**Improvements**
49
- Show QR Code for Guest WiFi

api/code/api.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2191,7 +2191,10 @@ func reportPSKAuthSuccess(w http.ResponseWriter, r *http.Request) {
21912191

21922192
devices := getDevicesJson()
21932193
pendingPsk, exists := devices["pending"]
2194-
if exists {
2194+
2195+
guest_wifi := !strings.Contains(pska.Iface, ExtraBSSPrefix)
2196+
2197+
if exists && !guest_wifi {
21952198
var foundPSK = false
21962199
for _, device := range devices {
21972200
if device.MAC == pska.MAC {

frontend/src/components/Plugins/CustomPlugin.web.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ const CustomPlugin = ({ ...props }) => {
3030
//NOTE can pass both src and srcdoc, src is for dev mode
3131
let src = !isDoc && props.src ? buildURL(props.src) : null
3232
let srcDoc = (isDoc && props.srcDoc) || null
33-
let width = '100%',
34-
height = '100%'
3533

3634
const postMessage = (message) => {
3735
if (typeof message !== 'string') {
@@ -73,19 +71,15 @@ const CustomPlugin = ({ ...props }) => {
7371
src,
7472
srcDoc,
7573
ref,
76-
width,
77-
height,
78-
style: { borderWidth: 0 },
74+
style: { borderWidth: 0, height: "100vh" },
7975
sandbox
8076
})
8177
} else {
8278
return React.createElement('iframe', {
8379
src,
8480
srcDoc,
8581
ref,
86-
width,
87-
height,
88-
style: { borderWidth: 0 },
82+
style: { borderWidth: 0, height: "100vh" },
8983
})
9084
}
9185

0 commit comments

Comments
 (0)