Skip to content

Commit

Permalink
Merge pull request #915 from adshares/develop
Browse files Browse the repository at this point in the history
v1.18.4
  • Loading branch information
m-pilarczyk authored Jun 30, 2022
2 parents d56ef59 + e1b7994 commit 46b4bc7
Show file tree
Hide file tree
Showing 26 changed files with 166 additions and 236 deletions.
14 changes: 12 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.18.4] - 2022-06-30
### Added
- Redirection to AdController during initialization
### Fixed
- License details url
- Registration with wallet in restricted mode

## [1.18.2] - 2022-06-02
### Added
- Opportunity sort and filter tables in query parameters
- Opportunity to sort and filter tables in query parameters
- Remembering selected filters when switching tabs
### Changed
- Format impressions amount (thousand separators)
### Fixed
- Direct deal for metaverse
- Metamask connection
Expand Down Expand Up @@ -435,7 +444,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.18.2...develop
[Unreleased]: https://github.com/adshares/adpanel/compare/v1.18.4...develop
[1.18.4]: https://github.com/adshares/adpanel/compare/v1.18.2...v1.18.4
[1.18.2]: https://github.com/adshares/adpanel/compare/v1.18.0...v1.18.2
[1.18.0]: https://github.com/adshares/adpanel/compare/v1.17.1...v1.18.0
[1.17.1]: https://github.com/adshares/adpanel/compare/v1.17.0...v1.17.1
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"@angular/cli": "^13.3.7",
"@angular/compiler-cli": "^13.3.10",
"@angular/language-service": "^13.3.10",
"@ngrx/schematics": "^13.0.0",
"@types/node": "^12.12.6",
"typescript": "4.6.4"
}
Expand Down
18 changes: 9 additions & 9 deletions src/app/admin/dashboard/dashboard.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { AdminService } from 'admin/admin.service';
import { DATE_AND_TIME_FORMAT } from 'common/utilities/consts';
import * as moment from 'moment';
import { Subscription, timer } from 'rxjs';
import { takeWhile } from 'rxjs/operators';
import { take, takeWhile } from 'rxjs/operators';

