diff --git a/etc/art/gamebusy.pdn b/etc/art/gamebusy.pdn new file mode 100644 index 0000000..8909125 Binary files /dev/null and b/etc/art/gamebusy.pdn differ diff --git a/web/app/Models/User.php b/web/app/Models/User.php index c6a360a..91a7ad0 100644 --- a/web/app/Models/User.php +++ b/web/app/Models/User.php @@ -91,15 +91,12 @@ class User extends Authenticatable implements MustVerifyEmail return $this->created_at->isoFormat('ll'); } - // XlXi: Returns a class name like text-success or - // gt-status-studio to show next to the - // user's name. - public function getOnlineClass() + // XlXi: TODO: Replace this with detailed presence + // like what game the user is in or + // what place they're editing. + public function isOnline() { - if($this->last_seen >= Carbon::now()->subMinutes(2)) - return 'text-success'; - - return 'text-muted'; + return ($this->last_seen >= Carbon::now()->subMinutes(2)); } public function _hasRolesetInternal($roleName) diff --git a/web/database/migrations/2014_10_12_000000_create_users_table.php b/web/database/migrations/2014_10_12_000000_create_users_table.php index b41941e..283bccc 100644 --- a/web/database/migrations/2014_10_12_000000_create_users_table.php +++ b/web/database/migrations/2014_10_12_000000_create_users_table.php @@ -22,6 +22,8 @@ return new class extends Migration $table->rememberToken(); $table->unsignedBigInteger('banId')->nullable(); + $table->string('biography')->nullable(); + $table->unsignedBigInteger('tokens')->default(0); $table->dateTime('next_reward')->useCurrent(); diff --git a/web/public/images/busy/game.png b/web/public/images/busy/game.png new file mode 100644 index 0000000..d03b7fe Binary files /dev/null and b/web/public/images/busy/game.png differ diff --git a/web/resources/js/components/Games.js b/web/resources/js/components/Games.js new file mode 100644 index 0000000..4233ecf --- /dev/null +++ b/web/resources/js/components/Games.js @@ -0,0 +1,120 @@ +/* + Graphictoria 5 (https://gtoria.net) + Copyright © XlXi 2022 +*/ + +import { Component, createRef } from 'react'; + +import classNames from 'classnames/bind'; + +import axios from 'axios'; + +import Twemoji from 'react-twemoji'; + +import { buildGenericApiUrl } from '../util/HTTP.js'; +import ProgressiveImage from './ProgressiveImage'; +import Loader from './Loader'; + +axios.defaults.withCredentials = true; + +function commaSeparate(num) { + let str = num.toString().split('.'); + str[0] = str[0].replace(/\B(?=(\d{3})+(?!\d))/g, ','); + return str.join('.'); +} + +class GameItemCard extends Component { + constructor(props) { + super(props); + this.state = { + hovered: false + } + } + + render() { + return ( + this.setState({hovered: true})} + onMouseLeave={() => this.setState({hovered: false})} + > + + +
+

Todo

+

{commaSeparate(1337)} Playing

+
+ +
+
+
+ +
+
+
+ { + this.state.hovered ? + +
+
+

+ By Todo +

+
+ + : + null + } + + ); + } +} + +class Games extends Component { + constructor(props) { + super(props); + } + + render() { + return ( +
+

Games

+ + +
+ ); + } +} + +export default Games; \ No newline at end of file diff --git a/web/resources/js/pages/Games.js b/web/resources/js/pages/Games.js new file mode 100644 index 0000000..4c230a5 --- /dev/null +++ b/web/resources/js/pages/Games.js @@ -0,0 +1,19 @@ +/* + Graphictoria 5 (https://gtoria.net) + Copyright © XlXi 2022 +*/ + +import $ from 'jquery'; + +import React from 'react'; +import { render } from 'react-dom'; + +import Games from '../components/Games'; + +const gamesId = 'gt-games-main'; + +$(document).ready(function() { + if (document.getElementById(gamesId)) { + render(, document.getElementById(gamesId)); + } +}); \ No newline at end of file diff --git a/web/resources/sass/Graphictoria.scss b/web/resources/sass/Graphictoria.scss index bba18a6..e40baea 100644 --- a/web/resources/sass/Graphictoria.scss +++ b/web/resources/sass/Graphictoria.scss @@ -1345,3 +1345,29 @@ p { -webkit-animation-fill-mode: both; -webkit-animation-name: dropdownEase; } + +// Voting +.graphictoria-vote-bar { + // border + html.gtoria-dark & { + border-color: $gray-700; + } + html.gtoria-light & { + border-color: $border-color; + } + + // rounded-1 + border-radius: 0.2rem; + + // bg-secondary + background-color: $secondary; + + // my-auto and mx-1 + margin: auto 0.25rem auto 0.25rem; + + // flex-fill + flex: 1 1 auto; + + position: relative; + height: 10px; +} diff --git a/web/resources/views/web/games/index.blade.php b/web/resources/views/web/games/index.blade.php index 81c46f0..7a1f174 100644 --- a/web/resources/views/web/games/index.blade.php +++ b/web/resources/views/web/games/index.blade.php @@ -2,6 +2,10 @@ @section('title', 'Games') +@section('page-specific') + +@endsection + @section('content')

Games

diff --git a/web/resources/views/web/home/dashboard.blade.php b/web/resources/views/web/home/dashboard.blade.php index 22f6a84..7fd1277 100644 --- a/web/resources/views/web/home/dashboard.blade.php +++ b/web/resources/views/web/home/dashboard.blade.php @@ -8,39 +8,31 @@ @section('content')
-

Hello, {{ Auth::user()->username }}!

-
- - - Recently Played - - - Content here. - - +
+

Recently Played

+
+ Content here. +
diff --git a/web/resources/views/web/user/profile.blade.php b/web/resources/views/web/user/profile.blade.php index fec28f2..d78cb6e 100644 --- a/web/resources/views/web/user/profile.blade.php +++ b/web/resources/views/web/user/profile.blade.php @@ -1,10 +1,11 @@ +{{-- XlXi: References lol --}} +{{-- XlXi: https://cubash.com/@Icseon --}} +{{-- XlXi: https://youtu.be/nouY1ugddcI?t=583 --}} + @extends('layouts.app') @section('title', $title) -@section('page-specific') -@endsection - @section('quick-admin')