Compare commits
No commits in common. "c6bc1fdd52a207f8b4b35d10f2f0d73a4a195415" and "0c2fa2479c6478fbf7a223258b3921632c84b0c4" have entirely different histories.
c6bc1fdd52
...
0c2fa2479c
|
|
@ -1,6 +1,6 @@
|
||||||
import { useCallback, useEffect, useRef, useState } from 'react';
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
||||||
import { ChevronLeft, ChevronRight, Pause, Play } from 'lucide-react';
|
import { ChevronLeft, ChevronRight, Pause, Play } from 'lucide-react';
|
||||||
import { listDirectory, stat, splitPath, getWebDAVBaseUrl, type EntryInfo } from '../webdav';
|
import { listDirectory, getWebDAVBaseUrl, type EntryInfo } from '../webdav';
|
||||||
import { IMAGE_EXTS } from './MediaEntry';
|
import { IMAGE_EXTS } from './MediaEntry';
|
||||||
|
|
||||||
// Module-level cache: persists for the lifetime of the page session.
|
// Module-level cache: persists for the lifetime of the page session.
|
||||||
|
|
@ -60,8 +60,7 @@ export default function DirectorySlideshow({ path }: Props) {
|
||||||
// Fetch directory listing and preload all images eagerly.
|
// Fetch directory listing and preload all images eagerly.
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!path) { setImages([]); return; }
|
if (!path) { setImages([]); return; }
|
||||||
stat(path)
|
listDirectory(path)
|
||||||
.then(info => listDirectory(info?.type === 'file' ? splitPath(path).parent : path))
|
|
||||||
.then(entries => {
|
.then(entries => {
|
||||||
const imgs = entries.filter(e => {
|
const imgs = entries.filter(e => {
|
||||||
if (e.type !== 'file') return false;
|
if (e.type !== 'file') return false;
|
||||||
|
|
|
||||||
|
|
@ -315,7 +315,7 @@ export default function HexEditor({ data, readOnly = false, onSave }: HexEditorP
|
||||||
</div>
|
</div>
|
||||||
)} */}
|
)} */}
|
||||||
|
|
||||||
<div className="px-3 font-mono font-bold text-xs leading-5 whitespace-nowrap">
|
<div className="px-3 font-mono text-xs leading-5 whitespace-nowrap">
|
||||||
{Array.from({ length: lastRenderRow - firstRenderRow }, (_, i) => {
|
{Array.from({ length: lastRenderRow - firstRenderRow }, (_, i) => {
|
||||||
const row = firstRenderRow + i;
|
const row = firstRenderRow + i;
|
||||||
const base = row * bytesPerRow;
|
const base = row * bytesPerRow;
|
||||||
|
|
@ -323,7 +323,7 @@ export default function HexEditor({ data, readOnly = false, onSave }: HexEditorP
|
||||||
<div key={row} className="flex items-center">
|
<div key={row} className="flex items-center">
|
||||||
|
|
||||||
{/* Address */}
|
{/* Address */}
|
||||||
<span className="text-amber-200 w-15 flex-shrink-0 select-none">
|
<span className="text-neutral-400 w-15 flex-shrink-0 select-none">
|
||||||
{base.toString(16).padStart(8, '0').toUpperCase()}
|
{base.toString(16).padStart(8, '0').toUpperCase()}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
|
@ -340,8 +340,8 @@ export default function HexEditor({ data, readOnly = false, onSave }: HexEditorP
|
||||||
const isAllMatch = allMatchSet.has(idx) && !isCurMatch;
|
const isAllMatch = allMatchSet.has(idx) && !isCurMatch;
|
||||||
const color = isCurMatch ? 'bg-orange-500 text-white'
|
const color = isCurMatch ? 'bg-orange-500 text-white'
|
||||||
: isAllMatch ? 'bg-yellow-800 text-yellow-200'
|
: isAllMatch ? 'bg-yellow-800 text-yellow-200'
|
||||||
: byte === 0 ? 'text-neutral-500'
|
: byte === 0 ? 'text-neutral-700'
|
||||||
: 'text-green-300';
|
: 'text-green-400';
|
||||||
const ring = isCursor && pane === 'hex' ? ' ring-1 ring-inset ring-blue-400' : '';
|
const ring = isCursor && pane === 'hex' ? ' ring-1 ring-inset ring-blue-400' : '';
|
||||||
const gap = col === 8 ? ' ml-2' : '';
|
const gap = col === 8 ? ' ml-2' : '';
|
||||||
return (
|
return (
|
||||||
|
|
@ -357,7 +357,7 @@ export default function HexEditor({ data, readOnly = false, onSave }: HexEditorP
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Separator */}
|
{/* Separator */}
|
||||||
<span className="text-neutral-500 mr-2 select-none">│</span>
|
<span className="text-neutral-700 mr-2 select-none">│</span>
|
||||||
|
|
||||||
{/* ASCII pane */}
|
{/* ASCII pane */}
|
||||||
<div className="flex">
|
<div className="flex">
|
||||||
|
|
@ -372,8 +372,8 @@ export default function HexEditor({ data, readOnly = false, onSave }: HexEditorP
|
||||||
const isAllMatch = allMatchSet.has(idx) && !isCurMatch;
|
const isAllMatch = allMatchSet.has(idx) && !isCurMatch;
|
||||||
const color = isCurMatch ? 'bg-orange-500 text-white'
|
const color = isCurMatch ? 'bg-orange-500 text-white'
|
||||||
: isAllMatch ? 'bg-yellow-800 text-yellow-200'
|
: isAllMatch ? 'bg-yellow-800 text-yellow-200'
|
||||||
: printable ? 'text-cyan-300'
|
: printable ? 'text-blue-300'
|
||||||
: 'text-neutral-500';
|
: 'text-neutral-700';
|
||||||
const ring = isCursor && pane === 'ascii' ? ' ring-1 ring-inset ring-blue-400' : '';
|
const ring = isCursor && pane === 'ascii' ? ' ring-1 ring-inset ring-blue-400' : '';
|
||||||
return (
|
return (
|
||||||
<span
|
<span
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ export default function StatusPage({ config, setConfig, onOpenFileManager }: Sta
|
||||||
|
|
||||||
const activeDevice = findActiveDevice();
|
const activeDevice = findActiveDevice();
|
||||||
const activeDir = activeDevice
|
const activeDir = activeDevice
|
||||||
? (activeDevice.base_url || activeDevice.url || null)
|
? (activeDevice.base_url || splitPath(activeDevice.url || '/').parent)
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
const mediaSetFiles: MediaSetEntry[] | null =
|
const mediaSetFiles: MediaSetEntry[] | null =
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user