Compare commits

...
Author SHA1 Message Date
Uriel 8655fe22bc remove old code 2025-07-17 17:46:39 -04:00
Uriel b08e2a0807 Use scroll snap at the end for serial 2025-07-17 17:45:59 -04:00
+2 -8
View File
@@ -114,13 +114,6 @@ export function Serial() {
} }
); );
useEffect(() => {
if (consoleRef.current)
consoleRef.current.scrollTo({
top: consoleRef.current.scrollHeight,
});
}, [consoleContent]);
useEffect(() => { useEffect(() => {
const id = setInterval(() => { const id = setInterval(() => {
if (!isSerialOpen) { if (!isSerialOpen) {
@@ -248,7 +241,7 @@ export function Serial() {
</div> </div>
<div className="bg-background-80 rounded-lg flex-grow h-0 flex flex-col p-2"> <div className="bg-background-80 rounded-lg flex-grow h-0 flex flex-col p-2">
<div <div
className="flex-grow overflow-x-auto overflow-y-auto" className="flex-grow overflow-auto overscroll-y-contain snap-y snap-proximity"
ref={consoleRef} ref={consoleRef}
> >
<div className="flex select-text"> <div className="flex select-text">
@@ -258,6 +251,7 @@ export function Serial() {
: l10n.getString('settings-serial-connection_lost')} : l10n.getString('settings-serial-connection_lost')}
</pre> </pre>
</div> </div>
<div className="snap-end" />
</div> </div>
<div className="border-t-2 pt-2 border-background-60 border-solid gap-2 flex flex-row"> <div className="border-t-2 pt-2 border-background-60 border-solid gap-2 flex flex-row">
<div className="xs:flex flex-grow xs:flex-wrap gap-2 grid grid-cols-2"> <div className="xs:flex flex-grow xs:flex-wrap gap-2 grid grid-cols-2">