{% extends "base.html" %} {% from "icons.html" import icon, sep %} {% from "ui.html" import csrf_field, file_input with context %} {% block title %}{{ _("Import") }} · {{ space.name }} · Synaptane{% endblock %} {% block crumbs %}{{ sep() }}{{ org.name }}{{ sep() }}{{ space.name }}{{ sep() }}{{ _("Import") }}{% endblock %} {% block content %} {% set base = '/o/' ~ org.slug ~ '/' ~ space.slug ~ '/-/import' %} {% macro paths(items) -%} {% if items|length > shown %}

{{ _("and {count} more", count=items|length - shown) }}

{% endif %} {%- endmacro %}

{{ _("Import a zip of Markdown files") }}

{% if plan is none %}

{{ _("An Obsidian vault, or any folder of Markdown files, zipped with its attachments. Nothing is written yet: you will see what the archive holds first. Files are kept as they are, and nothing already in the space is overwritten.") }}

{{ csrf_field() }}
{{ file_input("archive", "archive", required=true) }}
{% else %} {% set count = plan.new|length %}

{{ _(pl(plan.pages, "{n} page", "{n} pages"), n=plan.pages) }} · {{ _(pl(plan.attachments, "{n} attachment", "{n} attachments"), n=plan.attachments) }}{% if plan.folder %} · {{ _("into {folder}", folder=plan.folder) }}{% endif %}

{{ csrf_field() }} {% if plan.with_secrets %}

{{ _("Likely secrets") }} {{ plan.with_secrets|length }}

{{ _("These files are left out: a secret pushed to Git is hard to erase. Tick one only if it holds no real secret.") }}

{% if plan.with_secrets|length > shown %}

{{ _("and {count} more", count=plan.with_secrets|length - shown) }}

{% endif %}
{% endif %}
{% if plan.new %}
{{ _("Files to import") }} {{ count }}{{ paths(plan.new|map(attribute="path")|list) }}
{% endif %} {% if plan.existing %}
{{ _("Already in the space, left as they are") }} {{ plan.existing|length }}{{ paths(plan.existing) }}
{% endif %} {% if plan.too_large %}
{{ _("Too large (25 MB maximum per file), left out") }} {{ plan.too_large|length }}{{ paths(plan.too_large) }}
{% endif %} {% if plan.refused %}
{{ _("Refused: unsafe path, link, encrypted file or folder conflict") }} {{ plan.refused|length }}{{ paths(plan.refused) }}
{% endif %} {% if plan.left_out %}

{{ _(pl(plan.left_out, "{n} hidden or system file left out (.obsidian, .trash…).", "{n} hidden or system files left out (.obsidian, .trash…)."), n=plan.left_out) }}

{% endif %}
{% if plan.new or plan.with_secrets %}{% else %}

{{ _("Nothing to import.") }}

{% endif %}
{{ csrf_field() }}
{% endif %} {% endblock %}