0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-27 19:30:28 +01:00
Dieser Commit ist enthalten in:
Angus McLeod 2024-11-22 16:51:24 +01:00
Ursprung 6d5e7e91ec
Commit c54602a9ce
16 geänderte Dateien mit 62 neuen und 43 gelöschten Zeilen

Datei anzeigen

@ -51,7 +51,11 @@
disabled=this.saveDisabled disabled=this.saveDisabled
class="save" class="save"
}} }}
{{d-button action=(action "close") icon="times" disabled=this.closeDisabled}} {{d-button
action=(action "close")
icon="times"
disabled=this.closeDisabled
}}
</td> </td>
{{else}} {{else}}
<td><label>{{this.field.klass}}</label></td> <td><label>{{this.field.klass}}</label></td>

Datei anzeigen

@ -122,7 +122,7 @@ export default Component.extend({
setTimeout(() => { setTimeout(() => {
if (this.isDestroyed) { if (this.isDestroyed) {
return; return;
}; }
this.set("saveIcon", null); this.set("saveIcon", null);
}, 10000); }, 10000);
}); });

Datei anzeigen

@ -2,7 +2,9 @@
<div class="d-editor-container"> <div class="d-editor-container">
{{#if this.showPreview}} {{#if this.showPreview}}
<div class="d-editor-preview-wrapper {{if this.forcePreview 'force-preview'}}"> <div
class="d-editor-preview-wrapper {{if this.forcePreview 'force-preview'}}"
>
<div class="d-editor-preview"> <div class="d-editor-preview">
{{html-safe this.preview}} {{html-safe this.preview}}
</div> </div>

Datei anzeigen

@ -271,7 +271,10 @@
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper inputs=this.field.condition options=this.fieldConditionOptions}} {{wizard-mapper
inputs=this.field.condition
options=this.fieldConditionOptions
}}
</div> </div>
</div> </div>
@ -303,6 +306,9 @@
{{/if}} {{/if}}
{{#if this.validations}} {{#if this.validations}}
{{wizard-realtime-validations field=this.field validations=this.validations}} {{wizard-realtime-validations
field=this.field
validations=this.validations
}}
{{/if}} {{/if}}
{{/wizard-subscription-container}} {{/wizard-subscription-container}}

Datei anzeigen

@ -39,7 +39,10 @@
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper inputs=this.step.condition options=this.stepConditionOptions}} {{wizard-mapper
inputs=this.step.condition
options=this.stepConditionOptions
}}
</div> </div>
</div> </div>

Datei anzeigen

