Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit 47b5356

Browse files
feat: export file types
Signed-off-by: peterpeterparker <[email protected]>
1 parent 2fa015e commit 47b5356

File tree

8 files changed

+40
-33
lines changed

8 files changed

+40
-33
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
### Providers: New
66

77
- offline: v0.0.6 ([CHANGELOG](https://github.com/deckgo/deckdeckgo/blob/main/providers/offline/CHANGELOG.md))
8-
- sync: v0.0.20 ([CHANGELOG](https://github.com/deckgo/deckdeckgo/blob/main/providers/offline/CHANGELOG.md))
8+
- sync: v0.0.21 ([CHANGELOG](https://github.com/deckgo/deckdeckgo/blob/main/providers/offline/CHANGELOG.md))
99

1010
### Providers
1111

providers/sync/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 0.0.20 (2022-04-03)
1+
# 0.0.20 - 0.0.21 (2022-04-03)
22

33
### Features
44

providers/sync/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@deckdeckgo/sync",
3-
"version": "0.0.20",
3+
"version": "0.0.21",
44
"author": "David Dal Busco",
55
"description": "Sync data and auth providers for DeckDeckGo editors.",
66
"license": "AGPL-3.0-or-later",

providers/sync/src/services/file-system.service.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,7 @@ export const importData = async (file: File): Promise<'doc' | 'deck'> => {
3030
return result;
3131
};
3232

33-
export const exportData = async ({
34-
types = [
35-
{
36-
description: 'DeckDeckGo Files',
37-
accept: {
38-
'application/octet-stream': ['.ddg']
39-
}
40-
}
41-
]
42-
}: {
43-
types: FilePickerAcceptType[];
44-
}) => {
33+
export const exportData = async ({types}: {types: FilePickerAcceptType[]}) => {
4534
if (!isDeckEdited() && !isDocEdited()) {
4635
throw new Error('No deck or doc found');
4736
}

studio/package-lock.json

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

studio/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"@deckdeckgo/social-img": "^1.1.0",
5353
"@deckdeckgo/studio": "^0.0.15",
5454
"@deckdeckgo/styles": "^1.4.2",
55-
"@deckdeckgo/sync": "^0.0.18",
55+
"@deckdeckgo/sync": "^0.0.21",
5656
"@deckdeckgo/utils": "^5.1.0",
5757
"@deckdeckgo/word-cloud": "^1.2.0",
5858
"@ionic/core": "^5.9.1",

studio/src/app/components/core/nav/app-navigation-end/app-navigation-end.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,16 @@ export class AppNavigationEnd {
3939

4040
private async exportData() {
4141
try {
42-
await exportData();
42+
await exportData({
43+
types: [
44+
{
45+
description: 'DeckDeckGo Files',
46+
accept: {
47+
'application/octet-stream': ['.ddg']
48+
}
49+
}
50+
]
51+
});
4352
} catch (err) {
4453
throwError(`Something went wrong. ${err}.`);
4554
}

studio/src/app/components/core/nav/app-navigation-start/app-navigation-start.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,16 @@ export class AppNavigationStart {
2424

2525
private async exportData() {
2626
try {
27-
await exportData();
27+
await exportData({
28+
types: [
29+
{
30+
description: 'DeckDeckGo Files',
31+
accept: {
32+
'application/octet-stream': ['.ddg']
33+
}
34+
}
35+
]
36+
});
2837
} catch (err) {
2938
throwError(`Something went wrong. ${err}.`);
3039
}

0 commit comments

Comments
 (0)