Browse Source

updates home view banners

main
Keith Daulton 2 years ago
parent
commit
253ed09bd6
2 changed files with 4 additions and 2 deletions
  1. +1
    -1
      src/webviews/apps/home/home.html
  2. +3
    -1
      src/webviews/apps/home/home.ts

+ 1
- 1
src/webviews/apps/home/home.html View File

@ -93,7 +93,7 @@
} }
</style> </style>
<div class="ribbon-banner-container" data-banner="cyberweek2022" hidden> <div class="ribbon-banner-container" data-banner="cyberweek2022" hidden>
<a href="#" class="ribbon-banner">
<a href="https://bit.ly/3V2uvVY" class="ribbon-banner">
<h2> <h2>
<strong>50% off</strong> <strong>50% off</strong>
<span class="ribbon-banner__subtext">GitLens Pro &amp; all GitKraken products!</span> <span class="ribbon-banner__subtext">GitLens Pro &amp; all GitKraken products!</span>

+ 3
- 1
src/webviews/apps/home/home.ts View File

@ -357,9 +357,11 @@ function toggleArrayItem(list: string[] = [], item: string, add = true) {
return list; return list;
} }
const cyberweekStart = Date.parse('2022-11-28T07:00:00.000-08:00');
const cyberweekEnding = Date.parse('2022-12-06T00:00:00.000-08:00'); const cyberweekEnding = Date.parse('2022-12-06T00:00:00.000-08:00');
function showCyberWeek() { function showCyberWeek() {
return Date.now() < cyberweekEnding;
const now = Date.now();
return now < cyberweekEnding && now >= cyberweekStart;
} }
new HomeApp(); new HomeApp();

Loading…
Cancel
Save