Skip to content

Commit 6d14acf

Browse files
committed
frontend: scroll to USB Storage section when navigating from Autoload
1 parent 75b20ce commit 6d14acf

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

frontend/src/App.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,10 @@ function App() {
542542
config={config}
543543
onSaveConfig={handleSaveConfig}
544544
onToast={addToast}
545-
onRedirect={(v) => setView(v)}
545+
onRedirect={(v, target) => {
546+
if (target) setStorageScrollTarget(target)
547+
setView(v)
548+
}}
546549
/>
547550
)}
548551

frontend/src/components/views/AutoloadView.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ const AutoloadView = ({ payloads, config, onSaveConfig, onToast, onRedirect }) =
145145
<div className="pt-8 border-t border-white/5 mt-8 text-center space-y-4">
146146
<p className="text-zinc-500 text-sm font-bold uppercase tracking-widest opacity-60">Missing a payload?</p>
147147
<button
148-
onClick={() => onRedirect('storage')}
148+
onClick={() => onRedirect('storage', 'usb-storage')}
149149
className="group flex flex-col items-center mx-auto space-y-3"
150150
>
151151
<div className="flex items-center space-x-3 text-ps-blue group-hover:text-white transition-colors">

frontend/src/components/views/StorageHub.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ const StorageHub = ({ payloads, onInstall, onDelete, onUpload, onImportFromUsb,
232232
</section>
233233

234234
{/* USB Storage Section */}
235-
<section className="space-y-6">
235+
<section id="usb-storage" className="space-y-6">
236236
<div className="flex items-center justify-between px-2">
237237
<h3 className="label-caps !text-ps-blue flex items-center space-x-4 text-lg">
238238
<HardDrive className="w-6 h-6" />

0 commit comments

Comments
 (0)