+6
-4
src/screens/Settings/components/ExportCarDialog.tsx
+6
-4
src/screens/Settings/components/ExportCarDialog.tsx
···
6
import {saveBytesToDisk} from '#/lib/media/manip'
7
import {logger} from '#/logger'
8
import {useAgent} from '#/state/session'
9
-
import * as Toast from '#/view/com/util/Toast'
10
-
import {atoms as a, useTheme} from '#/alf'
11
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
12
import * as Dialog from '#/components/Dialog'
13
import {Download_Stroke2_Corner0_Rounded as DownloadIcon} from '#/components/icons/Download'
14
import {InlineLinkText} from '#/components/Link'
15
import {Loader} from '#/components/Loader'
16
import {Text} from '#/components/Typography'
17
18
export function ExportCarDialog({
···
44
}
45
} catch (e) {
46
logger.error('Error occurred while downloading CAR file', {message: e})
47
-
Toast.show(_(msg`Error occurred while saving file`), 'xmark')
48
} finally {
49
setLoading(false)
50
control.close()
···
56
<Dialog.Handle />
57
<Dialog.ScrollableInner
58
accessibilityDescribedBy="dialog-description"
59
-
accessibilityLabelledBy="dialog-title">
60
<View style={[a.relative, a.gap_lg, a.w_full]}>
61
<Text nativeID="dialog-title" style={[a.text_2xl, a.font_bold]}>
62
<Trans>Export My Data</Trans>
···
105
</Trans>
106
</Text>
107
</View>
108
</Dialog.ScrollableInner>
109
</Dialog.Outer>
110
)
···
6
import {saveBytesToDisk} from '#/lib/media/manip'
7
import {logger} from '#/logger'
8
import {useAgent} from '#/state/session'
9
+
import {atoms as a, useTheme, web} from '#/alf'
10
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
11
import * as Dialog from '#/components/Dialog'
12
import {Download_Stroke2_Corner0_Rounded as DownloadIcon} from '#/components/icons/Download'
13
import {InlineLinkText} from '#/components/Link'
14
import {Loader} from '#/components/Loader'
15
+
import * as Toast from '#/components/Toast'
16
import {Text} from '#/components/Typography'
17
18
export function ExportCarDialog({
···
44
}
45
} catch (e) {
46
logger.error('Error occurred while downloading CAR file', {message: e})
47
+
Toast.show(_(msg`Error occurred while saving file`), {type: 'error'})
48
} finally {
49
setLoading(false)
50
control.close()
···
56
<Dialog.Handle />
57
<Dialog.ScrollableInner
58
accessibilityDescribedBy="dialog-description"
59
+
accessibilityLabelledBy="dialog-title"
60
+
style={web({maxWidth: 500})}>
61
<View style={[a.relative, a.gap_lg, a.w_full]}>
62
<Text nativeID="dialog-title" style={[a.text_2xl, a.font_bold]}>
63
<Trans>Export My Data</Trans>
···
106
</Trans>
107
</Text>
108
</View>
109
+
<Dialog.Close />
110
</Dialog.ScrollableInner>
111
</Dialog.Outer>
112
)