src/actor.ts
src/lib/actor.ts
src/actor.ts
src/lib/actor.ts
+2
-2
src/components/DefaultAvatar.tsx
+2
-2
src/components/DefaultAvatar.tsx
+1
-1
src/components/ProfilePage.tsx
+1
-1
src/components/ProfilePage.tsx
···
5
5
import { Un$Typed } from "$lexicon/util.ts";
6
6
import { AtUri } from "@atproto/syntax";
7
7
import { Button, cn } from "@bigmoves/bff/components";
8
-
import { TimelineItem } from "../timeline.ts";
8
+
import { TimelineItem } from "../lib/timeline.ts";
9
9
import { bskyProfileLink, galleryLink, profileLink } from "../utils.ts";
10
10
import { AvatarButton } from "./AvatarButton.tsx";
11
11
import { FollowButton } from "./FollowButton.tsx";
+1
-1
src/components/Timeline.tsx
+1
-1
src/components/Timeline.tsx
+1
-1
src/components/TimelineItem.tsx
+1
-1
src/components/TimelineItem.tsx
···
1
1
import { Record as Gallery } from "$lexicon/types/social/grain/gallery.ts";
2
2
import { isPhotoView } from "$lexicon/types/social/grain/photo/defs.ts";
3
3
import { AtUri } from "@atproto/syntax";
4
-
import { type TimelineItem } from "../timeline.ts";
4
+
import { type TimelineItem } from "../lib/timeline.ts";
5
5
import { formatRelativeTime, galleryLink } from "../utils.ts";
6
6
import { ActorInfo } from "./ActorInfo.tsx";
7
7
import { GalleryPreviewLink } from "./GalleryPreviewLink.tsx";
src/errors.ts
src/lib/errors.ts
src/errors.ts
src/lib/errors.ts
src/follow.ts
src/lib/follow.ts
src/follow.ts
src/lib/follow.ts
src/gallery.ts
src/lib/gallery.ts
src/gallery.ts
src/lib/gallery.ts
+2
-2
src/main.tsx
+2
-2
src/main.tsx
···
3
3
import { Root } from "./app.tsx";
4
4
import { LoginPage } from "./components/LoginPage.tsx";
5
5
import { PDS_HOST_URL } from "./env.ts";
6
-
import { onError } from "./errors.ts";
6
+
import { onError } from "./lib/errors.ts";
7
+
import { photoUploadRoutes } from "./lib/uploads.tsx";
7
8
import * as actionHandlers from "./routes/actions.tsx";
8
9
import * as dialogHandlers from "./routes/dialogs.tsx";
9
10
import { handler as exploreHandler } from "./routes/explore.tsx";
···
14
15
import { handler as timelineHandler } from "./routes/timeline.tsx";
15
16
import { handler as uploadHandler } from "./routes/upload.tsx";
16
17
import { appStateMiddleware, type State } from "./state.ts";
17
-
import { photoUploadRoutes } from "./uploads.tsx";
18
18
import { generateStaticFilesHash, onSignedIn } from "./utils.ts";
19
19
20
20
let staticFilesHash = new Map<string, string>();
src/notifications.ts
src/lib/notifications.ts
src/notifications.ts
src/lib/notifications.ts
+1
-1
src/photo.ts
src/lib/photo.ts
+1
-1
src/photo.ts
src/lib/photo.ts
···
2
2
import { PhotoView } from "$lexicon/types/social/grain/photo/defs.ts";
3
3
import { $Typed } from "$lexicon/util.ts";
4
4
import { WithBffMeta } from "@bigmoves/bff";
5
-
import { PUBLIC_URL, USE_CDN } from "./env.ts";
5
+
import { PUBLIC_URL, USE_CDN } from "../env.ts";
6
6
7
7
export function photoThumb(did: string, cid: string) {
8
8
return photoUrl(did, cid, "thumbnail");
+2
-2
src/routes/actions.tsx
+2
-2
src/routes/actions.tsx
···
11
11
import { FollowButton } from "../components/FollowButton.tsx";
12
12
import { PhotoButton } from "../components/PhotoButton.tsx";
13
13
import { PhotoSelectButton } from "../components/PhotoSelectButton.tsx";
14
-
import { deleteGallery, getGallery, getGalleryFavs } from "../gallery.ts";
15
-
import { photoToView } from "../photo.ts";
14
+
import { deleteGallery, getGallery, getGalleryFavs } from "../lib/gallery.ts";
15
+
import { photoToView } from "../lib/photo.ts";
16
16
import type { State } from "../state.ts";
17
17
import { galleryLink } from "../utils.ts";
18
18
+3
-3
src/routes/dialogs.tsx
+3
-3
src/routes/dialogs.tsx
···
5
5
import { AtUri } from "@atproto/syntax";
6
6
import { BffContext, RouteHandler, WithBffMeta } from "@bigmoves/bff";
7
7
import { wrap } from "popmotion";
8
-
import { getActorPhotos, getActorProfile } from "../actor.ts";
9
8
import { AvatarDialog } from "../components/AvatarDialog.tsx";
10
9
import { GalleryCreateEditDialog } from "../components/GalleryCreateEditDialog.tsx";
11
10
import { GallerySortDialog } from "../components/GallerySortDialog.tsx";
···
13
12
import { PhotoDialog } from "../components/PhotoDialog.tsx";
14
13
import { PhotoSelectDialog } from "../components/PhotoSelectDialog.tsx";
15
14
import { ProfileDialog } from "../components/ProfileDialog.tsx";
16
-
import { getGallery, getGalleryItemsAndPhotos } from "../gallery.ts";
17
-
import { photoToView } from "../photo.ts";
15
+
import { getActorPhotos, getActorProfile } from "../lib/actor.ts";
16
+
import { getGallery, getGalleryItemsAndPhotos } from "../lib/gallery.ts";
17
+
import { photoToView } from "../lib/photo.ts";
18
18
import type { State } from "../state.ts";
19
19
20
20
export const createGallery: RouteHandler = (
+1
-1
src/routes/explore.tsx
+1
-1
src/routes/explore.tsx
···
4
4
import { BffContext, RouteHandler, WithBffMeta } from "@bigmoves/bff";
5
5
import { Input } from "@bigmoves/bff/components";
6
6
import { ComponentChildren } from "preact";
7
-
import { profileToView } from "../actor.ts";
8
7
import { ActorAvatar } from "../components/ActorAvatar.tsx";
8
+
import { profileToView } from "../lib/actor.ts";
9
9
import { getPageMeta } from "../meta.ts";
10
10
import type { State } from "../state.ts";
11
11
+1
-1
src/routes/gallery.tsx
+1
-1
src/routes/gallery.tsx
···
2
2
import { Record as Gallery } from "$lexicon/types/social/grain/gallery.ts";
3
3
import { BffContext, RouteHandler, WithBffMeta } from "@bigmoves/bff";
4
4
import { GalleryPage } from "../components/GalleryPage.tsx";
5
-
import { getGallery, getGalleryFavs } from "../gallery.ts";
5
+
import { getGallery, getGalleryFavs } from "../lib/gallery.ts";
6
6
import { getGalleryMeta, getPageMeta } from "../meta.ts";
7
7
import type { State } from "../state.ts";
8
8
import { galleryLink } from "../utils.ts";
+1
-1
src/routes/notifications.tsx
+1
-1
src/routes/notifications.tsx
···
5
5
import { AtUri } from "@atproto/syntax";
6
6
import { BffContext, RouteHandler } from "@bigmoves/bff";
7
7
import { NotificationsPage } from "../components/NotificationsPage.tsx";
8
-
import { getGallery } from "../gallery.ts";
8
+
import { getGallery } from "../lib/gallery.ts";
9
9
import type { State } from "../state.ts";
10
10
11
11
export const handler: RouteHandler = (
+3
-3
src/routes/profile.tsx
+3
-3
src/routes/profile.tsx
···
1
1
import { Record as BskyFollow } from "$lexicon/types/app/bsky/graph/follow.ts";
2
2
import { BffContext, RouteHandler, WithBffMeta } from "@bigmoves/bff";
3
-
import { getActorGalleries, getActorProfile } from "../actor.ts";
4
3
import { ProfilePage } from "../components/ProfilePage.tsx";
5
-
import { getFollow } from "../follow.ts";
4
+
import { getActorGalleries, getActorProfile } from "../lib/actor.ts";
5
+
import { getFollow } from "../lib/follow.ts";
6
+
import { getActorTimeline } from "../lib/timeline.ts";
6
7
import { getPageMeta } from "../meta.ts";
7
8
import type { State } from "../state.ts";
8
-
import { getActorTimeline } from "../timeline.ts";
9
9
import { profileLink } from "../utils.ts";
10
10
11
11
export const handler: RouteHandler = (
+1
-1
src/routes/timeline.tsx
+1
-1
src/routes/timeline.tsx
···
1
1
import { BffContext, RouteHandler } from "@bigmoves/bff";
2
2
import { getCookies, setCookie } from "@std/http";
3
3
import { Timeline } from "../components/Timeline.tsx";
4
+
import { getTimeline } from "../lib/timeline.ts";
4
5
import { getPageMeta } from "../meta.ts";
5
6
import type { State } from "../state.ts";
6
-
import { getTimeline } from "../timeline.ts";
7
7
8
8
export const handler: RouteHandler = (
9
9
req,
+1
-1
src/routes/upload.tsx
+1
-1
src/routes/upload.tsx
···
1
1
import { BffContext, RouteHandler } from "@bigmoves/bff";
2
-
import { getActorPhotos } from "../actor.ts";
3
2
import { UploadPage } from "../components/UploadPage.tsx";
3
+
import { getActorPhotos } from "../lib/actor.ts";
4
4
import { getPageMeta } from "../meta.ts";
5
5
import type { State } from "../state.ts";
6
6
import { galleryLink } from "../utils.ts";
+2
-2
src/state.ts
+2
-2
src/state.ts
···
3
3
import { Un$Typed } from "$lexicon/util.ts";
4
4
import { BffMiddleware } from "@bigmoves/bff";
5
5
import { MetaDescriptor } from "@bigmoves/bff/components";
6
-
import { getActorProfile } from "./actor.ts";
7
-
import { getNotifications } from "./notifications.ts";
6
+
import { getActorProfile } from "./lib/actor.ts";
7
+
import { getNotifications } from "./lib/notifications.ts";
8
8
9
9
export type State = {
10
10
profile?: ProfileView;
src/timeline.ts
src/lib/timeline.ts
src/timeline.ts
src/lib/timeline.ts
+1
-11
src/uploads.tsx
src/lib/uploads.tsx
+1
-11
src/uploads.tsx
src/lib/uploads.tsx
···
1
1
import { Record as Photo } from "$lexicon/types/social/grain/photo.ts";
2
2
import { BffMiddleware, route, RouteHandler } from "@bigmoves/bff";
3
-
import { PhotoPreview } from "./components/PhotoPreview.tsx";
3
+
import { PhotoPreview } from "../components/PhotoPreview.tsx";
4
4
import { photoThumb } from "./photo.ts";
5
5
6
6
function uploadPhoto(): RouteHandler {
···
64
64
),
65
65
];
66
66
}
67
-
68
-
// export function avatarUploadRoutes(): BffMiddleware[] {
69
-
// return [
70
-
// route(
71
-
// `/actions/avatar/upload`,
72
-
// ["POST"],
73
-
// uploadPhoto(),
74
-
// ),
75
-
// ];
76
-
// }