diff --git a/gui/app/package.json b/gui/app/package.json index 876010098..b6bf06fb0 100644 --- a/gui/app/package.json +++ b/gui/app/package.json @@ -25,12 +25,14 @@ "@sentry/react": "10.29.0", "@slimevr/gui-shared": "workspace:*", "@tanstack/react-query": "^5.48.0", + "@tanstack/react-virtual": "^3.13.12", "@tweenjs/tween.js": "^25.0.0", "@twemoji/svg": "^15.0.0", "ajv": "^8.17.1", "browser-fs-access": "^0.35.0", "classnames": "^2.5.1", "convert": "^5.12.0", + "fflate": "^0.8.2", "flatbuffers": "22.10.26", "intl-pluralrules": "^2.0.1", "ip-num": "^1.5.1", diff --git a/gui/app/public/i18n/en/translation.ftl b/gui/app/public/i18n/en/translation.ftl index 6c594eee9..1979bcd04 100644 --- a/gui/app/public/i18n/en/translation.ftl +++ b/gui/app/public/i18n/en/translation.ftl @@ -499,6 +499,7 @@ settings-sidebar-vrchat_osc = VRChat OSC settings-sidebar-osc_vmc = VMC settings-sidebar-utils = Utilities settings-sidebar-serial = USB Serial Console +settings-sidebar-logs = Logs settings-sidebar-appearance = Appearance settings-sidebar-home = Home Screen settings-sidebar-checklist = Tracking checklist @@ -876,6 +877,70 @@ settings-serial-send_command-warning = settings-serial-send_command-warning-ok = I know what I'm doing settings-serial-send_command-warning-cancel = Cancel +## Logs settings +settings-logs = Logs +settings-logs-description = Follow the logs live. When you ask for help, export them and attach the .zip file to your message. +settings-logs-tab-live = Live +settings-logs-tab-files = Files ({ $count }) +settings-logs-copy = Copy shown lines +settings-logs-export_all = Export all logs (.zip) +settings-logs-export-title = Export logs +settings-logs-export-all = All log files (.zip) +settings-logs-export-all-description = Every log file, for bug reports +settings-logs-export-origin = { $source } files only (.zip) +settings-logs-export-selected = + { $count -> + [one] Export 1 selected file (.zip) + *[other] Export { $count } selected files (.zip) + } +settings-logs-sources = Sources +settings-logs-source-all = All +settings-logs-source-slimevr_server = Server +settings-logs-source-gui = GUI +settings-logs-source-openvr_driver = OpenVR driver +settings-logs-source-bindings_provider = Bindings provider +settings-logs-level = Level +settings-logs-level-debug = Debug +settings-logs-level-info = Info +settings-logs-level-warn = Warning +settings-logs-level-error = Error +settings-logs-logger = Logger +settings-logs-logger-all = All +settings-logs-search = Search messages +settings-logs-filters = Filters +settings-logs-details-show = Show details +settings-logs-details-hide = Hide details +settings-logs-new_lines = + { $count -> + [one] 1 new line + *[other] { $count } new lines + } +settings-logs-status-live = Live +settings-logs-status-paused = Paused +settings-logs-status-file = File +settings-logs-lines = + { $total -> + [one] 1 line + *[other] { $total } lines + } +settings-logs-lines-filtered = { $shown } of { $total } lines +settings-logs-pause = Pause +settings-logs-resume = Resume +settings-logs-clear = Clear view +settings-logs-open_folder = Open logs folder +settings-logs-back = Back to files +settings-logs-viewing = Viewing { $name } +settings-logs-files-empty = No log files yet. +settings-logs-files-current = current +settings-logs-files-part = Part { $part } +settings-logs-files-count = + { $count -> + [one] 1 file + *[other] { $count } files + } +settings-logs-files-view = View +settings-logs-files-save = Save + ## OSC VRChat settings settings-osc-vrchat = VRChat OSC # This cares about multilines diff --git a/gui/app/src/App.tsx b/gui/app/src/App.tsx index d065465cc..2515d94c1 100644 --- a/gui/app/src/App.tsx +++ b/gui/app/src/App.tsx @@ -261,45 +261,6 @@ export default function App() { fetchReleases().catch((e) => error(e, 'failed to fetch releases')); }, []); - if (electron.isElectron) { - useEffect(() => { - const unlisten = electron.api.onServerStatus(({ type, message }) => { - if (type === 'stderr') { - // This strange invocation is what lets us lose the line information in the console - // See more here: https://stackoverflow.com/a/48994308 - // These two are fine to keep with console.log, they are server logs - setTimeout( - console.log.bind( - console, - `%c[SERVER] %c${message}`, - 'color:cyan', - 'color:red' - ) - ); - } else if (type === 'stdout') { - setTimeout( - console.log.bind( - console, - `%c[SERVER] %c${message}`, - 'color:cyan', - 'color:green' - ) - ); - } else if (type === 'error') { - error('Error: %s', message); - } else if (type === 'terminated') { - error('Server Process Terminated: %s', message); - } else if (type === 'other') { - log('Other process event: %s', message); - } - }); - - return () => { - unlisten(); - }; - }, []); - } - useEffect(() => { function onKeyboard(ev: KeyboardEvent) { if (ev.key === 'F1') { diff --git a/gui/app/src/components/ProfileQuickSwitch.tsx b/gui/app/src/components/ProfileQuickSwitch.tsx index 2d5d7265d..4833b2d12 100644 --- a/gui/app/src/components/ProfileQuickSwitch.tsx +++ b/gui/app/src/components/ProfileQuickSwitch.tsx @@ -1,20 +1,12 @@ import classNames from 'classnames'; -import { - CSSProperties, - ReactNode, - useEffect, - useId, - useRef, - useState, -} from 'react'; +import { ReactNode, useEffect, useRef } from 'react'; import { useLocalization } from '@fluent/react'; import { ProfileKind } from 'solarxr-protocol'; import { ArrowDownIcon } from './commons/icon/ArrowIcons'; import { CheckIcon } from './commons/icon/CheckIcon'; import { HumanIcon } from './commons/icon/HumanIcon'; import { TuneIcon } from './commons/icon/TuneIcon'; -import { Clickable } from './commons/Clickable'; -import { Drawer } from './commons/Drawer'; +import { PopoverMenu, PopoverMenuItem } from './commons/PopoverMenu'; import { Tooltip } from './commons/Tooltip'; import { Typography } from './commons/Typography'; import { useBreakpoint } from '@/hooks/breakpoint'; @@ -64,14 +56,7 @@ function ProfileSection({ const active = name === profiles.active; return (