diff --git a/app/views/oauth2/show.html.erb b/app/views/oauth2/show.html.erb index 3718084b3..583c2dfca 100644 --- a/app/views/oauth2/show.html.erb +++ b/app/views/oauth2/show.html.erb @@ -1,26 +1,101 @@ + +<% if User.current.logged? %> +
+

+ <%= @app&.name %>客户端
+ 此第三方应用请求获得以下权限: -

-
- <%= form_tag oauth2_path, method: :post, authenticity_token: true, remote: true, class: 'login-form' do %> - <%= hidden_field_tag :client_id, @app.uid %> - <%= hidden_field_tag :call_url, @call_url %> - <%= hidden_field_tag :state, params[:state] %> -

- <%= text_field_tag :login, '', placeholder: '请输入邮箱地址/用户名' %> -

- <%= password_field_tag :password, '', placeholder: '请输入密码'%> -

- <%= submit_tag '授权登录', class: "btn btn-login btn-lg btn-block mt-20" %> - <% end %> -
- <%= link_to "注 册", '/register', class: 'reg-link' %> +

+
+
    +
  • +
    + + +
    +
  • +
  • +
    + + +
    +
  • +
+
+ +
+
+ <%= form_tag oauth2_path, method: :post, authenticity_token: true, remote: true, class: 'login-form' do %> + <%= hidden_field_tag :client_id, @app.uid %> + <%= hidden_field_tag :call_url, @call_url %> + <%= submit_tag '同意授权', class: "btn btn-login btn-lg btn-block mt-20" %> + <% end %> +
+ <%= link_to "拒绝", '/access_denied', class: 'reg-link' %> +
-
-
\ No newline at end of file + +<% else %> +
+

+ 申请使用 GitLink 账号登录 + <%= @app&.name %> +

+ +
+
+ <%= form_tag oauth2_path, method: :post, authenticity_token: true, remote: true, class: 'login-form' do %> + <%= hidden_field_tag :client_id, @app.uid %> + <%= hidden_field_tag :call_url, @call_url %> +

+ <%= text_field_tag :login, '', placeholder: '请输入邮箱地址/用户名' %> +

+ <%= password_field_tag :password, '', placeholder: '请输入密码' %> +

+ <%= submit_tag '授权登录', class: "btn btn-login btn-lg btn-block mt-20" %> + <% end %> +
+ <%= link_to "注 册", '/register', class: 'reg-link' %> +
+
+
+
+<% end %> + + +