tangled
alpha
login
or
join now
rocksky.app
/
rocksky
96
fork
atom
A decentralized music tracking and discovery platform built on AT Protocol 🎵
rocksky.app
spotify
atproto
lastfm
musicbrainz
scrobbling
listenbrainz
96
fork
atom
overview
issues
7
pulls
pipelines
[web] fix dropbox/googledrive navigation
tsiry-sandratraina.com
8 months ago
70534e43
4d2eee59
+26
-16
4 changed files
expand all
collapse all
unified
split
apps
web
src
api
dropbox.ts
googledrive.ts
pages
dropbox
Dropbox.tsx
googledrive
GoogleDrive.tsx
+6
apps/web/src/api/dropbox.ts
···
10
10
path: string;
11
11
fileId: string;
12
12
};
13
13
+
directory: {
14
14
+
id: string;
15
15
+
name: string;
16
16
+
path: string;
17
17
+
fileId: string;
18
18
+
};
13
19
directories: {
14
20
id: string;
15
21
name: string;
+6
apps/web/src/api/googledrive.ts
···
8
8
path: string;
9
9
fileId: string;
10
10
};
11
11
+
directory: {
12
12
+
id: string;
13
13
+
name: string;
14
14
+
path: string;
15
15
+
fileId: string;
16
16
+
};
11
17
directories: {
12
18
id: string;
13
19
name: string;
+7
-8
apps/web/src/pages/dropbox/Dropbox.tsx
···
19
19
20
20
const Dropbox = (props: DropboxProps) => {
21
21
const { data, isLoading } = useFilesQuery(props.fileId);
22
22
-
const { data: parent } = useFilesQuery(data?.parentDirectory?.fileId);
23
22
24
23
const playFile = async (id: string) => {
25
24
console.log(">> Playing file:", id);
···
155
154
{
156
155
<Link
157
156
to={
158
158
-
parent?.parentDirectory?.path === "/Music"
157
157
+
data?.parentDirectory?.path === "/Music"
159
158
? `/dropbox`
160
159
: `/dropbox/$id`
161
160
}
162
162
-
params={{ id: parent?.parentDirectory?.fileId || "" }}
161
161
+
params={{ id: data?.parentDirectory?.fileId || "" }}
163
162
className="!text-[var(--color-text)]"
164
163
>
165
165
-
{parent?.parentDirectory?.path === "/Music"
166
166
-
? ""
167
167
-
: parent?.parentDirectory?.name}
164
164
+
{data?.parentDirectory?.path === "/Music"
165
165
+
? "Dropbox"
166
166
+
: data?.parentDirectory?.name}
168
167
</Link>
169
168
}
170
169
</Breadcrumbs>
···
173
172
marginBottom={"25px"}
174
173
className="!text-[var(--color-text)]"
175
174
>
176
176
-
{data?.parentDirectory?.path === "/Music"
175
175
+
{data?.directory?.path === "/Music"
177
176
? "Dropbox"
178
178
-
: data?.parentDirectory?.name}
177
177
+
: data?.directory?.name}
179
178
</HeadingMedium>
180
179
</div>
181
180
+7
-8
apps/web/src/pages/googledrive/GoogleDrive.tsx
···
19
19
20
20
const GoogleDrive = (props: GoogleDriveProps) => {
21
21
const { data, isLoading } = useFilesQuery(props.fileId);
22
22
-
const { data: parent } = useFilesQuery(data?.parentDirectory?.fileId);
23
22
24
23
const columns = [
25
24
columnHelper.accessor("name", {
···
150
149
{
151
150
<Link
152
151
to={
153
153
-
parent?.parentDirectory?.path === "/Music"
152
152
+
data?.parentDirectory?.path === "/Music"
154
153
? `/googledrive`
155
154
: `/googledrive/$id`
156
155
}
157
157
-
params={{ id: parent?.parentDirectory?.fileId || "" }}
156
156
+
params={{ id: data?.parentDirectory?.fileId || "" }}
158
157
className="!text-[var(--color-text)]"
159
158
>
160
160
-
{parent?.parentDirectory?.path === "/Music"
161
161
-
? ""
162
162
-
: parent?.parentDirectory?.name}
159
159
+
{data?.parentDirectory?.path === "/Music"
160
160
+
? "Google Drive"
161
161
+
: data?.parentDirectory?.name}
163
162
</Link>
164
163
}
165
164
</Breadcrumbs>
···
168
167
marginBottom={"25px"}
169
168
className="!text-[var(--color-text)]"
170
169
>
171
171
-
{data?.parentDirectory?.path === "/Music"
170
170
+
{data?.directory?.path === "/Music"
172
171
? "Google Drive"
173
173
-
: data?.parentDirectory?.name}
172
172
+
: data?.directory?.name}
174
173
</HeadingMedium>
175
174
</div>
176
175