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
bd74510d
Commit
bd74510d
authored
Dec 31, 2020
by
Dennis Willers
🏀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TestFix
parent
5bddb764
Pipeline
#334
passed with stages
in 5 minutes and 28 seconds
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
21 deletions
+12
-21
error.component.html
src/app/error/error.component.html
+0
-1
error.component.ts
src/app/error/error.component.ts
+0
-17
game.component.ts
src/app/game/game.component.ts
+4
-1
guesser.component.ts
src/app/guesser/guesser.component.ts
+4
-1
overview.component.ts
src/app/overview/overview.component.ts
+4
-1
No files found.
src/app/error/error.component.html
View file @
bd74510d
...
...
@@ -7,7 +7,6 @@
<br>
<mat-progress-spinner
color=
"primary"
mode=
"determinate"
value=
"value"
>
</mat-progress-spinner>
<button
(click)=
"move('left')"
>
Test me
</button>
</div>
src/app/error/error.component.ts
View file @
bd74510d
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
Router
}
from
'
@angular/router
'
;
import
{
io
}
from
'
socket.io-client
'
;
import
{
environment
}
from
'
../../environments/environment
'
;
@
Component
({
selector
:
'
app-error
'
,
...
...
@@ -10,27 +8,12 @@ import {environment} from '../../environments/environment';
})
export
class
ErrorComponent
implements
OnInit
{
private
socket
:
any
;
constructor
(
private
router
:
Router
)
{}
ngOnInit
():
void
{
this
.
socket
=
io
(
environment
.
tabuServerURL
);
this
.
socket
.
disconnect
();
this
.
listen
();
}
listen
():
any
{
this
.
socket
.
on
(
'
position
'
,
(
data
:
any
)
=>
{
console
.
log
(
'
Listener:
'
,
data
);
});
}
toStartpage
():
void
{
this
.
router
.
navigate
([
''
]);
}
move
(
direction
:
string
):
any
{
console
.
log
(
'
left:
'
,
direction
);
this
.
socket
.
emit
(
'
move
'
,
direction
);
}
}
src/app/game/game.component.ts
View file @
bd74510d
...
...
@@ -63,7 +63,10 @@ export class GameComponent implements OnInit {
}
this
.
fillGamestatus
();
this
.
team
=
String
(
params
.
get
(
'
team
'
));
this
.
socket
=
io
(
environment
.
tabuServerURL
);
this
.
socket
=
io
(
environment
.
tabuServerURL
,
{
// WARNING: in that case, there is no fallback to long-polling
transports
:
[
'
websocket
'
]
// or [ 'websocket', 'polling' ], which is the same thing
});
this
.
listen
();
});
this
.
startTimer
();
...
...
src/app/guesser/guesser.component.ts
View file @
bd74510d
...
...
@@ -34,7 +34,10 @@ export class GuesserComponent implements OnInit {
this
.
sessionName
=
String
(
params
.
get
(
'
sessionName
'
));
this
.
team
=
String
(
params
.
get
(
'
team
'
));
this
.
fillGamestatus
();
this
.
socket
=
io
(
environment
.
tabuServerURL
);
this
.
socket
=
io
(
environment
.
tabuServerURL
,
{
// WARNING: in that case, there is no fallback to long-polling
transports
:
[
'
websocket
'
]
// or [ 'websocket', 'polling' ], which is the same thing
});
this
.
listen
();
});
this
.
startTimer
();
...
...
src/app/overview/overview.component.ts
View file @
bd74510d
...
...
@@ -61,7 +61,10 @@ export class OverviewComponent implements OnInit {
return
;
}
this
.
getGameStatus
();
this
.
socket
=
io
(
environment
.
tabuServerURL
);
this
.
socket
=
io
(
environment
.
tabuServerURL
,
{
// WARNING: in that case, there is no fallback to long-polling
transports
:
[
'
websocket
'
]
// or [ 'websocket', 'polling' ], which is the same thing
});
this
.
listen
();
});
}
...
...
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