Skip to content

Commit 999332c

Browse files
committed
feat(rtdb): resolved merge conflicts
2 parents b56e48d + 64a3cd2 commit 999332c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+799
-517
lines changed

.github/workflows/run-tests.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,19 @@ on:
55
branches: [master, main]
66
pull_request:
77
branches: [master, main]
8-
8+
99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
12-
12+
env:
13+
NODE_ENV: ci
1314
steps:
1415
- uses: actions/checkout@v2
1516
- uses: actions/setup-node@v2
1617
with:
1718
node-version: 18
1819
- run: npm ci
19-
- run: npx playwright install --with-deps
20+
- run: npx playwright install --with-deps chromium
2021
- run: npx playwright test
2122
- uses: actions/upload-artifact@v3
2223
if: always()

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ Collections can also take a Firestore Query instead of a path:
325325
</Collection>
326326
```
327327

328+
<<<<<<< HEAD
328329
### Node
329330

330331
Fetch a single node from the Realtime Database and listen to its data in realtime. The `data` slot prop gives you access to the fetched data, and the `ref` provides the Realtime Database reference.
@@ -373,6 +374,48 @@ Fetch lists of nodes from the Realtime Database and listen to their data in real
373374
{/each}
374375
</NodeList>
375376
```
377+
=======
378+
### DownloadLink
379+
380+
DownloadLink provides a `link` to download a file from Firebase Storage and its `reference`.
381+
382+
```svelte
383+
<DownloadLink ref={item} let:link let:ref>
384+
<a href="{link}" download>Download {ref?.name}</a>
385+
</DownloadLink>
386+
```
387+
388+
### StorageList
389+
390+
StorageList provides a list of `items` and `prefixes` corresponding to the list of objects and sub-folders at a given Firebase Storage path.
391+
392+
```svelte
393+
<StorageList ref="/" let:list>
394+
<ul>
395+
{#if list === null}
396+
<li>Loading...</li>
397+
{:else if list.prefixes.length === 0 && list.items.length === 0}
398+
<li>Empty</li>
399+
{:else}
400+
<!-- Listing the prefixes -->
401+
{#each list.prefixes as prefix}
402+
<li>
403+
{prefix.name}
404+
</li>
405+
{/each}
406+
<!-- Listing the objects in the given folder -->
407+
{#each list.items as item}
408+
<li>
409+
{item.name}
410+
</li>
411+
{/each}
412+
{/if}
413+
</ul>
414+
</StorageList>
415+
```
416+
417+
You can combine
418+
>>>>>>> upstream/master
376419
377420
### Using Components Together
378421

dist/components/Collection.svelte

Lines changed: 0 additions & 13 deletions
This file was deleted.

dist/components/Collection.svelte.d.ts

Lines changed: 0 additions & 26 deletions
This file was deleted.

dist/components/Doc.svelte

Lines changed: 0 additions & 13 deletions
This file was deleted.

dist/components/Doc.svelte.d.ts

Lines changed: 0 additions & 25 deletions
This file was deleted.

dist/components/FirebaseApp.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
export let firestore;
33
export let rtdb;
44
export let auth;
5-
setFirebaseContext({ firestore, rtdb, auth });
5+
export let storage;
6+
setFirebaseContext({ firestore, rtdb, auth, storage });
67
</script>
78

89
<slot />

dist/components/FirebaseApp.svelte.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ import { SvelteComponent } from "svelte";
22
import type { Auth } from "firebase/auth";
33
import type { Firestore } from "firebase/firestore";
44
import type { Database } from "firebase/database";
5+
import type { FirebaseStorage } from "firebase/storage";
56
declare const __propDef: {
67
props: {
78
firestore: Firestore;
89
rtdb: Database;
910
auth: Auth;
11+
storage: FirebaseStorage;
1012
};
1113
events: {
1214
[evt: string]: CustomEvent<any>;

dist/components/SignedIn.svelte

Lines changed: 0 additions & 10 deletions
This file was deleted.

dist/components/SignedIn.svelte.d.ts

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)