mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 23:09:26 -05:00
sideleft: booru: /clear as command not tag
This commit is contained in:
@@ -45,6 +45,13 @@ const TagButton = (command) => {
|
||||
});
|
||||
}
|
||||
|
||||
const CommandButton = (command, displayName = command) => Button({
|
||||
className: 'sidebar-chat-chip sidebar-chat-chip-action txt txt-small',
|
||||
onClicked: () => sendMessage(command),
|
||||
setup: setupCursorHover,
|
||||
label: displayName,
|
||||
});
|
||||
|
||||
export const booruTabIcon = Box({
|
||||
hpack: 'center',
|
||||
homogeneous: true,
|
||||
@@ -452,7 +459,8 @@ const booruTags = Revealer({
|
||||
export const booruCommands = Box({
|
||||
className: 'spacing-h-5',
|
||||
setup: (self) => {
|
||||
self.pack_end(TagButton('/clear'), false, false, 0);
|
||||
self.pack_end(CommandButton('/clear'), false, false, 0);
|
||||
self.pack_end(CommandButton('/next'), false, false, 0);
|
||||
self.pack_start(Button({
|
||||
className: 'sidebar-chat-chip-toggle',
|
||||
setup: setupCursorHover,
|
||||
@@ -502,6 +510,9 @@ export const sendMessage = (text) => {
|
||||
booruContent.show_all();
|
||||
booruContent.attribute.map.set(Date.now(), message);
|
||||
}
|
||||
else if (text.startsWith('/next')) {
|
||||
sendMessage('+')
|
||||
}
|
||||
}
|
||||
else BooruService.fetch(text);
|
||||
}
|
||||
Reference in New Issue
Block a user