@ -35,7 +35,9 @@
{{/if}} {{/if}}
{{#if this.showRemove}} {{#if this.showRemove}}
<a role="button" {{action this.removePair this.pair}} class="remove-pair">{{d-icon <a
"times" role="button"
}}</a> {{action this.removePair this.pair}}
class="remove-pair"
>{{d-icon "times"}}</a>
{{/if}} {{/if}}

Datei anzeigen

@ -1,7 +1,10 @@
<div class="supplier-authorize"> <div class="supplier-authorize">
<WizardSubscriptionBadge /> <WizardSubscriptionBadge />
{{#if this.authorized}} {{#if this.authorized}}
<ConditionalLoadingSpinner @condition={{this.unauthorizing}} @size="small" /> <ConditionalLoadingSpinner
@condition={{this.unauthorizing}}
@size="small"
/>
<DButton <DButton
class="deauthorize" class="deauthorize"
@title="admin.wizard.subscription.deauthorize.title" @title="admin.wizard.subscription.deauthorize.title"

Datei anzeigen

@ -1,12 +1,22 @@
{{d-editor value=this.value forcePreview=this.forcePreview placeholder=this.placeholder}} {{d-editor
value=this.value
forcePreview=this.forcePreview
placeholder=this.placeholder
}}
<div class="wizard-editor-gutter"> <div class="wizard-editor-gutter">
{{#if this.previewEnabled}} {{#if this.previewEnabled}}
{{d-button action=(action "togglePreview") translatedLabel=this.previewLabel}} {{d-button
action=(action "togglePreview")
translatedLabel=this.previewLabel
}}
{{/if}} {{/if}}
{{#if this.fieldsEnabled}} {{#if this.fieldsEnabled}}
{{d-button action=(action "togglePopover") translatedLabel=this.popoverLabel}} {{d-button
action=(action "togglePopover")
translatedLabel=this.popoverLabel
}}
{{#if this.showPopover}} {{#if this.showPopover}}
<div class="wizard-editor-gutter-popover"> <div class="wizard-editor-gutter-popover">

Datei anzeigen

@ -31,19 +31,16 @@ export default Controller.extend({
} }
} }
setTimeout( setTimeout(() => {
() => { if (this.isDestroyed) {
if (this.isDestroyed) { return;
return; }
} this.setProperties({
this.setProperties({ messageKey: "create",
messageKey: "create", messageType: null,
messageType: null, messageOpts: null,
messageOpts: null, });
}); }, 10000);
},
10000
);
return result; return result;
}); });

Datei anzeigen

@ -28,7 +28,7 @@ export default Controller.extend({
setTimeout(() => { setTimeout(() => {
if (this.isDestroyed) { if (this.isDestroyed) {
return; return;
}; }
this.setProperties({ this.setProperties({
messageKey: "info", messageKey: "info",
messageOpts: null, messageOpts: null,

Datei anzeigen

@ -1,7 +1,6 @@
import DiscourseURL from "discourse/lib/url"; import DiscourseURL from "discourse/lib/url";
import { withPluginApi } from "discourse/lib/plugin-api"; import { withPluginApi } from "discourse/lib/plugin-api";
import getUrl from "discourse-common/lib/get-url"; import getUrl from "discourse-common/lib/get-url";
import { observes } from "discourse-common/utils/decorators";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import CustomWizardTextareaEditor from "../components/custom-wizard-textarea-editor"; import CustomWizardTextareaEditor from "../components/custom-wizard-textarea-editor";

Datei anzeigen

@ -181,7 +181,11 @@
{{/wizard-subscription-container}} {{/wizard-subscription-container}}
</div> </div>
{{wizard-links itemType="step" current=this.currentStep items=this.wizard.steps}} {{wizard-links
itemType="step"
current=this.currentStep
items=this.wizard.steps
}}
{{#if this.currentStep}} {{#if this.currentStep}}
{{wizard-custom-step {{wizard-custom-step

Datei anzeigen

@ -1,7 +1,7 @@
{{#if this.noAccess}} {{#if this.noAccess}}
<CustomWizardNoAccess <CustomWizardNoAccess
@text={{i18n this.noAccessI18nKey}} @text={{i18n this.noAccessI18nKey}}
@wizardId=this.wizardId @wizardId={{this.wizardId}}
@reason={{this.noAccessReason}} @reason={{this.noAccessReason}}
/> />
{{/if}} {{/if}}

Datei anzeigen

@ -13,7 +13,6 @@ import {
getUnsubscribedAdminWizards, getUnsubscribedAdminWizards,
getWizard, getWizard,
} from "../helpers/admin-wizard"; } from "../helpers/admin-wizard";
import { Promise } from "rsvp";
acceptance("Admin | Custom Fields Unsubscribed", function (needs) { acceptance("Admin | Custom Fields Unsubscribed", function (needs) {
needs.user(); needs.user();

Datei anzeigen

@ -1,16 +1,8 @@
import { getOwner } from "@ember/application"; import { click, fillIn, triggerKeyEvent, visit } from "@ember/test-helpers";
import {
click,
fillIn,
settled,
triggerKeyEvent,
visit,
} from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import { import {
acceptance, acceptance,
count, count,
createFile,
exists, exists,
query, query,
visible, visible,
@ -19,8 +11,6 @@ import { allFieldsWizard } from "../helpers/wizard";
import tagsJson from "../fixtures/tags"; import tagsJson from "../fixtures/tags";
import usersJson from "../fixtures/users"; import usersJson from "../fixtures/users";
const wizardComposerEdtiorEventPrefix = "wizard-editor";
acceptance("Field | Fields", function (needs) { acceptance("Field | Fields", function (needs) {
needs.pretender((server, helper) => { needs.pretender((server, helper) => {
server.get("/w/wizard.json", () => helper.response(allFieldsWizard)); server.get("/w/wizard.json", () => helper.response(allFieldsWizard));