Skip to content

Commit

Permalink
Add icons for remote favorite paths
Browse files Browse the repository at this point in the history
  • Loading branch information
robinkar committed Sep 27, 2023
1 parent a616727 commit 3d41c92
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/dashboard/app/apps/ood_app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def links
subtitle: favorite_path.title ? favorite_path.path.to_s : nil,
description: manifest.description,
url: OodAppkit::Urls::Files.new(base_url: url).url(path: favorite_path.path.to_s, fs: favorite_path.filesystem),
icon_uri: "fas://folder",
icon_uri: favorite_path.remote? ? "fas://cloud" : "fas://folder",
caption: caption,
new_tab: open_in_new_window?,
tile: tile
Expand Down
7 changes: 6 additions & 1 deletion apps/dashboard/app/views/files/_favorites.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
<ul id="favorites" class="nav nav-pills flex-column">
<li role="presentation" class="nav-item"><%= link_to 'Home Directory', files_path(Dir.home), class: "nav-link d bg-light" %></li>
<% OodFilesApp.new.favorite_paths.each do |p| %>
<li class="nav-item"><%= link_to p.title || p.path.to_s, files_path(p.filesystem, p.path.to_s), class: "nav-link d bg-light" %>
<li class="nav-item">
<%= link_to files_path(p.filesystem, p.path.to_s), class: "nav-link d bg-light" do %>
<%= fa_icon "cloud", classes: '' %>
<%= p.title || p.path.to_s %>
<% end %>
</li>
<% end %>
</ul>
</nav>

0 comments on commit 3d41c92

Please sign in to comment.