Compare commits

...

5 commits

Author SHA1 Message Date
thislight
3dc2196f1a
TimelinePanel: allow the toot composer collpased
All checks were successful
/ depoly (push) Successful in 1m4s
2024-09-28 22:46:48 +08:00
thislight
d90876a84e
TootComposer: fix placeholder empty 2024-09-28 22:46:28 +08:00
thislight
63603e049d
MediaAttachmentGrid: fix autoplay on iOS 2024-09-28 22:39:33 +08:00
thislight
108e8fc87c
BottomSheet: fix bottomUp position on mobile 2024-09-28 22:38:44 +08:00
thislight
a6b791ab5a
TootComposer: fix random stmt may be empty 2024-09-28 22:27:26 +08:00
6 changed files with 15 additions and 13 deletions

View file

@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package",
"name": "tutu",
"version": "1.0.6",
"version": "1.0.7",
"description": "",
"private": true,
"type": "module",

View file

@ -60,5 +60,13 @@
top: unset;
transform: translateX(-50%);
bottom: 0;
@media (max-width: 560px) {
& {
transform: none;
height: unset;
}
}
}
}

View file

@ -1,19 +1,14 @@
import {
children,
createEffect,
createRenderEffect,
createSignal,
onCleanup,
onMount,
startTransition,
useTransition,
type ChildrenReturn,
type ParentComponent,
type ResolvedChildren,
} from "solid-js";
import styles from "./BottomSheet.module.css";
import { useHeroSignal } from "../platform/anim";
import { makeEventListener } from "@solid-primitives/event-listener";
export type BottomSheetProps = {
open?: boolean;

View file

@ -172,6 +172,7 @@ const TimelinePanel: Component<{
client={props.client}
expanded={item.id === expandedThreadId() ? 1 : 0}
onExpandChange={(x) => {
setTyping(false)
if (item.id !== expandedThreadId()) {
setExpandedThreadId((x) => (x ? undefined : item.id));
} else if (x === 2) {
@ -423,11 +424,6 @@ const Home: ParentComponent = (props) => {
</Toolbar>
</AppBar>
}
fab={
<Fab color="secondary">
<CreateTootIcon />
</Fab>
}
>
<TimeSourceProvider value={now}>
<Show when={!!client()}>

View file

@ -109,8 +109,10 @@ const MediaAttachmentGrid: Component<{
src={item.url || undefined}
style={style()}
onLoadedMetadata={[setLoaded, true]}
autoplay={true}
autoplay={false}
controls
playsinline /* or safari on iOS will play in full-screen */
loop
/>
);

View file

@ -183,7 +183,8 @@ function randomChoose<T extends any[]>(
rn: number,
K: T,
): T extends Array<infer E> ? E : never {
const idx = Math.round(rn * K.length);
const idx = Math.floor(rn * K.length);
console.log(idx, K.length);
return K[idx];
}