Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
frag.jetzt SWTP 2022
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Marc Tröll
frag.jetzt SWTP 2022
Commits
ebff6f46
Commit
ebff6f46
authored
4 years ago
by
Lukas Haase
Browse files
Options
Downloads
Patches
Plain Diff
add read motd to archive
parent
a4e897f8
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/components/shared/_dialogs/motd-dialog/motd-dialog.component.html
+4
-4
4 additions, 4 deletions
...ts/shared/_dialogs/motd-dialog/motd-dialog.component.html
src/app/models/motd-list.ts
+8
-0
8 additions, 0 deletions
src/app/models/motd-list.ts
with
12 additions
and
4 deletions
src/app/components/shared/_dialogs/motd-dialog/motd-dialog.component.html
+
4
−
4
View file @
ebff6f46
...
...
@@ -19,16 +19,16 @@
</ars-col>
</ars-row>
<ars-row
class=
"message"
ars-flex-box
>
<ng-container
*ngFor=
"let message of motdsList.messages
New
"
>
<app-motd-message
[message]=
"message"
></app-motd-message>
<ng-container
*ngFor=
"let message of motdsList.messages"
>
<app-motd-message
*ngIf=
"!message.isRead && message.isNew"
[message]=
"message"
></app-motd-message>
</ng-container>
</ars-row>
<ars-row>
<h4
class=
"container-title"
>
{{ 'footer.motd-title-old' | translate }}
</h4>
</ars-row>
<ars-row
class=
"message"
ars-flex-box
>
<ng-container
*ngFor=
"let message of motdsList.messages
Old
"
>
<app-motd-message
[message]=
"message"
></app-motd-message>
<ng-container
*ngFor=
"let message of motdsList.messages"
>
<app-motd-message
*ngIf=
"message.isRead || !message.isNew"
[message]=
"message"
></app-motd-message>
</ng-container>
</ars-row>
<ars-row
[height]=
"32"
></ars-row>
...
...
This diff is collapsed.
Click to expand it.
src/app/models/motd-list.ts
+
8
−
0
View file @
ebff6f46
...
...
@@ -4,6 +4,7 @@ export class MotdList {
public
messagesNew
:
Motd
[]
=
[];
public
messagesOld
:
Motd
[]
=
[];
public
messages
:
Motd
[]
=
[];
private
localRead
:
string
[];
constructor
(
...
...
@@ -16,6 +17,10 @@ export class MotdList {
this
.
localRead
=
JSON
.
parse
(
localStorage
.
getItem
(
'
motds
'
));
this
.
parse
(
this
.
messagesNew
,
messagesNew
,
true
);
this
.
parse
(
this
.
messagesOld
,
messagesOld
,
false
);
this
.
messages
=
this
.
messagesNew
.
concat
(
this
.
messagesOld
);
this
.
sortList
(
this
.
messagesNew
);
this
.
sortList
(
this
.
messagesOld
);
this
.
sortList
(
this
.
messages
);
}
private
parse
(
list
:
Motd
[],
messages
:
any
,
isNew
:
boolean
):
void
{
...
...
@@ -34,6 +39,9 @@ export class MotdList {
});
list
.
push
(
motd
);
});
}
private
sortList
(
list
:
Motd
[])
{
list
.
sort
((
a
,
b
)
=>
b
.
startTimestamp
.
getTime
()
-
a
.
startTimestamp
.
getTime
());
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment