Skip to content

Commit 63d2cae

Browse files
committed
feat: admin dashboard fixed all modals and views
1 parent f3f4c89 commit 63d2cae

23 files changed

+548
-321
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ APP_DEBUG=true
55
APP_URL=http://laravelte.test
66
SESSION_DOMAIN=laravelte.test
77
SANCTUM_STATEFUL_DOMAINS=laravelte.test
8+
APP_LOGO="/img/laravelte_logo.png"
89

910
LOG_CHANNEL=stack
1011
LOG_DEPRECATIONS_CHANNEL=null

.env.testing

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ APP_DEBUG=true
55
APP_URL=http://laravelte.test
66
SESSION_DOMAIN=laravelte.test
77
SANCTUM_STATEFUL_DOMAINS=laravelte.test
8+
APP_LOGO="/img/laravelte_logo.png"
89

910
LOG_CHANNEL=stack
1011
LOG_DEPRECATIONS_CHANNEL=null

.github/workflows/deploy-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Make sure that your key algorithm of choice is supported. On Ubuntu 20.04 or later you must explicitly allow the use of the ssh-rsa algorithm. Add the following line to your OpenSSH daemon file (which is either /etc/ssh/sshd_config or a drop-in file under /etc/ssh/sshd_config.d/):
88
# CASignatureAlgorithms +ssh-rsa
99

10-
name: Deploy Education-Materials to Production
10+
name: Deploy Laravelte to Production
1111

1212
# Controls when the workflow will run
1313
on:

database/seeders/DemoTableSeeder.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Database\Seeders;
44

5+
use App\Models\ContactMessage;
56
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
67
use Illuminate\Database\Seeder;
78

@@ -12,6 +13,6 @@ class DemoTableSeeder extends Seeder
1213
*/
1314
public function run(): void
1415
{
15-
//
16+
ContactMessage::factory(10)->create();
1617
}
1718
}

