Remove bootstrap from admin/consumer_apps & admin/welcome and use Crayons (#18861)

* Removed bootstrap from admin/consumer_apps

* Removed bootstrap from admin/weclome

* Nit fix

* Minor design fix
This commit is contained in:
Rajat Talesra 2022-12-20 11:48:33 +05:30 committed by GitHub
parent 9c8d6ba51b
commit bec8283399
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 20 deletions

View file

@ -1,19 +1,21 @@
<div class="form-group">
<%= label_tag :app_bundle, "App Bundle:" %>
<%= text_field_tag :app_bundle, @app.app_bundle, class: "form-control" %>
</div>
<div class="flex flex-col gap-4">
<div class="crayons-field">
<%= label_tag :app_bundle, "App Bundle:", class: "crayons-field__label" %>
<%= text_field_tag :app_bundle, @app.app_bundle, class: "crayons-textfield" %>
</div>
<div class="form-group">
<%= label_tag :platform, "Platform:" %>
<%= select_tag :platform, options_for_select(ConsumerApp.platforms.invert, selected: @app.platform, class: "crayons-select"), class: "crayons-select", data: { "consumer-app-target" => "platform", "action" => "consumer-app#checkPlatform" } %>
</div>
<div class="crayons-field">
<%= label_tag :platform, "Platform:", class: "crayons-field_label" %>
<%= select_tag :platform, options_for_select(ConsumerApp.platforms.invert, selected: @app.platform), class: "crayons-select", data: { "consumer-app-target" => "platform", "action" => "consumer-app#checkPlatform" } %>
</div>
<div class="form-group">
<%= label_tag :auth_key, "Authentication Key:" %>
<%= text_area_tag :auth_key, @app.auth_key, size: "100x10", class: "form-control" %>
</div>
<div class="crayons-field">
<%= label_tag :auth_key, "Authentication Key:", class: "crayons-field__label" %>
<%= text_area_tag :auth_key, @app.auth_key, size: "100x10", class: "crayons-textfield" %>
</div>
<div class="form-group hidden" data-consumer-app-target="teamId">
<%= label_tag :team_id, "Team ID (Universal Links Support):" %>
<%= text_field_tag :team_id, @app.team_id, class: "form-control" %>
<div class="crayons-field hidden" data-consumer-app-target="teamId">
<%= label_tag :team_id, "Team ID (Universal Links Support):", class: "crayons-field__label" %>
<%= text_field_tag :team_id, @app.team_id, class: "crayons-textfield" %>
</div>
</div>

View file

@ -2,6 +2,6 @@
<div class="crayons-card p-6">
<%= form_for([:admin, @app], method: :patch, data: { controller: "consumer-app" }) do %>
<%= render "form" %>
<%= submit_tag "Update Consumer App", class: "crayons-btn" %>
<%= submit_tag "Update Consumer App", class: "crayons-btn mt-4" %>
<% end %>
</div>

View file

@ -1,7 +1,9 @@
<div class="crayons-card p-3 mb-5 mt-2">
<%= link_to "New Consumer App", new_admin_consumer_app_path, class: "crayons-btn float-right" %>
<h1 class="crayons-title mb-6">Consumer Apps</h1>
<header class="flex items-center mb-6">
<h2 class="crayons-title">Consumer Apps</h2>
<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.

View file

@ -2,6 +2,6 @@
<div class="crayons-card p-6">
<%= form_for([:admin, @app], method: :post, data: { controller: "consumer-app" }) do %>
<%= render "form" %>
<%= submit_tag "Create Consumer App", class: "crayons-btn" %>
<%= submit_tag "Create Consumer App", class: "crayons-btn mt-4" %>
<% end %>
</div>

View file

@ -3,7 +3,7 @@
<header class="flex items-center mb-6">
<h2 class="crayons-title">Welcome Threads</h2>
<%= link_to "Create A New Welcome Thread", admin_welcome_index_path, method: :post, class: "btn btn-primary ml-auto" %>
<%= link_to "Create A New Welcome Thread", admin_welcome_index_path, method: :post, class: "crayons-btn ml-auto" %>
</header>
<div class="crayons-card p-6 grid gap-4">