{{define "head"}}{{with .Data.Run}}{{if .Refresh}}{{end}}{{end}}{{end}}
{{define "content"}}{{$d := .Data}}
{{template "page-header" dict "Title" "Import from Notion" "Sub" "Copy pages from a Notion workspace into this team's Mapa."}}
{{template "notice" $d.Notice}}
{{template "form-error" $d.Error}}
{{with $d.Run}} Pages read so far: {{number L .Surveyed}}. The total isn't known until every shared page has been read. {{number L .Written}} of {{number L .Total}} so far. {{if eq .State "interrupted"}}Mapa restarted during the import.{{else}}You stopped the import.{{end}} It had {{if .Total}}written {{number L .Written}} of {{number L .Total}} pages{{else}}read {{number L .Surveyed}} pages{{end}}. Resume carries on from there. The report below shows how many pages were created, updated, kept, failed, and not imported. {{importFailure .Code}} This page refreshes itself every five seconds. Closing it doesn't stop the import. Nothing has happened for a while. Stop it, then resume.{{if eq .State "surveying"}}Reading Notion{{else if eq .State "writing"}}Writing pages{{else if eq .State "done"}}Run complete{{else if eq .State "interrupted"}}Interrupted{{else if eq .State "stopped"}}Stopped{{else}}The import failed{{end}}
{{if eq .State "surveying"}}
Images aren't set up in Mapa yet, so each image from Notion comes in as a line saying it wasn't imported. Run the import again once images are set up, and the pages nobody has edited get their pictures.
{{end}} {{with .Images}}{{if $.CanStart}}Imported images count against the team's image allowance, now {{.Team}} used, and, until each page is written, against yours, now {{.Own}}. If either fills, the run stops fetching images and says so; raise it, or free some, and run again.
{{end}}{{end}} {{if or .CanStop .CanResume .CanStart .CanStartOver}}Connected to {{if .Workspace}}the Notion workspace “{{.Workspace}}”{{else}}a Notion workspace{{end}}. Mapa holds its secret, sealed, and never shows it.
The previous import was ended. Connecting again starts a new import. It has no record of what the last one wrote, so it would create a second copy of every page it finds.
{{end}}Everything you share with this integration becomes a team page that every member of this team can read. Share only what the whole team should have.
No images were imported: images aren't set up in Mapa yet. Each one is a line in its page. Run the import again once images are set up.
{{end}}{{if hasSuffix .Label "allowance is full"}}Images stopped: {{.Label}}. Raise that allowance, or free some, and run the import again: the pages waiting for images are filled in.
{{end}}{{end}} {{with .Roots}}Started from: {{range $i, $r := .}}{{if $i}}, {{end}}“{{$r}}”{{end}}.
{{end}} {{if or .Pinned .Unpinned}}{{if not .Unpinned}}{{if eq .Pinned 1}}Pinned your top-level team page to your sidebar.{{else}}Pinned your {{number L .Pinned}} top-level team pages to your sidebar.{{end}}{{else if .Pinned}}Pinned {{number L .Pinned}} of your {{number L .Offered}} top-level team pages to your sidebar. Your sidebar holds {{number L .PinLimit}} pins.{{else if eq .Offered 1}}Your sidebar already holds {{number L .PinLimit}} pins, so your top-level team page wasn’t pinned. Unpin a page from sidebar first, then choose Pin to sidebar.{{else}}Your sidebar already holds {{number L .PinLimit}} pins, so your {{number L .Offered}} top-level team pages weren’t pinned. Unpin pages from sidebar first, then choose Pin to sidebar for each page.{{end}}
{{with .Unpinned}}