authorize.blade.php 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <title>{{ config_cache('app.name') }} - Authorization</title>
  8. <link href="{{ mix('/css/app.css') }}" rel="stylesheet">
  9. <style>
  10. .passport-authorize .container {
  11. margin-top: 30px;
  12. }
  13. .passport-authorize .scopes {
  14. margin-top: 20px;
  15. }
  16. .passport-authorize .buttons {
  17. margin-top: 25px;
  18. text-align: center;
  19. }
  20. .passport-authorize .btn {
  21. width: 125px;
  22. }
  23. .passport-authorize .btn-approve {
  24. margin-right: 15px;
  25. }
  26. .passport-authorize form {
  27. display: inline;
  28. }
  29. </style>
  30. </head>
  31. <body class="passport-authorize">
  32. <div class="container">
  33. <div class="row justify-content-center">
  34. <div class="col-md-6">
  35. <div class="text-center mb-5">
  36. <img src="/img/pixelfed-icon-grey.svg">
  37. </div>
  38. <p class="text-center h3 font-weight-light mb-3">Authorize {{ $client->name }}</p>
  39. <div class="card card-default shadow-none border">
  40. <div class="card-body">
  41. <div class="media">
  42. <img src="/img/icon/alert-circle.svg" class="mr-3" width="32" height="32">
  43. <div class="media-body">
  44. <p class="my-0"><span class="font-weight-bold">{{ $client->name }}</span></p>
  45. <p class="mb-0 text-muted small">wants access to your <strong>{{request()->user()->username}}</strong> account</p>
  46. </div>
  47. </div>
  48. <hr>
  49. @if (count($scopes) > 0)
  50. <div class="scopes">
  51. @foreach ($scopes as $scope)
  52. <div class="media mb-3">
  53. <img src="/img/icon/unlock.svg" class="mr-3" width="32" height="32">
  54. <div class="media-body">
  55. <p class="my-0"><span class="font-weight-bold">{{ $scope->id }}</span></p>
  56. <p class="mb-0 text-muted small">{{$scope->description}}</p>
  57. </div>
  58. </div>
  59. @endforeach
  60. </div>
  61. @endif
  62. <div class="buttons">
  63. <form method="post" action="{{ route('passport.authorizations.approve') }}">
  64. {{ csrf_field() }}
  65. <input type="hidden" name="state" value="{{ $request->state }}">
  66. <input type="hidden" name="client_id" value="{{ $client->id }}">
  67. <button type="submit" class="btn btn-success font-weight-bold btn-approve">Authorize</button>
  68. </form>
  69. <form method="post" action="{{ route('passport.authorizations.deny') }}">
  70. {{ csrf_field() }}
  71. {{ method_field('DELETE') }}
  72. <input type="hidden" name="state" value="{{ $request->state }}">
  73. <input type="hidden" name="client_id" value="{{ $client->id }}">
  74. <button class="btn btn-outline-danger font-weight-bold">Cancel</button>
  75. </form>
  76. </div>
  77. <hr>
  78. <p class="mb-0 text-center small text-muted">Click <a href="{{ route('logout') }}" class="font-weight-bold" onclick="event.preventDefault();document.getElementById('logout_auth').submit();">here</a> to log out of this account.</p>
  79. <form id="logout_auth" action="{{ route('logout') }}" method="POST" style="display: none;">
  80. @csrf
  81. </form>
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </body>
  88. </html>