Skip to content

Commit

Permalink
Add beta to MyVault
Browse files Browse the repository at this point in the history
  • Loading branch information
cguess committed Mar 29, 2024
1 parent 3255632 commit 7724000
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
4 changes: 3 additions & 1 deletion app/views/layouts/media_vault/_header.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
<ol id="site-nav__primary" class="site-nav__links">
<% if current_user.can_access_media_vault? %>
<li><%= link_to media_vault_dashboard_path, class: "btn btn--naked" do %><span>Dashboard</span><% end %></li>
<% if Flipper.enabled?(:adhoc, current_user) %><li><%= link_to media_vault_myvault_path, class: "btn btn--naked" do %><span>MyVault</span><% end %></li><% end %>
<% if Flipper.enabled?(:adhoc, current_user) %>
<li><%= link_to media_vault_myvault_path, class: "btn btn--naked" do %><span>MyVault&nbsp;<span style="font-size: .7rem; vertical-align: text-top;" class="super">Beta</span></span><% end %></li>
<% end %>
<li><%= link_to media_vault_guide_path, class: "btn btn--naked" do %><span>Guide<span class="hideable"> to MediaVault</span></span><% end %></li>
<li class="site-nav__search">
<%= render partial: "media_vault/search/search_box", locals: { myvault: @myvault } %>
Expand Down
8 changes: 7 additions & 1 deletion app/views/media_vault/archive/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
<%# Make this change dpeending on if we're in MyVault or not %>
<div class="flex justify-between flex-col md:flex-row lg:flex-row">
<div>
<h2><%= @myvault ? "MyVault:" : "Recently-archived media:" %></h2>
<h2>
<% if @myvault %>
MyVault&nbsp;<span style="font-size: 1.5rem; vertical-align: text-top; color: gray;" class="super">Beta</span>:
<% else %>
Recently-archived media:
<% end %>
</h2>
</div>
<% if Flipper.enabled?(:adhoc, current_user) %>
<div>
Expand Down
8 changes: 6 additions & 2 deletions app/views/media_vault/search/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@

<% if (@results || []).any? %>
<% if @author_results.try(:any?) %>
<h2 class="search-results__title"><%= pluralize(@author_results.length, "matching author") %> found<%= " in your MyVault" if @myvault %>:</h2>
<h2 class="search-results__title">
<%= pluralize(@author_results.length, "matching author") %> found<% if @myvault %> in your MyVault&nbsp;<span style="font-size: 1.5rem; vertical-align: text-top; color: gray;" class="super">Beta</span><% end %>
</h2>
<div class="search-results search-results--authors">
<% @author_results.each do |author| %>
<%= link_to media_vault_author_path(author, platform: author.platform), class: "search-result" do %>
Expand All @@ -28,7 +30,9 @@
<% end %>

<% if @post_results.any? %>
<h2 class="search-results__title"><%= pluralize(@post_results.length, "matching post") %> found<%= " in your MyVault" if @myvault %>:</h2>
<h2 class="search-results__title">
<%= pluralize(@post_results.length, "matching post") %> found<% if @myvault %> in your MyVault&nbsp;<span style="font-size: 1.5rem; vertical-align: text-top; color: gray;" class="super">Beta</span><% end %>:
</h2>
<div class="search-results search-results--posts archive-items archive-items--boxed-items archive-items--masonry">
<% @post_results.each do |post| %>
<%= render partial: "media_vault/media/archive_item", locals: { preview: true, **post.normalized_attrs_for_views } %>
Expand Down

0 comments on commit 7724000

Please sign in to comment.