Pārlūkot izejas kodu

Removes cyberweek code

main
Keith Daulton pirms 1 gada
vecāks
revīzija
a5fbbec0e6
5 mainītis faili ar 2 papildinājumiem un 114 dzēšanām
  1. +0
    -25
      src/webviews/apps/home/home.html
  2. +0
    -75
      src/webviews/apps/home/home.scss
  3. +2
    -14
      src/webviews/apps/home/home.ts
  4. Binārs
      src/webviews/apps/media/cyber-week-banner-dark.png
  5. Binārs
      src/webviews/apps/media/cyber-week-banner-light.png

+ 0
- 25
src/webviews/apps/home/home.html Parādīt failu

@ -83,32 +83,7 @@
.gl-plus-banner {
background-image: url(#{webroot}/media/gitlens-backdrop-opacity.webp);
}
.vscode-high-contrast .ribbon-banner,
.vscode-dark .ribbon-banner {
background-image: url(#{webroot}/media/cyber-week-banner-dark.webp);
}
.vscode-high-contrast-light .ribbon-banner,
.vscode-light .ribbon-banner {
background-image: url(#{webroot}/media/cyber-week-banner-light.webp);
}
</style>
<div class="ribbon-banner-container" data-banner="cyberweek2022" hidden>
<a href="https://bit.ly/3V2uvVY" class="ribbon-banner">
<h2>
<strong>50% off</strong>
<span class="ribbon-banner__subtext">GitLens Pro &amp; all GitKraken products!</span>
</h2>
<p>Expires Dec 5, 2022 11:59pm PT</p>
</a>
<a
href="#"
class="ribbon-banner-dismiss"
data-banner-dismiss="cyberweek2022"
title="Dismiss"
aria-label="Dismiss"
><code-icon icon="close"></code-icon
></a>
</div>
<div class="stepped-sections">
<stepped-section id="welcome">
<span slot="heading">Welcome to GitLens 13</span>

+ 0
- 75
src/webviews/apps/home/home.scss Parādīt failu

@ -609,81 +609,6 @@ vscode-button {
}
}
.ribbon-banner {
&-container {
position: relative;
}
&-dismiss {
position: absolute;
top: 0;
right: 0;
display: inline-flex;
justify-content: center;
align-items: center;
width: 2.2rem;
height: 2.2rem;
color: var(--color-foreground--75);
&:hover {
color: var(--color-foreground--75);
text-decoration: none;
}
}
.vscode-high-contrast &,
.vscode-dark & {
background-color: var(--color-background--lighten-10);
background-position: right -7rem center;
background-size: auto 140px;
}
.vscode-high-contrast-light &,
.vscode-light & {
background-color: var(--color-background--darken-10);
background-position: right 2.5rem center;
background-size: auto 28px;
}
background-repeat: no-repeat;
display: block;
text-align: left;
color: inherit;
padding: 1.2rem 9.3rem 1.2rem 1.4rem;
line-height: 1.1;
margin-top: -2rem;
margin-bottom: 1rem;
border-radius: 0.4rem;
mix-blend-mode: luminosity;
opacity: 0.8;
transition: opacity ease 250ms, mix-blend-mode ease 250ms;
&:focus,
&:hover {
color: inherit;
text-decoration: none;
mix-blend-mode: normal;
opacity: 1;
}
h2 {
font-size: 1.2rem;
font-weight: inherit;
margin: 0 0 0.8rem 0;
}
p {
font-size: 1rem;
margin: 0;
opacity: 0.8;
}
strong {
font-weight: 800;
opacity: 1;
}
&__subtext {
opacity: 0.8;
}
}
@media (max-width: 280px) {
.not-small {
display: none;

+ 2
- 14
src/webviews/apps/home/home.ts Parādīt failu

@ -230,15 +230,10 @@ export class HomeApp extends App {
return;
}
const { subscription, dismissedBanners } = this.state;
const isPaid = subscription.state === SubscriptionState.Paid;
const { dismissedBanners } = this.state;
$banners.forEach($el => {
const key = $el.getAttribute('data-banner');
if (
isPaid ||
(key !== null && dismissedBanners?.includes(key)) ||
(key === 'cyberweek2022' && !showCyberWeek())
) {
if (key !== null && dismissedBanners?.includes(key)) {
$el.setAttribute('hidden', 'true');
} else {
$el.removeAttribute('hidden');
@ -357,11 +352,4 @@ function toggleArrayItem(list: string[] = [], item: string, add = true) {
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');
function showCyberWeek() {
const now = Date.now();
return now < cyberweekEnding && now >= cyberweekStart;
}
new HomeApp();

Binārs
src/webviews/apps/media/cyber-week-banner-dark.png Parādīt failu

Pirms Pēc
Platums: 892  |  Augstums: 260  |  Izmērs: 129 KiB

Binārs
src/webviews/apps/media/cyber-week-banner-light.png Parādīt failu

Pirms Pēc
Platums: 106  |  Augstums: 56  |  Izmērs: 2.9 KiB

Notiek ielāde…
Atcelt
Saglabāt