update alert dialog text
This commit is contained in:
parent
c8a1dd41b7
commit
e984acbd30
3 changed files with 15 additions and 32 deletions
|
@ -32,6 +32,7 @@ const StyledDescription = styled(AlertDialogPrimitive.Description, {
|
|||
textAlign: 'center',
|
||||
minWidth: 0,
|
||||
alignSelf: 'center',
|
||||
maxWidth: '62%',
|
||||
})
|
||||
|
||||
const AlertDialogRoot = AlertDialogPrimitive.Root
|
||||
|
@ -53,10 +54,9 @@ export const Alert = ({ container, description, open, onClose }: AlertProps) =>
|
|||
<AlertDialogDescription>{description}</AlertDialogDescription>
|
||||
<div
|
||||
style={{
|
||||
width: '100%',
|
||||
gap: '$6',
|
||||
display: 'flex',
|
||||
justifyContent: 'flex-end',
|
||||
justifyContent: 'center',
|
||||
width: 'auto',
|
||||
}}
|
||||
>
|
||||
<AlertDialogAction asChild>
|
||||
|
@ -110,4 +110,5 @@ const Button = styled('button', {
|
|||
color: '$text',
|
||||
cursor: 'pointer',
|
||||
minWidth: 48,
|
||||
width: 'max-content',
|
||||
})
|
||||
|
|
|
@ -1367,7 +1367,6 @@ export class TldrawApp extends StateManager<TDSnapshot> {
|
|||
this.resetHistory()
|
||||
this.clearSelectHistory()
|
||||
this.session = undefined
|
||||
// this set it and set it back to the default document
|
||||
|
||||
const state = {
|
||||
...TldrawApp.defaultState,
|
||||
|
@ -1399,36 +1398,19 @@ export class TldrawApp extends StateManager<TDSnapshot> {
|
|||
loadDocumentFromURL = (page: TDPage, pageState: Record<string, TLPageState>) => {
|
||||
const { currentPageId } = this
|
||||
const pageId = page.id
|
||||
const state = {
|
||||
id: 'create_page',
|
||||
before: {
|
||||
appState: {
|
||||
currentPageId,
|
||||
},
|
||||
document: {
|
||||
pages: {
|
||||
[pageId]: undefined,
|
||||
},
|
||||
pageStates: {
|
||||
[pageId]: undefined,
|
||||
},
|
||||
},
|
||||
const nextDocument = {
|
||||
...this.state.document,
|
||||
pageStates: {
|
||||
...this.state.document.pageStates,
|
||||
[pageId]: pageState,
|
||||
},
|
||||
after: {
|
||||
appState: {
|
||||
currentPageId: page.id,
|
||||
},
|
||||
document: {
|
||||
pages: {
|
||||
[pageId]: page,
|
||||
},
|
||||
pageStates: {
|
||||
[pageId]: pageState,
|
||||
},
|
||||
},
|
||||
pages: {
|
||||
...this.document.pages,
|
||||
[pageId]: page,
|
||||
},
|
||||
}
|
||||
return this.setState(state)
|
||||
this.loadDocument(nextDocument as TDDocument)
|
||||
this.persist({})
|
||||
}
|
||||
|
||||
// Should we move this to the app layer? onSave, onSaveAs, etc?
|
||||
|
|
|
@ -121,7 +121,7 @@
|
|||
"share": "Share",
|
||||
"copy.current.page.link": "Copy Current Page Link",
|
||||
"copy.project.link": "Copy Project Link",
|
||||
"data.too.big.encoded": "Data is too big to be encoded into an URL",
|
||||
"data.too.big.encoded": "Data is too big to be encoded into an URL. Do not include image or video!",
|
||||
"dialog.save.firsttime": "Do you want to save your current project?",
|
||||
"dialog.save.again": "Do you want to save changes to your current project?",
|
||||
"dialog.cancel": "Cancel",
|
||||
|
|
Loading…
Reference in a new issue