Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RLG Maker
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Romain DELEAU
RLG Maker
Commits
79c8c71e
Commit
79c8c71e
authored
Apr 15, 2024
by
Romain DELEAU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
snackbars success/fail rework
parent
d9ebbd0c
Changes
51
Hide whitespace changes
Inline
Side-by-side
Showing
51 changed files
with
75 additions
and
522 deletions
+75
-522
app.component.ts
src/app/app.component.ts
+3
-7
app.module.ts
src/app/app.module.ts
+1
-21
copy-role-success.component.html
...ckbars/copy-role-success/copy-role-success.component.html
+0
-1
copy-role-success.component.scss
...ckbars/copy-role-success/copy-role-success.component.scss
+0
-6
copy-role-success.component.spec.ts
...ars/copy-role-success/copy-role-success.component.spec.ts
+0
-23
copy-role-success.component.ts
...nackbars/copy-role-success/copy-role-success.component.ts
+0
-15
copy-task-success.component.html
...ckbars/copy-task-success/copy-task-success.component.html
+0
-1
copy-task-success.component.scss
...ckbars/copy-task-success/copy-task-success.component.scss
+0
-7
copy-task-success.component.spec.ts
...ars/copy-task-success/copy-task-success.component.spec.ts
+0
-23
copy-task-success.component.ts
...nackbars/copy-task-success/copy-task-success.component.ts
+0
-15
delete-optionnal-tasks.component.html
...ete-optionnal-tasks/delete-optionnal-tasks.component.html
+0
-1
delete-optionnal-tasks.component.scss
...ete-optionnal-tasks/delete-optionnal-tasks.component.scss
+0
-6
delete-optionnal-tasks.component.spec.ts
...-optionnal-tasks/delete-optionnal-tasks.component.spec.ts
+0
-23
delete-optionnal-tasks.component.ts
...elete-optionnal-tasks/delete-optionnal-tasks.component.ts
+0
-15
finish-tutorial.component.html
.../snackbars/finish-tutorial/finish-tutorial.component.html
+0
-1
finish-tutorial.component.scss
.../snackbars/finish-tutorial/finish-tutorial.component.scss
+0
-6
finish-tutorial.component.spec.ts
...ackbars/finish-tutorial/finish-tutorial.component.spec.ts
+0
-23
finish-tutorial.component.ts
...ts/snackbars/finish-tutorial/finish-tutorial.component.ts
+0
-15
identifier-snackbar.component.html
...rs/identifier-snackbar/identifier-snackbar.component.html
+0
-1
identifier-snackbar.component.scss
...rs/identifier-snackbar/identifier-snackbar.component.scss
+0
-6
identifier-snackbar.component.spec.ts
...identifier-snackbar/identifier-snackbar.component.spec.ts
+0
-23
identifier-snackbar.component.ts
...bars/identifier-snackbar/identifier-snackbar.component.ts
+0
-16
loadingfail-snackbar.component.html
.../loadingfail-snackbar/loadingfail-snackbar.component.html
+0
-1
loadingfail-snackbar.component.scss
.../loadingfail-snackbar/loadingfail-snackbar.component.scss
+0
-6
loadingfail-snackbar.component.spec.ts
...adingfail-snackbar/loadingfail-snackbar.component.spec.ts
+0
-23
loadingfail-snackbar.component.ts
...rs/loadingfail-snackbar/loadingfail-snackbar.component.ts
+0
-15
loadingsucess-snackbar.component.html
...dingsucess-snackbar/loadingsucess-snackbar.component.html
+0
-1
loadingsucess-snackbar.component.scss
...dingsucess-snackbar/loadingsucess-snackbar.component.scss
+0
-6
loadingsucess-snackbar.component.spec.ts
...gsucess-snackbar/loadingsucess-snackbar.component.spec.ts
+0
-23
loadingsucess-snackbar.component.ts
...oadingsucess-snackbar/loadingsucess-snackbar.component.ts
+0
-15
move-optionnal-tasks.component.html
.../move-optionnal-tasks/move-optionnal-tasks.component.html
+0
-1
move-optionnal-tasks.component.scss
.../move-optionnal-tasks/move-optionnal-tasks.component.scss
+0
-6
move-optionnal-tasks.component.spec.ts
...ve-optionnal-tasks/move-optionnal-tasks.component.spec.ts
+0
-23
move-optionnal-tasks.component.ts
...rs/move-optionnal-tasks/move-optionnal-tasks.component.ts
+0
-15
role-name-duplicate.component.html
...rs/role-name-duplicate/role-name-duplicate.component.html
+0
-1
role-name-duplicate.component.scss
...rs/role-name-duplicate/role-name-duplicate.component.scss
+0
-6
role-name-duplicate.component.spec.ts
...role-name-duplicate/role-name-duplicate.component.spec.ts
+0
-23
role-name-duplicate.component.ts
...bars/role-name-duplicate/role-name-duplicate.component.ts
+0
-15
verify-game-fail-snackbar.component.html
...me-fail-snackbar/verify-game-fail-snackbar.component.html
+0
-1
verify-game-fail-snackbar.component.scss
...me-fail-snackbar/verify-game-fail-snackbar.component.scss
+0
-6
verify-game-fail-snackbar.component.spec.ts
...fail-snackbar/verify-game-fail-snackbar.component.spec.ts
+0
-23
verify-game-fail-snackbar.component.ts
...game-fail-snackbar/verify-game-fail-snackbar.component.ts
+0
-15
role.component.ts
src/app/pieces/role/role.component.ts
+2
-4
annexe-task.component.ts
src/app/pieces/tasks/annexe-task/annexe-task.component.ts
+4
-7
final-task.component.ts
src/app/pieces/tasks/final-task/final-task.component.ts
+3
-5
optionnal-task.component.ts
...p/pieces/tasks/optionnal-task/optionnal-task.component.ts
+7
-11
random-event.component.ts
src/app/pieces/tasks/random-event/random-event.component.ts
+3
-5
repeat-task.component.ts
src/app/pieces/tasks/repeat-task/repeat-task.component.ts
+1
-3
task.component.ts
src/app/pieces/tasks/task/task.component.ts
+3
-5
tutorial.service.ts
src/app/services/tutorial/tutorial.service.ts
+1
-1
styles.scss
src/styles.scss
+47
-1
No files found.
src/app/app.component.ts
View file @
79c8c71e
...
...
@@ -30,21 +30,17 @@ import { MatDialog } from '@angular/material/dialog';
import
{
SaveDialogComponent
}
from
'./components/dialogs/save-dialog/save-dialog.component'
;
import
{
Title
}
from
'@angular/platform-browser'
;
import
{
MatSnackBar
}
from
'@angular/material/snack-bar'
;
import
{
LoadingsucessSnackbarComponent
}
from
'./components/snackbars/loadingsucess-snackbar/loadingsucess-snackbar.component'
;
import
{
LoadingfailSnackbarComponent
}
from
'./components/snackbars/loadingfail-snackbar/loadingfail-snackbar.component'
;
import
{
Trace
}
from
'./class/trace/trace'
;
import
Minimap
from
'js-minimap'
;
import
{
MinimapService
}
from
'./services/minimap/minimap.service'
;
import
{
TranslateService
}
from
'@ngx-translate/core'
;
import
{
TutorialService
}
from
'./services/tutorial/tutorial.service'
;
import
{
VerifyGameFailSnackbarComponent
}
from
'./components/snackbars/verify-game-fail-snackbar/verify-game-fail-snackbar.component'
;
import
{
VerifyDialogComponent
}
from
'./components/dialogs/verify-dialog/verify-dialog.component'
;
import
{
LegalDialogComponent
}
from
'./components/dialogs/legal-dialog/legal-dialog.component'
;
import
{
CreateOptionnalTaskDialogComponent
}
from
'./components/dialogs/create-optionnal-task-dialog/create-optionnal-task-dialog.component'
;
import
{
UnityService
}
from
'./services/unity/unity.service'
;
import
{
Discussion
}
from
'./class/discussion/discussion'
;
import
{
Response
}
from
'./class/response/response'
;
import
{
Sentence
}
from
'./class/sentence/sentence'
;
import
{
InterrogativeSentence
}
from
'./class/sentence/interrogativeSentence/interrogative-sentence'
;
import
{
DeclarativeSentence
}
from
'./class/sentence/declarativeSentence/declarative-sentence'
;
import
{
ObjectReward
}
from
'./class/rewards/object-reward/object-reward'
;
...
...
@@ -600,10 +596,10 @@ export class AppComponent {
this
.
titleService
.
setTitle
(
'RLG Maker'
);
}
this
.
cdr
.
detectChanges
();
this
.
_snackBar
.
open
FromComponent
(
LoadingsucessSnackbarComponent
,
{
duration
:
5000
});
this
.
_snackBar
.
open
(
this
.
translate
.
instant
(
'snackbar_loading_success'
),
''
,
{
duration
:
5000
,
panelClass
:
'snackbar-success'
});
}
catch
(
e
)
{
console
.
error
(
e
);
this
.
_snackBar
.
open
FromComponent
(
LoadingfailSnackbarComponent
,
{
duration
:
5000
});
this
.
_snackBar
.
open
(
this
.
translate
.
instant
(
'snackbar_loading_fail'
),
''
,
{
duration
:
5000
,
panelClass
:
'snackbar-success'
});
}
};
}
...
...
@@ -769,7 +765,7 @@ export class AppComponent {
data
:
this
.
scenario
});
}
else
{
this
.
_snackBar
.
open
FromComponent
(
VerifyGameFailSnackbarComponent
,
{
duration
:
10000
});
this
.
_snackBar
.
open
(
this
.
translate
.
instant
(
'verify_error'
),
''
,
{
duration
:
10000
,
panelClass
:
'snackbar-fail'
});
}
}
...
...
src/app/app.module.ts
View file @
79c8c71e
...
...
@@ -41,26 +41,16 @@ import { CleanDialogComponent } from './components/dialogs/clean-dialog/clean-di
import
{
CreateDialogComponent
}
from
'./components/dialogs/create-dialog/create-dialog.component'
;
import
{
GameCharactersComponent
}
from
'./pieces/game-characters/game-characters.component'
;
import
{
SaveDialogComponent
}
from
'./components/dialogs/save-dialog/save-dialog.component'
;
import
{
IdentifierSnackbarComponent
}
from
'./components/snackbars/identifier-snackbar/identifier-snackbar.component'
;
import
{
LoadingsucessSnackbarComponent
}
from
'./components/snackbars/loadingsucess-snackbar/loadingsucess-snackbar.component'
;
import
{
LoadingfailSnackbarComponent
}
from
'./components/snackbars/loadingfail-snackbar/loadingfail-snackbar.component'
;
import
{
HttpClient
,
HttpClientModule
}
from
'@angular/common/http'
;
import
{
TranslateLoader
,
TranslateModule
}
from
'@ngx-translate/core'
;
import
{
TranslateHttpLoader
}
from
'@ngx-translate/http-loader'
;
import
{
TutorialComponent
}
from
'./components/tutorial/tutorial.component'
;
import
{
FinishTutorialComponent
}
from
'./components/snackbars/finish-tutorial/finish-tutorial.component'
;
import
{
VerifyGameFailSnackbarComponent
}
from
'./components/snackbars/verify-game-fail-snackbar/verify-game-fail-snackbar.component'
;
import
{
VerifyDialogComponent
}
from
'./components/dialogs/verify-dialog/verify-dialog.component'
;
import
{
RoleNameDuplicateComponent
}
from
'./components/snackbars/role-name-duplicate/role-name-duplicate.component'
;
import
{
CopyRoleSuccessComponent
}
from
'./components/snackbars/copy-role-success/copy-role-success.component'
;
import
{
LegalDialogComponent
}
from
'./components/dialogs/legal-dialog/legal-dialog.component'
;
import
{
RewardsComponent
}
from
'./sider-pieces/rewards/rewards.component'
;
import
{
MoveOptionnalTasksComponent
}
from
'./components/snackbars/move-optionnal-tasks/move-optionnal-tasks.component'
;
import
{
CreateOptionnalTaskDialogComponent
}
from
'./components/dialogs/create-optionnal-task-dialog/create-optionnal-task-dialog.component'
;
import
{
DeleteOptionnalTasksComponent
}
from
'./components/snackbars/delete-optionnal-tasks/delete-optionnal-tasks.component'
;
import
{
DiscussionsComponent
}
from
'./sider-pieces/discussions/discussions.component'
;
import
{
DiscussionDialogComponent
}
from
'./components/dialogs/discussion-dialog/discussion-dialog.component'
;
import
{
CopyTaskSuccessComponent
}
from
'./components/snackbars/copy-task-success/copy-task-success.component'
;
export
function
HttpLoaderFactory
(
http
:
HttpClient
)
{
return
new
TranslateHttpLoader
(
http
);
...
...
@@ -96,23 +86,13 @@ export function HttpLoaderFactory(http: HttpClient) {
CreateDialogComponent
,
GameCharactersComponent
,
SaveDialogComponent
,
IdentifierSnackbarComponent
,
LoadingsucessSnackbarComponent
,
LoadingfailSnackbarComponent
,
TutorialComponent
,
FinishTutorialComponent
,
VerifyGameFailSnackbarComponent
,
VerifyDialogComponent
,
RoleNameDuplicateComponent
,
CopyRoleSuccessComponent
,
LegalDialogComponent
,
RewardsComponent
,
MoveOptionnalTasksComponent
,
CreateOptionnalTaskDialogComponent
,
DeleteOptionnalTasksComponent
,
DiscussionsComponent
,
DiscussionDialogComponent
,
CopyTaskSuccessComponent
DiscussionDialogComponent
],
imports
:
[
BrowserModule
,
...
...
src/app/components/snackbars/copy-role-success/copy-role-success.component.html
deleted
100644 → 0
View file @
d9ebbd0c
<span
matSnackBarLabel
>
{{'role_copy_snackbar' | translate}}
</span>
\ No newline at end of file
src/app/components/snackbars/copy-role-success/copy-role-success.component.scss
deleted
100644 → 0
View file @
d9ebbd0c
::ng-deep
.mat-snack-bar-container
{
background-color
:
#1ba345
;
color
:
white
;
box-shadow
:
0px
0px
15px
5px
#1ba345
;
text-align
:
center
;
}
\ No newline at end of file
src/app/components/snackbars/copy-role-success/copy-role-success.component.spec.ts
deleted
100644 → 0
View file @
d9ebbd0c
import
{
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
CopyRoleSuccessComponent
}
from
'./copy-role-success.component'
;
describe
(
'CopyRoleSuccessComponent'
,
()
=>
{
let
component
:
CopyRoleSuccessComponent
;
let
fixture
:
ComponentFixture
<
CopyRoleSuccessComponent
>
;
beforeEach
(
async
()
=>
{
await
TestBed
.
configureTestingModule
({
declarations
:
[
CopyRoleSuccessComponent
]
})
.
compileComponents
();
fixture
=
TestBed
.
createComponent
(
CopyRoleSuccessComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
src/app/components/snackbars/copy-role-success/copy-role-success.component.ts
deleted
100644 → 0
View file @
d9ebbd0c
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'app-copy-role-success'
,
templateUrl
:
'./copy-role-success.component.html'
,
styleUrls
:
[
'./copy-role-success.component.scss'
]
})
export
class
CopyRoleSuccessComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
():
void
{
}
}
src/app/components/snackbars/copy-task-success/copy-task-success.component.html
deleted
100644 → 0
View file @
d9ebbd0c
<span
matSnackBarLabel
>
{{'task_copy_snackbar' | translate}}
</span>
\ No newline at end of file
src/app/components/snackbars/copy-task-success/copy-task-success.component.scss
deleted
100644 → 0
View file @
d9ebbd0c
::ng-deep
.mat-snack-bar-container
{
background-color
:
#1ba345
;
color
:
white
;
box-shadow
:
0px
0px
15px
5px
#1ba345
;
text-align
:
center
;
white-space
:
pre-wrap
;
}
\ No newline at end of file
src/app/components/snackbars/copy-task-success/copy-task-success.component.spec.ts
deleted
100644 → 0
View file @
d9ebbd0c
import
{
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
CopyTaskSuccessComponent
}
from
'./copy-task-success.component'
;
describe
(
'CopyTaskSuccessComponent'
,
()
=>
{
let
component
:
CopyTaskSuccessComponent
;
let
fixture
:
ComponentFixture
<
CopyTaskSuccessComponent
>
;
beforeEach
(
async
()
=>
{
await
TestBed
.
configureTestingModule
({
declarations
:
[
CopyTaskSuccessComponent
]
})
.
compileComponents
();
fixture
=
TestBed
.
createComponent
(
CopyTaskSuccessComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
src/app/components/snackbars/copy-task-success/copy-task-success.component.ts
deleted
100644 → 0
View file @
d9ebbd0c
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'app-copy-task-success'
,
templateUrl
:
'./copy-task-success.component.html'
,
styleUrls
:
[
'./copy-task-success.component.scss'
]
})
export
class
CopyTaskSuccessComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
():
void
{
}
}
src/app/components/snackbars/delete-optionnal-tasks/delete-optionnal-tasks.component.html
deleted
100644 → 0
View file @
d9ebbd0c
<span
matSnackBarLabel
>
{{'snackbar_deleteOptionnalTask' | translate}}
</span>
src/app/components/snackbars/delete-optionnal-tasks/delete-optionnal-tasks.component.scss
deleted
100644 → 0
View file @
d9ebbd0c
::ng-deep
.mat-snack-bar-container
{
background-color
:
#ffa808
;
color
:
white
;
box-shadow
:
0px
0px
15px
5px
#ffa808
;
text-align
:
center
;
}
\ No newline at end of file
src/app/components/snackbars/delete-optionnal-tasks/delete-optionnal-tasks.component.spec.ts
deleted
100644 → 0
View file @
d9ebbd0c
import
{
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
DeleteOptionnalTasksComponent
}
from
'./delete-optionnal-tasks.component'
;
describe
(
'DeleteOptionnalTasksComponent'
,
()
=>
{
let
component
:
DeleteOptionnalTasksComponent
;
let
fixture
:
ComponentFixture
<
DeleteOptionnalTasksComponent
>
;
beforeEach
(
async
()
=>
{
await
TestBed
.
configureTestingModule
({
declarations
:
[
DeleteOptionnalTasksComponent
]
})
.
compileComponents
();
fixture
=
TestBed
.
createComponent
(
DeleteOptionnalTasksComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
src/app/components/snackbars/delete-optionnal-tasks/delete-optionnal-tasks.component.ts
deleted
100644 → 0
View file @
d9ebbd0c
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'app-delete-optionnal-tasks'
,
templateUrl
:
'./delete-optionnal-tasks.component.html'
,
styleUrls
:
[
'./delete-optionnal-tasks.component.scss'
]
})
export
class
DeleteOptionnalTasksComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
():
void
{
}
}
src/app/components/snackbars/finish-tutorial/finish-tutorial.component.html
deleted
100644 → 0
View file @
d9ebbd0c
<span
matSnackBarLabel
>
{{'tutorial_finish' | translate}}
</span>
\ No newline at end of file
src/app/components/snackbars/finish-tutorial/finish-tutorial.component.scss
deleted
100644 → 0
View file @
d9ebbd0c
::ng-deep
.mat-snack-bar-container
{
background-color
:
#1ba345
;
color
:
white
;
box-shadow
:
0px
0px
15px
5px
#1ba345
;
text-align
:
center
;
}
\ No newline at end of file
src/app/components/snackbars/finish-tutorial/finish-tutorial.component.spec.ts
deleted
100644 → 0
View file @
d9ebbd0c
import
{
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
FinishTutorialComponent
}
from
'./finish-tutorial.component'
;
describe
(
'FinishTutorialComponent'
,
()
=>
{
let
component
:
FinishTutorialComponent
;
let
fixture
:
ComponentFixture
<
FinishTutorialComponent
>
;
beforeEach
(
async
()
=>
{
await
TestBed
.
configureTestingModule
({
declarations
:
[
FinishTutorialComponent
]
})
.
compileComponents
();
fixture
=
TestBed
.
createComponent
(
FinishTutorialComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
src/app/components/snackbars/finish-tutorial/finish-tutorial.component.ts
deleted
100644 → 0
View file @
d9ebbd0c
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'app-finish-tutorial'
,
templateUrl
:
'./finish-tutorial.component.html'
,
styleUrls
:
[
'./finish-tutorial.component.scss'
]
})
export
class
FinishTutorialComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
():
void
{
}
}
src/app/components/snackbars/identifier-snackbar/identifier-snackbar.component.html
deleted
100644 → 0
View file @
d9ebbd0c
<span
matSnackBarLabel
>
{{'snackbar_identifier' | translate}}
</span>
src/app/components/snackbars/identifier-snackbar/identifier-snackbar.component.scss
deleted
100644 → 0
View file @
d9ebbd0c
::ng-deep
.mat-snack-bar-container
{
background-color
:
#de3e44
;
color
:
white
;
box-shadow
:
0px
0px
15px
5px
#de3e44
;
text-align
:
center
;
}
\ No newline at end of file
src/app/components/snackbars/identifier-snackbar/identifier-snackbar.component.spec.ts
deleted
100644 → 0
View file @
d9ebbd0c
import
{
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
IdentifierSnackbarComponent
}
from
'./identifier-snackbar.component'
;
describe
(
'IdentifierSnackbarComponent'
,
()
=>
{
let
component
:
IdentifierSnackbarComponent
;
let
fixture
:
ComponentFixture
<
IdentifierSnackbarComponent
>
;
beforeEach
(
async
()
=>
{
await
TestBed
.
configureTestingModule
({
declarations
:
[
IdentifierSnackbarComponent
]
})
.
compileComponents
();
fixture
=
TestBed
.
createComponent
(
IdentifierSnackbarComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
src/app/components/snackbars/identifier-snackbar/identifier-snackbar.component.ts
deleted
100644 → 0
View file @
d9ebbd0c
import
{
Component
,
OnInit
,
inject
}
from
'@angular/core'
;
import
{
MatSnackBarRef
}
from
'@angular/material/snack-bar'
;
@
Component
({
selector
:
'app-identifier-snackbar'
,
templateUrl
:
'./identifier-snackbar.component.html'
,
styleUrls
:
[
'./identifier-snackbar.component.scss'
]
})
export
class
IdentifierSnackbarComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
():
void
{
}
}
src/app/components/snackbars/loadingfail-snackbar/loadingfail-snackbar.component.html
deleted
100644 → 0
View file @
d9ebbd0c
<span
matSnackBarLabel
>
{{'snackbar_loading_fail' | translate}}
</span>
\ No newline at end of file
src/app/components/snackbars/loadingfail-snackbar/loadingfail-snackbar.component.scss
deleted
100644 → 0
View file @
d9ebbd0c
::ng-deep
.mat-snack-bar-container
{
background-color
:
#de3e44
;
color
:
white
;
box-shadow
:
0px
0px
15px
5px
#de3e44
;
text-align
:
center
;
}
\ No newline at end of file
src/app/components/snackbars/loadingfail-snackbar/loadingfail-snackbar.component.spec.ts
deleted
100644 → 0
View file @
d9ebbd0c
import
{
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
LoadingfailSnackbarComponent
}
from
'./loadingfail-snackbar.component'
;
describe
(
'LoadingfailSnackbarComponent'
,
()
=>
{
let
component
:
LoadingfailSnackbarComponent
;
let
fixture
:
ComponentFixture
<
LoadingfailSnackbarComponent
>
;
beforeEach
(
async
()
=>
{
await
TestBed
.
configureTestingModule
({
declarations
:
[
LoadingfailSnackbarComponent
]
})
.
compileComponents
();
fixture
=
TestBed
.
createComponent
(
LoadingfailSnackbarComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
src/app/components/snackbars/loadingfail-snackbar/loadingfail-snackbar.component.ts
deleted
100644 → 0
View file @
d9ebbd0c
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'app-loadingfail-snackbar'
,
templateUrl
:
'./loadingfail-snackbar.component.html'
,
styleUrls
:
[
'./loadingfail-snackbar.component.scss'
]
})
export
class
LoadingfailSnackbarComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
():
void
{
}
}
src/app/components/snackbars/loadingsucess-snackbar/loadingsucess-snackbar.component.html
deleted
100644 → 0
View file @
d9ebbd0c
<span
matSnackBarLabel
>
{{'snackbar_loading_success' | translate}}
</span>
\ No newline at end of file
src/app/components/snackbars/loadingsucess-snackbar/loadingsucess-snackbar.component.scss
deleted
100644 → 0
View file @
d9ebbd0c
::ng-deep
.mat-snack-bar-container
{
background-color
:
#1ba345
;
color
:
white
;
box-shadow
:
0px
0px
15px
5px
#1ba345
;
text-align
:
center
;
}
\ No newline at end of file
src/app/components/snackbars/loadingsucess-snackbar/loadingsucess-snackbar.component.spec.ts
deleted
100644 → 0
View file @
d9ebbd0c
import
{
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
LoadingsucessSnackbarComponent
}
from
'./loadingsucess-snackbar.component'
;
describe
(
'LoadingsucessSnackbarComponent'
,
()
=>
{
let
component
:
LoadingsucessSnackbarComponent
;
let
fixture
:
ComponentFixture
<
LoadingsucessSnackbarComponent
>
;
beforeEach
(
async
()
=>
{
await
TestBed
.
configureTestingModule
({
declarations
:
[
LoadingsucessSnackbarComponent
]
})
.
compileComponents
();
fixture
=
TestBed
.
createComponent
(
LoadingsucessSnackbarComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
src/app/components/snackbars/loadingsucess-snackbar/loadingsucess-snackbar.component.ts
deleted
100644 → 0
View file @
d9ebbd0c
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'app-loadingsucess-snackbar'
,
templateUrl
:
'./loadingsucess-snackbar.component.html'
,
styleUrls
:
[
'./loadingsucess-snackbar.component.scss'
]
})
export
class
LoadingsucessSnackbarComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
():
void
{
}
}
src/app/components/snackbars/move-optionnal-tasks/move-optionnal-tasks.component.html
deleted
100644 → 0
View file @
d9ebbd0c
<span
matSnackBarLabel
>
{{'snackbar_moveOptionnalTask' | translate}}
</span>
src/app/components/snackbars/move-optionnal-tasks/move-optionnal-tasks.component.scss
deleted
100644 → 0
View file @
d9ebbd0c
::ng-deep
.mat-snack-bar-container
{
background-color
:
#ffa808
;
color
:
white
;
box-shadow
:
0px
0px
15px
5px
#ffa808
;
text-align
:
center
;
}
\ No newline at end of file
src/app/components/snackbars/move-optionnal-tasks/move-optionnal-tasks.component.spec.ts
deleted
100644 → 0
View file @
d9ebbd0c
import
{
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
MoveOptionnalTasksComponent
}
from
'./move-optionnal-tasks.component'
;
describe
(
'MoveOptionnalTasksComponent'
,
()
=>
{
let
component
:
MoveOptionnalTasksComponent
;
let
fixture
:
ComponentFixture
<
MoveOptionnalTasksComponent
>
;
beforeEach
(
async
()
=>
{
await
TestBed
.
configureTestingModule
({
declarations
:
[
MoveOptionnalTasksComponent
]
})
.
compileComponents
();
fixture
=
TestBed
.
createComponent
(
MoveOptionnalTasksComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
src/app/components/snackbars/move-optionnal-tasks/move-optionnal-tasks.component.ts
deleted
100644 → 0
View file @
d9ebbd0c
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'app-move-optionnal-tasks'
,
templateUrl
:
'./move-optionnal-tasks.component.html'
,
styleUrls
:
[
'./move-optionnal-tasks.component.scss'
]
})
export
class
MoveOptionnalTasksComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
():
void
{
}
}
src/app/components/snackbars/role-name-duplicate/role-name-duplicate.component.html
deleted
100644 → 0
View file @
d9ebbd0c
<span
matSnackBarLabel
>
{{'snackbar_roleName' | translate}}
</span>
src/app/components/snackbars/role-name-duplicate/role-name-duplicate.component.scss
deleted
100644 → 0
View file @
d9ebbd0c
::ng-deep
.mat-snack-bar-container
{
background-color
:
#de3e44
;
color
:
white
;
box-shadow
:
0px
0px
15px
5px
#de3e44
;
text-align
:
center
;
}
\ No newline at end of file
src/app/components/snackbars/role-name-duplicate/role-name-duplicate.component.spec.ts
deleted
100644 → 0
View file @
d9ebbd0c
import
{
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
RoleNameDuplicateComponent
}
from
'./role-name-duplicate.component'
;
describe
(
'RoleNameDuplicateComponent'
,
()
=>
{
let
component
:
RoleNameDuplicateComponent
;
let
fixture
:
ComponentFixture
<
RoleNameDuplicateComponent
>
;
beforeEach
(
async
()
=>
{
await
TestBed
.
configureTestingModule
({
declarations
:
[
RoleNameDuplicateComponent
]
})
.
compileComponents
();
fixture
=
TestBed
.
createComponent
(
RoleNameDuplicateComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
src/app/components/snackbars/role-name-duplicate/role-name-duplicate.component.ts
deleted
100644 → 0
View file @
d9ebbd0c
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'app-role-name-duplicate'
,
templateUrl
:
'./role-name-duplicate.component.html'
,
styleUrls
:
[
'./role-name-duplicate.component.scss'
]
})
export
class
RoleNameDuplicateComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
():
void
{
}
}
src/app/components/snackbars/verify-game-fail-snackbar/verify-game-fail-snackbar.component.html
deleted
100644 → 0
View file @
d9ebbd0c
<span
matSnackBarLabel
>
{{'verify_error' | translate}}
</span>
\ No newline at end of file
src/app/components/snackbars/verify-game-fail-snackbar/verify-game-fail-snackbar.component.scss
deleted
100644 → 0
View file @
d9ebbd0c
::ng-deep
.mat-snack-bar-container
{
background-color
:
#de3e44
;
color
:
white
;
box-shadow
:
0px
0px
15px
5px
#de3e44
;
text-align
:
center
;
}
\ No newline at end of file
src/app/components/snackbars/verify-game-fail-snackbar/verify-game-fail-snackbar.component.spec.ts
deleted
100644 → 0
View file @
d9ebbd0c
import
{
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
VerifyGameFailSnackbarComponent
}
from
'./verify-game-fail-snackbar.component'
;
describe
(
'VerifyGameFailSnackbarComponent'
,
()
=>
{
let
component
:
VerifyGameFailSnackbarComponent
;
let
fixture
:
ComponentFixture
<
VerifyGameFailSnackbarComponent
>
;
beforeEach
(
async
()
=>
{
await
TestBed
.
configureTestingModule
({
declarations
:
[
VerifyGameFailSnackbarComponent
]
})
.
compileComponents
();
fixture
=
TestBed
.
createComponent
(
VerifyGameFailSnackbarComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
src/app/components/snackbars/verify-game-fail-snackbar/verify-game-fail-snackbar.component.ts
deleted
100644 → 0
View file @
d9ebbd0c
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'app-verify-game-fail-snackbar'
,
templateUrl
:
'./verify-game-fail-snackbar.component.html'
,
styleUrls
:
[
'./verify-game-fail-snackbar.component.scss'
]
})
export
class
VerifyGameFailSnackbarComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
():
void
{
}
}
src/app/pieces/role/role.component.ts
View file @
79c8c71e
...
...
@@ -22,10 +22,8 @@ import { MinimapService } from 'src/app/services/minimap/minimap.service';
import
{
TranslateService
}
from
'@ngx-translate/core'
;
import
{
TutorialService
}
from
'src/app/services/tutorial/tutorial.service'
;
import
{
MatSnackBar
}
from
'@angular/material/snack-bar'
;
import
{
RoleNameDuplicateComponent
}
from
'src/app/components/snackbars/role-name-duplicate/role-name-duplicate.component'
;
import
{
CopyRoleService
}
from
'src/app/services/copyRole/copy-role.service'
;
import
{
Task
}
from
'src/app/class/task/task'
;
import
{
CopyRoleSuccessComponent
}
from
'src/app/components/snackbars/copy-role-success/copy-role-success.component'
;
import
{
RoleOccurrence
}
from
'src/app/class/role-occurrence/role-occurrence'
;
import
{
ObjectReward
}
from
'src/app/class/rewards/object-reward/object-reward'
;
import
{
Reward
}
from
'src/app/class/rewards/reward'
;
...
...
@@ -141,7 +139,7 @@ export class RoleComponent implements OnInit {
}
});
this
.
copyRoleService
.
mission
=
this
.
mission
;
this
.
_snackBar
.
open
FromComponent
(
CopyRoleSuccessComponent
,
{
duration
:
5000
});
this
.
_snackBar
.
open
(
this
.
translate
.
instant
(
'role_copy_snackbar'
),
''
,
{
duration
:
5000
,
panelClass
:
'snackbar-success'
});
}
onClickPaste
():
void
{
...
...
@@ -723,7 +721,7 @@ export class RoleComponent implements OnInit {
intituleIsAlreadyUsed
():
void
{
this
.
mission
.
roles
.
forEach
(
role
=>
{
if
(
role
!=
this
.
role
&&
role
.
intitule
==
this
.
role
.
intitule
)
{
this
.
_snackBar
.
open
FromComponent
(
RoleNameDuplicateComponent
,
{
duration
:
5000
});
this
.
_snackBar
.
open
(
this
.
translate
.
instant
(
'snackbar_roleName'
),
''
,
{
duration
:
5000
,
panelClass
:
'snackbar-fail'
});
this
.
role
.
intitule
=
''
;
}
});
...
...
src/app/pieces/tasks/annexe-task/annexe-task.component.ts
View file @
79c8c71e
...
...
@@ -12,15 +12,12 @@ import { TooltipService } from 'src/app/services/tooltip/tooltip.service';
import
{
SuppressDialogComponent
}
from
'src/app/components/dialogs/suppress-dialog/suppress-dialog.component'
;
import
{
CleanDialogComponent
}
from
'src/app/components/dialogs/clean-dialog/clean-dialog.component'
;
import
{
MatSnackBar
}
from
'@angular/material/snack-bar'
;
import
{
IdentifierSnackbarComponent
}
from
'src/app/components/snackbars/identifier-snackbar/identifier-snackbar.component'
;
import
{
Trace
}
from
'src/app/class/trace/trace'
;
import
{
MinimapService
}
from
'src/app/services/minimap/minimap.service'
;
import
{
TranslateService
}
from
'@ngx-translate/core'
;
import
{
TutorialService
}
from
'src/app/services/tutorial/tutorial.service'
;
import
{
FinishTutorialComponent
}
from
'src/app/components/snackbars/finish-tutorial/finish-tutorial.component'
;
import
{
UnityService
}
from
'src/app/services/unity/unity.service'
;
import
{
CopyTaskService
}
from
'src/app/services/copyTask/copy-task.service'
;
import
{
CopyTaskSuccessComponent
}
from
'src/app/components/snackbars/copy-task-success/copy-task-success.component'
;
@
Component
({
selector
:
'app-annexe-task'
,
...
...
@@ -59,7 +56,7 @@ export class AnnexeTaskComponent implements OnInit {
this
.
scenario
.
traces
.
push
(
new
Trace
(
this
.
scenario
.
traces
.
length
,
'valid_phase'
,
undefined
,
undefined
,
'phase_'
+
this
.
tutorialService
.
phase
,
'Tutorial'
));
this
.
tutorialService
.
validPhase
();
if
(
this
.
tutorialService
.
isDone
())
{
this
.
_snackBar
.
open
FromComponent
(
FinishTutorialComponent
,
{
duration
:
5000
});
this
.
_snackBar
.
open
(
this
.
translate
.
instant
(
'tutorial_finish'
),
''
,
{
duration
:
5000
,
panelClass
:
'snackbar-success'
});
}
}
}
...
...
@@ -161,13 +158,13 @@ export class AnnexeTaskComponent implements OnInit {
onClickCopy
()
{
this
.
copyTaskService
.
onClickCopy
(
this
.
scenario
,
this
.
role
,
this
.
task
);
this
.
_snackBar
.
open
FromComponent
(
CopyTaskSuccessComponent
,
{
duration
:
5000
});
this
.
_snackBar
.
open
(
this
.
translate
.
instant
(
'task_copy_snackbar'
),
''
,
{
duration
:
5000
,
panelClass
:
'snackbar-success'
});
}
onClickPaste
()
{
this
.
role
.
tasks
[
this
.
i
][
this
.
j
]
=
this
.
copyTaskService
.
onClickPaste
(
this
.
scenario
);;
if
(
this
.
role
.
isAlreadyUsedIdentifier
((
this
.
role
.
tasks
[
this
.
i
][
this
.
j
]
as
Task
).
identifier
))
{
this
.
_snackBar
.
open
FromComponent
(
IdentifierSnackbarComponent
,
{
duration
:
5000
});
this
.
_snackBar
.
open
(
this
.
translate
.
instant
(
'snackbar_identifier'
),
''
,
{
duration
:
5000
,
panelClass
:
'snackbar-fail'
});
(
this
.
role
.
tasks
[
this
.
i
][
this
.
j
]
as
Task
).
identifier
=
''
;
}
}
...
...
@@ -283,7 +280,7 @@ export class AnnexeTaskComponent implements OnInit {
});
}
if
(
this
.
role
.
isAlreadyUsedIdentifier
(
this
.
task
.
identifier
))
{
this
.
_snackBar
.
open
FromComponent
(
IdentifierSnackbarComponent
,
{
duration
:
5000
});
this
.
_snackBar
.
open
(
this
.
translate
.
instant
(
'snackbar_identifier'
),
''
,
{
duration
:
5000
,
panelClass
:
'snackbar-fail'
});
this
.
task
.
identifier
=
''
;
}
this
.
editTrace
(
event
,
'Task_identifier'
);
...
...
src/app/pieces/tasks/final-task/final-task.component.ts
View file @
79c8c71e
...
...
@@ -12,12 +12,10 @@ import { SuppressDialogComponent } from 'src/app/components/dialogs/suppress-dia
import
{
MatDialog
}
from
'@angular/material/dialog'
;
import
{
CleanDialogComponent
}
from
'src/app/components/dialogs/clean-dialog/clean-dialog.component'
;
import
{
MatSnackBar
}
from
'@angular/material/snack-bar'
;
import
{
IdentifierSnackbarComponent
}
from
'src/app/components/snackbars/identifier-snackbar/identifier-snackbar.component'
;
import
{
Trace
}
from
'src/app/class/trace/trace'
;
import
{
MinimapService
}
from
'src/app/services/minimap/minimap.service'
;
import
{
TranslateService
}
from
'@ngx-translate/core'
;
import
{
UnityService
}
from
'src/app/services/unity/unity.service'
;
import
{
CopyTaskSuccessComponent
}
from
'src/app/components/snackbars/copy-task-success/copy-task-success.component'
;
import
{
CopyTaskService
}
from
'src/app/services/copyTask/copy-task.service'
;
@
Component
({
...
...
@@ -163,13 +161,13 @@ export class FinalTaskComponent implements OnInit {
onClickCopy
()
{
this
.
copyTaskService
.
onClickCopy
(
this
.
scenario
,
this
.
role
,
this
.
task
);
this
.
_snackBar
.
open
FromComponent
(
CopyTaskSuccessComponent
,
{
duration
:
5000
});
this
.
_snackBar
.
open
(
this
.
translate
.
instant
(
'task_copy_snackbar'
),
''
,
{
duration
:
5000
,
panelClass
:
'snackbar-success'
});
}
onClickPaste
()
{
this
.
role
.
tasks
[
this
.
i
][
this
.
j
]
=
this
.
copyTaskService
.
onClickPaste
(
this
.
scenario
);;
if
(
this
.
role
.
isAlreadyUsedIdentifier
((
this
.
role
.
tasks
[
this
.
i
][
this
.
j
]
as
Task
).
identifier
))
{
this
.
_snackBar
.
open
FromComponent
(
IdentifierSnackbarComponent
,
{
duration
:
5000
});
this
.
_snackBar
.
open
(
this
.
translate
.
instant
(
'snackbar_identifier'
),
''
,
{
duration
:
5000
,
panelClass
:
'snackbar-fail'
});
(
this
.
role
.
tasks
[
this
.
i
][
this
.
j
]
as
Task
).
identifier
=
''
;
}
}
...
...
@@ -305,7 +303,7 @@ export class FinalTaskComponent implements OnInit {
});
}
if
(
this
.
role
.
isAlreadyUsedIdentifier
(
this
.
task
.
identifier
))
{
this
.
_snackBar
.
open
FromComponent
(
IdentifierSnackbarComponent
,
{
duration
:
5000
});
this
.
_snackBar
.
open
(
this
.
translate
.
instant
(
'snackbar_identifier'
),
''
,
{
duration
:
5000
,
panelClass
:
'snackbar-fail'
});
this
.
task
.
identifier
=
''
;
}
this
.
editTrace
(
event
,
'Task_identifier'
);
...
...
src/app/pieces/tasks/optionnal-task/optionnal-task.component.ts
View file @
79c8c71e
...
...
@@ -12,15 +12,11 @@ import { SuppressDialogComponent } from 'src/app/components/dialogs/suppress-dia
import
{
MatDialog
}
from
'@angular/material/dialog'
;
import
{
CleanDialogComponent
}
from
'src/app/components/dialogs/clean-dialog/clean-dialog.component'
;
import
{
MatSnackBar
}
from
'@angular/material/snack-bar'
;
import
{
IdentifierSnackbarComponent
}
from
'src/app/components/snackbars/identifier-snackbar/identifier-snackbar.component'
;
import
{
Trace
}
from
'src/app/class/trace/trace'
;
import
{
MinimapService
}
from
'src/app/services/minimap/minimap.service'
;
import
{
TranslateService
}
from
'@ngx-translate/core'
;
import
{
MoveOptionnalTasksComponent
}
from
'src/app/components/snackbars/move-optionnal-tasks/move-optionnal-tasks.component'
;
import
{
DeleteOptionnalTasksComponent
}
from
'src/app/components/snackbars/delete-optionnal-tasks/delete-optionnal-tasks.component'
;
import
{
UnityService
}
from
'src/app/services/unity/unity.service'
;
import
{
CopyTaskService
}
from
'src/app/services/copyTask/copy-task.service'
;
import
{
CopyTaskSuccessComponent
}
from
'src/app/components/snackbars/copy-task-success/copy-task-success.component'
;
@
Component
({
selector
:
'app-optionnal-task'
,
...
...
@@ -138,7 +134,7 @@ export class OptionnalTaskComponent implements OnInit {
}
this
.
task
.
changeType
(
type
);
if
(
this
.
role
.
countOptionnalTasksInColumn
(
this
.
role
.
getRealIndex
(
this
.
i
,
this
.
j
))
<
2
)
{
this
.
_snackBar
.
open
FromComponent
(
DeleteOptionnalTasksComponent
,
{
duration
:
5000
});
this
.
_snackBar
.
open
(
this
.
translate
.
instant
(
'snackbar_deleteOptionnalTask'
),
''
,
{
duration
:
5000
,
panelClass
:
'snackbar-warning'
});
}
this
.
scenario
.
traces
.
push
(
new
Trace
(
this
.
scenario
.
traces
.
length
,
'transform_into_['
+
type
+
']'
,
this
.
missionIndex
,
this
.
roleIndex
,
'all'
,
'Opt_task_['
+
this
.
i
+
';'
+
this
.
j
+
']'
,
'#E8E3B3'
));
}
...
...
@@ -159,7 +155,7 @@ export class OptionnalTaskComponent implements OnInit {
this
.
role
.
removeTask
(
this
.
i
,
this
.
j
);
this
.
mission
.
equalizeLengths
();
if
(
this
.
role
.
countOptionnalTasksInColumn
(
this
.
role
.
getRealIndex
(
this
.
i
,
this
.
j
))
<
2
)
{
this
.
_snackBar
.
open
FromComponent
(
DeleteOptionnalTasksComponent
,
{
duration
:
5000
});
this
.
_snackBar
.
open
(
this
.
translate
.
instant
(
'snackbar_deleteOptionnalTask'
),
''
,
{
duration
:
5000
,
panelClass
:
'snackbar-warning'
});
}
this
.
scenario
.
traces
.
push
(
new
Trace
(
this
.
scenario
.
traces
.
length
,
'delete'
,
this
.
missionIndex
,
this
.
roleIndex
,
'all'
,
'Opt_task_['
+
this
.
i
+
';'
+
this
.
j
+
']'
,
'#E8E3B3'
));
}
else
{
...
...
@@ -170,13 +166,13 @@ export class OptionnalTaskComponent implements OnInit {
onClickCopy
()
{
this
.
copyTaskService
.
onClickCopy
(
this
.
scenario
,
this
.
role
,
this
.
task
);
this
.
_snackBar
.
open
FromComponent
(
CopyTaskSuccessComponent
,
{
duration
:
5000
});
this
.
_snackBar
.
open
(
this
.
translate
.
instant
(
'task_copy_snackbar'
),
''
,
{
duration
:
5000
,
panelClass
:
'snackbar-success'
});
}
onClickPaste
()
{
this
.
role
.
tasks
[
this
.
i
][
this
.
j
]
=
this
.
copyTaskService
.
onClickPaste
(
this
.
scenario
);;
if
(
this
.
role
.
isAlreadyUsedIdentifier
((
this
.
role
.
tasks
[
this
.
i
][
this
.
j
]
as
Task
).
identifier
))
{
this
.
_snackBar
.
open
FromComponent
(
IdentifierSnackbarComponent
,
{
duration
:
5000
});
this
.
_snackBar
.
open
(
this
.
translate
.
instant
(
'snackbar_identifier'
),
''
,
{
duration
:
5000
,
panelClass
:
'snackbar-fail'
});
(
this
.
role
.
tasks
[
this
.
i
][
this
.
j
]
as
Task
).
identifier
=
''
;
}
}
...
...
@@ -242,7 +238,7 @@ export class OptionnalTaskComponent implements OnInit {
this
.
displayPrequires
=
'hide'
;
this
.
displaySymbolChoice
=
'hide'
;
this
.
mission
.
equalizeLengths
();
this
.
_snackBar
.
open
FromComponent
(
MoveOptionnalTasksComponent
,
{
duration
:
5000
});
this
.
_snackBar
.
open
(
this
.
translate
.
instant
(
'snackbar_moveOptionnalTask'
),
''
,
{
duration
:
5000
,
panelClass
:
'snackbar-warning'
});
}
else
if
(
direction
==
'top'
&&
this
.
canMoveTo
(
'top'
))
{
this
.
role
.
moveTask
(
this
.
i
,
this
.
j
,
direction
);
this
.
displayMenu
=
'hide'
;
...
...
@@ -255,7 +251,7 @@ export class OptionnalTaskComponent implements OnInit {
this
.
displayPrequires
=
'hide'
;
this
.
displaySymbolChoice
=
'hide'
;
this
.
mission
.
equalizeLengths
();
this
.
_snackBar
.
open
FromComponent
(
MoveOptionnalTasksComponent
,
{
duration
:
5000
});
this
.
_snackBar
.
open
(
this
.
translate
.
instant
(
'snackbar_moveOptionnalTask'
),
''
,
{
duration
:
5000
,
panelClass
:
'snackbar-warning'
});
}
else
if
(
direction
==
'bottom'
)
{
this
.
role
.
moveTask
(
this
.
i
,
this
.
j
,
direction
);
this
.
displayMenu
=
'hide'
;
...
...
@@ -317,7 +313,7 @@ export class OptionnalTaskComponent implements OnInit {
});
}
if
(
this
.
role
.
isAlreadyUsedIdentifier
(
this
.
task
.
identifier
))
{
this
.
_snackBar
.
open
FromComponent
(
IdentifierSnackbarComponent
,
{
duration
:
5000
});
this
.
_snackBar
.
open
(
this
.
translate
.
instant
(
'snackbar_identifier'
),
''
,
{
duration
:
5000
,
panelClass
:
'snackbar-fail'
});
this
.
task
.
identifier
=
''
;
}
this
.
editTrace
(
event
,
'Task_identifier'
);
...
...
src/app/pieces/tasks/random-event/random-event.component.ts
View file @
79c8c71e
...
...
@@ -12,12 +12,10 @@ import { SuppressDialogComponent } from 'src/app/components/dialogs/suppress-dia
import
{
MatDialog
}
from
'@angular/material/dialog'
;
import
{
CleanDialogComponent
}
from
'src/app/components/dialogs/clean-dialog/clean-dialog.component'
;
import
{
MatSnackBar
}
from
'@angular/material/snack-bar'
;
import
{
IdentifierSnackbarComponent
}
from
'src/app/components/snackbars/identifier-snackbar/identifier-snackbar.component'
;
import
{
Trace
}
from
'src/app/class/trace/trace'
;
import
{
MinimapService
}
from
'src/app/services/minimap/minimap.service'
;
import
{
TranslateService
}
from
'@ngx-translate/core'
;
import
{
UnityService
}
from
'src/app/services/unity/unity.service'
;
import
{
CopyTaskSuccessComponent
}
from
'src/app/components/snackbars/copy-task-success/copy-task-success.component'
;
import
{
CopyTaskService
}
from
'src/app/services/copyTask/copy-task.service'
;
@
Component
({
...
...
@@ -153,13 +151,13 @@ export class RandomEventComponent implements OnInit {
onClickCopy
()
{
this
.
copyTaskService
.
onClickCopy
(
this
.
scenario
,
this
.
role
,
this
.
task
);
this
.
_snackBar
.
open
FromComponent
(
CopyTaskSuccessComponent
,
{
duration
:
5000
});
this
.
_snackBar
.
open
(
this
.
translate
.
instant
(
'task_copy_snackbar'
),
''
,
{
duration
:
5000
,
panelClass
:
'snackbar-success'
});
}
onClickPaste
()
{
this
.
role
.
tasks
[
this
.
i
][
this
.
j
]
=
this
.
copyTaskService
.
onClickPaste
(
this
.
scenario
);;
if
(
this
.
role
.
isAlreadyUsedIdentifier
((
this
.
role
.
tasks
[
this
.
i
][
this
.
j
]
as
Task
).
identifier
))
{
this
.
_snackBar
.
open
FromComponent
(
IdentifierSnackbarComponent
,
{
duration
:
5000
});
this
.
_snackBar
.
open
(
this
.
translate
.
instant
(
'snackbar_identifier'
),
''
,
{
duration
:
5000
,
panelClass
:
'snackbar-fail'
});
(
this
.
role
.
tasks
[
this
.
i
][
this
.
j
]
as
Task
).
identifier
=
''
;
}
}
...
...
@@ -299,7 +297,7 @@ export class RandomEventComponent implements OnInit {
});
}
if
(
this
.
role
.
isAlreadyUsedIdentifier
(
this
.
task
.
identifier
))
{
this
.
_snackBar
.
open
FromComponent
(
IdentifierSnackbarComponent
,
{
duration
:
5000
});
this
.
_snackBar
.
open
(
this
.
translate
.
instant
(
'snackbar_identifier'
),
''
,
{
duration
:
5000
,
panelClass
:
'snackbar-fail'
});
this
.
task
.
identifier
=
''
;
}
this
.
editTrace
(
event
,
'Task_identifier'
);
...
...
src/app/pieces/tasks/repeat-task/repeat-task.component.ts
View file @
79c8c71e
...
...
@@ -17,9 +17,7 @@ import { TutorialService } from 'src/app/services/tutorial/tutorial.service';
import
{
Ressource
}
from
'src/app/class/ressource/ressource'
;
import
{
PrerequireRessource
}
from
'src/app/class/prerequires/prerequire-ressource/prerequire-ressource'
;
import
{
CopyTaskService
}
from
'src/app/services/copyTask/copy-task.service'
;
import
{
CopyTaskSuccessComponent
}
from
'src/app/components/snackbars/copy-task-success/copy-task-success.component'
;
import
{
MatSnackBar
}
from
'@angular/material/snack-bar'
;
import
{
IdentifierSnackbarComponent
}
from
'src/app/components/snackbars/identifier-snackbar/identifier-snackbar.component'
;
@
Component
({
selector
:
'app-repeat-task'
,
...
...
@@ -95,7 +93,7 @@ export class RepeatTaskComponent implements OnInit {
onClickCopy
()
{
this
.
copyTaskService
.
onClickCopy
(
this
.
scenario
,
this
.
role
,
this
.
task
);
this
.
_snackBar
.
open
FromComponent
(
CopyTaskSuccessComponent
,
{
duration
:
5000
});
this
.
_snackBar
.
open
(
this
.
translate
.
instant
(
'task_copy_snackbar'
),
''
,
{
duration
:
5000
,
panelClass
:
'snackbar-success'
});
}
onClickPaste
()
{
...
...
src/app/pieces/tasks/task/task.component.ts
View file @
79c8c71e
...
...
@@ -12,14 +12,12 @@ import { SuppressDialogComponent } from 'src/app/components/dialogs/suppress-dia
import
{
MatDialog
}
from
'@angular/material/dialog'
;
import
{
CleanDialogComponent
}
from
'src/app/components/dialogs/clean-dialog/clean-dialog.component'
;
import
{
MatSnackBar
}
from
'@angular/material/snack-bar'
;
import
{
IdentifierSnackbarComponent
}
from
'src/app/components/snackbars/identifier-snackbar/identifier-snackbar.component'
;
import
{
Trace
}
from
'src/app/class/trace/trace'
;
import
{
MinimapService
}
from
'src/app/services/minimap/minimap.service'
;
import
{
TranslateService
}
from
'@ngx-translate/core'
;
import
{
TutorialService
}
from
'src/app/services/tutorial/tutorial.service'
;
import
{
UnityService
}
from
'src/app/services/unity/unity.service'
;
import
{
CopyTaskService
}
from
'src/app/services/copyTask/copy-task.service'
;
import
{
CopyTaskSuccessComponent
}
from
'src/app/components/snackbars/copy-task-success/copy-task-success.component'
;
@
Component
({
selector
:
'app-task'
,
...
...
@@ -164,13 +162,13 @@ export class TaskComponent implements OnInit {
onClickCopy
()
{
this
.
copyTaskService
.
onClickCopy
(
this
.
scenario
,
this
.
role
,
this
.
task
);
this
.
_snackBar
.
open
FromComponent
(
CopyTaskSuccessComponent
,
{
duration
:
5000
});
this
.
_snackBar
.
open
(
this
.
translate
.
instant
(
'task_copy_snackbar'
),
''
,
{
duration
:
50000
,
panelClass
:
'snackbar-success'
});
}
onClickPaste
()
{
this
.
role
.
tasks
[
this
.
i
][
this
.
j
]
=
this
.
copyTaskService
.
onClickPaste
(
this
.
scenario
);;
if
(
this
.
role
.
isAlreadyUsedIdentifier
((
this
.
role
.
tasks
[
this
.
i
][
this
.
j
]
as
Task
).
identifier
))
{
this
.
_snackBar
.
open
FromComponent
(
IdentifierSnackbarComponent
,
{
duration
:
5000
});
this
.
_snackBar
.
open
(
this
.
translate
.
instant
(
'snackbar_identifier'
),
''
,
{
duration
:
5000
,
panelClass
:
'snackbar-fail'
});
(
this
.
role
.
tasks
[
this
.
i
][
this
.
j
]
as
Task
).
identifier
=
''
;
}
}
...
...
@@ -325,7 +323,7 @@ export class TaskComponent implements OnInit {
});
}
if
(
this
.
role
.
isAlreadyUsedIdentifier
(
this
.
task
.
identifier
))
{
this
.
_snackBar
.
open
FromComponent
(
IdentifierSnackbarComponent
,
{
duration
:
5000
});
this
.
_snackBar
.
open
(
this
.
translate
.
instant
(
'snackbar_identifier'
),
''
,
{
duration
:
5000
,
panelClass
:
'snackbar-fail'
});
this
.
task
.
identifier
=
''
;
}
this
.
editTrace
(
event
,
'Task_identifier'
);
...
...
src/app/services/tutorial/tutorial.service.ts
View file @
79c8c71e
...
...
@@ -29,6 +29,6 @@ export class TutorialService {
}
isDone
():
boolean
{
return
this
.
phaseDone
.
some
(
phase
=>
false
);
return
!
this
.
phaseDone
.
some
(
phase
=>
false
);
}
}
src/styles.scss
View file @
79c8c71e
...
...
@@ -99,4 +99,50 @@ $highlight-color: #009b00;
right
:
0px
;
bottom
:
0px
;
border
:
1px
solid
black
;
}
\ No newline at end of file
}
.snackbar-fail
{
background-color
:
#de3e44
;
color
:
white
;
box-shadow
:
0px
0px
15px
5px
#de3e44
;
text-align
:
center
;
white-space
:
pre-wrap
;
text-align
:
center
;
span
{
font-family
:
'Glacial Indifference'
,
sans-serif
;
font-size
:
16px
;
margin-left
:
auto
;
margin-right
:
auto
;
}
}
.snackbar-success
{
background-color
:
#1ba345
;
color
:
white
;
box-shadow
:
0px
0px
15px
5px
#1ba345
;
text-align
:
center
;
white-space
:
pre-wrap
;
text-align
:
center
;
span
{
font-family
:
'Glacial Indifference'
,
sans-serif
;
font-size
:
16px
;
margin-left
:
auto
;
margin-right
:
auto
;
}
}
.snackbar-warning
{
background-color
:
#ffa808
;
color
:
white
;
box-shadow
:
0px
0px
15px
5px
#ffa808
;
text-align
:
center
;
white-space
:
pre-wrap
;
text-align
:
center
;
span
{
font-family
:
'Glacial Indifference'
,
sans-serif
;
font-size
:
16px
;
margin-left
:
auto
;
margin-right
:
auto
;
}
}
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