Skip to content

Commit

Permalink
Show a link for shipping next year after Sept 1. (#4482)
Browse files Browse the repository at this point in the history
* Show a link for shipping next year after Sept 1.

* Updated screenshots

* Updated screenshots
  • Loading branch information
jrobbins authored Oct 28, 2024
1 parent 30964ae commit 77c14b3
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions client-src/elements/chromedash-drawer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,21 @@ export class ChromedashDrawer extends LitElement {
const myFeaturesMenu = this.renderMyFeaturesMenu();
const adminMenu = this.renderAdminMenu();

const year = new Date().getFullYear();
const now = new Date();
const year = now.getFullYear();
const shippingThisYear = this.renderNavItem(
'/features?q=shipping_year=' + year,
'Shipping ' + year
);
const nextYear = year + 1;
let shippingNextYear = this.renderNavItem(
'/features?q=shipping_year=' + nextYear,
'Shipping ' + nextYear
);
// Only show next year starting on September 1.
if (now.getMonth() < 8) {
shippingNextYear = html``;
}

return html`
<sl-drawer
Expand All @@ -279,7 +289,7 @@ export class ChromedashDrawer extends LitElement {
>
${accountMenu} ${this.renderNavItem('/roadmap', 'Roadmap')}
${this.renderNavItem('/features', 'All features')} ${shippingThisYear}
${myFeaturesMenu}
${shippingNextYear} ${myFeaturesMenu}
<hr />
<div class="section-header">Stats</div>
${this.renderNavItem('/metrics/css/popularity', 'CSS')}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 77c14b3

Please sign in to comment.