Skip to content

Commit

Permalink
Merge pull request #901 from adshares/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
m-pilarczyk authored May 30, 2022
2 parents 4d640d6 + d2d9e13 commit 3118797
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 10 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.17.1] - 2022-05-30
### Fixed
- Newsletter subscription
- DCL builder link
- Edit site's option for manual approval

## [1.17.0] - 2022-05-19
### Added
- Links to publisher sites in publisher panel
Expand Down Expand Up @@ -411,7 +417,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Publisher features (Sites & AdUnits)


[Unreleased]: https://github.com/adshares/adpanel/compare/v1.17.0...develop
[Unreleased]: https://github.com/adshares/adpanel/compare/v1.17.1...develop
[1.17.1]: https://github.com/adshares/adpanel/compare/v1.17.0...v1.17.1
[1.17.0]: https://github.com/adshares/adpanel/compare/v1.16.1...v1.17.0
[1.16.1]: https://github.com/adshares/adpanel/compare/v1.16.0...v1.16.1
[1.16.0]: https://github.com/adshares/adpanel/compare/v1.15.0...v1.16.0
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "adpanel",
"version": "1.17.0",
"version": "1.17.1",
"scripts": {
"ng": "ng",
"start": "ng serve adshares",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { SessionService } from '../../../../session.service'
import { pageRankInfoEnum } from 'models/enum/site.enum'
import { Store } from '@ngrx/store'
import { AppState } from 'models/app-state.model'
import { DECENTRALAND_BUILDER } from 'models/enum/link.enum'
import { User } from 'models/user.model'
import { CryptovoxelsConverter } from 'common/utilities/targeting-converter/cryptovoxels-converter'
import { DecentralandConverter } from 'common/utilities/targeting-converter/decentraland-converter'
Expand Down Expand Up @@ -71,7 +72,7 @@ export class PublisherListItemComponent implements OnInit {
if (PublisherListItemComponent.isDecentralandDomain(domain)) {
if ('scene-0-0.decentraland.org' === domain) {
presentedName = 'DCL Builder'
url = ''
url = DECENTRALAND_BUILDER
} else {
const converter = new DecentralandConverter()
presentedName = `Decentraland ${converter.decodeValue(domain)}`
Expand Down
2 changes: 2 additions & 0 deletions src/app/models/enum/link.enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ export const ADD_UNIT_DECENTRALAND_SMART = 'https://adshar.es/dclsmart'
export const ADSHARES_UNITS = 'https://adshares.net/units'
// Adshares wallet installation instruction
export const ADSHARES_WALLET = 'https://adshares.net/wallet'
// Decentraland builder
export const DECENTRALAND_BUILDER = 'https://builder.decentraland.org/'
// Metamask wallet installation instruction
export const METAMASK_WALLET = 'https://metamask.io/'
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ export class EditSiteAdditionalTargetingComponent extends HandleSubscription imp
super();
}

ngOnInit() {
const acceptBannersManuallyOption = this.route.snapshot.data.siteOptions.acceptBannersManually
this.isCheckedOnlyAcceptedBanners = !!acceptBannersManuallyOption
ngOnInit(): void {
this.createSiteMode = !!this.router.url.match('/create-site/');
this.targetingOptionsToAdd = cloneDeep(this.route.parent.snapshot.data.filteringOptions);
this.targetingOptionsToExclude = cloneDeep(this.route.parent.snapshot.data.filteringOptions);
Expand Down Expand Up @@ -136,6 +134,12 @@ export class EditSiteAdditionalTargetingComponent extends HandleSubscription imp
this.addedItems = [...filtering.requires];
this.showRequiresSection = this.addedItems.length > 0;
this.excludedItems = [...filtering.excludes];

if (this.createSiteMode) {
this.isCheckedOnlyAcceptedBanners = !!this.route.snapshot.data.siteOptions.acceptBannersManually
} else {
this.isCheckedOnlyAcceptedBanners = lastEditedSite.onlyAcceptedBanners
}
});
this.subscriptions.push(lastSiteSubscription);
}
Expand Down
7 changes: 4 additions & 3 deletions src/app/publisher/site-details/site-details.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import {
} from 'publisher/dialogs/site-code-metaverse-dialog/site-code-metaverse-dialog.component'
import { faExternalLinkSquareAlt } from '@fortawesome/free-solid-svg-icons';
import { CryptovoxelsConverter } from 'common/utilities/targeting-converter/cryptovoxels-converter'
import { DECENTRALAND_BUILDER } from 'models/enum/link.enum'

@Component({
selector: 'app-site-details',
Expand Down Expand Up @@ -139,9 +140,9 @@ export class SiteDetailsComponent extends HandleSubscription implements OnInit {
private getSiteLinkUrl(): string {
if ('metaverse' === this.site.medium) {
if ('decentraland' === this.site.vendor) {
return 'DCL Builder' !== this.site.name
? new DecentralandConverter().convertBackendUrlToValidUrl(this.site.url)
: ''
return 'DCL Builder' === this.site.name
? DECENTRALAND_BUILDER
: new DecentralandConverter().convertBackendUrlToValidUrl(this.site.url)
} else if ('cryptovoxels' === this.site.vendor) {
return new CryptovoxelsConverter().convertBackendUrlToValidUrl(this.site.url)
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/settings/settings.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class SettingsService {
}

newsletter (isSubscribed: boolean): Observable<any> {
return this.http.post(`${environment.authUrl}/newsletter/subscription`,
return this.http.post(`${environment.apiUrl}/newsletter/subscription`,
{ isSubscribed })
}

Expand Down

0 comments on commit 3118797

Please sign in to comment.