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
4c586b10
Commit
4c586b10
authored
Aug 28, 2023
by
Romain DELEAU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dynamic title with project name
parent
57802226
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
app.component.ts
src/app/app.component.ts
+10
-1
No files found.
src/app/app.component.ts
View file @
4c586b10
...
...
@@ -27,6 +27,7 @@ import { TooltipService } from './services/tooltip/tooltip.service';
import
{
ZoomService
}
from
'./services/zoom/zoom.service'
;
import
{
MatDialog
}
from
'@angular/material/dialog'
;
import
{
SaveDialogComponent
}
from
'./components/dialogs/save-dialog/save-dialog.component'
;
import
{
Title
}
from
'@angular/platform-browser'
;
@
Component
({
selector
:
'app-root'
,
...
...
@@ -40,7 +41,7 @@ export class AppComponent {
@
ViewChild
(
'fileInput'
)
fileInput
:
any
;
constructor
(
private
cdr
:
ChangeDetectorRef
,
protected
pieceDetailsService
:
PieceDetailsService
,
protected
tooltipService
:
TooltipService
,
private
elementRef
:
ElementRef
,
private
zoomService
:
ZoomService
,
private
dialog
:
MatDialog
)
{
private
elementRef
:
ElementRef
,
private
zoomService
:
ZoomService
,
private
dialog
:
MatDialog
,
private
titleService
:
Title
)
{
pieceDetailsService
.
piece
=
this
.
scenario
;
this
.
scenario
.
missions
.
forEach
(
mission
=>
{
...
...
@@ -67,9 +68,11 @@ export class AppComponent {
if
(
data
.
result
)
{
if
(
data
.
fileName
==
''
)
{
fileName
=
"Scénario - RLG Maker"
;
this
.
titleService
.
setTitle
(
'RLG Maker'
);
}
else
{
this
.
scenario
.
projectName
=
data
.
fileName
;
fileName
=
data
.
fileName
+
' - RLG Maker'
;
this
.
titleService
.
setTitle
(
'RLG Maker - '
+
this
.
scenario
.
projectName
);
}
this
.
scenario
.
tooltips
=
this
.
tooltipService
.
activatedTooltips
;
const
jsonString
=
JSON
.
stringify
(
this
.
scenario
);
...
...
@@ -219,6 +222,12 @@ export class AppComponent {
});
this
.
scenario
=
scenario
;
this
.
pieceDetailsService
.
piece
=
this
.
scenario
;
if
(
scenario
.
projectName
)
{
this
.
titleService
.
setTitle
(
'RLG Maker - '
+
this
.
scenario
.
projectName
);
}
else
{
this
.
titleService
.
setTitle
(
'RLG Maker'
);
}
this
.
cdr
.
detectChanges
();
};
}
...
...
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