-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathshow.html.erb
More file actions
37 lines (33 loc) · 1.69 KB
/
Copy pathshow.html.erb
File metadata and controls
37 lines (33 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<% @page_title = "Import status" %>
<%= turbo_stream_from @import %>
<div class="panel panel--centered flex flex-column gap-half" style="--panel-size: 54ch;">
<h1 class="txt-x-large font-weight-black margin-block-end">Import status</h1>
<% case @import.status %>
<% when "pending", "processing" %>
<div class="import-status">
Your import is in progress. This may take a while for large accounts.
</div>
<% when "completed" %>
<div class="import-status import-status--success">
<div><strong>Your import was successful!</strong></div>
<%= link_to "Go to your account →", landing_url(script_name: @import.account.slug), class: "btn btn--link" %>
</div>
<% when "failed" %>
<div class="import-status import-status--error">
<div><strong>Import failed</strong></div>
<% if @import.failed_due_to_conflict? %>
<div>The account you’re trying to import already exists. Make sure you’re importing a <%= Fizzy.saas? ? "self-hosted" : "fizzy.do" %> account.</div>
<% elsif @import.failed_due_to_invalid_export? %>
<div>The .zip file you uploaded doesn’t look like a Fizzy account export.</div>
<% elsif @import.failed_due_to_insufficient_disk_space? %>
<div>Your server doesn’t have enough free disk space for this import. Free up at least twice the export file’s size and try again.</div>
<% else %>
<div>This may be due to corrupted export data or a conflict with existing data. Please try again with a fresh export.</div>
<% end %>
<%= link_to "Try again", new_account_import_path, class: "btn" %>
</div>
<% end %>
</div>
<% content_for :footer do %>
<%= render "sessions/footer" %>
<% end %>