--- /dev/null
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table('users', function(Blueprint $table) {
+ $table->text('stream_link')->nullable()->default(null);
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::table('users', function(Blueprint $table) {
+ $table->dropColumn('stream_link');
+ });
+ }
+};
Icon.PENDING = makePreset('PendingIcon', 'clock');
Icon.PROTOCOL = makePreset('ProtocolIcon', 'file-alt');
Icon.SECOND_PLACE = makePreset('SecondPlaceIcon', 'medal');
+Icon.STREAM = makePreset('StreamIcon', ['fab', 'twitch']);
Icon.THIRD_PLACE = makePreset('ThirdPlaceIcon', 'award');
export default Icon;
import PropTypes from 'prop-types';
import React from 'react';
-import { Table } from 'react-bootstrap';
+import { Button, Table } from 'react-bootstrap';
import { withTranslation } from 'react-i18next';
+import Icon from '../common/Icon';
import Box from '../users/Box';
import { calculateScores } from '../../helpers/Tournament';
import i18n from '../../i18n';
<tbody>
{calculateScores(tournament).map(score =>
<tr className="score" key={score.participant.id}>
- <td><Box user={score.participant.user} /></td>
+ <td>
+ <div className="d-flex align-items-center justify-content-between">
+ <Box user={score.participant.user} />
+ {score.participant.user.stream_link ?
+ <Button
+ href={score.participant.user.stream_link}
+ size="sm"
+ target="_blank"
+ title={i18n.t('users.stream')}
+ variant="outline-twitch"
+ >
+ <Icon.STREAM title="" />
+ </Button>
+ : null}
+ </div>
+ </td>
<td className="text-end text-lg">{score.score}</td>
</tr>
)}
PendingIcon: 'Ausstehend',
SecondPlaceIcon: 'Zweiter Platz',
ThirdPlaceIcon: 'Dritter Platz',
+ StreamIcon: 'Stream',
zelda: {
'big-key': 'Big Key',
'blue-boomerang': 'Boomerang',
tournaments: {
scoreboard: 'Scoreboard',
},
+ users: {
+ stream: 'Stream',
+ },
validation: {
error: {
required: 'Bitte ausfüllen',
PendingIcon: 'Pending',
SecondPlaceIcon: 'Second Place',
ThirdPlaceIcon: 'Third Place',
+ StreamIcon: 'Stream',
zelda: {
'big-key': 'Big Key',
'blue-boomerang': 'Boomerang',
tournaments: {
scoreboard: 'Scoreboard',
},
+ users: {
+ stream: 'Stream',
+ },
validation: {
error: {
required: 'Please tell me',
$discord: #5865f2;
$gold: #c9b037;
$silver: #b4b4b4;
+$twitch: #6441a5;
// Custom variant
$custom-colors: (
- "discord": $discord
+ "discord": $discord,
+ "twitch": $twitch
);