Initial commit
This commit is contained in:
65
resources/views/dashboard.blade.php
Normal file
65
resources/views/dashboard.blade.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<x-app-layout>
|
||||
<x-slot name="header">
|
||||
<h2 class="font-semibold text-xl text-gray-800 leading-tight">
|
||||
{{ __('Dashboard') }}
|
||||
</h2>
|
||||
</x-slot>
|
||||
|
||||
<div class="py-12">
|
||||
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8 space-y-6">
|
||||
<!-- Welcome Message -->
|
||||
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
|
||||
<div class="p-6 text-gray-900">
|
||||
<h3 class="text-lg font-medium text-gray-900">歡迎回來,{{ Auth::user()->name }}!</h3>
|
||||
<p class="mt-1 text-sm text-gray-600">這是您的個人儀表板</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Recent Documents Widget -->
|
||||
@if($recentDocuments->isNotEmpty())
|
||||
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
|
||||
<div class="px-6 py-5 border-b border-gray-200">
|
||||
<div class="flex items-center justify-between">
|
||||
<h3 class="text-lg font-medium text-gray-900">最新文件</h3>
|
||||
<a href="{{ route('documents.index') }}" class="text-sm text-indigo-600 hover:text-indigo-900">
|
||||
查看全部 →
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="divide-y divide-gray-200">
|
||||
@foreach($recentDocuments as $document)
|
||||
<div class="px-6 py-4 hover:bg-gray-50 transition">
|
||||
<div class="flex items-start">
|
||||
<div class="flex-shrink-0 text-3xl mr-4">
|
||||
{{ $document->currentVersion?->getFileIcon() ?? '📄' }}
|
||||
</div>
|
||||
<div class="flex-1 min-w-0">
|
||||
<h4 class="text-sm font-medium text-gray-900">
|
||||
<a href="{{ route('documents.public.show', $document->public_uuid) }}" class="hover:text-indigo-600">
|
||||
{{ $document->title }}
|
||||
</a>
|
||||
</h4>
|
||||
@if($document->description)
|
||||
<p class="mt-1 text-sm text-gray-500 line-clamp-1">{{ $document->description }}</p>
|
||||
@endif
|
||||
<div class="mt-2 flex items-center space-x-4 text-xs text-gray-500">
|
||||
<span>{{ $document->category->icon }} {{ $document->category->name }}</span>
|
||||
<span>📅 {{ $document->created_at->format('Y-m-d') }}</span>
|
||||
<span>📏 {{ $document->currentVersion?->getFileSizeHuman() }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ml-4 flex-shrink-0">
|
||||
<a href="{{ route('documents.public.download', $document->public_uuid) }}"
|
||||
class="inline-flex items-center px-3 py-1.5 border border-gray-300 rounded-md text-xs font-medium text-gray-700 bg-white hover:bg-gray-50">
|
||||
下載
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
Reference in New Issue
Block a user