changes
This commit is contained in:
1 parent
872683b11b
commit
e1988a3962
119 files changed
+5679
-1811
No files matched your search
@@ -0,0 +1,35 @@
|
||||
import PopupWindow from "../PopupWindow.js";
|
||||
import { WifiSelection, NetworkToggle } from "./Wifi.js";
|
||||
import { BluetoothDevices, BluetoothToggle } from "./Bluetooth.js";
|
||||
import { Row } from "../ToggleButton.js";
|
||||
import { configs } from "../../vars.js";
|
||||
import { layoutPos } from "../../functions/utils.js";
|
||||
export const WINDOW_NAME = "network__window";
|
||||
const { bar } = configs.theme;
|
||||
|
||||
const Container = () =>
|
||||
Widget.Box({
|
||||
class_names: ["network-info__container", "window-content"],
|
||||
hexpand: false,
|
||||
vertical: true,
|
||||
children: [
|
||||
Row([NetworkToggle, BluetoothToggle], [WifiSelection, BluetoothDevices]),
|
||||
],
|
||||
});
|
||||
|
||||
const NetworkWindow = () =>
|
||||
PopupWindow({
|
||||
name: WINDOW_NAME,
|
||||
layout: layoutPos(bar.position.value, "top-right"),
|
||||
animation: "slide top",
|
||||
child: Container(),
|
||||
});
|
||||
|
||||
export default function() {
|
||||
App.addWindow(NetworkWindow());
|
||||
|
||||
bar.position.connect("changed", () => {
|
||||
App.removeWindow(WINDOW_NAME);
|
||||
App.addWindow(NetworkWindow());
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user