Skip to content

Commit

Permalink
Update license banner rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtelnov committed Jan 16, 2024
1 parent 2f469c4 commit 5bcb9d3
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 24 deletions.
12 changes: 5 additions & 7 deletions packages/survey-creator-angular/src/creator.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
<div class="svc-creator__content-holder svc-flex-column">
<ng-container *ngFor="let tab of creator.tabs">
<div class="svc-creator-tab" *ngIf="creator.viewType == tab.id && tab.visible"
[attr.id]="'scrollableDiv-' + tab.id" [class.svc-creator__toolbox--right]="creator.toolboxLocation == 'right'">
<ng-template [component]="{ name: tab.componentContent, data: { model: tab.data.model } }"></ng-template>
[attr.id]="'scrollableDiv-' + tab.id"
[class.svc-creator__toolbox--right]="creator.toolboxLocation == 'right'">
<ng-template
[component]="{ name: tab.componentContent, data: { model: tab.data.model } }"></ng-template>
</div>
</ng-container>
</div>
Expand All @@ -40,11 +42,7 @@
</div>
</div>
<div class="svc-creator__banner" *ngIf="!creator.haveCommercialLicense">
<span class="svc-creator__non-commercial-text">
<a href="https://surveyjs.io/buy">
{{creator.licenseText}}
</a>
</span>
<span class="svc-creator__non-commercial-text" [innerHTML]="creator.licenseText | safeHtml"></span>
</div>
<sv-notifier [notifier]="creator.notifier"></sv-notifier>
</div>
Expand Down
3 changes: 1 addition & 2 deletions packages/survey-creator-core/src/components/creator.scss
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,12 @@ survey-creator,
.svc-creator__non-commercial-text {
color: $primary-foreground;
font-family: $font-family;
font-weight: bold;
font-size: calcSize(2);
vertical-align: middle;
padding: 12px 128px;

a {
color: $primary-foreground;
text-decoration: none;
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/survey-creator-core/src/localization/english.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export var enStrings = {
deleteQuestion: "Delete Question",
convertTo: "Convert to",
drag: "Drag element",
license: "To use our library in your app, a developer license is necessary. If you currently hold an activated license, ensure you're using the latest version available."
license: "To use our library, a <a href='https://surveyjs.io/licensing'>developer license</a> is required. If you have an active license, <a href='https://surveyjs.io/remove-alert-banner'>set up your license key</a> and ensure you're using the latest version."
},
// Question types
qt: {
Expand Down
3 changes: 1 addition & 2 deletions packages/survey-creator-core/src/localization/hebrew.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ export var hebrewStrings = {
deletePanel: "מחיקת לוח",
deleteQuestion: "מחיקת שאלה",
convertTo: "המרה ל",
drag: "גרירת אלמנט",
license: "אנא רכשו רישיון מפתחים כדי להשתמש ביוצר הסקר ביישום שלכם"
drag: "גרירת אלמנט"
},
// Question types
qt: {
Expand Down
3 changes: 1 addition & 2 deletions packages/survey-creator-knockout/src/survey-creator.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@
</div>
<!-- ko ifnot: creator.haveCommercialLicense -->
<div class="svc-creator__banner">
<span class="svc-creator__non-commercial-text"><a href="https://surveyjs.io/buy"
data-bind="text: creator.licenseText"></a></span>
<span class="svc-creator__non-commercial-text" data-bind="html: creator.licenseText"></span>
</div>
<!-- /ko -->
<!-- ko component: { name: 'sv-notifier', params: { notifier: creator.notifier } } -->
Expand Down
7 changes: 2 additions & 5 deletions packages/survey-creator-react/src/SurveyCreator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,10 @@ export class SurveyCreatorComponent extends SurveyElementBase<
const fullContainerClassName = "svc-flex-row svc-full-container" + (" svc-creator__side-bar--" + this.creator.sidebarLocation);
let licenseBanner = null;
if (!this.props.creator.haveCommercialLicense) {
const htmlValue = { __html: this.props.creator.licenseText };
licenseBanner = (
<div className="svc-creator__banner">
<span className="svc-creator__non-commercial-text">
<a href="https://surveyjs.io/buy">
{this.props.creator.licenseText}
</a>
</span>
<span className="svc-creator__non-commercial-text" dangerouslySetInnerHTML={htmlValue}></span>
</div>
);
}
Expand Down
9 changes: 4 additions & 5 deletions packages/survey-creator-vue/src/Creator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,10 @@
</div>
</div>
<div class="svc-creator__banner" v-if="!model.haveCommercialLicense">
<span class="svc-creator__non-commercial-text">
<a href="https://surveyjs.io/buy">
{{ model.licenseText }}
</a>
</span>
<span
class="svc-creator__non-commercial-text"
v-html="model.licenseText"
></span>
</div>
<sv-notifier :model="model.notifier"></sv-notifier>
</div>
Expand Down

0 comments on commit 5bcb9d3

Please sign in to comment.