mirror of
https://github.com/System-End/identity-vault.git
synced 2026-04-19 19:45:08 +00:00
slacked id
This commit is contained in:
parent
a7b0645755
commit
73f87f0f9f
3 changed files with 38 additions and 0 deletions
|
|
@ -35,4 +35,6 @@ class StaticPagesController < ApplicationController
|
|||
|
||||
def security
|
||||
end
|
||||
|
||||
def slack_id = render layout: "minimal"
|
||||
end
|
||||
|
|
|
|||
35
app/views/static_pages/slack_id.html.erb
Normal file
35
app/views/static_pages/slack_id.html.erb
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<style>
|
||||
.slack-id-page {
|
||||
text-align: center;
|
||||
margin-top: 20vh;
|
||||
}
|
||||
|
||||
.slack-id {
|
||||
font-family: monospace;
|
||||
font-size: 2rem;
|
||||
font-weight: 600;
|
||||
padding: 0.75rem 1.5rem;
|
||||
border: 1px solid var(--pico-muted-border-color);
|
||||
border-radius: var(--pico-border-radius);
|
||||
cursor: pointer;
|
||||
user-select: all;
|
||||
}
|
||||
.slack-id:hover { border-color: var(--pico-primary); }
|
||||
.slack-id-hint {
|
||||
display: block;
|
||||
margin-top: 0.5rem;
|
||||
font-size: 0.75rem;
|
||||
opacity: 0.5;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="slack-id-page">
|
||||
<h1>Your Slack ID is:</h1>
|
||||
|
||||
<% if current_identity&.slack_id.present? %>
|
||||
<code class="slack-id" onclick="navigator.clipboard.writeText(this.textContent.trim());var c=this.nextElementSibling;c.textContent='Copied!';setTimeout(()=>c.textContent='Click to copy',2000)"><%= current_identity.slack_id %></code>
|
||||
<small class="slack-id-hint usn">Click to copy</small>
|
||||
<% else %>
|
||||
<p>No Slack ID linked to your account.</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
@ -239,6 +239,7 @@ Rails.application.routes.draw do
|
|||
root "static_pages#home"
|
||||
|
||||
get "/welcome", to: "static_pages#welcome", as: :welcome
|
||||
get "/slack-id", to: "static_pages#slack_id", as: :slack_id
|
||||
get "/oauth/welcome", to: "static_pages#oauth_welcome", as: :oauth_welcome
|
||||
get "/security", to: "static_pages#security", as: :security
|
||||
get "/activity", to: "audit_logs#index", as: :audit_logs
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue