Finish 2 days room limit
- Create modal to register when limit is past - Create modal to share the link - Use UrlManager to check if limit room is active Signed-off-by: Gregoire Parant <g.parant@thecodingmachine.com>
This commit is contained in:
parent
60f4cf75c3
commit
fd64fc43a4
12 changed files with 194 additions and 11 deletions
|
@ -58,6 +58,15 @@ class UrlManager {
|
|||
pushStartLayerNameToUrl(startLayerName: string): void {
|
||||
window.location.hash = startLayerName;
|
||||
}
|
||||
|
||||
get isActiveLimitRoom(): boolean {
|
||||
const match = /\*\/(\w+)\/(?:\w+)/.exec(window.location.pathname.toString());
|
||||
const timestamp = match ? Number.parseInt(match[1]) : null;
|
||||
if(!timestamp){
|
||||
return false;
|
||||
}
|
||||
return ((new Date()).getTime() - 48*60*60*1000) < timestamp;
|
||||
}
|
||||
}
|
||||
|
||||
export const urlManager = new UrlManager();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue