mirror of
https://github.com/System-End/hackatime.git
synced 2026-04-20 00:35:22 +00:00
Make it actually work :P
This commit is contained in:
parent
44c149c198
commit
895690662f
3 changed files with 11 additions and 11 deletions
|
|
@ -30,7 +30,6 @@ class Admin::OauthApplicationsController < Admin::BaseController
|
|||
@application.renew_secret
|
||||
if @application.save
|
||||
flash[:notice] = I18n.t(:notice, scope: %i[doorkeeper flash applications rotate_secret])
|
||||
flash[:application_secret] = @application.plaintext_secret
|
||||
else
|
||||
flash[:alert] = I18n.t(:alert, scope: %i[doorkeeper flash applications rotate_secret])
|
||||
end
|
||||
|
|
|
|||
|
|
@ -165,16 +165,6 @@
|
|||
</svg>
|
||||
<%= t('doorkeeper.applications.buttons.edit') %>
|
||||
<% end %>
|
||||
<%= button_to rotate_secret_oauth_application_path(@application),
|
||||
method: :post,
|
||||
data: { turbo_confirm: "Are you sure? This will invalidate your current secrets and break existing integrations"},
|
||||
class: "w-full inline-flex items-center justify-center gap-2 px-4 py-2 bg-yellow hover:bg-yellow/80 text-white font-medium rounded transition-colors duration-200" do %>
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" />
|
||||
</svg>
|
||||
Rotate Secret
|
||||
<% end %>
|
||||
|
||||
<%= render 'delete_form', application: @application, submit_btn_css: 'danger' %>
|
||||
|
||||
<% if current_user&.admin_level_superadmin? %>
|
||||
|
|
@ -195,6 +185,16 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= button_to rotate_secret_oauth_application_path(@application),
|
||||
method: :post,
|
||||
data: { turbo_confirm: "Are you sure? This will invalidate your current secrets and break existing integrations" },
|
||||
class: "w-full inline-flex items-center justify-center gap-2 px-4 py-2 border border-yellow/40 text-yellow hover:bg-yellow/10 font-medium rounded transition-colors duration-200" do %>
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" />
|
||||
</svg>
|
||||
Rotate Secret
|
||||
<% end %>
|
||||
|
||||
<%= link_to oauth_applications_path,
|
||||
class: "w-full inline-flex items-center justify-center gap-2 px-4 py-2 border border-darkless text-white font-medium rounded transition-colors duration-200 hover:bg-darkless" do %>
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<aside class="flex flex-col min-h-screen w-[250px] bg-dark text-white px-3 py-4 rounded-r-lg overflow-y-auto lg:block" data-nav-target="nav" style="scrollbar-width: none; -ms-overflow-style: none;">
|
||||
<div class="space-y-4">
|
||||
<% flash.each do |name, msg| %>
|
||||
<% next if name.to_sym == :application_secret %>
|
||||
<%
|
||||
c =
|
||||
case name.to_sym
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue