-
Notifications
You must be signed in to change notification settings - Fork 781
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
1,195 additions
and
1,751 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/workbench/browser/src/app/core/services/notification.service.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { ModalService } from 'eo/workbench/browser/src/app/shared/services/modal.service'; | ||
import StorageUtil from 'eo/workbench/browser/src/app/utils/storage/storage.utils'; | ||
|
||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
export class NotificationService { | ||
constructor(private modal: ModalService) {} | ||
init() { | ||
const hasShow = StorageUtil.get('notification_has_show'); | ||
if (hasShow) return; | ||
|
||
const logInfo = { | ||
startTime: new Date('2023-02-07 16:00:00'), | ||
endTime: new Date('2023-02-07 18:00:00') | ||
}; | ||
const currentData = new Date(); | ||
|
||
//Curent data is greater than end time | ||
if (currentData.getTime() > logInfo.endTime.getTime()) { | ||
return; | ||
} | ||
|
||
this.modal.create({ | ||
nzTitle: $localize`Release Notes`, | ||
nzContent: $localize`There will be downtime updates from ${logInfo.startTime.getHours()}\:00 to ${logInfo.endTime.getHours()}\:00 today, and may be temporarily inaccessible.` | ||
}); | ||
StorageUtil.set('notification_has_show', true, 60 * 60 * 24); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
d9a67ba
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
postcat-demo – ./
postcat-demo-git-web-eolinker.vercel.app
postcat-demo-eolinker.vercel.app
eoapi-demo.vercel.app
www.postcat.com
postcat.com