@Component({
selector: 'app-dashboard',
Expand Down Expand Up @@ -118,16 +118,16 @@ export class DashboardComponent extends HandleSubscription implements OnInit {
const adminStoreSettingsSubscription = this.store.select('state', 'admin', 'panelBlockade')
.subscribe((isBlocked: boolean) => {
this.isPanelBlocked = isBlocked;
if (isBlocked) {
const licenseSubscription = this.store.select('state', 'admin', 'license')
.pipe(take(1))
.subscribe((license: License) => {
this.licenseDetailUrl = license.detailsUrl;
});
this.subscriptions.push(licenseSubscription);
}
});

if (this.isPanelBlocked) {
const licenseSubscription = this.store.select('state', 'admin', 'license')
.subscribe((license: License) => {
this.licenseDetailUrl = license.detailsUrl;
});
this.subscriptions.push(licenseSubscription);
}

const adminStoreIndexSubscription = this.store.select('state', 'admin', 'index')
.subscribe((index) => {
if (null === index) {
Expand Down
13 changes: 0 additions & 13 deletions src/app/admin/general-settings/general-settings.component.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
.general-settings {
padding: 30px;
width: calc(100% - 380px);

.settings-outlet & {
width: auto;
}
}

.bid-strategy-wrapper {
margin-top: 30px;
margin-left: 30px;
Expand All @@ -15,7 +6,3 @@
.app-license {
margin: 30px;
}

.settings-outlet .general-settings {
width: 100% !important;
}
Original file line number Diff line number Diff line change
Expand Up @@ -294,12 +294,6 @@ <h1 class="dwmth-heading dwmth-heading--primary">
</div>

<div class="row justify-end">
<div
*ngIf="isDefaultBidStrategy"
class="row align-center dwmth-box dwmth-copy dwmth-copy--semi dwmth-copy--green new-feature"
>
New feature!
</div>
<button
class="self-end dwmth-btn dwmth-btn--edit"
(click)="navigateToCampaignEdition('bid-strategy')"
Expand All @@ -317,13 +311,6 @@ <h1 class="dwmth-heading dwmth-heading--primary">
</section>
<section class="dwmth-box dwmth-box--high">
<div class="row justify-end">
<div
*ngIf="undefined == campaign.conversions || campaign.conversions.length == 0"
class="row align-center dwmth-box dwmth-copy dwmth-copy--semi dwmth-copy--green new-feature"
>
New feature!
</div>

<button
class="self-end dwmth-btn dwmth-btn--edit"
(click)="navigateToCampaignEdition('conversion')"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ export class EditCampaignConversionComponent extends HandleSubscription implemen
});
}


getFormDataFromStore(): void {
this.store.dispatch(new LoadCampaignsConfig());

Expand Down
8 changes: 6 additions & 2 deletions src/app/api/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ export class ApiAuthService {
return this.http.get<WalletToken>(`${environment.authUrl}/login/wallet/init`)
}

walletLogin (network: string, address: string, token: string, signature: string): Observable<User> {
return this.http.post<User>(`${environment.authUrl}/login/wallet`, { network, address, token, signature })
walletLogin (network: string, address: string, token: string, signature: string, referralToken: string = null): Observable<User> {
const body = { network, address, token, signature }
if (null !== referralToken) {
body['referralToken'] = referralToken
}
return this.http.post<User>(`${environment.authUrl}/login/wallet`, body)
}
}
5 changes: 5 additions & 0 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { environment } from "environments/environment";
animations: [fadeAnimation]
})
export class AppComponent extends HandleSubscription implements OnInit {
private readonly MODE_INITIALIZATION = 'initialization';
name: string = null;
info: Info = null;

Expand All @@ -40,6 +41,10 @@ export class AppComponent extends HandleSubscription implements OnInit {
this.name = environment.name;
const infoSubscription = this.store.select('state', 'common', 'info')
.subscribe((info: Info) => {
if (environment.adControllerUrl && this.MODE_INITIALIZATION === info?.mode) {
window.location.href = environment.adControllerUrl
return
}
this.info = info;
});
this.subscriptions.push(infoSubscription);
Expand Down
7 changes: 4 additions & 3 deletions src/app/auth/login/login.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class LoginComponent extends HandleSubscription implements OnInit {
return
}
this.checkIfUserRemembered()
this.storeReferralTokenIfPresent()
this.redirectIfReferralTokenPresent()
this.store.dispatch(new authActions.UserLogOutSuccess())
}

Expand Down Expand Up @@ -229,7 +229,7 @@ export class LoginComponent extends HandleSubscription implements OnInit {
this.redirectAfterLogin(user)
}

private storeReferralTokenIfPresent (): void {
private redirectIfReferralTokenPresent (): void {
this.route.queryParams.subscribe(params => {
const referralToken = params['r']
if (referralToken) {
Expand Down Expand Up @@ -313,7 +313,8 @@ export class LoginComponent extends HandleSubscription implements OnInit {
}

walletLogin (network: string, address: string, token: string, signature: string): void {
this.api.auth.walletLogin(network, address, token, signature).subscribe(
const referralToken = this.api.users.getReferralToken()
this.api.auth.walletLogin(network, address, token, signature, referralToken).subscribe(
user => {
this.processLogin(user)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ export class TableNavigationComponent extends HandleSubscription implements OnIn
{title: 'C6', columnWidth: 'col-xs-1-3', keys: ['rpmChange']},
];


adUnitsNavigation = [
{title: 'Name', columnWidth: 'col-xs-1', keys: ['name']},
{title: 'Size', columnWidth: 'col-xs-1', hideArrows: true},
Expand Down
1 change: 0 additions & 1 deletion src/app/common/utilities/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ function enumToObjectArray(enumInput) {
return enumNameArrayObject;
}


function formatMoney(
value,
precision: number = 11,
Expand Down
1 change: 1 addition & 0 deletions src/app/models/info.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export interface Info {
capabilities: string[]
demandFee: number;
inventoryUrl: string;
mode: string;
module: string;
name: string;
panelUrl: string;
Expand Down
6 changes: 0 additions & 6 deletions src/app/publisher/site-details/site-details.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -362,12 +362,6 @@
</p>

<div class="row justify-end">
<div
*ngIf="!popAdUnits.length"
class="row align-center dwmth-box dwmth-copy dwmth-copy--semi dwmth-copy--green new-feature"
>
New feature!
</div>
<button
class="
dwmth-btn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,8 @@
.general-settings {
padding: 30px;
min-width: 500px;
width: calc(100% - 300px);

@include media(xl-up) {
width: calc(100% - 380px);
}

.settings-outlet & {
width: 100% !important;
}
}
2 changes: 0 additions & 2 deletions src/app/store/admin/admin.actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ export class SetAdminSettings implements Action {
export class SetAdminSettingsSuccess implements Action {
readonly type: string = SET_ADMIN_SETTINGS_SUCCESS;


constructor(public payload: AdminSettings) {
}
}
Expand All @@ -233,7 +232,6 @@ export class SetAdminSiteOptions implements Action {
export class SetAdminSiteOptionsSuccess implements Action {
readonly type: string = SET_ADMIN_SITE_OPTIONS_SUCCESS;


constructor(public payload: AdminSiteOptions) {
}
}
Expand Down
Loading

0 comments on commit 46b4bc7

Please sign in to comment.