💥 fix(control-center/notif-history): clean all button not doing anything on ::on-clicked
This commit is contained in:
@@ -5,31 +5,32 @@ import { TileDND } from "./tiles/DoNotDisturb";
|
||||
import { TileRecording } from "./tiles/Recording";
|
||||
import { TileNightLight } from "./tiles/NightLight";
|
||||
import { Pages } from "./Pages";
|
||||
import { createRoot } from "/usr/share/ags/js/gnim/src/jsx/scope";
|
||||
|
||||
|
||||
export let TilesPages: (Pages|null) = null;
|
||||
export const tileList: Array<() => Gtk.Widget> = [
|
||||
export let TilesPages: Pages|undefined;
|
||||
export const tileList: Array<() => JSX.Element|Gtk.Widget> = [
|
||||
TileNetwork,
|
||||
TileBluetooth,
|
||||
TileRecording,
|
||||
TileDND,
|
||||
TileNightLight
|
||||
];
|
||||
] as Array<() => Gtk.Widget>;
|
||||
|
||||
export function Tiles(): Gtk.Widget {
|
||||
return <Gtk.Box class={"tiles-container"} orientation={Gtk.Orientation.VERTICAL}
|
||||
onDestroy={() => TilesPages = null} $={(self) => {
|
||||
onDestroy={() => TilesPages = undefined} $={(self) => {
|
||||
if(!TilesPages)
|
||||
TilesPages = <Pages class="tile-pages" /> as Pages;
|
||||
TilesPages = createRoot(() => new Pages({ class: "tile-pages" }));
|
||||
|
||||
self.append(TilesPages as unknown as Gtk.Widget);
|
||||
self.append(TilesPages!);
|
||||
}}>
|
||||
|
||||
<Gtk.FlowBox orientation={Gtk.Orientation.HORIZONTAL} rowSpacing={6}
|
||||
columnSpacing={6} minChildrenPerLine={2} activateOnSingleClick={true}
|
||||
maxChildrenPerLine={2} hexpand={true} vexpand={true} homogeneous={true}>
|
||||
columnSpacing={6} minChildrenPerLine={2} activateOnSingleClick
|
||||
maxChildrenPerLine={2} hexpand vexpand homogeneous>
|
||||
|
||||
{tileList.map(tile => tile())}
|
||||
{tileList.map(t => t())}
|
||||
</Gtk.FlowBox>
|
||||
</Gtk.Box> as Gtk.Box;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user