Implemented strict linting standards and prettier formatting config. (#248)
* Implemented strict linting standards and prettier formatting config. * More linter fixes and type updates. * More linter updates and type fixes * Remove noisy comments * Linter and type updates * Linter, formatting and type updates. * Linter updates * Type updates * Type updates * fixed all linter errors * Fixed all linting, formatting and type issues. * Resolve merge conflicts.
This commit is contained in:
@@ -1,64 +1,63 @@
|
||||
const network = await Service.import("network");
|
||||
import { renderWAPs } from "./WirelessAPs.js";
|
||||
import { renderWapStaging } from "./APStaging.js";
|
||||
import { AccessPoint } from "lib/types/network.js";
|
||||
const network = await Service.import('network');
|
||||
import { renderWAPs } from './WirelessAPs.js';
|
||||
import { renderWapStaging } from './APStaging.js';
|
||||
import { AccessPoint } from 'lib/types/network.js';
|
||||
import { BoxWidget } from 'lib/types/widget.js';
|
||||
|
||||
const Staging = Variable({} as AccessPoint);
|
||||
const Connecting = Variable("");
|
||||
const Connecting = Variable('');
|
||||
|
||||
const searchInProgress = Variable(false);
|
||||
|
||||
const startRotation = () => {
|
||||
const startRotation = (): void => {
|
||||
searchInProgress.value = true;
|
||||
setTimeout(() => {
|
||||
searchInProgress.value = false;
|
||||
}, 5 * 1000);
|
||||
};
|
||||
|
||||
const Wifi = () => {
|
||||
const Wifi = (): BoxWidget => {
|
||||
return Widget.Box({
|
||||
class_name: "menu-section-container wifi",
|
||||
class_name: 'menu-section-container wifi',
|
||||
vertical: true,
|
||||
children: [
|
||||
Widget.Box({
|
||||
class_name: "menu-label-container",
|
||||
hpack: "fill",
|
||||
class_name: 'menu-label-container',
|
||||
hpack: 'fill',
|
||||
children: [
|
||||
Widget.Label({
|
||||
class_name: "menu-label",
|
||||
class_name: 'menu-label',
|
||||
hexpand: true,
|
||||
hpack: "start",
|
||||
label: "Wi-Fi",
|
||||
hpack: 'start',
|
||||
label: 'Wi-Fi',
|
||||
}),
|
||||
Widget.Button({
|
||||
vpack: "center",
|
||||
hpack: "end",
|
||||
class_name: "menu-icon-button search network",
|
||||
vpack: 'center',
|
||||
hpack: 'end',
|
||||
class_name: 'menu-icon-button search network',
|
||||
on_primary_click: () => {
|
||||
startRotation();
|
||||
network.wifi.scan();
|
||||
},
|
||||
child: Widget.Icon({
|
||||
class_name: searchInProgress
|
||||
.bind("value")
|
||||
.as((v) => (v ? "spinning" : "")),
|
||||
icon: "view-refresh-symbolic",
|
||||
class_name: searchInProgress.bind('value').as((v) => (v ? 'spinning' : '')),
|
||||
icon: 'view-refresh-symbolic',
|
||||
}),
|
||||
}),
|
||||
],
|
||||
}),
|
||||
Widget.Box({
|
||||
class_name: "menu-items-section",
|
||||
class_name: 'menu-items-section',
|
||||
vertical: true,
|
||||
children: [
|
||||
Widget.Box({
|
||||
class_name: "wap-staging",
|
||||
class_name: 'wap-staging',
|
||||
setup: (self) => {
|
||||
renderWapStaging(self, network, Staging, Connecting);
|
||||
},
|
||||
}),
|
||||
Widget.Box({
|
||||
class_name: "available-waps",
|
||||
class_name: 'available-waps',
|
||||
vertical: true,
|
||||
setup: (self) => {
|
||||
renderWAPs(self, network, Staging, Connecting);
|
||||
|
||||
Reference in New Issue
Block a user