Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Tabu
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
9
Issues
9
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dennis Willers
Tabu
Commits
ab00dfc2
Commit
ab00dfc2
authored
Feb 14, 2021
by
Dennis Willers
🏀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change Screen Resolution / Fix Button Spam Bug
parent
fe09725b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
17 deletions
+42
-17
app.component.scss
src/app/app.component.scss
+7
-0
app.component.ts
src/app/app.component.ts
+16
-4
game.component.ts
src/app/game/game.component.ts
+18
-9
round-history.component.html
src/app/round-history/round-history.component.html
+1
-1
round-history.component.ts
src/app/round-history/round-history.component.ts
+0
-3
No files found.
src/app/app.component.scss
View file @
ab00dfc2
...
...
@@ -11,6 +11,13 @@ html, body {
margin-top
:
5em
;
}
.tabletView
{
text-align
:
center
;
margin-left
:
5em
;
margin-right
:
5em
;
margin-top
:
5em
;
}
.mobileView
{
text-align
:
center
;
margin-left
:
2em
;
...
...
src/app/app.component.ts
View file @
ab00dfc2
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
Component
,
HostListener
,
OnInit
}
from
'
@angular/core
'
;
@
Component
({
selector
:
'
app-root
'
,
...
...
@@ -8,12 +8,24 @@ import {Component, OnInit} from '@angular/core';
export
class
AppComponent
implements
OnInit
{
title
=
'
Tabu
'
;
view
=
'
desktopView
'
;
isMobileResolution
=
false
;
ngOnInit
():
void
{
this
.
isMobileResolution
=
window
.
innerWidth
<
768
;
if
(
this
.
isMobileResolution
)
{
const
width
=
window
.
innerWidth
;
this
.
setView
(
width
);
}
@
HostListener
(
'
window:resize
'
,
[
'
$event
'
])
onResize
(
$event
:
any
):
any
{
console
.
log
(
'
RESIZE
'
);
const
width
=
window
.
innerWidth
;
this
.
setView
(
width
);
}
setView
(
width
:
number
):
void
{
if
(
width
<
768
)
{
this
.
view
=
'
mobileView
'
;
}
else
if
(
width
<
1024
){
this
.
view
=
'
tabletView
'
;
}
else
{
this
.
view
=
'
desktopView
'
;
}
...
...
src/app/game/game.component.ts
View file @
ab00dfc2
...
...
@@ -144,9 +144,12 @@ export class GameComponent implements OnInit, OnDestroy {
({
spielname
:
this
.
sessionName
,
team
:
this
.
team
,
red
:
this
.
gameStatus
.
red
,
blue
:
this
.
gameStatus
.
blue
,
cardID
:
this
.
gameStatus
.
activeCard
}).
then
(
value
=>
{
this
.
newCard
();
this
.
gameStatus
.
red
=
JSON
.
parse
(
value
.
red
);
this
.
gameStatus
.
blue
=
JSON
.
parse
(
value
.
blue
);
const
status
=
JSON
.
parse
(
value
.
status
);
if
(
status
)
{
this
.
newCard
();
this
.
gameStatus
.
red
=
JSON
.
parse
(
value
.
red
);
this
.
gameStatus
.
blue
=
JSON
.
parse
(
value
.
blue
);
}
});
}
...
...
@@ -160,9 +163,12 @@ export class GameComponent implements OnInit, OnDestroy {
blue
:
this
.
gameStatus
.
blue
,
cardID
:
this
.
gameStatus
.
activeCard
}).
then
(
value
=>
{
this
.
newCard
();
this
.
gameStatus
.
red
=
JSON
.
parse
(
value
.
red
);
this
.
gameStatus
.
blue
=
JSON
.
parse
(
value
.
blue
);
const
status
=
JSON
.
parse
(
value
.
status
);
if
(
status
)
{
this
.
newCard
();
this
.
gameStatus
.
red
=
JSON
.
parse
(
value
.
red
);
this
.
gameStatus
.
blue
=
JSON
.
parse
(
value
.
blue
);
}
});
}
else
if
(
this
.
isWatchdog
)
{
let
opennentTeam
=
''
;
...
...
@@ -179,9 +185,12 @@ export class GameComponent implements OnInit, OnDestroy {
blue
:
this
.
gameStatus
.
blue
,
cardID
:
this
.
gameStatus
.
activeCard
}).
then
(
value
=>
{
this
.
newCard
();
this
.
gameStatus
.
red
=
JSON
.
parse
(
value
.
red
);
this
.
gameStatus
.
blue
=
JSON
.
parse
(
value
.
blue
);
const
status
=
JSON
.
parse
(
value
.
status
);
if
(
status
)
{
this
.
newCard
();
this
.
gameStatus
.
red
=
JSON
.
parse
(
value
.
red
);
this
.
gameStatus
.
blue
=
JSON
.
parse
(
value
.
blue
);
}
});
}
}
...
...
src/app/round-history/round-history.component.html
View file @
ab00dfc2
<mat-card
*ngIf=
"round
!==
0"
class=
"transparent {{redTurn}}"
>
<mat-card
*ngIf=
"round
History.length >
0"
class=
"transparent {{redTurn}}"
>
<mat-card-title>
Runde {{round}}
</mat-card-title>
</mat-card>
<div
class=
"example-container mat-elevation-z8"
>
...
...
src/app/round-history/round-history.component.ts
View file @
ab00dfc2
...
...
@@ -73,9 +73,6 @@ export class RoundHistoryComponent extends DataSource<any> implements OnInit, On
}
ngOnChanges
(
changes
:
SimpleChanges
):
void
{
if
(
this
.
round
===
6
)
{
console
.
log
(
changes
);
}
if
(
changes
.
hasOwnProperty
(
'
round
'
))
{
this
.
round
=
changes
.
round
.
currentValue
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment