|
@ -14,13 +14,17 @@ const template = html` |
|
|
<p class="header-card__account"> |
|
|
<p class="header-card__account"> |
|
|
<span class="status"> |
|
|
<span class="status"> |
|
|
<span ${ref('statusNode')} tabindex="-1" class="status-label" |
|
|
<span ${ref('statusNode')} tabindex="-1" class="status-label" |
|
|
><span class="repo-access${x => (x.isPro ? ' is-pro' : '')}">✨</span>${x => x.planName}</span |
|
|
|
|
|
|
|
|
><span class="repo-access${x => (x.isPro ? ' is-pro' : '')}">✨</span>${x => |
|
|
|
|
|
`${x.planName}${x.daysLeft}`}</span |
|
|
> |
|
|
> |
|
|
<pop-over class="${x => (x.pinStatus ? 'is-pinned' : null)}"> |
|
|
<pop-over class="${x => (x.pinStatus ? 'is-pinned' : null)}"> |
|
|
${when( |
|
|
${when( |
|
|
x => x.pinStatus, |
|
|
x => x.pinStatus, |
|
|
html<HeaderCard>`
|
|
|
html<HeaderCard>`
|
|
|
<span slot="type">status update</span> |
|
|
|
|
|
|
|
|
<span slot="type" |
|
|
|
|
|
><span class="repo-access${x => (x.isPro ? ' is-pro' : '')}">✨</span>${x => |
|
|
|
|
|
x.planName}</span |
|
|
|
|
|
> |
|
|
<a |
|
|
<a |
|
|
href="#" |
|
|
href="#" |
|
|
class="action is-icon" |
|
|
class="action is-icon" |
|
@ -33,7 +37,8 @@ const template = html` |
|
|
`,
|
|
|
`,
|
|
|
)} |
|
|
)} |
|
|
You have access to GitLens+ features on ${x => (x.isPro ? 'any repo' : 'local & public repos')}, and all |
|
|
You have access to GitLens+ features on ${x => (x.isPro ? 'any repo' : 'local & public repos')}, and all |
|
|
other GitLens features on any repo. |
|
|
|
|
|
|
|
|
other GitLens features on any repo.<br /><br /> |
|
|
|
|
|
✨ indicates GitLens+ features. |
|
|
</pop-over> |
|
|
</pop-over> |
|
|
</span> |
|
|
</span> |
|
|
<span class="account-actions"> |
|
|
<span class="account-actions"> |
|
@ -344,7 +349,7 @@ export class HeaderCard extends FASTElement { |
|
|
return 'GitLens Free'; |
|
|
return 'GitLens Free'; |
|
|
case SubscriptionState.FreeInPreviewTrial: |
|
|
case SubscriptionState.FreeInPreviewTrial: |
|
|
case SubscriptionState.FreePlusInTrial: |
|
|
case SubscriptionState.FreePlusInTrial: |
|
|
return `GitLens Pro (Trial), ${this.daysRemaining} left`; |
|
|
|
|
|
|
|
|
return 'GitLens Pro (Trial)'; |
|
|
case SubscriptionState.VerificationRequired: |
|
|
case SubscriptionState.VerificationRequired: |
|
|
return `${this.plan} (Unverified)`; |
|
|
return `${this.plan} (Unverified)`; |
|
|
default: |
|
|
default: |
|
@ -352,6 +357,17 @@ export class HeaderCard extends FASTElement { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@volatile |
|
|
|
|
|
get daysLeft() { |
|
|
|
|
|
switch (this.state) { |
|
|
|
|
|
case SubscriptionState.FreeInPreviewTrial: |
|
|
|
|
|
case SubscriptionState.FreePlusInTrial: |
|
|
|
|
|
return `, ${this.daysRemaining} left`; |
|
|
|
|
|
default: |
|
|
|
|
|
return ''; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
get hasAccount() { |
|
|
get hasAccount() { |
|
|
switch (this.state) { |
|
|
switch (this.state) { |
|
|
case SubscriptionState.Free: |
|
|
case SubscriptionState.Free: |
|
|