diff --git a/app/assets/stylesheets/legacy/_layout.scss b/app/assets/stylesheets/legacy/_layout.scss index 6ffed80..7889464 100644 --- a/app/assets/stylesheets/legacy/_layout.scss +++ b/app/assets/stylesheets/legacy/_layout.scss @@ -8,6 +8,13 @@ body { background-attachment: fixed; } +body#admin-panel { + background: linear-gradient(35deg, rgba(255,0,255,0.2) 0, rgba(153,12,14,0.9) 100%), + url('/img/bg-1.jpg'); + background-size: cover; + background-attachment: fixed; +} + .ks-site-icon { svg { display: inline-block; @@ -60,30 +67,6 @@ body { } } -body#admin-panel { - #wrapper { - > header { - background: $color-red-bright; - background: linear-gradient(35deg, rgba(255,0,255,0.2) 0, rgba(153,12,14,0.9) 100%), - url('/img/bg-1.jpg'); - } - } - - #main-nav { - ul { - grid-template-columns: repeat(4, 1fr); - - li { - a { - &.active { - border-bottom: 2px solid $color-red-bright; - } - } - } - } - } -} - .flash-msg { width: 100%; text-align: center; @@ -123,14 +106,6 @@ main { table { width: 100%; - th, td { - &.hide-small { - @include media-max(small) { - display: none; - } - } - } - th { color: $text-color-discreet; font-weight: normal; diff --git a/app/views/admin/dashboard/index.html.erb b/app/views/admin/dashboard/index.html.erb index e7f405a..c00c55a 100644 --- a/app/views/admin/dashboard/index.html.erb +++ b/app/views/admin/dashboard/index.html.erb @@ -1,3 +1,7 @@ -
- With great power comes great responsibility. -
+<%= render partial: "components/header", locals: { page_title: "Admin Panel" } %> + +<%= render layout: "components/main_simple" do %> ++ With great power comes great responsibility. +
+<% end %> diff --git a/app/views/admin/donations/edit.html.erb b/app/views/admin/donations/edit.html.erb index 5042797..2372949 100644 --- a/app/views/admin/donations/edit.html.erb +++ b/app/views/admin/donations/edit.html.erb @@ -1,8 +1,12 @@ -- <%= link_to 'Show', admin_donation_path(@donation), class: 'ks-text-link' %> | - <%= link_to 'Back', admin_donations_path, class: 'ks-text-link' %> -
+ <%= render 'form', donation: @donation, url: admin_donation_path(@donation) %> + +
+ <%= link_to 'Show', admin_donation_path(@donation), class: 'ks-text-link' %> | + <%= link_to 'Back', admin_donations_path, class: 'ks-text-link' %> +
+<% end %> diff --git a/app/views/admin/donations/index.html.erb b/app/views/admin/donations/index.html.erb index 3325d1c..9f26c76 100644 --- a/app/views/admin/donations/index.html.erb +++ b/app/views/admin/donations/index.html.erb @@ -1,41 +1,43 @@ -
User | -Amount BTC | -in EUR | -in USD | -Public name | -Date | -- | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<%= donation.user.cn %> | -<%= sats_to_btc donation.amount_sats %> BTC | -<%= number_to_currency donation.amount_eur / 100, unit: "" %> | -<%= number_to_currency donation.amount_usd / 100, unit: "" %> | -<%= donation.public_name %> | -<%= donation.paid_at ? donation.paid_at.strftime("%Y-%m-%d") : "" %> | -<%= link_to 'Show', admin_donation_path(donation), class: 'btn btn-sm btn-gray' %> | -<%= link_to 'Edit', edit_admin_donation_path(donation), class: 'btn btn-sm btn-gray' %> | -<%= link_to 'Destroy', admin_donation_path(donation), class: 'btn btn-sm btn-red', method: :delete, data: { confirm: 'Are you sure?' } %> | +<%= render layout: "components/main_simple" do %> + <% if @donations.any? %> +
User | +Amount BTC | +in EUR | +in USD | +Public name | +Date | +
---|
- No donations yet. + + +
+ No donations yet. +
+ <% end %> + ++ <%= link_to 'Record an out-of-system donation', new_admin_donation_path, class: 'btn-md btn-gray' %>
<% end %> - -- <%= link_to 'Record an out-of-system donation', new_admin_donation_path, class: 'btn-md btn-gray' %> -
diff --git a/app/views/admin/donations/new.html.erb b/app/views/admin/donations/new.html.erb index ca10ca3..965cdbc 100644 --- a/app/views/admin/donations/new.html.erb +++ b/app/views/admin/donations/new.html.erb @@ -1,7 +1,11 @@ -- <%= link_to 'Back', admin_donations_path, class: 'ks-text-link' %> -
+ <%= render 'form', donation: @donation, url: admin_donations_path %> + ++ <%= link_to 'Back', admin_donations_path, class: 'ks-text-link' %> +
+<% end %> diff --git a/app/views/admin/donations/show.html.erb b/app/views/admin/donations/show.html.erb index dd929f2..6cd247a 100644 --- a/app/views/admin/donations/show.html.erb +++ b/app/views/admin/donations/show.html.erb @@ -1,36 +1,40 @@ -<%= notice %>
+<%= render partial: "components/header", locals: { page_title: "Donations" } %> -- User: - <%= @donation.user_id %> -
+<%= render layout: "components/main_simple" do %> +<%= notice %>
-- Amount sats: - <%= @donation.amount_sats %> -
++ User: + <%= @donation.user.address %> +
-- Amount eur: - <%= @donation.amount_eur %> -
++ Amount sats: + <%= @donation.amount_sats %> +
-- Amount usd: - <%= @donation.amount_usd %> -
++ Amount eur: + <%= @donation.amount_eur %> +
-- Public name: - <%= @donation.public_name %> -
++ Amount usd: + <%= @donation.amount_usd %> +
-- Date: - <%= @donation.paid_at %> -
++ Public name: + <%= @donation.public_name %> +
-- <%= link_to 'Edit', edit_admin_donation_path(@donation), class: 'ks-text-link' %> | - <%= link_to 'Back', admin_donations_path, class: 'ks-text-link' %> -
++ Date: + <%= @donation.paid_at %> +
+ ++ <%= link_to 'Edit', edit_admin_donation_path(@donation), class: 'ks-text-link' %> | + <%= link_to 'Back', admin_donations_path, class: 'ks-text-link' %> +
+<% end %> diff --git a/app/views/admin/invitations/index.html.erb b/app/views/admin/invitations/index.html.erb index fa2e981..d30c0d0 100644 --- a/app/views/admin/invitations/index.html.erb +++ b/app/views/admin/invitations/index.html.erb @@ -1,32 +1,35 @@ -- There are currently <%= @invitations_unused_count %> - unused invitations available to existing users. - <%= @users_with_referrals_count %> users have successfully - invited new users. -
-Token | -Accepted | -Invited user | -
---|---|---|
<%= invitation.token %> | -<%= invitation.used_at.strftime("%Y-%m-%d") %> | -<%= User.find(invitation.invited_user_id).address %> | -
+ There are currently <%= @invitations_unused_count %> + unused invitations available to existing users. + <%= @users_with_referrals_count %> users have successfully + invited new users. +
Token | +Accepted | +Invited user | +
---|---|---|
<%= invitation.token %> | +<%= invitation.used_at.strftime("%Y-%m-%d") %> | +<%= User.find(invitation.invited_user_id).address %> | +
UID | -Admin | - -|
---|---|---|
<%= entry[:uid] %> | -<%= entry[:mail] %> | -<%= entry[:admin] %> | - -
UID | +Admin | + +|
---|---|---|
<%= entry[:uid] %> | +<%= entry[:mail] %> | +<%= entry[:admin] %> | + +
- Your Kosmos account and password currently give you access to these - services: -
-- Chat rooms and instant messaging (XMPP/Jabber) -
-- Kosmos community forums and user support/help site -
-- Send and receive sats over the Bitcoin Lightning Network -
-- Kosmos documentation and knowledge base -
-- Code hosting and collaboration for software projects -
-- Continuous integration for software projects on Gitea -
-+ Your Kosmos account and password currently give you access to these + services: +
++ Chat rooms and instant messaging (XMPP/Jabber) +
+ Kosmos community forums and user support/help site +
++ Send and receive sats over the Bitcoin Lightning Network +
++ Kosmos documentation and knowledge base +
++ Code hosting and collaboration for software projects +
++ Continuous integration for software projects on Gitea +
+- Your financial contributions to the development and upkeep of Kosmos - software and services. -
-+ Your financial contributions to the development and upkeep of Kosmos + software and services. +
+
-
- <%= number_with_delimiter donation.amount_sats %> sats
-
-
-
- (~ <%= number_to_currency donation.amount_eur / 100, unit: "" %> EUR)
-
-
- <% if donation.public_name.present? %> - Public name: <%= donation.public_name %> - <% else %> - Anonymous - <% end %> -
-- No donations to show. -
- <% end %> -
+
+ <%= number_with_delimiter donation.amount_sats %> sats
+
+
+
+ (~ <%= number_to_currency donation.amount_eur / 100, unit: "" %> EUR)
+
+
+ <% if donation.public_name.present? %> + Public name: <%= donation.public_name %> + <% else %> + Anonymous + <% end %> +
++ No donations to show. +
+ <% end %> +- Invite your friends to a Kosmos account by sharing an invitation URL with them: -
- <% end %> -URL | -
---|
<%= invitation_url(invitation.token) %> | -
- You do not have any invitations to give away yet. All good - things come in time. -
- <% end %> -Accepted | -Invited user | -
---|---|
<%= invitation.used_at.strftime("%Y-%m-%d") %> | -<%= User.find(invitation.invited_user_id).address %> | -
+ Invite your friends to a Kosmos account by sharing an invitation URL with them: +
<% end %> -URL | +
---|
<%= invitation_url(invitation.token) %> | +
+ You do not have any invitations to give away yet. All good + things come in time. +
+ <% end %> +ID | +Accepted | +Invited user | +
---|---|---|
<%= invitation.token %> | +<%= invitation.used_at.strftime("%Y-%m-%d") %> | +<%= User.find(invitation.invited_user_id).address %> | +
<%= msg %>
- <%= form_with(url: settings_reset_password_path, method: :post) do %> - <%= submit_tag("Send me a password reset link", class: 'btn-md btn-gray') %> - <% end %> -
-+ <%= form_with(url: settings_reset_password_path, method: :post) do %> + <%= submit_tag("Send me a password reset link", class: 'btn-md btn-gray') %> + <% end %> +
+Sorry, you're not allowed to access this page.
+<%= render partial: "components/header", locals: { page_title: "403" } %> + +<%= render layout: "components/main_simple" do %> +Sorry, you're not allowed to access this page.
+<% end %> diff --git a/app/views/shared/status_not_found.html.erb b/app/views/shared/status_not_found.html.erb index c31810c..44e8b49 100644 --- a/app/views/shared/status_not_found.html.erb +++ b/app/views/shared/status_not_found.html.erb @@ -1,2 +1,6 @@ -Sorry, this page does not exist.
+<%= render partial: "components/header", locals: { page_title: "404" } %> + +<%= render layout: "components/main_simple" do %> +Sorry, this page does not exist.
+<% end %> diff --git a/app/views/shared/status_unauthorized.html.erb b/app/views/shared/status_unauthorized.html.erb index e69de29..9e8a412 100644 --- a/app/views/shared/status_unauthorized.html.erb +++ b/app/views/shared/status_unauthorized.html.erb @@ -0,0 +1,6 @@ +<%= render partial: "components/header", locals: { page_title: "401" } %> + +<%= render layout: "components/main_simple" do %> +This page needs authorization to access.
+<% end %> diff --git a/app/views/wallet/index.html.erb b/app/views/wallet/index.html.erb index 8c800fa..c34b2bc 100644 --- a/app/views/wallet/index.html.erb +++ b/app/views/wallet/index.html.erb @@ -1,92 +1,90 @@ <%= render partial: "components/header", locals: { page_title: "Wallet" } %> -- Send and receive sats via the Bitcoin Lightning Network. -
-
- <% if @balance %>
- <%= number_with_delimiter @balance %> sats
- Available balance
- <% else %>
- n/a sats
- Balance unavailable
- <% end %>
-
- Your Kosmos user address is also a - Lightning Address! - The easiest way to receive sats is by just giving out your address: + Send and receive sats via the Bitcoin Lightning Network.
-- <%= current_user.address %> +
+ <% if @balance %>
+ <%= number_with_delimiter @balance %> sats
+ Available balance
+ <% else %>
+ n/a sats
+ Balance unavailable
+ <% end %>
- You can connect various wallet apps to your Kosmos account. This allows - you to both receive and send sats. Any wallet that supports - LNDHub - accounts should be able to add/import your account using our setup - code/URL: -
-- - or - - -
-- <%= raw @svg %> -
-+ Your Kosmos user address is also a + Lightning Address! + The easiest way to receive sats is by just giving out your address: +
++ <%= current_user.address %> +
+- Android / iOS / macOS -
-- When adding a wallet, choose "Import wallet" on the bottom of the screen, - then scan the setup QR code. -
-- Firefox / Chrome (Opera, Brave, Chromium-based browsers) -
-- Choose "LNDHub (Bluewallet)" in the connect dialog and paste the setup - URL in the "LNDHub Export URI" field. -
-+ You can connect various wallet apps to your Kosmos account. This allows + you to both receive and send sats. Any wallet that supports + LNDHub + accounts should be able to add/import your account using our setup + code/URL: +
++ + or + + +
++ <%= raw @svg %> +
++ Android / iOS / macOS +
++ When adding a wallet, choose "Import wallet" on the bottom of the screen, + then scan the setup QR code. +
++ Firefox / Chrome (Opera, Brave, Chromium-based browsers) +
++ Choose "LNDHub (Bluewallet)" in the connect dialog and paste the setup + URL in the "LNDHub Export URI" field. +
+