resources/css/app.css

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ body, p, h1, h2, h3 {
3333
.form-error {
3434
@apply text-right;
3535
}
36+
.checkbox {
37+
@apply ml-2 text-sm font-medium text-gray-900 dark:text-gray-300
38+
}
3639
.scrollbar-hidden::-webkit-scrollbar {
3740
display: none;
3841
}
@@ -49,14 +52,49 @@ a {
4952
.page-top-padding {
5053
@apply mt-28;
5154
}
55+
.scrollbar-hidden::-webkit-scrollbar {
56+
display: none;
57+
}
58+
59+
5260

5361
/* ========== Table =========== */
5462
.table-responsive {
55-
@apply overflow-x-auto;
63+
@apply overflow-x-auto relative shadow-md sm:rounded-lg;
64+
}
65+
table {
66+
@apply w-full text-sm text-left rounded text-gray-500 dark:text-gray-400;
67+
}
68+
table caption {
69+
@apply p-5 text-lg font-semibold text-left text-gray-900 bg-white dark:text-white dark:bg-gray-800;
5670
}
5771

58-
.scrollbar-hidden::-webkit-scrollbar {
59-
display: none;
72+
table caption p {
73+
@apply mt-1 text-sm font-normal text-gray-500 dark:text-gray-400;
74+
}
75+
76+
table thead,
77+
table tfoot {
78+
@apply text-xs text-gray-700 uppercase bg-gray-50 dark:bg-[#2c3543] dark:text-gray-400;
79+
}
80+
81+
table thead tr td,
82+
table thead tr th,
83+
table tfoot tr td,
84+
table tfoot tr th {
85+
@apply py-3 px-6;
86+
}
87+
table tbody tr {
88+
@apply bg-white border-b dark:bg-gray-800 dark:border-gray-700 hover:bg-gray-100 dark:hover:bg-gray-700;
89+
}
90+
table tbody tr th {
91+
@apply py-4 px-6 font-medium text-gray-900 whitespace-nowrap dark:text-white;
92+
}
93+
table tbody tr td {
94+
@apply py-4 px-6;
95+
}
96+
table .actions {
97+
@apply flex gap-2;
6098
}
6199

62100

@@ -105,5 +143,5 @@ a {
105143
@apply p-6 space-y-6;
106144
}
107145
.modal-footer {
108-
@apply mt-3 p-6 space-y-6 border-t border-gray-600 flex justify-end items-center gap-3;
146+
@apply mt-3 p-6 space-y-6 border-t border-gray-600 flex justify-end items-baseline gap-3;
109147
}

resources/ts/Components/AdminSidebar.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
},
4444
{
4545
title: ' My Profile',
46-
route: route('user.profile'),
46+
route: route('admin.profile'),
4747
icon: 'user',
4848
},
4949
{

resources/ts/Components/Button.svelte

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
const dispatch = createEventDispatcher()
77
88
type ButtonSize = 'normal' | 'sm' | 'lg'
9-
type ButtonColor = 'primary' | 'secondary' | 'tertiary'
9+
type ButtonColor = 'primary' | 'secondary' | 'tertiary' | 'ghost'
1010
1111
export let size: ButtonSize = 'normal'
1212
export let color: ButtonColor = 'primary'
@@ -54,6 +54,9 @@
5454
button.tertiary {
5555
@apply bg-gradient-to-r from-tertiary-500 via-tertiary-600 to-tertiary-700 hover:opacity-70;
5656
}
57+
button.ghost {
58+
@apply border border-primary-700 dark:border-primary-300 text-primary-800 dark:text-primary-200;
59+
}
5760
button.btn-sm {
5861
@apply py-1 lg:py-2 px-2 lg:px-3;
5962
}

resources/ts/Components/Circle.svelte

Lines changed: 44 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,54 @@
11
<script lang="ts">
2-
import Icon from './Icon.svelte';
3-
import { createEventDispatcher } from 'svelte';
2+
import Icon from './Icon.svelte'
3+
import { createEventDispatcher } from 'svelte'
44
5-
const dispatch = createEventDispatcher();
5+
const dispatch = createEventDispatcher()
66
7-
function handleClick() {
8-
dispatch('click');
9-
}
7+
function handleClick() {
8+
dispatch('click')
9+
}
1010
11-
type CircleSize = 'sm' | 'lg' | 'xl' | 'n';
12-
type CircleColor = 'primary' | 'danger' | 'success' | 'error' | 'warning';
11+
type CircleSize = 'sm' | 'lg' | 'xl' | 'n'
12+
type CircleColor = 'primary' | 'danger' | 'success' | 'error' | 'warning'
1313
14-
export let icon = 'edit';
15-
export let size: CircleSize = 'sm';
16-
export let color: CircleColor = 'primary';
17-
18-
$: btnSize =
19-
size == 'xl'
20-
? 'w-12 h-12 text-3xl'
21-
: size == 'lg'
22-
? 'w-10 h-10 text-2xl'
23-
: size == 'sm'
24-
? 'w-6 h-6 text-base'
25-
: 'w-8 h-8 text-xl';
26-
27-
$: btnColor =
28-
color == 'primary'
29-
? 'blue'
30-
: color == 'success'
31-
? 'green'
32-
: color == 'warning'
33-
? 'yellow'
34-
: 'red';
14+
export let icon = 'edit'
15+
export let size: CircleSize = 'sm'
16+
export let color: CircleColor = 'primary'
3517
</script>
3618

3719
<button
38-
type="button"
39-
class="{btnSize} rounded-full bg-{btnColor}-500 hover:bg-{btnColor}-600 focus:bg-{btnColor}-700 text-white flex flex-col items-center justify-center"
40-
on:click={handleClick}
41-
{...$$props}
20+
type="button"
21+
class="circle-{size} rounded-full circle-{color} text-white flex flex-col items-center justify-center"
22+
on:click={handleClick}
23+
{...$$props}
4224
>
43-
<Icon name={icon} />
25+
<Icon name={icon} />
4426
</button>
27+
28+
<style lang="css">
29+
button.circle-primary {
30+
@apply bg-primary-500 hover:bg-primary-600 focus:bg-primary-700;
31+
}
32+
button.circle-success {
33+
@apply bg-green-500 hover:bg-green-600 focus:bg-green-700;
34+
}
35+
button.circle-warning {
36+
@apply bg-yellow-500 hover:bg-yellow-600 focus:bg-yellow-700;
37+
}
38+
button.circle-error,
39+
button.circle-danger {
40+
@apply bg-red-500 hover:bg-red-600 focus:bg-red-700;
41+
}
42+
button.circle-xl {
43+
@apply w-12 h-12 text-3xl;
44+
}
45+
button.circle-lg {
46+
@apply w-10 h-10 text-2xl;
47+
}
48+
button.circle-sm {
49+
@apply w-6 h-6 text-base;
50+
}
51+
button.circle-n {
52+
@apply w-8 h-8 text-xl;
53+
}
54+
</style>

0 commit comments

Comments
 (0)