diff --git a/CHANGELOG.md b/CHANGELOG.md
index 801f9df39..cfe257252 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
+## [2.6.0] - 2023-07-25
+### Added
+- Custom logos support in dark mode
+- Missed views rate statistics for sites
+- Filtering by added and accepted dates on banner classification page
+### Changed
+- Targeting custom option UX - remove unintuitive batch input
+- Logo in banner preview
+### Fixed
+- Block buttons while campaign/site creation is in progress
+- Fixing background of targeting select input
+- Png icons replaced with svgs
+- Classifier filtering and Targeting & exclusions text and backgrounds contrasting colors set
+- Direct deal's condition
+- Discarding status filter on banner classification page
+
## [2.5.0] - 2023-05-15
### Added
- Instructions for adding the ads.txt file entry
@@ -578,7 +594,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/v2.5.0...develop
+[Unreleased]: https://github.com/adshares/adpanel/compare/v2.6.0...develop
+[2.6.0]: https://github.com/adshares/adpanel/compare/v2.5.0...v2.6.0
[2.5.0]: https://github.com/adshares/adpanel/compare/v2.4.6...v2.5.0
[2.4.6]: https://github.com/adshares/adpanel/compare/v2.4.5...v2.4.6
[2.4.5]: https://github.com/adshares/adpanel/compare/v2.4.4...v2.4.5
diff --git a/angular.json b/angular.json
index 2254e80f8..6d75ee371 100644
--- a/angular.json
+++ b/angular.json
@@ -31,6 +31,7 @@
"polyfills": "src/polyfills.ts",
"assets": [
"src/assets",
+ "src/logo.png",
"src/favicon.ico",
"src/favicon-16x16.png",
"src/favicon-32x32.png",
diff --git a/deploy/reload.sh b/deploy/reload.sh
index 8133c2d78..a0bd2832f 100755
--- a/deploy/reload.sh
+++ b/deploy/reload.sh
@@ -36,7 +36,8 @@ then
if [[ -d ${BRAND_ASSETS_DIR} ]]
then
echo "Copying brand assets from ${BRAND_ASSETS_DIR}"
- cp -fr "${BRAND_ASSETS_DIR}"/* $BUILD_DIRECTORY/
+# sync all files exclude *simple*
+ rsync -r --exclude="*simple*" "${BRAND_ASSETS_DIR}"/* $BUILD_DIRECTORY/
else
echo "Brand assets directory ${BRAND_ASSETS_DIR} doesn't exist."
fi
diff --git a/package.json b/package.json
index 2a3d2543f..98d25e65f 100644
--- a/package.json
+++ b/package.json
@@ -67,6 +67,7 @@
"@types/node": "^12.12.6",
"@typescript-eslint/eslint-plugin": "5.27.1",
"@typescript-eslint/parser": "5.27.1",
+ "angular-http-server": "^1.11.1",
"eslint": "8.22.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-angular": "^4.1.0",
diff --git a/sonar-project.properties b/sonar-project.properties
index 149fb3a50..d724ce280 100644
--- a/sonar-project.properties
+++ b/sonar-project.properties
@@ -2,7 +2,7 @@ sonar.host.url=https://sonarcloud.io
sonar.organization=adshares-github
sonar.projectKey=adshares-adpanel
sonar.projectName=Adshares AdPanel
-sonar.projectVersion=2.5
+sonar.projectVersion=2.6
# =====================================================
# Meta-data for the project
diff --git a/src/app/advertiser/dashboard/dashboard.component.html b/src/app/advertiser/dashboard/dashboard.component.html
index 9a43e9040..b943d20aa 100644
--- a/src/app/advertiser/dashboard/dashboard.component.html
+++ b/src/app/advertiser/dashboard/dashboard.component.html
@@ -77,7 +77,7 @@
-
+
Create your first campaign
diff --git a/src/app/advertiser/edit-campaign/edit-campaign-additional-targeting/edit-campaign-additional-targeting.component.html b/src/app/advertiser/edit-campaign/edit-campaign-additional-targeting/edit-campaign-additional-targeting.component.html
index ae2d9e6c7..13efaffc6 100644
--- a/src/app/advertiser/edit-campaign/edit-campaign-additional-targeting/edit-campaign-additional-targeting.component.html
+++ b/src/app/advertiser/edit-campaign/edit-campaign-additional-targeting/edit-campaign-additional-targeting.component.html
@@ -163,19 +163,14 @@
Targeting
-
diff --git a/src/app/advertiser/edit-campaign/edit-campaign-additional-targeting/edit-campaign-additional-targeting.component.ts b/src/app/advertiser/edit-campaign/edit-campaign-additional-targeting/edit-campaign-additional-targeting.component.ts
index fdfcebd1d..4f2575f3e 100644
--- a/src/app/advertiser/edit-campaign/edit-campaign-additional-targeting/edit-campaign-additional-targeting.component.ts
+++ b/src/app/advertiser/edit-campaign/edit-campaign-additional-targeting/edit-campaign-additional-targeting.component.ts
@@ -4,10 +4,12 @@ import { FormControl, FormGroup } from '@angular/forms';
import { filter, first, take } from 'rxjs/operators';
import { Store } from '@ngrx/store';
import {
+ ADD_CAMPAIGN_TO_CAMPAIGNS_FAILURE,
AddCampaignToCampaigns,
ClearLastEditedCampaign,
SaveCampaignBasicInformation,
SaveCampaignTargeting,
+ UPDATE_CAMPAIGN_FAILURE,
UpdateCampaign,
} from 'store/advertiser/advertiser.actions';
import { AppState } from 'models/app-state.model';
@@ -20,6 +22,7 @@ import { processTargeting } from 'common/components/targeting/targeting.helpers'
import { HandleSubscriptionComponent } from 'common/handle-subscription.component';
import { CustomValidators } from 'common/utilities/forms';
import { ServerOptionsService } from 'common/server-options.service';
+import { Actions, ofType } from '@ngrx/effects';
@Component({
selector: 'app-edit-campaign-additional-targeting',
@@ -49,7 +52,8 @@ export class EditCampaignAdditionalTargetingComponent extends HandleSubscription
private router: Router,
private advertiserService: AdvertiserService,
private serverOptionsService: ServerOptionsService,
- private assetHelpers: AssetHelpersService
+ private assetHelpers: AssetHelpersService,
+ private actions$: Actions
) {
super();
}
@@ -88,9 +92,17 @@ export class EditCampaignAdditionalTargetingComponent extends HandleSubscription
this.submitted = false;
this.createCampaignMode ? this.saveCampaignTargetingAndCpm(false) : this.updateTargetingAndCpm();
+
+ const errorSubscription = this.actions$
+ .pipe(ofType(ADD_CAMPAIGN_TO_CAMPAIGNS_FAILURE, UPDATE_CAMPAIGN_FAILURE), first())
+ .subscribe(() => {
+ this.changesSaved = false;
+ });
+ this.subscriptions.push(errorSubscription);
}
updateTargetingAndCpm(): void {
+ this.changesSaved = true;
const targeting = {
requires: this.addedItems,
excludes: this.excludedItems,
diff --git a/src/app/advertiser/edit-campaign/edit-campaign-basic-info/edit-campaign-basic-information.component.html b/src/app/advertiser/edit-campaign/edit-campaign-basic-info/edit-campaign-basic-information.component.html
index 9c6ac63bd..c85830577 100644
--- a/src/app/advertiser/edit-campaign/edit-campaign-basic-info/edit-campaign-basic-information.component.html
+++ b/src/app/advertiser/edit-campaign/edit-campaign-basic-info/edit-campaign-basic-information.component.html
@@ -214,18 +214,15 @@
Basic information
-
+
{{ createCampaignMode ? 'Back to dashboard' : 'Back' }}
+ [disabled]="changesSaved">
{{ createCampaignMode ? 'Save & continue' : 'Update' }}
diff --git a/src/app/advertiser/edit-campaign/edit-campaign-basic-info/edit-campaign-basic-information.component.ts b/src/app/advertiser/edit-campaign/edit-campaign-basic-info/edit-campaign-basic-information.component.ts
index b533e49c2..e17917ec1 100644
--- a/src/app/advertiser/edit-campaign/edit-campaign-basic-info/edit-campaign-basic-information.component.ts
+++ b/src/app/advertiser/edit-campaign/edit-campaign-basic-info/edit-campaign-basic-information.component.ts
@@ -10,7 +10,12 @@ import { Campaign, CampaignBasicInformation, CampaignsConfig } from 'models/camp
import { campaignInitialState } from 'models/initial-state/campaign';
import { campaignStatusesEnum } from 'models/enum/campaign.enum';
import { Entry } from 'models/targeting-option.model';
-import { LoadCampaignsConfig, SaveCampaignBasicInformation, UpdateCampaign } from 'store/advertiser/advertiser.actions';
+import {
+ LoadCampaignsConfig,
+ SaveCampaignBasicInformation,
+ UpdateCampaign,
+ UPDATE_CAMPAIGN_FAILURE,
+} from 'store/advertiser/advertiser.actions';
import * as moment from 'moment';
import { appSettings } from 'app-settings';
@@ -27,6 +32,7 @@ import { HandleSubscriptionComponent } from 'common/handle-subscription.componen
import { CustomValidators } from 'common/utilities/forms';
import { ServerOptionsService } from 'common/server-options.service';
import { faCalendar } from '@fortawesome/free-regular-svg-icons';
+import { Actions, ofType } from '@ngrx/effects';
@Component({
selector: 'app-edit-campaign-basic-information',
@@ -59,7 +65,8 @@ export class EditCampaignBasicInformationComponent extends HandleSubscriptionCom
private route: ActivatedRoute,
private store: Store,
private advertiserService: AdvertiserService,
- private serverOptionsService: ServerOptionsService
+ private serverOptionsService: ServerOptionsService,
+ private actions$: Actions
) {
super();
}
@@ -151,6 +158,11 @@ export class EditCampaignBasicInformationComponent extends HandleSubscriptionCom
};
this.store.dispatch(new UpdateCampaign(this.campaign));
+
+ const errorSubscription = this.actions$.pipe(ofType(UPDATE_CAMPAIGN_FAILURE)).subscribe(() => {
+ this.changesSaved = false;
+ });
+ this.subscriptions.push(errorSubscription);
}
createForm() {
diff --git a/src/app/advertiser/edit-campaign/edit-campaign-create-ads/edit-campaign-create-ads.component.html b/src/app/advertiser/edit-campaign/edit-campaign-create-ads/edit-campaign-create-ads.component.html
index deb21a99a..8880f16f9 100644
--- a/src/app/advertiser/edit-campaign/edit-campaign-create-ads/edit-campaign-create-ads.component.html
+++ b/src/app/advertiser/edit-campaign/edit-campaign-create-ads/edit-campaign-create-ads.component.html
@@ -180,7 +180,7 @@ Upload ads
[uploader]="uploader"
onclick="document.getElementById('fileSelect').click()"
data-test="advertiser-edit-campaign-create-ads-form-drag-and-drop-wrapper">
-
+
Drag & Drop or Browse
@@ -306,12 +306,7 @@
Upload ads
-
- Delete placements
-
+ Delete ad
@@ -341,22 +336,15 @@
Upload ads
+ [disabled]="changesSaved">
Save as draft
-
-
- {{ isEditMode ? 'Update' : 'Save & continue' }}
-
-
-
-
+
+ {{ isEditMode ? 'Update' : 'Save & continue' }}
diff --git a/src/app/advertiser/edit-campaign/edit-campaign-create-ads/edit-campaign-create-ads.component.ts b/src/app/advertiser/edit-campaign/edit-campaign-create-ads/edit-campaign-create-ads.component.ts
index b3f2879dc..932ce12c6 100644
--- a/src/app/advertiser/edit-campaign/edit-campaign-create-ads/edit-campaign-create-ads.component.ts
+++ b/src/app/advertiser/edit-campaign/edit-campaign-create-ads/edit-campaign-create-ads.component.ts
@@ -6,9 +6,11 @@ import { MatDialog } from '@angular/material/dialog';
import { first, take } from 'rxjs/operators';
import { FileUploader } from 'ng2-file-upload';
import {
+ ADD_CAMPAIGN_TO_CAMPAIGNS_FAILURE,
AddCampaignToCampaigns,
ClearLastEditedCampaign,
SaveCampaignAds,
+ UPDATE_CAMPAIGN_FAILURE,
UpdateCampaign,
} from 'store/advertiser/advertiser.actions';
import { AdvertiserService } from 'advertiser/advertiser.service';
@@ -28,6 +30,7 @@ import { SessionService } from '../../../session.service';
import { ShowDialogOnError } from 'store/common/common.actions';
import { faPlus } from '@fortawesome/free-solid-svg-icons';
import { faCircleXmark } from '@fortawesome/free-regular-svg-icons';
+import { Actions, ofType } from '@ngrx/effects';
interface UploadingFile {
name: string;
@@ -87,7 +90,8 @@ export class EditCampaignCreateAdsComponent extends HandleSubscriptionComponent
private router: Router,
private store: Store
,
private session: SessionService,
- private matDialog: MatDialog
+ private matDialog: MatDialog,
+ private actions$: Actions
) {
super();
}
@@ -461,6 +465,13 @@ export class EditCampaignCreateAdsComponent extends HandleSubscriptionComponent
this.isEditMode
? this.store.dispatch(new UpdateCampaign(this.campaign))
: this.saveCampaignAds(this.campaign, isDraft);
+
+ const errorSubscription = this.actions$
+ .pipe(ofType(ADD_CAMPAIGN_TO_CAMPAIGNS_FAILURE, UPDATE_CAMPAIGN_FAILURE), first())
+ .subscribe(() => {
+ this.changesSaved = false;
+ });
+ this.subscriptions.push(errorSubscription);
} else {
this.changesSaved = false;
}
diff --git a/src/app/advertiser/edit-campaign/edit-campaign-summary/edit-campaign-summary.component.html b/src/app/advertiser/edit-campaign/edit-campaign-summary/edit-campaign-summary.component.html
index 715254dab..0ffb7afd2 100644
--- a/src/app/advertiser/edit-campaign/edit-campaign-summary/edit-campaign-summary.component.html
+++ b/src/app/advertiser/edit-campaign/edit-campaign-summary/edit-campaign-summary.component.html
@@ -138,16 +138,10 @@ 3. Ads
Back
-
+
Save as draft
-
+
Start campaign
diff --git a/src/app/advertiser/edit-campaign/edit-campaign-summary/edit-campaign-summary.component.ts b/src/app/advertiser/edit-campaign/edit-campaign-summary/edit-campaign-summary.component.ts
index 6c10eb847..ceb48fcb0 100644
--- a/src/app/advertiser/edit-campaign/edit-campaign-summary/edit-campaign-summary.component.ts
+++ b/src/app/advertiser/edit-campaign/edit-campaign-summary/edit-campaign-summary.component.ts
@@ -10,12 +10,13 @@ import { AdvertiserService } from 'advertiser/advertiser.service';
import { AssetHelpersService } from 'common/asset-helpers.service';
import { processTargeting } from 'common/components/targeting/targeting.helpers';
import { adStatusesEnum } from 'models/enum/ad.enum';
-import { AddCampaignToCampaigns } from 'store/advertiser/advertiser.actions';
+import { AddCampaignToCampaigns, ADD_CAMPAIGN_TO_CAMPAIGNS_FAILURE } from 'store/advertiser/advertiser.actions';
import { HandleSubscriptionComponent } from 'common/handle-subscription.component';
import { TargetingOption } from 'models/targeting-option.model';
import { cloneDeep } from 'common/utilities/helpers';
import { faEdit } from '@fortawesome/free-solid-svg-icons';
import { faCalendar } from '@fortawesome/free-regular-svg-icons';
+import { Actions, ofType } from '@ngrx/effects';
@Component({
selector: 'app-edit-campaign-summary',
@@ -29,11 +30,13 @@ export class EditCampaignSummaryComponent extends HandleSubscriptionComponent im
faEdit = faEdit;
faCalendar = faCalendar;
CONVERSIONS_DESCRIPTION = CONVERSIONS_DESCRIPTION;
+ changesSaved: boolean = false;
constructor(
private store: Store,
private advertiserService: AdvertiserService,
- private assetHelpers: AssetHelpersService
+ private assetHelpers: AssetHelpersService,
+ private readonly actions$: Actions
) {
super();
}
@@ -58,6 +61,7 @@ export class EditCampaignSummaryComponent extends HandleSubscriptionComponent im
}
saveCampaign(isDraft): void {
+ this.changesSaved = true;
if (!isDraft) {
this.campaign = {
...this.campaign,
@@ -74,5 +78,9 @@ export class EditCampaignSummaryComponent extends HandleSubscriptionComponent im
};
}
this.store.dispatch(new AddCampaignToCampaigns(this.campaign));
+ const errorSubscription = this.actions$.pipe(ofType(ADD_CAMPAIGN_TO_CAMPAIGNS_FAILURE)).subscribe(() => {
+ this.changesSaved = false;
+ });
+ this.subscriptions.push(errorSubscription);
}
}
diff --git a/src/app/app.component.html b/src/app/app.component.html
index bf4dde10f..d1814e631 100644
--- a/src/app/app.component.html
+++ b/src/app/app.component.html
@@ -5,7 +5,9 @@
-
+
+
+
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index 8eb1ad323..c9d316e82 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -83,4 +83,8 @@ export class AppComponent extends HandleSubscriptionComponent implements OnInit
isOauth(): boolean {
return undefined !== this.route.snapshot.queryParams.redirect_uri;
}
+
+ onLogoError(event) {
+ event.target.src = '/logo.png';
+ }
}
diff --git a/src/app/auth/auth.component.html b/src/app/auth/auth.component.html
index 3b87accc6..64d96135d 100644
--- a/src/app/auth/auth.component.html
+++ b/src/app/auth/auth.component.html
@@ -12,7 +12,8 @@