Compare commits
2 commits
130a989185
...
f8f07e9015
Author | SHA1 | Date | |
---|---|---|---|
|
f8f07e9015 | ||
|
f914ada22b |
2 changed files with 11 additions and 31 deletions
|
@ -1,9 +1,7 @@
|
|||
import {
|
||||
Component,
|
||||
For,
|
||||
onCleanup,
|
||||
createSignal,
|
||||
untrack,
|
||||
Match,
|
||||
Switch as JsSwitch,
|
||||
ErrorBoundary,
|
||||
|
@ -18,7 +16,6 @@ import Thread from "./Thread.jsx";
|
|||
|
||||
const TrendTimelinePanel: Component<{
|
||||
client: mastodon.rest.Client;
|
||||
prefetch?: boolean;
|
||||
|
||||
openFullScreenToot: (
|
||||
toot: mastodon.v1.Status,
|
||||
|
@ -37,13 +34,6 @@ const TrendTimelinePanel: Component<{
|
|||
);
|
||||
const [expandedId, setExpandedId] = createSignal<string>();
|
||||
|
||||
const tlEndObserver = new IntersectionObserver(() => {
|
||||
if (untrack(() => props.prefetch) && !snapshot.loading)
|
||||
refetchTimeline();
|
||||
});
|
||||
|
||||
onCleanup(() => tlEndObserver.disconnect());
|
||||
|
||||
const isExpandedId = createSelector(expandedId);
|
||||
|
||||
const isExpanded = (st: mastodon.v1.Status) => isExpandedId(st.id);
|
||||
|
@ -123,7 +113,7 @@ const TrendTimelinePanel: Component<{
|
|||
toots={item}
|
||||
onBoost={(...args) => onBoost(index(), ...args)}
|
||||
onBookmark={(...args) => onBookmark(index(), ...args)}
|
||||
onReply={(client, status) =>
|
||||
onReply={({ status }, element) =>
|
||||
props.openFullScreenToot(status, element, true)
|
||||
}
|
||||
client={props.client}
|
||||
|
@ -140,8 +130,6 @@ const TrendTimelinePanel: Component<{
|
|||
}}
|
||||
</For>
|
||||
</div>
|
||||
|
||||
<div ref={(e) => tlEndObserver.observe(e)}></div>
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
|
@ -149,7 +137,7 @@ const TrendTimelinePanel: Component<{
|
|||
"align-items": "center",
|
||||
"justify-content": "center",
|
||||
"flex-flow": "column",
|
||||
gap: "20px"
|
||||
gap: "20px",
|
||||
}}
|
||||
>
|
||||
<JsSwitch>
|
||||
|
@ -162,16 +150,6 @@ const TrendTimelinePanel: Component<{
|
|||
>
|
||||
Retry
|
||||
</Button>
|
||||
|
||||
</Match>
|
||||
<Match when={true}>
|
||||
<Button
|
||||
variant="contained"
|
||||
onClick={[refetchTimeline, undefined]}
|
||||
disabled={snapshot.loading}
|
||||
>
|
||||
Refresh
|
||||
</Button>
|
||||
</Match>
|
||||
</JsSwitch>
|
||||
</div>
|
||||
|
|
|
@ -88,13 +88,15 @@ export default defineConfig(({ mode }) => {
|
|||
version(),
|
||||
],
|
||||
server: {
|
||||
https: {
|
||||
https: serverHttpCertBase
|
||||
? {
|
||||
// This config controls https for the *dev server*.
|
||||
// See docs/dev-https.md for setting up https
|
||||
key: serverHttpCertKey,
|
||||
cert: serverHttpCertCrt,
|
||||
passphrase: serverHttpCertPassword,
|
||||
},
|
||||
}
|
||||
: undefined,
|
||||
},
|
||||
define: {
|
||||
"import.meta.env.BUILT_AT": `"${new Date().toISOString()}"`,
|
||||
|
|
Loading…
Reference in a new issue