profile bios
This commit is contained in:
parent
916aee357b
commit
9c32b05638
|
|
@ -5,6 +5,7 @@ namespace App\Http\Controllers;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
|
|
||||||
class PageController extends Controller
|
class PageController extends Controller
|
||||||
|
|
@ -63,19 +64,32 @@ class PageController extends Controller
|
||||||
public function users(Request $request)
|
public function users(Request $request)
|
||||||
{
|
{
|
||||||
if ($request->has('q')) {
|
if ($request->has('q')) {
|
||||||
$users = DB::table('users')->where('name', 'LIKE', '%'.$request->q.'%')->paginate(10);
|
$users = DB::table('users')->where('name', 'LIKE', '%' . $request->q . '%')->paginate(10);
|
||||||
} else {
|
} else {
|
||||||
$users = User::paginate(10);
|
$users = User::paginate(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
return view('pages.users')->with('users', $users);
|
return view('pages.users')->with('users', $users);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function settings()
|
public function settings()
|
||||||
{
|
{
|
||||||
return view('misc.settings');
|
return view('misc.settings');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function change_settings(Request $request)
|
||||||
|
{
|
||||||
|
$request->validate([
|
||||||
|
'bio' => 'required|min:3|max:2000'
|
||||||
|
]);
|
||||||
|
|
||||||
|
$user = Auth::user();
|
||||||
|
$user->blurb = $request->bio;
|
||||||
|
$user->save();
|
||||||
|
|
||||||
|
return redirect()->back()->with('success', 'Your bio has been updated.');
|
||||||
|
}
|
||||||
|
|
||||||
public function download()
|
public function download()
|
||||||
{
|
{
|
||||||
return view('pages.download');
|
return view('pages.download');
|
||||||
|
|
|
||||||
|
|
@ -1,104 +1,114 @@
|
||||||
@extends('layouts.app')
|
@extends('layouts.app')
|
||||||
@section('title')
|
@section('title')
|
||||||
<title>Settings - {{ env('APP_NAME') }}</title>
|
<title>Settings - {{ env('APP_NAME') }}</title>
|
||||||
@endsection
|
@endsection
|
||||||
@section('titlediscord')
|
@section('titlediscord')
|
||||||
<meta content="Settings - {{env('APP_NAME')}}" property="og:title" />
|
<meta content="Settings - {{ env('APP_NAME') }}" property="og:title" />
|
||||||
@endsection
|
@endsection
|
||||||
@section('descdiscord')
|
@section('descdiscord')
|
||||||
<meta content="ARCHBLOX is a work in progress revival." property="og:description" />
|
<meta content="ARCHBLOX is a work in progress revival." property="og:description" />
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('popup_content')
|
@section('popup_content')
|
||||||
<div class="popupcontainer" id="invisible">
|
<div class="popupcontainer" id="invisible">
|
||||||
<div class="popup">
|
<div class="popup">
|
||||||
<h2>Test Dialog</h2>
|
<h2>Test Dialog</h2>
|
||||||
<p class="warningtext">WARNING TEXT</p>
|
<p class="warningtext">WARNING TEXT</p>
|
||||||
<p>DESCRIPTION OF THE SETTING YOU ARE ABOUT TO CHANGE</p>
|
<p>DESCRIPTION OF THE SETTING YOU ARE ABOUT TO CHANGE</p>
|
||||||
<input type="text" placeholder="New Username Field">
|
<input type="text" placeholder="New Username Field">
|
||||||
<br>
|
<br>
|
||||||
<input type="password" placeholder="Old Password Field">
|
<input type="password" placeholder="Old Password Field">
|
||||||
<input type="password" placeholder="New Password Field">
|
<input type="password" placeholder="New Password Field">
|
||||||
<input type="password" placeholder="Confirm New Password Field">
|
<input type="password" placeholder="Confirm New Password Field">
|
||||||
<br>
|
<br>
|
||||||
<input type="text" placeholder="Confirm Old E-Mail Field">
|
<input type="text" placeholder="Confirm Old E-Mail Field">
|
||||||
<input type="text" placeholder="New E-Mail Field">
|
<input type="text" placeholder="New E-Mail Field">
|
||||||
<input type="text" placeholder="Confirm New E-Mail Field">
|
<input type="text" placeholder="Confirm New E-Mail Field">
|
||||||
<br>
|
<br>
|
||||||
<input type="date">
|
<input type="date">
|
||||||
<br>
|
<br>
|
||||||
<select name="Time Preference">
|
<select name="Time Preference">
|
||||||
<option value="12hour">12 Hour</option>
|
<option value="12hour">12 Hour</option>
|
||||||
<option value="24hour">24 Hour</option>
|
<option value="24hour">24 Hour</option>
|
||||||
</select>
|
</select>
|
||||||
<br>
|
<br>
|
||||||
<select name="Date Preference">
|
<select name="Date Preference">
|
||||||
<option value="DMY">DAY/MONTH/YEAR</option>
|
<option value="DMY">DAY/MONTH/YEAR</option>
|
||||||
<option value="MDY">MONTH/DAY/YEAR</option>
|
<option value="MDY">MONTH/DAY/YEAR</option>
|
||||||
<option value="YDM">YEAR/MONTH/DAY</option>
|
<option value="YDM">YEAR/MONTH/DAY</option>
|
||||||
</select>
|
</select>
|
||||||
<br>
|
<br>
|
||||||
<button class="bluebutton">Confirm_Good</button>
|
<button class="bluebutton">Confirm_Good</button>
|
||||||
<button class="redbutton">Cancel_Bad</button>
|
<button class="redbutton">Cancel_Bad</button>
|
||||||
<button class="redbutton">Confirm_Bad</button>
|
<button class="redbutton">Confirm_Bad</button>
|
||||||
<button class="bluebutton">Cancel_Good</button>
|
<button class="bluebutton">Cancel_Good</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<h1>Settings</h1>
|
<h1>Settings</h1>
|
||||||
<div class="content_special" style="align-content: flex-end; align-items: flex-start; width=100%;">
|
<form action="{{ route('change_settings') }}" method="POST">
|
||||||
<div class="content_special" style="flex-wrap: wrap; flex-direction: column; width: 50%;">
|
@csrf
|
||||||
<h3>Bio</h3>
|
<div class="content_special" style="align-content: flex-end; align-items: flex-start; width=100%;">
|
||||||
<textarea style="resize: none; width: 100%; height: 75px;" placeholder="Hello!"></textarea>
|
<div class="content_special" style="flex-wrap: wrap; flex-direction: column; width: 50%;">
|
||||||
<button class="bluebutton">Save</button>
|
<h3>Bio</h3>
|
||||||
<br>
|
<textarea style="resize: none; width: 100%; height: 75px;" name="bio">@if(!old('bio')){{ Auth::user()->blurb }}@else{{old('bio')}}@endif</textarea>
|
||||||
|
@if ($errors->any())
|
||||||
|
<span class="warningtext">{{ $errors->first() }}</span>
|
||||||
|
@endif
|
||||||
|
@if(session()->has('success'))
|
||||||
|
<span style="color:green">{{ session()->get('success') }}</span>
|
||||||
|
@endif
|
||||||
|
<button class="bluebutton" type="submit">Save</button>
|
||||||
|
</form>
|
||||||
|
<br>
|
||||||
</div>
|
</div>
|
||||||
<div class="content_special"
|
<div class="content_special"
|
||||||
style="flex-wrap: wrap; flex-direction: row-reverse; width: 50%; text-align: end; align-content: flex-end;">
|
style="flex-wrap: wrap; flex-direction: row-reverse; width: 50%; text-align: end; align-content: flex-end;">
|
||||||
<p style="width: 100%;">Username: OnlyTwentyCharacters <button class="bluebutton">Edit</button></p>
|
<p style="width: 100%;">Username: {{ Auth::user()->name }} <button class="bluebutton">Edit</button></p>
|
||||||
<p style="width: 100%;">E-Mail: t****@ex********.com <button class="bluebutton">Edit</button></p>
|
<p style="width: 100%;">E-Mail: {{ Auth::user()->email }} <button class="bluebutton">Edit</button></p>
|
||||||
<p style="width: 100%;">Date of Birth: 01/01/01 <button class="bluebutton">Edit</button></p>
|
<p style="width: 100%;">Date of Birth: {{ Auth::user()->dob }} <button class="bluebutton">Edit</button></p>
|
||||||
<p style="width: 100%;">Password: ******** <button class="bluebutton">Edit</button></p>
|
<p style="width: 100%;">Password: ******** <button class="bluebutton">Edit</button></p>
|
||||||
<p style="width: 100%;">Date Display Preference: D/M/YY <button class="bluebutton">Edit</button></p>
|
<p style="width: 100%;">Date Display Preference: D/M/YY <button class="bluebutton">Edit</button></p>
|
||||||
<p style="width: 100%;">Time Display Preference: 12 Hour <button class="bluebutton">Edit</button></p>
|
<p style="width: 100%;">Time Display Preference: 12 Hour <button class="bluebutton">Edit</button></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="content_special" style="align-content: flex-end; align-items: flex-start;">
|
|
||||||
<div class="content_special"
|
|
||||||
style="flex-wrap: wrap; flex-direction: column; width: 50%; align-content: flex-start;">
|
|
||||||
<h3>Invite Keys</h3>
|
|
||||||
<p>You can only create 1 invite every week. <br>Manage your keys and key history below.</p>
|
|
||||||
<p><button class="bluebutton"><a href="{{ route('key_index') }}" style="font-weight:normal;color:#fff">Create
|
|
||||||
Invite Key</a></button></p>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="content_special"
|
<div class="content_special" style="align-content: flex-end; align-items: flex-start;">
|
||||||
style="flex-wrap: wrap; flex-direction: column; width: 50%; text-align: end; align-content: center;">
|
<div class="content_special"
|
||||||
<h3>Theme</h3>
|
style="flex-wrap: wrap; flex-direction: column; width: 50%; align-content: flex-start;">
|
||||||
<p>Selected Theme: SKEUOMORPHIC</p>
|
<h3>Invite Keys</h3>
|
||||||
<div class="content_special" style="width: 100%; flex-wrap: nowrap;">
|
<p>You can only create 1 invite every week. <br>Manage your keys and key history below.</p>
|
||||||
<div class="custom-select" style="width: 90%;">
|
<p><button class="bluebutton"><a href="{{ route('key_index') }}" style="font-weight:normal;color:#fff">Create
|
||||||
<select name="Theme" style="width: 100%;">
|
Invite Key</a></button></p>
|
||||||
<option value="SKEUO">SKEUOMORPHIC</option>
|
</div>
|
||||||
<option value="FLAT">FLAT</option>
|
<div class="content_special"
|
||||||
<option value="2013">2013</option>
|
style="flex-wrap: wrap; flex-direction: column; width: 50%; text-align: end; align-content: center;">
|
||||||
<option value="2007">2007</option>
|
<h3>Theme</h3>
|
||||||
</select>
|
<p>Selected Theme: SKEUOMORPHIC</p>
|
||||||
|
<div class="content_special" style="width: 100%; flex-wrap: nowrap;">
|
||||||
|
<div class="custom-select" style="width: 90%;">
|
||||||
|
<select name="Theme" style="width: 100%;">
|
||||||
|
<option value="SKEUO">SKEUOMORPHIC</option>
|
||||||
|
<option value="FLAT">FLAT</option>
|
||||||
|
<option value="2013">2013</option>
|
||||||
|
<option value="2007">2007</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<button style="width: max-content;" class="greenbutton">Save</button>
|
||||||
</div>
|
</div>
|
||||||
<button style="width: max-content;" class="greenbutton">Save</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<br>
|
||||||
<br>
|
<div style="flex-wrap: wrap; flex-direction: column;">
|
||||||
<div style="flex-wrap: wrap; flex-direction: column;">
|
<h3>DANGER ZONE</h3>
|
||||||
<h3>DANGER ZONE</h3>
|
<p style="color: darkred;">These are inactive for now.<br>In order to delete your account, please ask one of the
|
||||||
<p style="color: darkred;">These are inactive for now.<br>In order to delete your account, please ask one of the Developers.</p>
|
Developers.</p>
|
||||||
<p>These buttons can fully delete data. Use with caution!</p>
|
<p>These buttons can fully delete data. Use with caution!</p>
|
||||||
<p>
|
<p>
|
||||||
<button class="redbutton" disabled>Delete Account</button>
|
<button class="redbutton" disabled>Delete Account</button>
|
||||||
<button class="redbutton" disabled>Delete All Places</button>
|
<button class="redbutton" disabled>Delete All Places</button>
|
||||||
<button class="redbutton" disabled>Delete All Avatar Items</button>
|
<button class="redbutton" disabled>Delete All Avatar Items</button>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,9 @@
|
||||||
<div id="profileleftcontainer">
|
<div id="profileleftcontainer">
|
||||||
<p id="status">"I'm new to ARCHBLOX!"</p>
|
<p id="status">"I'm new to ARCHBLOX!"</p>
|
||||||
<img alt="profile image" src="{{ asset('img/reviewpending.png') }}" width="75%">
|
<img alt="profile image" src="{{ asset('img/reviewpending.png') }}" width="75%">
|
||||||
<p id="bio">{{ $data['user']->blurb }}</p>
|
<div id="bio"
|
||||||
|
style="min-width:350px;max-width:350px;text-align:center;margin:0 auto;max-height:275px;overflow-y: auto;">
|
||||||
|
{!! nl2br(e($data['user']->blurb)) !!}</div>
|
||||||
<br>
|
<br>
|
||||||
<div id="stats">
|
<div id="stats">
|
||||||
<h3>Joined: {{ $data['user']->created_at->format('d/m/Y') }}</h3>
|
<h3>Joined: {{ $data['user']->created_at->format('d/m/Y') }}</h3>
|
||||||
|
|
@ -82,8 +84,8 @@
|
||||||
<div class="content_special" style="justify-content: center;">
|
<div class="content_special" style="justify-content: center;">
|
||||||
<h2>Friends ({{ $data['user']->getFriendsCount() }})</h2>
|
<h2>Friends ({{ $data['user']->getFriendsCount() }})</h2>
|
||||||
@if ($data['user']->getFriendsCount() > 0)
|
@if ($data['user']->getFriendsCount() > 0)
|
||||||
<a href="{{ route('profile_friends', $data['user']->id) }}" style="margin-left: 5px"> <button class="bluebutton"
|
<a href="{{ route('profile_friends', $data['user']->id) }}" style="margin-left: 5px"> <button
|
||||||
style="margin-top: 5px">View All</button></a>
|
class="bluebutton" style="margin-top: 5px">View All</button></a>
|
||||||
</div>
|
</div>
|
||||||
<div id="profilefriendcontainer" class="content_special"
|
<div id="profilefriendcontainer" class="content_special"
|
||||||
style="flex-wrap: nowrap;justify-content: space-evenly;flex-direction: row;display: inline-flex;align-content: center;align-items: center;">
|
style="flex-wrap: nowrap;justify-content: space-evenly;flex-direction: row;display: inline-flex;align-content: center;align-items: center;">
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ Route::middleware(['auth'])->group(function () {
|
||||||
Route::get('/users', [App\Http\Controllers\PageController::class, 'users'])->name('users');
|
Route::get('/users', [App\Http\Controllers\PageController::class, 'users'])->name('users');
|
||||||
Route::post('/users', [App\Http\Controllers\PageController::class, 'users'])->name('users');
|
Route::post('/users', [App\Http\Controllers\PageController::class, 'users'])->name('users');
|
||||||
Route::get('/my/settings', [App\Http\Controllers\PageController::class, 'settings'])->name('settings');
|
Route::get('/my/settings', [App\Http\Controllers\PageController::class, 'settings'])->name('settings');
|
||||||
|
Route::post('/my/settings', [App\Http\Controllers\PageController::class, 'change_settings'])->name('change_settings');
|
||||||
Route::get('/my/invites', [App\Http\Controllers\KeyController::class, 'index'])->name('key_index');
|
Route::get('/my/invites', [App\Http\Controllers\KeyController::class, 'index'])->name('key_index');
|
||||||
Route::post('/my/invites', [App\Http\Controllers\KeyController::class, 'create'])->name('key_create');
|
Route::post('/my/invites', [App\Http\Controllers\KeyController::class, 'create'])->name('key_create');
|
||||||
Route::get('/download', [App\Http\Controllers\PageController::class, 'download'])->name('download');
|
Route::get('/download', [App\Http\Controllers\PageController::class, 'download'])->name('download');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue