0.2.4 — fix code-editor white screen, rename package to "Exbyte Depot"

- Fix critical crash: opening the built-in code editor blanked the whole app
  (white screen). The editing early-return sat above the syntax-highlight
  useMemo, so entering edit mode changed the hook count and React tore down the
  tree (Rules of Hooks violation). Moved all hooks above the early returns.
- Diff-vs-previous button is now shown only for text/code files, not binaries
  (p4 diff2 on a .uasset only prints "files differ", which is useless).
- Package renamed to "Exbyte Depot" (productName + mainBinaryName); identifier
  unchanged so existing installs upgrade in place.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Bonchellon
2026-07-08 09:43:33 +03:00
parent 0da836b0ac
commit c175d734d7
6 changed files with 16 additions and 13 deletions

View File

@ -2209,7 +2209,7 @@ function Preview({ file, onRevert, onFlash, editorId, editorName, onBlame, onDif
{codeFile && onBlame && (
<span className="gbtn icon" title={t("Blame — who changed each line")} onClick={() => onBlame(spec || dp, name)}>{I.people}</span>
)}
{hist && onDiffPrev && (
{hist && onDiffPrev && codeFile && (
<span className="gbtn icon" title={t("Diff against the previous revision")} onClick={() => onDiffPrev(file)}>{I.clock}</span>
)}
{!hist && <span className="gbtn" onClick={() => onRevert(file)}>{I.revert}{t("Revert")}</span>}