2735 + function disconnectNetwork() {
2736 + if (networkService)
2737 + refreshNetwork(networkService.disconnect());
2743 + function expandRow(row) {
2744 + const willOpen
= expandedSsid
!== row.ssid;
2745 + expandedSsid
= willOpen
? row.ssid
: "";
2746 + if (willOpen
&& row.connected
&& networkService)
2747 + refreshNetwork(networkService.diagnostics());
2735 2751 function toggleBluetooth() {
2736 2752 if (bluetoothService)
2737 2753 refreshBluetooth(bluetoothService.toggle(
!(bluetoothState.adapter
&& bluetoothState.adapter.state
=== "powered")));
2808 + width: parent.width
2809 + height: root.height
2810 + contentWidth: width
2811 + contentHeight: panelCol.height
2813 + interactive: contentHeight
> height
2814 + boundsBehavior:
Flickable.StopAtBounds
2815 + flickableDirection:
Flickable.VerticalFlick
2820 + width: parent.width
2789 2824 objectName:
"networkRateRow" 2790 2825 width: parent.width
2872 2905 width: parent.width
2873 - height:
Math.
min(wifiListCol.height,
232)
2874 - contentHeight: wifiListCol.height
2876 - interactive: contentHeight
> height
2877 - boundsBehavior:
Flickable.StopAtBounds
2909 + model: root.networkState.networks
|| []
2882 - width: parent.width
2911 + delegate: Column {
2886 - model: root.networkState.networks
|| []
2914 + required property
var modelData
2915 + readonly property bool
active: modelData.connected
=== true 2916 + readonly property bool
revealed: root.expandedSsid
=== modelData.ssid
2917 + readonly property
var detail: root.networkState.connectionDetail
|| ({})
2888 - delegate: Column {
2891 - required property
var modelData
2892 - readonly property bool
active: modelData.connected
=== true 2893 - readonly property bool
revealed: root.expandedSsid
=== modelData.ssid
2919 + width: parent.width
2901 2925 width: parent.width
2904 2928 color: root.theme
? root.theme.withAlpha(root.theme.ui.backdrop, wifiRow.active
? 0.82 : 0.55)
: "#333333" 2905 - border.width: wifiRow.active
? 2 : 1 2906 - border.color: root.theme
? (wifiRow.active
? root.theme.ui.accent
: (wifiRow.modelData.state
=== "connecting" ? root.roleColor(
"warning")
: root.theme.withAlpha(root.theme.ui.minor,
0.45)))
: "white" 2929 + border.width: (wifiRow.active
|| wifiRow.revealed)
? 2 : 1 2930 + border.color: root.theme
? (wifiRow.active
? root.theme.ui.accent
: (wifiRow.modelData.state
=== "connecting" ? root.roleColor(
"warning")
: (wifiRow.revealed
? root.theme.withAlpha(root.theme.ui.accent,
0.6)
: root.theme.withAlpha(root.theme.ui.minor,
0.45))))
: "white" 2929 2953 color: root.roleColor(wifiRow.modelData.signalRole
|| "ui.minor")
2935 2960 anchors.right: parent.right
2936 - anchors.rightMargin:
10 2961 + anchors.rightMargin:
12 2937 2962 anchors.verticalCenter: parent.verticalCenter
2941 - color: root.theme
? root.theme.withAlpha(wifiRow.active
? root.theme.error
: root.theme.ui.accent, wifiRow.revealed
? 0.34 : 0.18)
: "transparent" 2943 - border.color: root.theme
? root.theme.withAlpha(wifiRow.active
? root.theme.error
: root.theme.ui.accent,
0.7)
: "white" 2946 - anchors.centerIn: parent
2949 - text: wifiRow.active
? "forget" : (wifiRow.modelData.needsPassphrase
? (wifiRow.revealed
? "cancel" : "connect")
: "connect")
2953 - anchors.fill: parent
2955 - if (wifiRow.active) {
2956 - root.expandedSsid
= "";
2957 - root.forgetNetwork(wifiRow.modelData.id);
2958 - }
else if (wifiRow.modelData.needsPassphrase) {
2959 - root.expandedSsid
= wifiRow.revealed
? "" : wifiRow.modelData.ssid;
2961 - root.expandedSsid
= "";
2962 - root.selectNetwork(wifiRow.modelData.id);
2963 + font.family:
"Symbols Nerd Font Mono" 2964 + font.pixelSize:
16 2966 + rotation: wifiRow.revealed
? 90 : 0 2967 + color: root.roleColor(wifiRow.active
? "content.accent" : "ui.minor")
2972 - anchors.right: wifiAction.left
2973 + anchors.right: wifiChevron.left
2973 2974 anchors.rightMargin:
10 2974 2975 anchors.verticalCenter: parent.verticalCenter
2975 2976 theme: root.theme
2989 2990 elide:
Text.ElideRight
2994 + anchors.fill: parent
2995 + onClicked: root.expandRow(wifiRow.modelData)
3000 - function submit() {
3001 - root.connectSecured(wifiRow.modelData.ssid, wifiPp.text);
3003 - root.expandedSsid
= "";
3006 3004 visible: wifiRow.revealed
3007 3005 width: parent.width
3008 - height: visible
? 34 : 0 3006 + height: visible
? drawerCol.height
+ 16 : 0 3010 - color: root.theme
? root.theme.withAlpha(root.theme.ui.backdrop,
0.7)
: "#333333" 3008 + color: root.theme
? root.theme.withAlpha(root.theme.ui.backdrop,
0.55)
: "#333333" 3011 3009 border.width:
1 3012 - border.color: root.theme
? root.theme.withAlpha(root.theme.ui.accent,
0.6)
: "white" 3013 - onVisibleChanged: {
3015 - Qt.callLater(
function() {
3016 - wifiPp.forceActiveFocus();
3010 + border.color: root.theme
? root.theme.withAlpha(root.theme.ui.accent,
0.4)
: "white" 3023 - anchors.left: parent.left
3024 - anchors.leftMargin:
12 3025 - anchors.right: wifiPpConfirm.left
3026 - anchors.rightMargin:
10 3027 - anchors.verticalCenter: parent.verticalCenter
3028 - verticalAlignment:
TextInput.AlignVCenter
3029 - color: root.theme
? root.theme.content.normal
: "white" 3030 - selectionColor: root.theme
? root.theme.ui.focus
: "#ffffff" 3031 - selectedTextColor: root.theme
? root.theme.content.backdrop
: "black" 3032 - font.family:
"IBM Plex Sans" 3033 - font.pixelSize:
13 3034 - echoMode:
TextInput.Password
3036 - onAccepted: wifiPpRow.submit()
3037 - Keys.onReturnPressed: (event)
=> {
3038 - event.accepted
= true;
3039 - wifiPpRow.submit();
3041 - Keys.onEnterPressed: (event)
=> {
3042 - event.accepted
= true;
3043 - wifiPpRow.submit();
3045 - Keys.onEscapePressed: (event)
=> {
3046 - event.accepted
= true;
3048 - root.expandedSsid
= "";
3053 - anchors.left: parent.left
3054 - anchors.leftMargin:
12 3055 - anchors.verticalCenter: parent.verticalCenter
3056 - visible: wifiPp.text.length
=== 0 3059 - text:
"passphrase" 3066 - anchors.right: parent.right
3067 - anchors.rightMargin:
6 3068 - anchors.verticalCenter: parent.verticalCenter
3072 - color: root.theme
? root.theme.withAlpha(root.theme.ui.accent,
0.22)
: "transparent" 3074 - border.color: root.theme
? root.theme.withAlpha(root.theme.ui.accent,
0.7)
: "white" 3018 + width: parent.width
- 24 3077 - anchors.centerIn: parent
3078 3023 theme: root.theme
3079 3024 variant:
"meta" 3026 + const dbm
= wifiRow.modelData.signalDbm;
3027 + const sig
= (dbm
=== null || dbm
=== undefined)
? `${wifiRow.modelData.signal}
/4 bars` : `${dbm}
dBm`;
3028 + return `${wifiRow.modelData.securityLabel
|| "Open"}
· ${sig}
`;
3030 + color: root.theme
? root.theme.content.normal
: "white" 3084 - anchors.fill: parent
3085 - onClicked: wifiPpRow.submit()
3035 + visible: wifiRow.active
&& !!wifiRow.detail.bssid
3036 + width: parent.width
3042 + text:
`${wifiRow.detail.band
|| "?"}${wifiRow.detail.channel
? " · ch " + wifiRow.detail.channel
: ""}${wifiRow.detail.mode
? " · " + wifiRow.detail.mode
: ""}
` 3049 + visible:
!!wifiRow.detail.rxRate
|| !!wifiRow.detail.txRate
3050 + text:
`↓ ${wifiRow.detail.rxRate
|| "?"}
↑ ${wifiRow.detail.txRate
|| "?"}
` 3057 + text: wifiRow.detail.bssid
3065 + visible:
!wifiRow.modelData.needsPassphrase
3069 + visible:
!wifiRow.active
3073 + color: root.theme
? root.theme.withAlpha(root.theme.ui.accent,
0.18)
: "transparent" 3075 + border.color: root.theme
? root.theme.withAlpha(root.theme.ui.accent,
0.7)
: "white" 3078 + anchors.centerIn: parent
3085 + anchors.fill: parent
3087 + root.expandedSsid
= "";
3088 + root.selectNetwork(wifiRow.modelData.id);
3095 + visible: wifiRow.active
3099 + color: root.theme
? root.theme.withAlpha(root.theme.ui.accent,
0.18)
: "transparent" 3101 + border.color: root.theme
? root.theme.withAlpha(root.theme.ui.accent,
0.7)
: "white" 3104 + anchors.centerIn: parent
3107 + text:
"disconnect" 3111 + anchors.fill: parent
3113 + root.expandedSsid
= "";
3114 + root.disconnectNetwork();
3121 + visible: wifiRow.active
|| wifiRow.modelData.known
3125 + color: root.theme
? root.theme.withAlpha(root.theme.error,
0.18)
: "transparent" 3127 + border.color: root.theme
? root.theme.withAlpha(root.theme.error,
0.7)
: "white" 3130 + anchors.centerIn: parent
3137 + anchors.fill: parent
3139 + root.expandedSsid
= "";
3140 + root.forgetNetwork(wifiRow.modelData.id);
3154 + function submit() {
3155 + root.connectSecured(wifiRow.modelData.ssid, wifiPp.text);
3157 + root.expandedSsid
= "";
3160 + visible: wifiRow.modelData.needsPassphrase
3161 + width: parent.width
3162 + height: visible
? 34 : 0 3164 + color: root.theme
? root.theme.withAlpha(root.theme.ui.backdrop,
0.7)
: "#333333" 3166 + border.color: root.theme
? root.theme.withAlpha(root.theme.ui.accent,
0.6)
: "white" 3167 + onVisibleChanged: {
3168 + if (visible
&& wifiRow.revealed)
3169 + Qt.callLater(
function() {
3170 + wifiPp.forceActiveFocus();
3177 + anchors.left: parent.left
3178 + anchors.leftMargin:
12 3179 + anchors.right: wifiPpConfirm.left
3180 + anchors.rightMargin:
10 3181 + anchors.verticalCenter: parent.verticalCenter
3182 + verticalAlignment:
TextInput.AlignVCenter
3183 + color: root.theme
? root.theme.content.normal
: "white" 3184 + selectionColor: root.theme
? root.theme.ui.focus
: "#ffffff" 3185 + selectedTextColor: root.theme
? root.theme.content.backdrop
: "black" 3186 + font.family:
"IBM Plex Sans" 3187 + font.pixelSize:
13 3188 + echoMode:
TextInput.Password
3190 + onAccepted: wifiPpRow.submit()
3191 + Keys.onReturnPressed: (event)
=> {
3192 + event.accepted
= true;
3193 + wifiPpRow.submit();
3195 + Keys.onEnterPressed: (event)
=> {
3196 + event.accepted
= true;
3197 + wifiPpRow.submit();
3199 + Keys.onEscapePressed: (event)
=> {
3200 + event.accepted
= true;
3202 + root.expandedSsid
= "";
3207 + anchors.left: parent.left
3208 + anchors.leftMargin:
12 3209 + anchors.verticalCenter: parent.verticalCenter
3210 + visible: wifiPp.text.length
=== 0 3213 + text:
"passphrase" 3220 + anchors.right: parent.right
3221 + anchors.rightMargin:
6 3222 + anchors.verticalCenter: parent.verticalCenter
3226 + color: root.theme
? root.theme.withAlpha(root.theme.ui.accent,
0.22)
: "transparent" 3228 + border.color: root.theme
? root.theme.withAlpha(root.theme.ui.accent,
0.7)
: "white" 3231 + anchors.centerIn: parent
3238 + anchors.fill: parent
3239 + onClicked: wifiPpRow.submit()
3179 3335 width: parent.width
3180 - height:
Math.
min(btListCol.height,
184)
3181 - contentHeight: btListCol.height
3183 - interactive: contentHeight
> height
3184 - boundsBehavior:
Flickable.StopAtBounds
3339 + model: root.bluetoothState.devices
|| []
3189 - width: parent.width
3193 - model: root.bluetoothState.devices
|| []
3195 - delegate: Rectangle {
3341 + delegate: Rectangle {
3198 3344 required property
var modelData
3252 3400 component
TrayPanel:
Column {