File tree Expand file tree Collapse file tree 7 files changed +72
-46
lines changed
wifi/components/localProxying Expand file tree Collapse file tree 7 files changed +72
-46
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import { NoConnection } from "start-pages/NoConnection";
1818import { AppContextIface , Theme } from "types" ;
1919import Smooth from "components/Smooth" ;
2020import { PwaPermissionsAlert , PwaPermissionsModal } from "components/PwaPermissions" ;
21+ import { LocalProxyBanner } from "pages/wifi/components/localProxying/LocalProxyBanner" ;
2122
2223export const AppContext = React . createContext < AppContextIface > ( {
2324 theme : "light" ,
@@ -89,6 +90,7 @@ function MainApp({ username }: { username: string }) {
8990 < TopBar username = { username } appContext = { appContext } />
9091 < div id = "main" >
9192 < ErrorBoundary >
93+ < LocalProxyBanner />
9294 < NotificationsMain />
9395 </ ErrorBoundary >
9496 < PwaPermissionsAlert />
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ import { usePwaSubtabUrl } from "hooks/PWA/usePwaSubtabUrl";
1111import Loading from "components/Loading" ;
1212import newTabProps from "utils/newTabProps" ;
1313import { docsUrl } from "params" ;
14- import "./devicesSubs.scss" ;
1514import SubTitle from "components/SubTitle" ;
15+ import "./devicesSubs.scss" ;
1616
1717export function DevicesSubs ( ) {
1818 const {
@@ -97,7 +97,7 @@ export function DevicesSubs() {
9797 < SubTitle > Subscribed Devices</ SubTitle >
9898
9999 { subscriptionsList && subscriptionsList . length > 0 ? (
100- < >
100+ < div className = "subscriptions-list" >
101101 { subscriptionsList . map ( ( sub , index ) => (
102102 < SubscriptionCard
103103 key = { index }
@@ -107,7 +107,7 @@ export function DevicesSubs() {
107107 revalidateSubs = { revalidateSubs }
108108 />
109109 ) ) }
110- </ >
110+ </ div >
111111 ) : (
112112 < Card > No subscriptions found</ Card >
113113 ) }
Original file line number Diff line number Diff line change 1515 padding : 10px ;
1616 }
1717 }
18-
19- .subscription-card {
18+ .subscriptions-list {
2019 display : flex ;
21- flex-direction : row ;
22- justify-content : space-between ;
23- align-items : center ;
20+ flex-direction : column ;
21+ gap : 10px ;
2422
25- @media ( max-width : 40 rem ) {
26- flex-direction : column ;
27- gap : 10 px ;
28- align-items : flex-end ;
29- }
23+ .subscription-card {
24+ display : flex ;
25+ flex-direction : row ;
26+ justify-content : space-between ;
27+ align-items : center ;
3028
31- .alias-info {
32- font-size : 1.2rem ;
33- input {
34- width : 30ch ;
35- margin-right : 5px ;
36- border-radius : 5px ;
37- }
3829 @media (max-width : 40rem ) {
39- width : 100% ;
30+ flex-direction : column ;
31+ gap : 10px ;
32+ align-items : flex-end ;
33+ }
34+
35+ .alias-info {
36+ font-size : 1.2rem ;
4037 input {
38+ width : 30ch ;
39+ margin-right : 5px ;
40+ border-radius : 5px ;
41+ }
42+ @media (max-width : 40rem ) {
4143 width : 100% ;
44+ input {
45+ width : 100% ;
46+ }
4247 }
43- }
4448
45- .current-tag {
46- margin-left : 5px ;
49+ .current-tag {
50+ margin-left : 5px ;
51+ }
4752 }
48- }
4953
50- .btns-container {
51- display : flex ;
52- flex-direction : row ;
53- gap : 10px ;
54+ .btns-container {
55+ display : flex ;
56+ flex-direction : row ;
57+ gap : 10px ;
5458
55- .icon-btns {
56- padding : 0px 10px ;
57- font-size : 1.6rem ;
58- opacity : 0.5 ;
59- cursor : pointer ;
60- & :hover {
61- opacity : 0.8 ;
59+ .icon-btns {
60+ padding : 0px 10px ;
61+ font-size : 1.6rem ;
62+ opacity : 0.5 ;
63+ cursor : pointer ;
64+ & :hover {
65+ opacity : 0.8 ;
66+ }
6267 }
6368 }
6469 }
Original file line number Diff line number Diff line change 11.notifications-settings {
2+ margin-bottom : 10px ;
23 .title-switch-row {
34 display : flex ;
45 flex-direction : row ;
Original file line number Diff line number Diff line change 1+ import React from "react" ;
2+ import { Alert } from "react-bootstrap" ;
3+ import { adminUiLocalDomain } from "params" ;
4+
5+ export function LocalProxyBanner ( ) {
6+ return (
7+ window . location . origin === adminUiLocalDomain && (
8+ < Alert variant = "danger" >
9+ < Alert . Heading > Local Proxy Connection</ Alert . Heading >
10+ < div >
11+ Local proxy is less reliable and only gives access to the Dappmanager UI. It won't load other Dappnode
12+ services. Use it < b > only as a fallback</ b > method.
13+ </ div >
14+ </ Alert >
15+ )
16+ ) ;
17+ }
Original file line number Diff line number Diff line change @@ -75,15 +75,14 @@ export function LocalProxying() {
7575 < >
7676 { localProxyingStatus . data ? (
7777 < >
78- { window . location . origin !== adminUiLocalDomain && (
79- < AlertDismissible variant = "warning" >
80- < p >
81- Note that connecting via local proxy is less reliable than using a VPN or Wi-fi hotspot. The local proxy
82- only provides access to the Dappmanager UI and does not grant access to other domains served through
83- your Dappnode, such as client interfaces or other package UIs.
84- </ p >
85- </ AlertDismissible >
86- ) }
78+ < AlertDismissible variant = "warning" >
79+ < p >
80+ Note that connecting via local proxy is less reliable than using a VPN or Wi-fi hotspot, and should be
81+ used < b > only as a fallback</ b > method. It only provides access to the Dappmanager UI and does not grant
82+ access to other domains served through your Dappnode, such as client interfaces or other package UIs.
83+ </ p >
84+ </ AlertDismissible >
85+
8786 < Card spacing >
8887 < p >
8988 If you are connected to the same router as your Dappnode you can use this page at{ " " }
Original file line number Diff line number Diff line change @@ -15,5 +15,7 @@ const coreDnpNames = [
1515 params . wifiDnpName ,
1616 params . bindDnpName ,
1717 params . ipfsDnpName ,
18- params . HTTPS_PORTAL_DNPNAME
18+ params . HTTPS_PORTAL_DNPNAME ,
19+ params . notificationsDnpName ,
20+ params . PREMIUM_DNP_NAME
1921] ;
You can’t perform that action at this time.
0 commit comments