|
@ -1,4 +1,4 @@ |
|
|
import { attr, css, customElement, FASTElement, html, volatile, when } from '@microsoft/fast-element'; |
|
|
|
|
|
|
|
|
import { attr, css, customElement, FASTElement, html, observable, volatile, when } from '@microsoft/fast-element'; |
|
|
import { SubscriptionState } from '../../../../subscription'; |
|
|
import { SubscriptionState } from '../../../../subscription'; |
|
|
import { pluralize } from '../../../../system/string'; |
|
|
import { pluralize } from '../../../../system/string'; |
|
|
import { numberConverter } from '../../shared/components/converters/number-converter'; |
|
|
import { numberConverter } from '../../shared/components/converters/number-converter'; |
|
@ -15,11 +15,16 @@ const template = html` |
|
|
that enhance your GitLens experience. |
|
|
that enhance your GitLens experience. |
|
|
</h3> |
|
|
</h3> |
|
|
|
|
|
|
|
|
<p class="mb-1"> |
|
|
|
|
|
<vscode-button @click="${x => x.fireAction('command:gitlens.plus.startPreviewTrial')}" |
|
|
|
|
|
>Try GitLens+ features on private repos</vscode-button |
|
|
|
|
|
> |
|
|
|
|
|
</p> |
|
|
|
|
|
|
|
|
${when( |
|
|
|
|
|
y => y.extensionEnabled, |
|
|
|
|
|
html<PlusBanner>`
|
|
|
|
|
|
<p class="mb-1"> |
|
|
|
|
|
<vscode-button @click="${x => x.fireAction('command:gitlens.plus.startPreviewTrial')}" |
|
|
|
|
|
>Try GitLens+ features on private repos</vscode-button |
|
|
|
|
|
> |
|
|
|
|
|
</p> |
|
|
|
|
|
`,
|
|
|
|
|
|
)} |
|
|
`,
|
|
|
`,
|
|
|
)} |
|
|
)} |
|
|
${when( |
|
|
${when( |
|
@ -43,11 +48,16 @@ const template = html` |
|
|
<a title="Learn more about GitLens+ features" href="command:gitlens.plus.learn">GitLens+ features</a> on |
|
|
<a title="Learn more about GitLens+ features" href="command:gitlens.plus.learn">GitLens+ features</a> on |
|
|
private repos. |
|
|
private repos. |
|
|
</p> |
|
|
</p> |
|
|
<p class="mb-1"> |
|
|
|
|
|
<vscode-button @click="${x => x.fireAction('command:gitlens.plus.purchase')}" |
|
|
|
|
|
>Upgrade to Pro</vscode-button |
|
|
|
|
|
> |
|
|
|
|
|
</p> |
|
|
|
|
|
|
|
|
${when( |
|
|
|
|
|
y => y.extensionEnabled, |
|
|
|
|
|
html<PlusBanner>`
|
|
|
|
|
|
<p class="mb-1"> |
|
|
|
|
|
<vscode-button @click="${x => x.fireAction('command:gitlens.plus.purchase')}" |
|
|
|
|
|
>Upgrade to Pro</vscode-button |
|
|
|
|
|
> |
|
|
|
|
|
</p> |
|
|
|
|
|
`,
|
|
|
|
|
|
)} |
|
|
`,
|
|
|
`,
|
|
|
)} |
|
|
)} |
|
|
${when( |
|
|
${when( |
|
@ -70,11 +80,16 @@ const template = html` |
|
|
Your free 3-day GitLens Pro trial has ended, extend your trial to get an additional free 7-days of |
|
|
Your free 3-day GitLens Pro trial has ended, extend your trial to get an additional free 7-days of |
|
|
GitLens+ features on private repos. |
|
|
GitLens+ features on private repos. |
|
|
</p> |
|
|
</p> |
|
|
<p class="mb-1"> |
|
|
|
|
|
<vscode-button @click="${x => x.fireAction('command:gitlens.plus.loginOrSignUp')}" |
|
|
|
|
|
>Extend Pro Trial</vscode-button |
|
|
|
|
|
> |
|
|
|
|
|
</p> |
|
|
|
|
|
|
|
|
${when( |
|
|
|
|
|
y => y.extensionEnabled, |
|
|
|
|
|
html<PlusBanner>`
|
|
|
|
|
|
<p class="mb-1"> |
|
|
|
|
|
<vscode-button @click="${x => x.fireAction('command:gitlens.plus.loginOrSignUp')}" |
|
|
|
|
|
>Extend Pro Trial</vscode-button |
|
|
|
|
|
> |
|
|
|
|
|
</p> |
|
|
|
|
|
`,
|
|
|
|
|
|
)} |
|
|
`,
|
|
|
`,
|
|
|
)} |
|
|
)} |
|
|
${when( |
|
|
${when( |
|
@ -85,11 +100,16 @@ const template = html` |
|
|
Your GitLens Pro trial has ended, please upgrade to GitLens Pro to continue to use GitLens+ features on |
|
|
Your GitLens Pro trial has ended, please upgrade to GitLens Pro to continue to use GitLens+ features on |
|
|
private repos. |
|
|
private repos. |
|
|
</p> |
|
|
</p> |
|
|
<p class="mb-1"> |
|
|
|
|
|
<vscode-button @click="${x => x.fireAction('command:gitlens.plus.purchase')}" |
|
|
|
|
|
>Upgrade to Pro</vscode-button |
|
|
|
|
|
> |
|
|
|
|
|
</p> |
|
|
|
|
|
|
|
|
${when( |
|
|
|
|
|
y => y.extensionEnabled, |
|
|
|
|
|
html<PlusBanner>`
|
|
|
|
|
|
<p class="mb-1"> |
|
|
|
|
|
<vscode-button @click="${x => x.fireAction('command:gitlens.plus.purchase')}" |
|
|
|
|
|
>Upgrade to Pro</vscode-button |
|
|
|
|
|
> |
|
|
|
|
|
</p> |
|
|
|
|
|
`,
|
|
|
|
|
|
)} |
|
|
`,
|
|
|
`,
|
|
|
)} |
|
|
)} |
|
|
${when( |
|
|
${when( |
|
@ -117,7 +137,7 @@ const template = html` |
|
|
SubscriptionState.Free, |
|
|
SubscriptionState.Free, |
|
|
SubscriptionState.FreePreviewTrialExpired, |
|
|
SubscriptionState.FreePreviewTrialExpired, |
|
|
SubscriptionState.FreePlusTrialExpired, |
|
|
SubscriptionState.FreePlusTrialExpired, |
|
|
].includes(x.state), |
|
|
|
|
|
|
|
|
].includes(x.state) && x.extensionEnabled, |
|
|
html<PlusBanner>`
|
|
|
html<PlusBanner>`
|
|
|
<p class="mb-0"> |
|
|
<p class="mb-0"> |
|
|
${when( |
|
|
${when( |
|
@ -131,6 +151,14 @@ const template = html` |
|
|
</p> |
|
|
</p> |
|
|
`,
|
|
|
`,
|
|
|
)} |
|
|
)} |
|
|
|
|
|
${when( |
|
|
|
|
|
x => !x.extensionEnabled, |
|
|
|
|
|
html<PlusBanner>`
|
|
|
|
|
|
<p class="mb-0"> |
|
|
|
|
|
To use GitLens+, open a folder containing a git repository or clone from a URL from the Explorer. |
|
|
|
|
|
</p> |
|
|
|
|
|
`,
|
|
|
|
|
|
)} |
|
|
`;
|
|
|
`;
|
|
|
|
|
|
|
|
|
const styles = css`
|
|
|
const styles = css`
|
|
@ -201,6 +229,9 @@ export class PlusBanner extends FASTElement { |
|
|
@attr({ mode: 'boolean' }) |
|
|
@attr({ mode: 'boolean' }) |
|
|
plus = true; |
|
|
plus = true; |
|
|
|
|
|
|
|
|
|
|
|
@observable |
|
|
|
|
|
extensionEnabled = true; |
|
|
|
|
|
|
|
|
get daysRemaining() { |
|
|
get daysRemaining() { |
|
|
if (this.days < 1) { |
|
|
if (this.days < 1) { |
|
|
return 'less than one day'; |
|
|
return 'less than one day'; |
|
|