docbrown/app/views/admin/consumer_apps/index.html.erb
Rajat Talesra 93f73636c7
Post bootstrap changes - remove headings from admin.scss (#19019)
* h1 and h2 design fixes

* h2 redesign fixes

* Removed incorrect code

* Revert incorrect test code

* h3 heading redesign

* h4,h4,h5 headings redesign

* Minor design fixes

* Fixed all heading styles

* Test case fix

* Revert incorrect if condition

* Revert incorrect if condition

* Removed non required div
2023-02-02 15:52:35 +05:30

54 lines
2.3 KiB
Text

<div class="crayons-card p-3 mb-5 mt-2">
<header class="flex items-center mb-6">
<h1 class="crayons-title">Consumer Apps</h1>
<a href="<%= new_admin_consumer_app_path %>" class="crayons-btn ml-auto" role="button">New Consumer App</a>
</header>
<p>
Consumer apps are standalone mobile apps that users can use to browse <%= Settings::Community.community_name %> as an alternative to web browsers.
</p>
<p class="mt-3">
If the app is listed as <strong>operational</strong>, it means <%= Settings::Community.community_name %> will be able to deliver push notifications directly to users' devices.
</p>
</div>
<table class="crayons-table" width="100%">
<thead>
<tr>
<th scope="col">App Bundle</th>
<th scope="col">Platform</th>
<th scope="col">Devices</th>
<th scope="col">Authentication Key</th>
<th scope="col">Operational</th>
<th scope="col">Actions</th>
</tr>
</thead>
<tbody class="crayons-card">
<% @apps.each do |app| %>
<tr>
<td><%= app.app_bundle %></td>
<td><%= Device.platforms[app.platform] %></td>
<td><%= app.devices.count %></td>
<% if app.auth_credentials.present? %>
<td><span class="crayons-icon" role="img" aria-label="Authentication Key is available">✅</span></td>
<% else %>
<td><span class="crayons-icon" role="img" aria-label="Authentication Key is not available">❌</span></td>
<% end %>
<% if app.operational? %>
<td><span class="crayons-icon" role="img" aria-label="App is Operational">✅</span></td>
<% else %>
<td><span class="crayons-icon" role="img" aria-label="App is not Operational">❌</span></td>
<% end %>
<td>
<% if app.forem_app? %>
<span class="fs-xs">Forem apps are supported by default and can't be modified.</span>
<% else %>
<%= link_to "Edit", edit_admin_consumer_app_path(app), class: "crayons-btn crayons-btn--outlined" %>
<%= link_to "Destroy", admin_consumer_app_path(app), class: "crayons-btn crayons-btn--danger", method: :delete, data: { confirm: "Are you sure?" } %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>