Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Commits on Source (3)
(chore) Remove hashtag targetting from boost campaigns -
#2084
· 96126ac3
Guy Thouret
authored
Oct 14, 2019
96126ac3
(chore) Set max boost campaign preview width the same as newsfeed -
#2086
· 64fa4eca
Guy Thouret
authored
Oct 14, 2019
64fa4eca
(chore) Update boost campaign creator for new preview payload structure -
#2086
· 527024d5
Guy Thouret
authored
Oct 14, 2019
527024d5
Hide whitespace changes
Inline
Side-by-side
src/app/modules/boost/campaigns/campaigns.service.ts
View file @
527024d5
...
...
@@ -249,4 +249,8 @@ export class CampaignsService {
},
];
}
async
rate
():
Promise
<
number
>
{
return
((
await
this
.
client
.
get
(
`api/v2/boost/campaigns/rate`
))
as
any
).
rate
;
}
}
src/app/modules/boost/campaigns/campaigns.type.ts
View file @
527024d5
...
...
@@ -49,5 +49,8 @@ export type CampaignPayment = {
};
export
type
CampaignPreview
=
{
cannot_fulfill_daily
?:
boolean
;
canBeDelivered
:
boolean
;
durationDays
:
number
;
globalViewsPerDay
:
number
;
viewsPerDayRequested
:
number
;
};
src/app/modules/boost/campaigns/creator/creator.component.html
View file @
527024d5
...
...
@@ -109,7 +109,7 @@
></m-boost-campaigns-creator--content-selector>
</div>
<div
class=
"m-form--field"
>
<!--
<div class="m-form--field">
<label class="m-form--field-label">
<span i18n>Targeting</span>
<m-tooltip icon="help" i18n>TBD</m-tooltip>
...
...
@@ -138,7 +138,7 @@
<i class="material-icons">check</i>
</m-hashtags-selector>
</div>
</div>
</div>
-->
<div
class=
"m-form--fieldset"
>
<div
class=
"m-form--field"
>
...
...
src/app/modules/boost/campaigns/creator/creator.component.ts
View file @
527024d5
...
...
@@ -35,7 +35,12 @@ export class BoostCampaignsCreatorComponent implements OnInit, OnDestroy {
currentError
:
string
=
''
;
preview
:
CampaignPreview
=
{};
preview
:
CampaignPreview
=
{
canBeDelivered
:
true
,
durationDays
:
0
,
globalViewsPerDay
:
0
,
viewsPerDayRequested
:
0
,
};
protected
route$
:
Subscription
;
...
...
@@ -68,7 +73,7 @@ export class BoostCampaignsCreatorComponent implements OnInit, OnDestroy {
this
.
preview$
=
this
.
previewSubject
.
pipe
(
debounceTime
(
600
))
.
subscribe
(
async
(
campaign
:
Campaign
)
=>
{
this
.
preview
=
(
await
this
.
service
.
preview
(
campaign
))
||
{}
;
this
.
preview
=
(
await
this
.
service
.
preview
(
campaign
))
||
this
.
preview
;
this
.
detectChanges
();
});
}
...
...
src/app/modules/boost/campaigns/view/view.component.scss
View file @
527024d5
...
...
@@ -24,4 +24,8 @@
color
:
themed
(
$m-grey-400
);
}
}
.m-boost-campaigns-creator--content-selector
{
max-width
:
860px
;
}
}