Commit Graph
47 Commits
Author SHA1 Message Date
robert dennis f7aa208cab fix ci 2026-10-20 15:46:16 -04:00
ItzLinaton 60b72365d8 Feat: Custom User Avatars (V2) (#7295)
Added custom user avatar support.

## Extra Details:
- Users can upload custom `PNG, JPEG, SVG, WebP, AVIF`, and `ICO`
avatars.
- Added avatar management to the user account area.
- Added admin controls to update and remove user avatars.
- Custom User avatars appear in:
  - Panel Navbar.
  - Panel Admin Activity Logs.
  - Server Sub user List.
  - Server Activity Logs
  - Personal Account Activity Logs.
  - Server Ownership Details.
  
---

<img width="1329" height="327"
alt="{B32EBD7F-1FCA-4356-966C-0D60A9A23E49}"
src="https://github.com/user-attachments/assets/881fa5b3-9599-4370-975d-83b6bd91a7d1"
/>

---

<img width="997" height="847" alt="adminpage"
src="https://github.com/user-attachments/assets/989acbcc-351c-431b-ab7f-557ba4c7e070"
/>

---

<img width="955" height="781" alt="serverinfo"
src="https://github.com/user-attachments/assets/6556afac-1971-4112-9686-b71137072c5f"
/>

---

<img width="1376" height="919" alt="userarea"
src="https://github.com/user-attachments/assets/d49f0ddb-1f38-4884-b186-8db78bfed4b0"
/>

---

<img width="936" height="232" alt="userslist"
src="https://github.com/user-attachments/assets/0e8a4b4a-719a-4d52-a485-d7577736b43f"
/>

---

<img width="983" height="772" alt="activity"
src="https://github.com/user-attachments/assets/37ef7176-a804-43f7-ae32-ae65e1a2671b"
/>
2026-10-20 15:09:33 -04:00
Sandip Ghimire eb1611f9e2 fix(console): improve terminal layout, resize reliability, and rendering performance (#7300)
## Description

This PR resolves several visual artifacts, resize desync issues, and
edge-case rendering glitches with the Ghostty-web terminal integration
in the server console:

### 1. Reliable Terminal Resizing & Layout Transitions
- **Bypass `FitAddon` throttle lock (`unlockFitResize`)**: Ghostty's
`FitAddon` sets a 50ms `_isResizing` lock via `setTimeout`, which
silently dropped subsequent `fit()` calls triggered immediately after
layout/route transitions. Unlocking this ensures post-layout re-fits are
never lost.
- **WASM Line Bounds & Viewport Clamping (`patchWasmTerminal`)**:
- Guards against potential null/undefined line reads from the WASM
terminal (`getLine` and `getScrollbackLine` fallback to empty arrays).
- Synchronizes and clamps viewport coordinates during `term.resize` to
prevent scroll desync and jumps when resizing windows or toggling
devtools.

### 2. Precise Font Metrics & Clean Canvas Redraws
- **Canvas-based Font Measurement (`measureTerminalFont`)**: Accurately
computes font cell width, baseline, ascent, and descent using a 2D
canvas context instead of relying on rough estimates.
- **Artifact Prevention in `adjustRendering`**: Automatically flushes
and repaints the canvas background with the theme background color when
viewport offsets change or full redraws occur, eliminating ghosting/text
smearing.

### 3. Clear & Output Lifecycle Improvements
- **Terminal Clear Handling**: Extends `preserveScrollPositionOnWrite`
to intercept `term.clear()`, issuing ANSI reset escapes
(`\x1b[2J\x1b[3J\x1b[H`) and resetting viewport positions.
- **Prefix Newlines**: Normalizes `term.writeln` to ensure initial logs
and scrollback buffer transitions don't overwrite the first line.

### 4. Layout & Styling Polish
- Replaced negative margin gutter compensation hacks (`-ml-4
w-[calc(100%+2rem)]`) in `Terminal.tsx` with clean `w-full` and
`overflow-hidden`.
- Ensured consistent container and input rounding across mobile and
desktop breakpoints.

---

## Changes Overview

- `resources/scripts/components/server/console/useTerminal.ts`: Added
`unlockFitResize`, `measureTerminalFont`, `patchWasmTerminal`, viewport
clamping, canvas clear on redraw, and clear handling.
- `resources/scripts/themes/classic/views/server/console/Terminal.tsx`:
Cleaned container classes and removed mobile negative-margin overrides.
2026-10-19 15:06:01 -04:00
Sky Mulley bf761ec11a fix console addon changes breaking lint tests 2026-10-19 09:15:48 +01:00
Sky Mulley 33c5dd6f31 migrate terminal improvements to addons 2026-10-18 21:33:16 +01:00
Sky Mulley 266544edfc Interactable Terminal Improvements (#7296)
Fixes some internal Discord discussions.

Most of this works around gaps in ghostty-web 0.4.0's selection and link
handling. Several fixes reach into its private internals, so the
dependency is pinned to `0.4.0` now instead of free spinning.

Ghostty seems to be an overall regression as a library over XTerm, below
are some internal hook ins to provide vital functionality back to the
console that v1 originally had.

### Selection
- Double-click selects the word on the line you clicked. Ghostty's
`getWordAtCell` reads the live screen row whatever the scroll position,
so once you'd scrolled up it picked a word from a different line.
- Triple-click now selects and copies the whole line, including every
row it wraps onto.
- Copying no longer puts a line break where a line only wrapped.
Ghostty's `getSelection` puts `\n` between every row, which broke copied
URLs and commands. The fix covers Ctrl/Cmd+C, drag-copy, right-click
copy and triple-click. If a row wrapped at a space, the space is kept.

### Links
- URLs that wrap across rows are detected as one link, and hovering any
part of them underlines the whole URL.
- Only `http:` and `https:` links can be opened. Console output comes
from the game server, so a `javascript:`, `file:` or `ssh:` link in the
output is ignored rather than passed to `window.open`.

### Focus
- The page no longer scrolls when the console takes focus. Ghostty
focuses the console on open and its hidden textarea on every press; both
now focus with `preventScroll`.
2026-10-16 14:11:59 -04:00
robert dennis 5006604b02 theme leftovers 2026-10-12 20:14:47 -04:00
robert dennis 38d2aadccc console and file views 2026-10-12 15:31:58 -04:00
robert dennis cf956515d9 console scroll easing 2026-10-11 01:11:32 -04:00
robert dennis 706d7ea5a9 console scrollbar 2026-10-11 01:11:32 -04:00
robert dennis 93e4b98882 touch scrolling for console 2026-10-11 00:31:17 -04:00
robert dennis 2aa8e5fc64 stop console opening mobile keyboard 2026-10-11 00:18:11 -04:00
robert dennis e217e42360 complexity cleanup 2026-10-08 18:49:15 -04:00
robert dennis 3314ce8630 chart cleanup 2026-10-08 17:48:30 -04:00
robert dennis 56fb932a73 action cleanup 2026-10-08 17:40:00 -04:00
robert dennis cceaa535b8 lint cleanup 2026-10-08 16:54:59 -04:00
Sky Mulley 4adda9b8df don't snap to bottom for new lines in console log 2026-10-06 23:10:31 +01:00
Sky Mulley 6bc4fb33c4 fix issue where console terminals could leak between sessions 2026-10-06 12:19:05 +01:00
6c0413e39b Start 2.0 development
Co-authored-by: Anthony <anthony@infraly.co>
Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
2026-10-05 18:10:18 -04:00
VoidValueandcesarmr-github e5a9706d6c Fix Unicode character width rendering using Unicode11Addon in xterm.js [TO FIX #2484] (#5524)
fixes #2484

Co-authored-by: cesarmr-github <167689141+cesarmr-github@users.noreply.github.com>
2026-02-11 16:05:02 -08:00
Dane Everitt f1ea7ec90d Load IBM Plex Sans from code and export as part of bundle (#5447)
Removes the need to load any external resources for fonts. Resolves https://github.com/pterodactyl/panel/issues/5343
2025-12-20 16:37:54 -08:00
Charles Morgan a4e547dc67 ui(server): fix console searchbar z-index (#4587) 2022-11-27 19:38:28 -07:00
Matthew Penner df2402b54f Streaming Transfers (#4548) 2022-11-14 18:25:07 -07:00
Boy132 032e4f2e31 Apply node maintenance mode to servers (#4421) 2022-11-06 16:02:30 -07:00
Cubxity 597821b3bb fix: byte units (#4419) 2022-10-09 16:09:24 -06:00
DaneEveritt 2e61a4db13 fix: eslint errors 2022-10-08 11:30:14 -07:00
Aspect d7b387be3e Show UptimeDuration for starting servers (#4284) 2022-10-04 20:12:07 -06:00
Simon StjernholmandDaneEveritt 5700dd6a8e fixes loading overlay to console only (#4246)
Co-authored-by: DaneEveritt <dane@daneeveritt.com>
2022-07-16 08:30:00 -04:00
DaneEveritt 0d0c595909 Show starting/stopping correctly in stats; closes #4209 2022-06-30 20:33:09 -04:00
DaneEveritt 3120e1d4a0 Fix console rendering on Safari; closes #4189 2022-06-30 20:30:01 -04:00
VinGal cc06d1faa9 Fixes rounding when 0.001% or less on CPU usage. (#4207) 2022-06-30 20:23:27 -04:00
DaneEveritt bd278b2688 Fix install warning display and make it reactive 2022-06-27 20:36:24 -04:00
DaneEveritt 7886251cd8 Fix infinity display 2022-06-27 20:16:43 -04:00
DaneEveritt 050d4e7a36 Show the resource limits next to numbers 2022-06-27 20:14:55 -04:00
DaneEveritt 5f156e193a Improve the graph display; hide the bottom bar when no data exists. 2022-06-27 19:59:36 -04:00
DaneEveritt bf287c45d6 Logic improvements, move stat blocks to right side 2022-06-27 19:56:26 -04:00
DaneEveritt ad6e9f076b Fix copy to clipboard when clicking server address
closes #4187
2022-06-27 19:18:58 -04:00
Boy132 ac997cd7a6 fix: use correct network stat (#4175) 2022-06-27 18:30:21 -04:00
Boy132 63cf6ee96e fix: round cpu usage in chart (#4182)
fixes #4168
2022-06-27 18:30:00 -04:00
DaneEveritt dc84af9937 Apply new eslint rules; default to prettier for styling 2022-06-26 15:13:52 -04:00
DaneEveritt 1eb3ea2ee4 Some code cleanup, add jest coverage and begin using it for utility functions 2022-06-26 14:34:09 -04:00
DaneEveritt 47d6235ea0 Keep server address at the top 2022-06-25 21:31:10 -04:00
DaneEveritt 00338e431b Automatically hide the kill modal when server stops 2022-06-25 21:29:41 -04:00
DaneEveritt 76f3b996fe Auto resize values when they'd overflow the container 2022-06-25 21:27:18 -04:00
DaneEveritt 182507ff0e Upgrade charts to ChartJS 3 and improve UI for them 2022-06-25 20:51:49 -04:00
DaneEveritt 54c619e6ba Some mobile improvements for the UI; make console fill space better 2022-06-21 18:43:59 -04:00
DaneEveritt faff263f17 First pass at new server console design 2022-06-20 17:26:47 -04:00