add cloudflare warp icon

This commit is contained in:
end-4
2024-05-11 10:30:57 +07:00
parent f500ac941f
commit 71f284525a
3 changed files with 16 additions and 3 deletions
@@ -121,14 +121,17 @@ export const ModuleCloudflareWarp = async (props = {}) => {
enabled: false,
},
className: 'txt-small sidebar-iconbutton',
tooltipText: 'WARP',
tooltipText: 'Cloudflare WARP',
onClicked: (self) => {
self.attribute.enabled = !self.attribute.enabled;
self.toggleClassName('sidebar-button-active', self.attribute.enabled);
if (self.attribute.enabled) Utils.execAsync('warp-cli connect').catch(print)
else Utils.execAsync('warp-cli disconnect').catch(print);
},
child: MaterialIcon('dns', 'norm'),
child: Widget.Icon({
icon: 'cloudflare-dns-symbolic',
className: 'txt-norm',
}),
setup: (self) => {
setupCursorHover(self);
self.attribute.enabled = !exec(`bash -c 'warp-cli status | grep Disconnected'`);
+1 -1
View File
@@ -85,7 +85,7 @@ const timeRow = Box({
const togglesBox = Widget.Box({
hpack: 'center',
className: 'sidebar-togglesbox spacing-h-10',
className: 'sidebar-togglesbox spacing-h-5',
children: [
ToggleIconWifi(),
ToggleIconBluetooth(),