forked from Shinonome/dots-hyprland
ags: sync
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import Widget from 'resource:///com/github/Aylur/ags/widget.js';
|
import Widget from 'resource:///com/github/Aylur/ags/widget.js';
|
||||||
|
|
||||||
export const searchItem = ({ materialIconName, name, actionName, content, onActivate }) => {
|
export const searchItem = ({ materialIconName, name, actionName, content, onActivate, extraClassName = '', ...rest }) => {
|
||||||
const actionText = Widget.Revealer({
|
const actionText = Widget.Revealer({
|
||||||
revealChild: false,
|
revealChild: false,
|
||||||
transition: "crossfade",
|
transition: "crossfade",
|
||||||
@@ -17,7 +17,7 @@ export const searchItem = ({ materialIconName, name, actionName, content, onActi
|
|||||||
child: actionText,
|
child: actionText,
|
||||||
})
|
})
|
||||||
return Widget.Button({
|
return Widget.Button({
|
||||||
className: 'overview-search-result-btn',
|
className: `overview-search-result-btn txt ${extraClassName}`,
|
||||||
onClicked: onActivate,
|
onClicked: onActivate,
|
||||||
child: Widget.Box({
|
child: Widget.Box({
|
||||||
children: [
|
children: [
|
||||||
@@ -33,13 +33,13 @@ export const searchItem = ({ materialIconName, name, actionName, content, onActi
|
|||||||
children: [
|
children: [
|
||||||
Widget.Label({
|
Widget.Label({
|
||||||
hpack: 'start',
|
hpack: 'start',
|
||||||
className: 'overview-search-results-txt txt txt-smallie txt-subtext',
|
className: 'overview-search-results-txt txt-smallie txt-subtext',
|
||||||
label: `${name}`,
|
label: `${name}`,
|
||||||
truncate: "end",
|
truncate: "end",
|
||||||
}),
|
}),
|
||||||
Widget.Label({
|
Widget.Label({
|
||||||
hpack: 'start',
|
hpack: 'start',
|
||||||
className: 'overview-search-results-txt txt txt-norm',
|
className: 'overview-search-results-txt txt-norm',
|
||||||
label: `${content}`,
|
label: `${content}`,
|
||||||
truncate: "end",
|
truncate: "end",
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -72,9 +72,6 @@ export const chatEntry = TextView({
|
|||||||
acceptsTab: false,
|
acceptsTab: false,
|
||||||
className: 'sidebar-chat-entry txt txt-smallie',
|
className: 'sidebar-chat-entry txt txt-smallie',
|
||||||
setup: (self) => self
|
setup: (self) => self
|
||||||
.hook(App, (self, currentName, visible) => {
|
|
||||||
if (currentName === 'sideleft' && visible) self.grab_focus();
|
|
||||||
})
|
|
||||||
.hook(ChatGPT, (self) => {
|
.hook(ChatGPT, (self) => {
|
||||||
if (APIS[currentApiId].name != 'Assistant (ChatGPT 3.5)') return;
|
if (APIS[currentApiId].name != 'Assistant (ChatGPT 3.5)') return;
|
||||||
self.placeholderText = (ChatGPT.key.length > 0 ? 'Message ChatGPT...' : 'Enter OpenAI API Key...');
|
self.placeholderText = (ChatGPT.key.length > 0 ? 'Message ChatGPT...' : 'Enter OpenAI API Key...');
|
||||||
|
|||||||
@@ -119,7 +119,12 @@ const pinButton = Button({
|
|||||||
child: MaterialIcon('push_pin', 'larger'),
|
child: MaterialIcon('push_pin', 'larger'),
|
||||||
tooltipText: 'Pin sidebar (Ctrl+P)',
|
tooltipText: 'Pin sidebar (Ctrl+P)',
|
||||||
onClicked: (self) => self.attribute.toggle(self),
|
onClicked: (self) => self.attribute.toggle(self),
|
||||||
setup: setupCursorHover,
|
setup: (self) => {
|
||||||
|
setupCursorHover(self);
|
||||||
|
self.hook(App, (self, currentName, visible) => {
|
||||||
|
if (currentName === 'sideleft' && visible) self.grab_focus();
|
||||||
|
})
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
export default () => Box({
|
export default () => Box({
|
||||||
|
|||||||
Reference in New Issue
Block a user