@@ -5,12 +5,6 @@ import { chunk } from 'lodash'
55import Link from 'next/link'
66import { useState } from 'react'
77import { useApp } from '~/components/app-provider'
8- import {
9- Accordion ,
10- AccordionContent ,
11- AccordionItem ,
12- AccordionTrigger ,
13- } from '~/components/ui/accordion'
148import { Button } from '~/components/ui/button'
159import { Dialog , DialogContent , DialogHeader , DialogTitle } from '~/components/ui/dialog'
1610import { Progress } from '~/components/ui/progress'
@@ -23,12 +17,7 @@ import {
2317 readableStreamFromIterable ,
2418 transformStreamFromFn ,
2519} from '~/lib/streams'
26- import {
27- currentDomainHostname ,
28- currentDomainUrl ,
29- downloadFile ,
30- legacyDomainHostname ,
31- } from '~/lib/util'
20+ import { downloadFile } from '~/lib/util'
3221
3322export default function Page ( ) {
3423 const { dbManager } = useApp ( )
@@ -42,61 +31,15 @@ export default function Page() {
4231 < DialogTitle > Export your databases</ DialogTitle >
4332 < div className = "py-2 border-b" />
4433 </ DialogHeader >
34+ < p > All databases live locally within your browser's local IndexedDB storage.</ p >
4535 < p >
46- { legacyDomainHostname } is renaming to { currentDomainHostname } , which means you need to
47- transfer your databases if you wish to continue using them .
36+ You can backup and restore your databases in order to transfer them between browsers or
37+ devices .
4838 </ p >
4939
50- < Accordion type = "single" collapsible >
51- < AccordionItem value = "item-1" className = "border rounded-md" >
52- < AccordionTrigger className = "p-0 gap-2 px-3 py-2" >
53- < div className = "flex gap-2 items-center font-normal text-lighter text-sm" >
54- < span >
55- Why is { legacyDomainHostname } renaming to { currentDomainHostname } ?
56- </ span >
57- </ div >
58- </ AccordionTrigger >
59- < AccordionContent className = "p-3 prose prose-sm" >
60- This project is not an official Postgres project and we don't want to mislead
61- anyone! We're renaming to{ ' ' }
62- < Link href = { currentDomainUrl } className = "underline" >
63- { currentDomainHostname }
64- </ Link > { ' ' }
65- because, well, that's what this does. This will still be 100% Postgres-focused,
66- just with a different URL.
67- </ AccordionContent >
68- </ AccordionItem >
69- </ Accordion >
70- < Accordion type = "single" collapsible >
71- < AccordionItem value = "item-1" className = "border rounded-md" >
72- < AccordionTrigger className = "p-0 gap-2 px-3 py-2" >
73- < div className = "flex gap-2 items-center font-normal text-lighter text-sm" >
74- < span > Why do I need to export my databases?</ span >
75- </ div >
76- </ AccordionTrigger >
77- < AccordionContent className = "p-3 prose prose-sm" >
78- < p >
79- Since PGlite databases are stored in your browser's IndexedDB storage, other
80- domains like{ ' ' }
81- < Link href = { currentDomainUrl } className = "underline" >
82- { currentDomainHostname }
83- </ Link > { ' ' }
84- cannot access them directly (this is a security restriction built into every
85- browser).
86- </ p >
87- < p >
88- If you'd like to continue using your previous databases and conversations:
89- < ol >
90- < li > Export them from { legacyDomainHostname } </ li >
91- < li > Import them to { currentDomainHostname } </ li >
92- </ ol >
93- </ p >
94- </ AccordionContent >
95- </ AccordionItem >
96- </ Accordion >
9740 < div className = "my-2 border-b" />
9841 < div className = "prose" >
99- < h4 className = "mb-4" > How to transfer your databases to { currentDomainHostname } </ h4 >
42+ < h4 className = "mb-4" > How to export and import your databases </ h4 >
10043 < ol >
10144 < li >
10245 Click < strong > Export</ strong > to download all of your databases into a single
@@ -158,12 +101,11 @@ export default function Page() {
158101 ) }
159102 < br />
160103 This tarball will contain every PGlite database's < code > pgdata</ code > dump
161- along with any files you imported or exported from { legacyDomainHostname } .
104+ along with any files that you imported or exported in your chats .
162105 </ li >
163106 < li >
164- Navigate to{ ' ' }
165- < Link href = { `${ currentDomainUrl } /import` } > { currentDomainHostname } /import</ Link > and
166- click < strong > Import</ strong > .
107+ Navigate to < Link href = "/import" > { window . location . origin } /import</ Link > and click{ ' ' }
108+ < strong > Import</ strong > .
167109 </ li >
168110 </ ol >
169111 </ div >
0 commit comments