Skip to content

Commit 105f5e6

Browse files
committed
Add about modal
1 parent 0aaae75 commit 105f5e6

File tree

4 files changed

+100
-32
lines changed

4 files changed

+100
-32
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This project was built using [Laravel](https://laravel.com) and [ReactJS](https:
1717
![Move card illustration](docs/img/move-card-illustration.png)
1818
- Swap Column Order
1919
![Swap column illustration](docs/img/swap-column-illustration.png)
20-
- Collaboration with **realtime** changes and permission management
20+
- Collaboration with **realtime** changes and Level Based Access Control permission management
2121
![Permission level](docs/img/permission-level.png)
2222
![Permission table](docs/img/permission-table.png)
2323

compose.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
services:
2+
mariadb:
3+
image: 'mariadb:10'
4+
ports:
5+
- '${FORWARD_DB_PORT:-3306}:3306'
6+
restart: on-failure
7+
environment:
8+
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
9+
MYSQL_DATABASE: '${DB_DATABASE}'
10+
MYSQL_USER: '${DB_USERNAME}'
11+
MYSQL_PASSWORD: '${DB_PASSWORD}'
12+
volumes:
13+
- 'stageboard-mariadb:/var/lib/mysql'
14+
soketi:
15+
image: 'quay.io/soketi/soketi:latest-16-alpine'
16+
environment:
17+
SOKETI_DEBUG: '${SOKETI_DEBUG:-1}'
18+
SOKETI_METRICS_SERVER_PORT: '9601'
19+
SOKETI_DEFAULT_APP_ID: '${PUSHER_APP_ID}'
20+
SOKETI_DEFAULT_APP_KEY: '${PUSHER_APP_KEY}'
21+
SOKETI_DEFAULT_APP_SECRET: '${PUSHER_APP_SECRET}'
22+
ports:
23+
- '${PUSHER_PORT:-6001}:6001'
24+
- '${PUSHER_METRICS_PORT:-9601}:9601'
25+
mailpit:
26+
image: 'axllent/mailpit:latest'
27+
ports:
28+
- '${FORWARD_MAILPIT_PORT:-1025}:1025'
29+
- '${FORWARD_MAILPIT_DASHBOARD_PORT:-8025}:8025'
30+
volumes:
31+
stageboard-mariadb:
32+
driver: local

resources/js/Components/Navbar.tsx

Lines changed: 63 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,80 @@
11
import { type User } from '@/types'
22
import { Link, router } from '@inertiajs/react'
3-
import React from 'react'
3+
import React, {useState} from 'react'
44
import { UserCircleIcon } from '@heroicons/react/24/solid'
55

66
interface Props {
77
user: User
88
}
99

1010
export default function Navbar ({ user }: Props): JSX.Element {
11+
const [activeModal, setActiveModal] = useState(false)
12+
1113
return (
12-
<div className="navbar bg-base-100 shadow-md z-10">
13-
<div className="flex-1">
14-
{!route().current('home')
15-
? <a className="btn btn-ghost text-xl" onClick={() => { router.get('/home') }}>Stageboard</a>
16-
: <a className="btn btn-ghost text-xl">Stageboard</a>
17-
}
18-
</div>
14+
<>
15+
<div className="navbar bg-base-100 shadow-md z-10">
16+
<div className="flex-1">
17+
{!route().current('home')
18+
? <a className="btn btn-ghost text-xl" onClick={() => {
19+
router.get('/home')
20+
}}>Stageboard</a>
21+
: <a className="btn btn-ghost text-xl">Stageboard</a>
22+
}
23+
</div>
1924

20-
<div className="flex-none">
21-
<div className="dropdown dropdown-end">
22-
<div tabIndex={0} role="button" className="btn btn-ghost avatar">
23-
<p>{user.name}</p>
24-
<div className="w-10 rounded-full">
25-
<UserCircleIcon />
25+
<div className="flex-none">
26+
<div className="dropdown dropdown-end">
27+
<div tabIndex={0} role="button" className="btn btn-ghost avatar">
28+
<p>{user.name}</p>
29+
<div className="w-10 rounded-full">
30+
<UserCircleIcon/>
31+
</div>
2632
</div>
33+
<ul className="menu menu-sm dropdown-content mt-3 z-[1] p-2 shadow bg-base-100 rounded-box w-52">
34+
<li>
35+
<Link href={route('profile.edit')} as="button">Profile</Link>
36+
</li>
37+
<li>
38+
<Link href={route('web.page.home')} as="button">Home</Link>
39+
</li>
40+
<li>
41+
<button onClick={() => { setActiveModal(true) }}>About</button>
42+
</li>
43+
<li></li>
44+
<li>
45+
<Link href={route('logout')} method="post" as="button">Logout</Link>
46+
</li>
47+
</ul>
2748
</div>
28-
<ul className="menu menu-sm dropdown-content mt-3 z-[1] p-2 shadow bg-base-100 rounded-box w-52">
29-
<li>
30-
<Link href={route('profile.edit')} as="button">Profile</Link>
31-
</li>
32-
<li>
33-
<Link href={route('web.page.home')} as="button">Home</Link>
34-
</li>
35-
<li></li>
36-
<li>
37-
<Link href={route('logout')} method="post" as="button">Logout</Link>
38-
</li>
39-
</ul>
4049
</div>
4150
</div>
42-
</div>
51+
<dialog className={'modal' + (activeModal ? ' modal-open' : '')}>
52+
<div className="modal-box">
53+
<h3 className="font-bold text-lg mb-4">About Stageboard</h3>
54+
<div className="text-sm space-y-4">
55+
<div>
56+
<p>Stageboard v{import.meta.env.VITE_APP_VERSION}</p>
57+
</div>
58+
<div>
59+
<p>Created by: Ivan Rizkyanto</p>
60+
<p>Contact: [email protected]</p>
61+
</div>
62+
<div>
63+
<a href="https://github.com/stackpan/stageboard/blob/main/LICENSE" className="text-purple-800">MIT License</a>
64+
</div>
65+
</div>
66+
<div className="modal-action">
67+
<button
68+
onClick={() => {
69+
setActiveModal(false)
70+
}}
71+
className="btn btn-sm btn-outline"
72+
>
73+
Close
74+
</button>
75+
</div>
76+
</div>
77+
</dialog>
78+
</>
4379
)
4480
}

resources/js/Pages/Board/Partials/DeleteBoardSettings.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import React, {type JSX, useState} from 'react'
1+
import React, { type JSX, useState } from 'react'
22
import BoardSettingSectionLayout from '@/Layouts/BoardSettingSectionLayout'
3-
import {Link, router, usePage} from "@inertiajs/react";
4-
import {BoardSettingsProps} from "@/Pages/Board/Settings";
3+
import { router, usePage } from '@inertiajs/react'
4+
import { type BoardSettingsProps } from '@/Pages/Board/Settings'
55

66
interface Props {
77
className?: string
@@ -12,7 +12,7 @@ export default function DeleteBoardSettings ({ className = '' }: Props): JSX.Ele
1212

1313
const [activeModal, setActiveModal] = useState(false)
1414

15-
const handleDeleteConfirmation = () => {
15+
const handleDeleteConfirmation = (): void => {
1616
router.visit(route('web.page.home'), {
1717
onFinish: () => {
1818
router.delete(route('web.boards.destroy', board.id))

0 commit comments

Comments
 (0)