base configs

This commit is contained in:
nx-smul
2025-01-17 18:08:55 +06:00
parent 4a173bceb9
commit 272e677bfb
49 changed files with 403 additions and 22461 deletions
@@ -86,20 +86,14 @@ export const BluetoothIndicator = () => Widget.Stack({
transition: 'slide_up_down',
transitionDuration: userOptions.animations.durationSmall,
children: {
'disabled': Widget.Label({ className: 'txt-norm icon-material', label: 'bluetooth_disabled' }),
'enabled': Widget.Label({ className: 'txt-norm icon-material', label: 'bluetooth' }),
'connected': Widget.Label({ className: 'txt-norm icon-material', label: 'bluetooth_connected' }),
'false': Widget.Label({ className: 'txt-norm icon-material', label: 'bluetooth_disabled' }),
'true': Widget.Label({ className: 'txt-norm icon-material', label: 'bluetooth' }),
},
setup: (self) =>
self.hook(Bluetooth, (stack) => {
if (!Bluetooth.enabled) {
stack.shown = 'disabled';
} else if (Bluetooth.connected_devices.length === 0) {
stack.shown = 'enabled';
} else if (Bluetooth.connected_devices.length > 0) {
stack.shown = 'connected';
}
}),
setup: (self) => self
.hook(Bluetooth, stack => {
stack.shown = String(Bluetooth.enabled);
})
,
});
const BluetoothDevices = () => Widget.Box({
@@ -164,11 +158,8 @@ const NetworkWifiIndicator = () => Widget.Stack({
transition: 'slide_up_down',
transitionDuration: userOptions.animations.durationSmall,
children: {
'disabled': Widget.Label({ className: 'txt-norm icon-material', label: 'signal_wifi_off' }),
'disconnected': Widget.Label({
className: 'txt-norm icon-material',
label: 'signal_wifi_statusbar_not_connected',
}),
'disabled': Widget.Label({ className: 'txt-norm icon-material', label: 'wifi_off' }),
'disconnected': Widget.Label({ className: 'txt-norm icon-material', label: 'signal_wifi_off' }),
'connecting': Widget.Label({ className: 'txt-norm icon-material', label: 'settings_ethernet' }),
'0': Widget.Label({ className: 'txt-norm icon-material', label: 'signal_wifi_0_bar' }),
'1': Widget.Label({ className: 'txt-norm icon-material', label: 'network_wifi_1_bar' }),
@@ -180,11 +171,10 @@ const NetworkWifiIndicator = () => Widget.Stack({
if (!Network.wifi) {
return;
}
if (!Network.wifi.enabled) {
stack.shown = 'disabled';
} else if (Network.wifi.internet == 'connected') {
if (Network.wifi.internet == 'connected') {
stack.shown = String(Math.ceil(Network.wifi.strength / 25));
} else if (['disconnected', 'connecting'].includes(Network.wifi.internet)) {
}
else if (["disconnected", "connecting"].includes(Network.wifi.internet)) {
stack.shown = Network.wifi.internet;
}
}),