Indev dashboard feed.
This commit is contained in:
parent
f0096f2e97
commit
8e2c838363
|
|
@ -18,6 +18,6 @@ class EmailVerificationPromptController extends Controller
|
||||||
{
|
{
|
||||||
return $request->user()->hasVerifiedEmail()
|
return $request->user()->hasVerifiedEmail()
|
||||||
? redirect()->intended(RouteServiceProvider::HOME)
|
? redirect()->intended(RouteServiceProvider::HOME)
|
||||||
: view('auth.verify-email');
|
: view('web.auth.verify-email');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,13 +18,13 @@ class VerifyEmailController extends Controller
|
||||||
public function __invoke(EmailVerificationRequest $request)
|
public function __invoke(EmailVerificationRequest $request)
|
||||||
{
|
{
|
||||||
if ($request->user()->hasVerifiedEmail()) {
|
if ($request->user()->hasVerifiedEmail()) {
|
||||||
return redirect()->intended(RouteServiceProvider::HOME.'?verified=1');
|
return redirect()->intended(RouteServiceProvider::HOME);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($request->user()->markEmailAsVerified()) {
|
if ($request->user()->markEmailAsVerified()) {
|
||||||
event(new Verified($request->user()));
|
event(new Verified($request->user()));
|
||||||
}
|
}
|
||||||
|
|
||||||
return redirect()->intended(RouteServiceProvider::HOME.'?verified=1');
|
return redirect()->intended(RouteServiceProvider::HOME);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ use Illuminate\Notifications\Notifiable;
|
||||||
use App\Notifications\ResetPasswordNotification;
|
use App\Notifications\ResetPasswordNotification;
|
||||||
use Laravel\Sanctum\HasApiTokens;
|
use Laravel\Sanctum\HasApiTokens;
|
||||||
|
|
||||||
class User extends Authenticatable
|
class User extends Authenticatable implements MustVerifyEmail
|
||||||
{
|
{
|
||||||
use HasApiTokens, HasFactory, Notifiable;
|
use HasApiTokens, HasFactory, Notifiable;
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -11,28 +11,28 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/preset-react": "^7.16.7",
|
"@babel/preset-react": "^7.16.7",
|
||||||
"@react-three/drei": "^9.6.0",
|
"@react-three/drei": "^9.7.1",
|
||||||
"@react-three/fiber": "^8.0.12",
|
"@react-three/fiber": "^8.0.13",
|
||||||
"@tailwindcss/forms": "^0.4.0",
|
"@tailwindcss/forms": "^0.4.1",
|
||||||
"alpinejs": "^3.4.2",
|
"alpinejs": "^3.10.2",
|
||||||
"autoprefixer": "^10.4.2",
|
"autoprefixer": "^10.4.7",
|
||||||
"axios": "^0.25",
|
"axios": "^0.25.0",
|
||||||
"bootstrap": "^5.1.3",
|
"bootstrap": "^5.1.3",
|
||||||
"jquery": "^3.6.0",
|
"jquery": "^3.6.0",
|
||||||
"laravel-mix": "^6.0.43",
|
"laravel-mix": "^6.0.43",
|
||||||
"lodash": "^4.17.19",
|
"lodash": "^4.17.19",
|
||||||
"postcss": "^8.4.6",
|
"postcss": "^8.4.13",
|
||||||
"postcss-import": "^14.0.2",
|
"postcss-import": "^14.1.0",
|
||||||
"react": "^18.1.0",
|
"react": "^18.1.0",
|
||||||
"resolve-url-loader": "^5.0.0",
|
"resolve-url-loader": "^5.0.0",
|
||||||
"sass": "^1.51.0",
|
"sass": "^1.51.0",
|
||||||
"sass-loader": "^12.1.0",
|
"sass-loader": "^12.6.0",
|
||||||
"tailwindcss": "^3.0.18"
|
"tailwindcss": "^3.0.24"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"install": "^0.13.0",
|
"install": "^0.13.0",
|
||||||
"laravel-mix-banner": "^0.1.4",
|
"laravel-mix-banner": "^0.1.4",
|
||||||
"npm": "^8.8.0",
|
"npm": "^8.9.0",
|
||||||
"react-router-dom": "^6.3.0"
|
"react-router-dom": "^6.3.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,14 @@
|
||||||
<IfModule mod_rewrite.c>
|
Options -MultiViews -Indexes
|
||||||
<IfModule mod_negotiation.c>
|
|
||||||
Options -MultiViews -Indexes
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
RewriteEngine On
|
ErrorDocument 403 /index.php
|
||||||
|
|
||||||
# Handle Authorization Header
|
RewriteEngine On
|
||||||
RewriteCond %{HTTP:Authorization} .
|
|
||||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
|
||||||
|
|
||||||
# Redirect Trailing Slashes If Not A Folder...
|
# Handle Authorization Header
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
RewriteCond %{HTTP:Authorization} .
|
||||||
RewriteCond %{REQUEST_URI} (.+)/$
|
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||||
RewriteRule ^ %1 [L,R=301]
|
|
||||||
|
|
||||||
# Send Requests To Front Controller...
|
# Send Requests To Front Controller...
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
RewriteRule ^ index.php [L]
|
RewriteRule ^ index.php [L]
|
||||||
</IfModule>
|
|
||||||
|
|
@ -1,15 +1,44 @@
|
||||||
// © XlXi 2021
|
// © XlXi 2021
|
||||||
// Graphictoria 5
|
// Graphictoria 5
|
||||||
|
|
||||||
import { useState, useRef } from 'react';
|
import { useState, useRef, useEffect } from 'react';
|
||||||
|
|
||||||
|
import { buildGenericApiUrl } from '../util/HTTP.js';
|
||||||
import Loader from './Loader';
|
import Loader from './Loader';
|
||||||
|
|
||||||
|
let posts = [
|
||||||
|
{
|
||||||
|
postId: 0,
|
||||||
|
poster: {
|
||||||
|
type: "User",
|
||||||
|
name: "XlXi",
|
||||||
|
thumbnail: "https://www.gtoria.local/images/testing/headshot.png"
|
||||||
|
},
|
||||||
|
content: "test",
|
||||||
|
time: "Now"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
postId: 1,
|
||||||
|
poster: {
|
||||||
|
type: "User",
|
||||||
|
name: "XlXi",
|
||||||
|
thumbnail: "https://www.gtoria.local/images/testing/headshot.png"
|
||||||
|
},
|
||||||
|
content: "test 2",
|
||||||
|
time: "Now"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
const Feed = () => {
|
const Feed = () => {
|
||||||
const inputRef = useRef();
|
const inputRef = useRef();
|
||||||
const submitRef = useRef();
|
const submitRef = useRef();
|
||||||
const feedRef = useRef();
|
const feedRef = useRef();
|
||||||
const [feedLoaded, setFeedLoaded] = useState(false);
|
const [feedLoaded, setFeedLoaded] = useState(true);
|
||||||
|
const [mouseHover, setMouseHover] = useState(-1);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
@ -20,15 +49,44 @@ const Feed = () => {
|
||||||
<button ref={ submitRef } className="btn btn-secondary" type="submit">Share</button>
|
<button ref={ submitRef } className="btn btn-secondary" type="submit">Share</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div ref={ feedRef } className="d-flex">
|
{
|
||||||
{
|
feedLoaded ?
|
||||||
feedLoaded ?
|
(
|
||||||
|
posts.length > 0 ?
|
||||||
<h1>feed</h1>
|
<div className="card d-flex">
|
||||||
|
{
|
||||||
|
posts.map(({ postId, poster, time, content }, index) =>
|
||||||
|
<>
|
||||||
|
<div className="row p-2" onMouseEnter={ () => setMouseHover(index) } onMouseLeave={ () => setMouseHover(-1) }>
|
||||||
|
<div className="col-3 col-sm-2 col-md-1">
|
||||||
|
<a href="#">
|
||||||
|
<img src={ poster.thumbnail } className="img-fluid border graphictora-user-circle" />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div className="col-9 col-sm-10 col-md-11">
|
||||||
|
<div className="d-flex">
|
||||||
|
<a href="#" className="text-decoration-none fw-bold me-auto">{ poster.name } <i className="fa-solid fa-gavel"></i></a>
|
||||||
|
{ mouseHover == index ? <a href={ buildGenericApiUrl('www', `report/user-wall/${postId}`) } target="_blank" className="text-decoration-none link-danger me-2">Report <i className="fa-solid fa-circle-exclamation"></i></a> : null }
|
||||||
|
<p className="text-muted">{ time }</p>
|
||||||
|
</div>
|
||||||
|
<p>{ content }</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{ posts.length != (index+1) ? <hr className="m-0" /> : null }
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
</div>
|
||||||
:
|
:
|
||||||
|
<div className="text-center mt-3">
|
||||||
|
<p className="text-muted">No posts were found. You could be the first!</p>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
:
|
||||||
|
<div className="d-flex">
|
||||||
<Loader />
|
<Loader />
|
||||||
}
|
</div>
|
||||||
</div>
|
}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
// Graphictoria 5
|
// Graphictoria 5
|
||||||
|
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import * as Bootstrap from 'bootstrap';
|
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { render } from 'react-dom';
|
import { render } from 'react-dom';
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<div class="mb-4 graphictoria-home-shadow">
|
<div class="mb-4 graphictoria-home-shadow">
|
||||||
<h1 class="graphictoria-homepage-header">Graphictoria</h1>
|
<h1 class="graphictoria-homepage-header">Graphictoria</h1>
|
||||||
{{-- TODO: make the user count automatic via a model --}}
|
{{-- TODO: make the user count automatic via a model --}}
|
||||||
<h5 class="mb-0">Graphictoria aims to revive the classic Roblox experience. Join <b>9k+</b> other users and relive your childhood!</h5>
|
<h5 class="mb-0">Graphictoria aims to revive the classic Roblox experience. Join <b>10k+</b> other users and relive your childhood!</h5>
|
||||||
<p class="graphictoria-homepage-fine-print fst-italic">* Graphictoria is not affiliated with, endorsed by, or sponsored by Roblox Corporation.</p>
|
<p class="graphictoria-homepage-fine-print fst-italic">* Graphictoria is not affiliated with, endorsed by, or sponsored by Roblox Corporation.</p>
|
||||||
</div>
|
</div>
|
||||||
<a href="{{ route('auth.register.index') }}" class="btn btn-success">Create your account<i class="ps-2 graphictoria-small-aligned-text fas fa-chevron-right"></i></a>
|
<a href="{{ route('auth.register.index') }}" class="btn btn-success">Create your account<i class="ps-2 graphictoria-small-aligned-text fas fa-chevron-right"></i></a>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue