forked from Shinonome/dots-hyprland
Remove unnecessary imports,
Add some translations
This commit is contained in:
@@ -11,7 +11,6 @@ import BooruService from '../../../services/booru.js';
|
||||
import { chatEntry } from '../apiwidgets.js';
|
||||
import { ConfigToggle } from '../../.commonwidgets/configwidgets.js';
|
||||
import { SystemMessage } from './ai_chatmessage.js';
|
||||
import { getString } from '../../../i18n/i18n.js';
|
||||
|
||||
const IMAGE_REVEAL_DELAY = 13; // Some wait for inits n other weird stuff
|
||||
const USER_CACHE_DIR = GLib.get_user_cache_dir();
|
||||
@@ -213,17 +212,17 @@ const BooruPage = (taglist, serviceName = 'Booru') => {
|
||||
children: [
|
||||
Box({ hexpand: true }),
|
||||
ImageAction({
|
||||
name: 'Go to file url',
|
||||
name: getString('Go to file url'),
|
||||
icon: 'file_open',
|
||||
action: () => execAsync(['xdg-open', `${data.file_url}`]).catch(print),
|
||||
}),
|
||||
ImageAction({
|
||||
name: 'Go to source',
|
||||
name: getString('Go to source'),
|
||||
icon: 'open_in_new',
|
||||
action: () => execAsync(['xdg-open', `${data.source}`]).catch(print),
|
||||
}),
|
||||
ImageAction({
|
||||
name: 'Save image',
|
||||
name: getString('Save image'),
|
||||
icon: 'save',
|
||||
action: (self) => {
|
||||
const currentTags = BooruService.queries.at(-1).realTagList.filter(tag => !tag.includes('rating:'));
|
||||
@@ -259,10 +258,10 @@ const BooruPage = (taglist, serviceName = 'Booru') => {
|
||||
transition: 'slide_up_down',
|
||||
transitionDuration: userOptions.animations.durationSmall,
|
||||
children: {
|
||||
'api': PageState('api', 'Calling API'),
|
||||
'download': PageState('downloading', 'Downloading image'),
|
||||
'done': PageState('done', 'Finished!'),
|
||||
'error': PageState('error', 'Error'),
|
||||
'api': PageState('api', getString('Calling API')),
|
||||
'download': PageState('downloading', getString('Downloading image')),
|
||||
'done': PageState('done', getString('Finished!')),
|
||||
'error': PageState('error', getString('Error')),
|
||||
},
|
||||
});
|
||||
const downloadIndicator = MarginRevealer({
|
||||
|
||||
@@ -12,7 +12,6 @@ import { markdownTest } from '../../.miscutils/md2pango.js';
|
||||
import { MarginRevealer } from '../../.widgethacks/advancedrevealers.js';
|
||||
import { MaterialIcon } from '../../.commonwidgets/materialicon.js';
|
||||
import { chatEntry } from '../apiwidgets.js';
|
||||
import { getString } from '../../../i18n/i18n.js';
|
||||
|
||||
export const chatGPTTabIcon = Icon({
|
||||
hpack: 'center',
|
||||
@@ -122,7 +121,7 @@ const GPTInfo = () => {
|
||||
className: 'txt txt-title-small sidebar-chat-welcome-txt',
|
||||
wrap: true,
|
||||
justify: Gtk.Justification.CENTER,
|
||||
label: `${getString("Assistant")} (GPTs)`,
|
||||
label: `Assistant (GPTs)`,
|
||||
}),
|
||||
Box({
|
||||
className: 'spacing-h-5',
|
||||
|
||||
@@ -11,7 +11,6 @@ import { ConfigToggle, ConfigSegmentedSelection, ConfigGap } from '../../.common
|
||||
import { markdownTest } from '../../.miscutils/md2pango.js';
|
||||
import { MarginRevealer } from '../../.widgethacks/advancedrevealers.js';
|
||||
import { chatEntry } from '../apiwidgets.js';
|
||||
import { getString } from '../../../i18n/i18n.js';
|
||||
|
||||
const MODEL_NAME = `Gemini`;
|
||||
|
||||
@@ -35,7 +34,7 @@ const GeminiInfo = () => {
|
||||
className: 'txt txt-title-small sidebar-chat-welcome-txt',
|
||||
wrap: true,
|
||||
justify: Gtk.Justification.CENTER,
|
||||
label: `${getString('Assistant')} (Gemini)`,
|
||||
label: `Assistant (Gemini)`,
|
||||
}),
|
||||
Box({
|
||||
className: 'spacing-h-5',
|
||||
|
||||
@@ -13,7 +13,6 @@ import { setupCursorHover, setupCursorHoverInfo } from '../../.widgetutils/curso
|
||||
import WaifuService from '../../../services/waifus.js';
|
||||
import { darkMode } from '../../.miscutils/system.js';
|
||||
import { chatEntry } from '../apiwidgets.js';
|
||||
import { getString } from '../../../i18n/i18n.js';
|
||||
|
||||
async function getImageViewerApp(preferredApp) {
|
||||
Utils.execAsync(['bash', '-c', `command -v ${preferredApp}`])
|
||||
@@ -124,11 +123,11 @@ const WaifuImage = (taglist) => {
|
||||
transition: 'slide_up_down',
|
||||
transitionDuration: userOptions.animations.durationSmall,
|
||||
children: {
|
||||
'api': ImageState('api', 'Calling API'),
|
||||
'download': ImageState('downloading', 'Downloading image'),
|
||||
'done': ImageState('done', 'Finished!'),
|
||||
'error': ImageState('error', 'Error'),
|
||||
'notfound': ImageState('error', 'Not found!'),
|
||||
'api': ImageState('api', getString('Calling API')),
|
||||
'download': ImageState('downloading', getString('Downloading image')),
|
||||
'done': ImageState('done', getString('Finished!')),
|
||||
'error': ImageState('error', getString('Error')),
|
||||
'notfound': ImageState('error', getString('Not found!')),
|
||||
},
|
||||
});
|
||||
const downloadIndicator = MarginRevealer({
|
||||
@@ -157,12 +156,12 @@ const WaifuImage = (taglist) => {
|
||||
children: [
|
||||
Box({ hexpand: true }),
|
||||
ImageAction({
|
||||
name: 'Go to source',
|
||||
name: getString('Go to source'),
|
||||
icon: 'link',
|
||||
action: () => execAsync(['xdg-open', `${thisBlock.attribute.imageData.source}`]).catch(print),
|
||||
}),
|
||||
ImageAction({
|
||||
name: 'Hoard',
|
||||
name: getString('Hoard'),
|
||||
icon: 'save',
|
||||
action: (self) => {
|
||||
execAsync(['bash', '-c', `mkdir -p $(xdg-user-dir PICTURES)/homework${thisBlock.attribute.isNsfw ? '/🌶️' : ''} && cp ${thisBlock.attribute.imagePath} $(xdg-user-dir PICTURES)/homework${thisBlock.attribute.isNsfw ? '/🌶️/' : ''}`])
|
||||
@@ -171,7 +170,7 @@ const WaifuImage = (taglist) => {
|
||||
},
|
||||
}),
|
||||
ImageAction({
|
||||
name: 'Open externally',
|
||||
name: getString('Open externally'),
|
||||
icon: 'open_in_new',
|
||||
action: () => execAsync([IMAGE_VIEWER_APP, `${thisBlock.attribute.imagePath}`]).catch(print),
|
||||
}),
|
||||
|
||||
@@ -17,7 +17,6 @@ const TextView = Widget.subclass(Gtk.TextView, "AgsTextView");
|
||||
|
||||
import { widgetContent } from './sideleft.js';
|
||||
import { IconTabContainer } from '../.commonwidgets/tabcontainer.js';
|
||||
import { getString } from '../../i18n/i18n.js';
|
||||
|
||||
const EXPAND_INPUT_THRESHOLD = 30;
|
||||
const APILIST = {
|
||||
|
||||
@@ -12,7 +12,6 @@ import { setupCursorHover } from '../../.widgetutils/cursorhover.js';
|
||||
|
||||
import { ColorPickerSelection, hslToHex, hslToRgbValues, hexToHSL } from './color.js';
|
||||
import { clamp } from '../../.miscutils/mathfuncs.js';
|
||||
import { getString } from '../../../i18n/i18n.js';
|
||||
|
||||
export default () => {
|
||||
const selectedColor = new ColorPickerSelection();
|
||||
|
||||
@@ -3,7 +3,6 @@ import App from 'resource:///com/github/Aylur/ags/app.js';
|
||||
import Widget from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
import * as Utils from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
import { setupCursorHover } from '../../.widgetutils/cursorhover.js';
|
||||
import { getString } from '../../../i18n/i18n.js';
|
||||
const { execAsync, exec } = Utils;
|
||||
const { Box, Button, CenterBox, EventBox, Icon, Label, Scrollable } = Widget;
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ import { MaterialIcon } from '../../.commonwidgets/materialicon.js';
|
||||
import { setupCursorHover } from '../../.widgetutils/cursorhover.js';
|
||||
|
||||
import { distroID, isArchDistro, isDebianDistro, hasFlatpak } from '../../.miscutils/system.js';
|
||||
import { getString } from '../../../i18n/i18n.js';
|
||||
|
||||
const scripts = [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user