<% if notice.present? %>
<%= notice %>
<% end %>
<% if alert.present? %>
<%= alert %>
<% end %>
<%= @stats[:total] %>
Total
<%= @stats[:unseen] %>
Unseen
<%= @stats[:learning] %>
Learning
<%= @stats[:known] %>
Known
<%= @stats[:due] %>
Due Now
<% if @stats[:unseen] > 0 %>
<%= link_to "Filter words (#{@stats[:unseen]} unseen)", filter_path, class: "btn btn-primary" %>
<% end %>
<% if @stats[:due] > 0 %>
<%= link_to "Review (#{@stats[:due]} due)", review_path, class: "btn btn-success" %>
<% end %>
<% if @stats[:learning] > 0 && @stats[:due] == 0 %>
<%= link_to "Review queue (#{@stats[:learning]} upcoming)", review_path, class: "btn btn-outline" %>
<% end %>
Import words
One entry per line or upload a .txt/.csv file.
Formats: word - definition |
word: definition | word | definition |
just word
<%= form_with url: words_path, method: :post, local: false, data: { turbo: false }, multipart: true do |f| %>
<%= f.file_field :word_file, accept: ".txt,.csv,.tsv", class: "file-input" %>
or paste below
<%= f.text_area :word_list, placeholder: "ephemeral - lasting for a very short time\npersistent\ntenacious: holding firmly to a purpose", rows: 8, class: "import-textarea" %>
<%= f.submit "Import", class: "btn btn-primary" %>
<% end %>
<% if @words.any? %>
All words (<%= @words.count %>)
<% @words.each do |word| %>
">
| <%= word.text %> |
<%= word.definition.presence || "-" %> |
<%= word.review&.status || "new" %>
<% if word.review&.status == "learning" && word.review.due_at %>
<%= word.review.due_label %>
<% end %>
|
<%= button_to "x", word_path(word), method: :delete, class: "btn-del", data: { turbo_confirm: "Remove #{word.text}?" } %>
|
<% end %>
<% end %>