Added static URL to offers detail screen

This commit is contained in:
Peter Zimon 2021-10-05 15:03:39 +02:00
parent 24d28f3d79
commit 611fbf5926
4 changed files with 30 additions and 2 deletions

View File

@ -49,6 +49,11 @@ export default class MembersController extends Controller {
this.cadences = cadences;
}
@task
copyOfferUrl() {
return true;
}
@action
setup() {
this.fetchProducts.perform();

View File

@ -1279,7 +1279,7 @@
}
/* Grey background modifiers */
.gh-main-section-content.grey .gh-btn:not(.gh-btn-white):not(.gh-btn-green):not(.gh-btn-blue):not(.gh-btn-red):not(.gh-btn-text),
.gh-main-section-content.grey .gh-btn:not(.gh-btn-white):not(.gh-btn-green):not(.gh-btn-blue):not(.gh-btn-red):not(.gh-btn-black):not(.gh-btn-link):not(.gh-btn-text),
.gh-expandable-content .gh-btn:not(.gh-btn-white):not(.gh-btn-green):not(.gh-btn-blue):not(.gh-btn-red):not(.gh-btn-black):not(.gh-btn-link):not(.gh-btn-text) {
background: var(--whitegrey-d2);
}

View File

@ -149,6 +149,11 @@
font-size: 1.5rem;
}
.gh-offer-url .gh-input {
background: color-mod(var(--input-bg-color) l(-1%)) !important;
color: var(--midgrey-l2) !important;
}
/* Offers  Portal preview */
.gh-offer-portal-preview {
display: flex;

View File

@ -105,7 +105,7 @@
</GhFormGroup>
{{#if (eq this.selectedDuration "multiple-months")}}
<GhFormGroup @errors={{this.errors}} @property="duration-months" @class="duration-months">
<label for="name" class="fw6">Number of months</label>
<label for="duration-months" class="fw6">Number of months</label>
<GhTextInput
@name="duration-months"
@id="duration-months"
@ -138,6 +138,24 @@
<GhErrorMessage @errors={{this.errors}} @property="code" />
</GhFormGroup>
</div>
<GhFormGroup @errors={{this.errors}} @property="url" @class="gh-offer-url">
<label for="url" class="fw6">URL</label>
<div class="gh-input-group">
<GhTextInput
@name="url"
@value="https://example.com/black-friday"
@id="url"
@disabled="disabled"
@class="gh-input" />
<GhTaskButton
@buttonText="Copy link"
@task={{this.copyOfferUrl}}
@successText="Link copied"
@class="gh-btn gh-btn-icon" />
</div>
<GhErrorMessage @errors={{this.errors}} @property="url" />
</GhFormGroup>
<GhFormGroup @errors={{this.errors}} @property="description">
<label for="description" class="fw6">Description</label>
<GhTextarea