Skip to content

Commit 2cf0dc3

Browse files
committed
minor formatting
1 parent abb7154 commit 2cf0dc3

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

resources/views/mcp/authorize.blade.php

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
3636
<link rel="shortcut icon" href="/favicon.ico" />
3737
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
38-
<meta name="apple-mobile-web-app-title" content="Locket" />
38+
<meta name="apple-mobile-web-app-title" content="Authorize MCP" />
3939
<link rel="manifest" href="/site.webmanifest" />
4040

4141
<link rel="preconnect" href="https://fonts.bunny.net">
@@ -51,14 +51,16 @@
5151
<!-- Header -->
5252
<div class="flex flex-col space-y-1.5 p-6">
5353
<div class="flex items-center justify-center mb-4">
54-
<!-- Shield icon -->
54+
<!-- Shield Icon -->
5555
<svg class="h-12 w-12 text-primary" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
5656
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20.618 5.984A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.031 9-11.622 0-1.042-.133-2.052-.382-3.016z"></path>
5757
</svg>
5858
</div>
59+
5960
<h3 class="text-2xl font-semibold leading-none tracking-tight text-center">
6061
Authorize {{ $client->name }}
6162
</h3>
63+
6264
<p class="text-sm text-muted-foreground text-center">
6365
This application will be able to:<br/>Use available MCP functionality.
6466
</p>
@@ -72,10 +74,11 @@
7274
<p class="font-medium">{{ $user->email }}</p>
7375
</div>
7476

75-
<!-- Scopes/Permissions -->
77+
<!-- Scopes / Permissions -->
7678
@if(count($scopes) > 0)
7779
<div class="space-y-2">
7880
<p class="text-sm font-medium">Permissions:</p>
81+
7982
<ul class="space-y-2">
8083
@foreach($scopes as $scope)
8184
<li class="flex items-start gap-2">
@@ -92,32 +95,32 @@
9295
@endif
9396
</div>
9497

95-
<!-- Footer with buttons -->
98+
<!-- Footer With Buttons -->
9699
<div class="flex items-center p-6 pt-0 gap-3">
97-
<!-- Deny form -->
100+
<!-- Deny Form -->
98101
<form method="POST" action="{{ route('passport.authorizations.deny') }}" class="flex-1">
99102
@csrf
100103
@method('DELETE')
101104
<input type="hidden" name="state" value="">
102105
<input type="hidden" name="client_id" value="{{ $client->id }}">
103106
<input type="hidden" name="auth_token" value="{{ $authToken }}">
104107
<button type="submit" class="inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-10 px-4 py-2 w-full">
105-
<!-- X icon -->
106108
<svg class="mr-2 h-4 w-4" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
107109
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
108110
</svg>
109111
Cancel
110112
</button>
111113
</form>
112114

113-
<!-- Approve form -->
115+
<!-- Approve Form -->
114116
<form method="POST" action="{{ route('passport.authorizations.approve') }}" class="flex-1" id="authorizeForm">
115117
@csrf
116118
<input type="hidden" name="state" value="">
117119
<input type="hidden" name="client_id" value="{{ $client->id }}">
118120
<input type="hidden" name="auth_token" value="{{ $authToken }}">
119121
<button type="submit" class="inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground hover:bg-primary/90 h-10 px-4 py-2 w-full" id="authorizeButton">
120122
<span id="authorizeText">Authorize</span>
123+
121124
<svg id="loadingSpinner" class="animate-spin -ml-1 mr-3 h-4 w-4 text-white hidden" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
122125
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
123126
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
@@ -137,15 +140,15 @@
137140
const loadingSpinner = document.getElementById('loadingSpinner');
138141
139142
form.addEventListener('submit', function(e) {
140-
// Show loading state
143+
// Show loading state...
141144
button.disabled = true;
142145
authorizeText.textContent = 'Authorizing...';
143146
loadingSpinner.classList.remove('hidden');
144147
145-
// After form submission, watch for redirect and close window
148+
// After form submission, watch for redirect and close window...
146149
setTimeout(function() {
147150
const checkRedirect = setInterval(function() {
148-
// If URL changed or we have OAuth params, redirect happened
151+
// If URL changed or we have OAuth params, redirect happened...
149152
if (!window.location.href.includes('/oauth/authorize') ||
150153
window.location.search.includes('code=') ||
151154
window.location.search.includes('error=')) {
@@ -154,15 +157,15 @@
154157
}
155158
}, 100);
156159
157-
// Fallback: close after 5 seconds
160+
// Fallback: Close after five seconds...
158161
setTimeout(function() {
159162
clearInterval(checkRedirect);
160163
window.close();
161164
}, 5000);
162165
}, 200);
163166
});
164167
165-
// Handle cancel button
168+
// Handle cancel button...
166169
const cancelForm = document.querySelector('form[method="POST"]:has(input[name="_method"][value="DELETE"])');
167170
if (cancelForm) {
168171
cancelForm.addEventListener('submit', function(e) {

0 commit comments

Comments
 (0)