85 lines
4.5 KiB
PHP
85 lines
4.5 KiB
PHP
<x-app-layout>
|
|
@php($currentProject = $project)
|
|
|
|
<x-slot name="header">
|
|
<h2 class="font-semibold text-xl text-gray-800 leading-tight">{{ $project->name }} — Settings</h2>
|
|
</x-slot>
|
|
|
|
<div class="py-8">
|
|
<div class="max-w-3xl mx-auto sm:px-6 lg:px-8 space-y-6">
|
|
|
|
@if(session('status'))
|
|
<div class="bg-green-50 border border-green-200 text-green-700 px-4 py-3 rounded-md text-sm">
|
|
{{ session('status') }}
|
|
</div>
|
|
@endif
|
|
|
|
{{-- DSN --}}
|
|
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg p-6">
|
|
<h3 class="text-lg font-medium text-gray-900 mb-4">Client DSN</h3>
|
|
<p class="text-sm text-gray-500 mb-3">Use this DSN in your Sentry SDK configuration to send events to this project.</p>
|
|
<div x-data="{ copied: false }" class="flex items-center gap-2">
|
|
<code class="flex-1 bg-gray-50 border border-gray-200 rounded-md px-4 py-3 text-sm font-mono text-gray-800 break-all select-all">{{ $project->dsn }}</code>
|
|
<button @click="navigator.clipboard.writeText('{{ $project->dsn }}'); copied = true; setTimeout(() => copied = false, 2000)"
|
|
class="shrink-0 inline-flex items-center px-3 py-2 bg-white border border-gray-300 rounded-md text-sm text-gray-700 hover:bg-gray-50 transition"
|
|
type="button">
|
|
<span x-show="!copied">Copy</span>
|
|
<span x-show="copied" x-cloak>Copied!</span>
|
|
</button>
|
|
</div>
|
|
<form method="POST" action="{{ route('projects.regenerate-keys', $project) }}" class="mt-4"
|
|
onsubmit="return confirm('Regenerating keys will invalidate the current DSN. Continue?')">
|
|
@csrf
|
|
@method('PATCH')
|
|
<x-secondary-button type="submit">Regenerate Keys</x-secondary-button>
|
|
</form>
|
|
</div>
|
|
|
|
{{-- Update Project --}}
|
|
@can('update', $project)
|
|
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg p-6">
|
|
<h3 class="text-lg font-medium text-gray-900 mb-4">Project Details</h3>
|
|
<form method="POST" action="{{ route('projects.update', $project) }}" class="space-y-6">
|
|
@csrf
|
|
@method('PATCH')
|
|
|
|
<div>
|
|
<x-input-label for="name" value="Project Name" />
|
|
<x-text-input id="name" name="name" type="text" class="mt-1 block w-full" :value="old('name', $project->name)" required />
|
|
<x-input-error :messages="$errors->get('name')" class="mt-2" />
|
|
</div>
|
|
|
|
<div>
|
|
<x-input-label for="platform" value="Platform" />
|
|
<select id="platform" name="platform" class="mt-1 block w-full border-gray-300 focus:border-indigo-500 focus:ring-indigo-500 rounded-md shadow-sm">
|
|
<option value="">Select a platform...</option>
|
|
@foreach(['php', 'javascript', 'python', 'ruby', 'java', 'go', 'rust', 'csharp', 'node', 'other'] as $plat)
|
|
<option value="{{ $plat }}" {{ old('platform', $project->platform) === $plat ? 'selected' : '' }}>{{ ucfirst($plat) }}</option>
|
|
@endforeach
|
|
</select>
|
|
<x-input-error :messages="$errors->get('platform')" class="mt-2" />
|
|
</div>
|
|
|
|
<x-primary-button>Save Changes</x-primary-button>
|
|
</form>
|
|
</div>
|
|
@endcan
|
|
|
|
{{-- Delete Project --}}
|
|
@can('delete', $project)
|
|
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg p-6">
|
|
<h3 class="text-lg font-medium text-red-600 mb-2">Danger Zone</h3>
|
|
<p class="text-sm text-gray-500 mb-4">Deleting a project will permanently remove all its issues and events.</p>
|
|
<form method="POST" action="{{ route('projects.destroy', $project) }}"
|
|
onsubmit="return confirm('Are you sure you want to delete this project? This action cannot be undone.')">
|
|
@csrf
|
|
@method('DELETE')
|
|
<x-danger-button>Delete Project</x-danger-button>
|
|
</form>
|
|
</div>
|
|
@endcan
|
|
|
|
</div>
|
|
</div>
|
|
</x-app-layout>
|