diff --git a/app/assets/stylesheets/import.css b/app/assets/stylesheets/import.css new file mode 100644 index 000000000..5ab6b2cc5 --- /dev/null +++ b/app/assets/stylesheets/import.css @@ -0,0 +1,33 @@ +@layer components { + .import-status { + --import-status-border-color: var(--color-ink-light); + --import-status-color: var(--color-ink); + + border: 1px dashed var(--import-status-border-color); + border-radius: 1ch; + color: var(--import-status-color); + font-size: var(--text-medium); + padding: 1.5ch; + + .btn { + font-size: var(--text-small); + margin-block-start: 1.5ch; + } + } + + .import-status--success { + --import-status-border-color: var(--color-positive); + --import-status-color: var(--color-positive); + } + + .import-status--error { + --import-status-border-color: var(--color-negative); + --import-status-color: var(--color-negative); + } + + @keyframes dash { + to { + background-position: 100% 0%, 0% 100%, 0% 0%, 100% 100%; + } + } +} diff --git a/app/assets/stylesheets/utilities.css b/app/assets/stylesheets/utilities.css index 76dedfe12..53837034c 100644 --- a/app/assets/stylesheets/utilities.css +++ b/app/assets/stylesheets/utilities.css @@ -32,6 +32,7 @@ .txt-link { color: var(--color-link); text-decoration: underline; } .font-weight-normal { font-weight: normal; } + .font-weight-semibold { font-weight: 600; } .font-weight-bold { font-weight: bold; } .font-weight-black { font-weight: 900; } diff --git a/app/views/account/imports/new.html.erb b/app/views/account/imports/new.html.erb index fd837a7b6..ab6af3a51 100644 --- a/app/views/account/imports/new.html.erb +++ b/app/views/account/imports/new.html.erb @@ -1,9 +1,15 @@ <% @page_title = "Import an account" %> - -
Your import is in progress. This may take a while for large accounts.
+Your import has completed successfully!
- <%= link_to "Go to your account", landing_url(script_name: @import.account.slug), class: "btn btn--link center txt-medium" %> +Your import failed.
- <% if @import.failed_due_to_conflict? %> -It looks like the account you are trying to import already exists.
- <% elsif @import.failed_due_to_invalid_export? %> -The ZIP file isn't a Fizzy account export.
- <% else %> -This may be due to corrupted export data or a conflict with existing data. Please try again with a fresh export.
- <% end %> - <%= link_to "Try again", new_account_import_path, class: "btn btn--plain center txt-medium" %> +