slacked id

This commit is contained in:
24c02 2026-02-26 14:58:24 -05:00
parent a7b0645755
commit 73f87f0f9f
3 changed files with 38 additions and 0 deletions

View file

@ -35,4 +35,6 @@ class StaticPagesController < ApplicationController
def security
end
def slack_id = render layout: "minimal"
end

View 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>

View file

@ -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