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
1692be1b
Commit
1692be1b
authored
Apr 16, 2021
by
Dennis Willers
🏀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
If new Card is -1 a POP-Up which needs to be implemented should pop up. Watching for Error 502
parent
2d1a049e
Pipeline
#401
passed with stage
in 5 minutes and 17 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
7 deletions
+26
-7
package-lock.json
package-lock.json
+1
-1
game.component.ts
src/app/game/game.component.ts
+15
-5
guesser.component.ts
src/app/guesser/guesser.component.ts
+5
-1
overview.component.ts
src/app/overview/overview.component.ts
+5
-0
No files found.
package-lock.json
View file @
1692be1b
{
{
"name"
:
"tabooh"
,
"name"
:
"tabooh"
,
"version"
:
"2.2.
1
"
,
"version"
:
"2.2.
2
"
,
"lockfileVersion"
:
1
,
"lockfileVersion"
:
1
,
"requires"
:
true
,
"requires"
:
true
,
"dependencies"
:
{
"dependencies"
:
{
...
...
src/app/game/game.component.ts
View file @
1692be1b
...
@@ -8,6 +8,7 @@ import {SocketDataService} from '../dao/socketDataService';
...
@@ -8,6 +8,7 @@ import {SocketDataService} from '../dao/socketDataService';
import
{
Subject
}
from
'
rxjs
'
;
import
{
Subject
}
from
'
rxjs
'
;
import
{
takeUntil
}
from
'
rxjs/operators
'
;
import
{
takeUntil
}
from
'
rxjs/operators
'
;
import
{
ViewModus
}
from
'
../dao/viewModus
'
;
import
{
ViewModus
}
from
'
../dao/viewModus
'
;
import
{
HttpErrorResponse
}
from
'
@angular/common/http
'
;
@
Component
({
@
Component
({
selector
:
'
app-game
'
,
selector
:
'
app-game
'
,
...
@@ -102,10 +103,14 @@ export class GameComponent implements OnInit, OnDestroy {
...
@@ -102,10 +103,14 @@ export class GameComponent implements OnInit, OnDestroy {
this
.
subNewCard
=
this
.
socketDataService
.
getNewCard
(
this
.
sessionName
)
this
.
subNewCard
=
this
.
socketDataService
.
getNewCard
(
this
.
sessionName
)
.
pipe
(
takeUntil
(
this
.
ngUnsubscribe
))
.
pipe
(
takeUntil
(
this
.
ngUnsubscribe
))
.
subscribe
(
data
=>
{
.
subscribe
(
data
=>
{
this
.
service
.
getCard
({
cardID
:
data
}).
then
(
value
=>
{
if
(
data
===
-
1
)
{
this
.
fillNewCard
(
value
);
console
.
log
(
'
Öffne POP UP
'
);
this
.
fillGamestatus
();
}
else
{
});
this
.
service
.
getCard
({
cardID
:
data
}).
then
(
value
=>
{
this
.
fillNewCard
(
value
);
this
.
fillGamestatus
();
});
}
});
});
this
.
subEndRound
=
this
.
socketDataService
.
getNewRound
(
this
.
sessionName
)
this
.
subEndRound
=
this
.
socketDataService
.
getNewRound
(
this
.
sessionName
)
.
pipe
(
takeUntil
(
this
.
ngUnsubscribe
))
.
pipe
(
takeUntil
(
this
.
ngUnsubscribe
))
...
@@ -232,7 +237,12 @@ export class GameComponent implements OnInit, OnDestroy {
...
@@ -232,7 +237,12 @@ export class GameComponent implements OnInit, OnDestroy {
if
(
status
)
{
if
(
status
)
{
this
.
fillNewCard
(
value
);
this
.
fillNewCard
(
value
);
}
}
}).
catch
(
reason
=>
console
.
log
(
reason
));
}).
catch
((
err
:
HttpErrorResponse
)
=>
{
console
.
log
(
err
);
if
(
err
.
status
===
502
)
{
console
.
log
(
'
Keine neuen Karten mehr
'
);
}
});
}
}
fillNewCard
(
value
:
any
):
void
{
fillNewCard
(
value
:
any
):
void
{
...
...
src/app/guesser/guesser.component.ts
View file @
1692be1b
...
@@ -63,7 +63,11 @@ export class GuesserComponent implements OnInit, OnDestroy {
...
@@ -63,7 +63,11 @@ export class GuesserComponent implements OnInit, OnDestroy {
this
.
subNewCard
=
this
.
socketDataService
.
getNewCard
(
this
.
sessionName
)
this
.
subNewCard
=
this
.
socketDataService
.
getNewCard
(
this
.
sessionName
)
.
pipe
(
takeUntil
(
this
.
ngUnsubscribe
))
.
pipe
(
takeUntil
(
this
.
ngUnsubscribe
))
.
subscribe
(
data
=>
{
.
subscribe
(
data
=>
{
this
.
fillGamestatus
();
if
(
data
===
-
1
)
{
console
.
log
(
'
Öffne POP UP
'
);
}
else
{
this
.
fillGamestatus
();
}
});
});
this
.
subEndRound
=
this
.
socketDataService
.
getEndRound
(
this
.
sessionName
)
this
.
subEndRound
=
this
.
socketDataService
.
getEndRound
(
this
.
sessionName
)
.
pipe
(
takeUntil
(
this
.
ngUnsubscribe
))
.
pipe
(
takeUntil
(
this
.
ngUnsubscribe
))
...
...
src/app/overview/overview.component.ts
View file @
1692be1b
...
@@ -8,6 +8,7 @@ import {Subject} from 'rxjs';
...
@@ -8,6 +8,7 @@ import {Subject} from 'rxjs';
import
{
takeUntil
}
from
'
rxjs/operators
'
;
import
{
takeUntil
}
from
'
rxjs/operators
'
;
import
{
ViewModus
}
from
'
../dao/viewModus
'
;
import
{
ViewModus
}
from
'
../dao/viewModus
'
;
import
{
Location
}
from
'
@angular/common
'
;
import
{
Location
}
from
'
@angular/common
'
;
import
{
HttpErrorResponse
}
from
'
@angular/common/http
'
;
@
Component
({
@
Component
({
selector
:
'
app-overview
'
,
selector
:
'
app-overview
'
,
...
@@ -207,6 +208,10 @@ export class OverviewComponent implements OnInit, OnDestroy {
...
@@ -207,6 +208,10 @@ export class OverviewComponent implements OnInit, OnDestroy {
const
audio
=
'
../../../assets/sounds/state-change_confirm-up.ogg
'
;
const
audio
=
'
../../../assets/sounds/state-change_confirm-up.ogg
'
;
this
.
playAudio
(
audio
);
this
.
playAudio
(
audio
);
});
});
}).
catch
((
err
:
HttpErrorResponse
)
=>
{
if
(
err
.
status
===
502
)
{
console
.
log
(
'
POP UP HIER ÖFFNEN
'
);
}
});
});
}
}
...
...
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