1
0
Fork 0
Dieser Commit ist enthalten in:
merefield 2023-09-04 14:55:51 +01:00
Ursprung fee56c2d43
Commit 27cde861b6
6 geänderte Dateien mit 48 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -0,0 +1,24 @@
// import { geoLocationSearch, providerDetails } from "../lib/location-utilities";
//import { ajax } from "discourse/lib/ajax";
import { action, set } from "@ember/object";
// import { equal } from "@ember/object/computed";
// import { A } from "@ember/array";
import { inject as service } from "@ember/service";
import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
// import I18n from "I18n";
export default class WizardSubscriptionAuthorize extends Component {
@service siteSettings;
@tracked supplierId = 1;
constructor() {
super(...arguments);
}
@action
authorize() {
window.location.href = `${basePath}/authorize?supplier_id=${this.supplierId}`;
}
}

Datei anzeigen

@ -18,6 +18,7 @@
}} }}
<div class="admin-actions"> <div class="admin-actions">
{{wizard-subscription-authorize}}
{{wizard-subscription-badge}} {{wizard-subscription-badge}}
{{wizard-subscription-cta}} {{wizard-subscription-cta}}
</div> </div>

Datei anzeigen

@ -0,0 +1,15 @@
<div class="supplier-authorize">
{{#if authorized}}
{{conditional-loading-spinner size="small" condition=unauthorizing}}
<a {{action "deauthorize"}} class="deauthorize" title={{i18n "admin.subscription_client.supplier.deauthorize"}} role="button" disabled={{unauthorizing}}>
{{i18n "admin.wizard.subscription.deauthorize"}}
</a>
{{else}}
{{d-button
icon="id-card"
class="btn-primary"
label="admin.wizard.subscription.authorize"
title="admin.wizard.subscription.authorize"
action=(action "authorize")}}
{{/if}}
</div>

Datei anzeigen

@ -49,6 +49,10 @@ $error: #ef1700;
.btn-pavilion-support { .btn-pavilion-support {
margin-left: 10px; margin-left: 10px;
} }
.supplier-authorize .btn-primary {
margin-right: 10px;
}
} }
.wizard-message { .wizard-message {

Datei anzeigen

@ -545,6 +545,8 @@ en:
subscription: subscription:
title: Subscriber Features title: Subscriber Features
authorize: "Authorize Subscription"
deauthorize: "De-authorize Subscription"
subscribed: subscribed:
label: Subscribed label: Subscribed
title: You're subscribed and can use these features title: You're subscribed and can use these features

Datei anzeigen

@ -8,6 +8,8 @@
# subscription_url: https://coop.pavilion.tech # subscription_url: https://coop.pavilion.tech
gem 'liquid', '5.0.1', require: true gem 'liquid', '5.0.1', require: true
gem "discourse_subscription_client", "0.1.0.pre14", require_name: "discourse_subscription_client"
register_asset 'stylesheets/common/admin.scss' register_asset 'stylesheets/common/admin.scss'
register_asset 'stylesheets/common/wizard.scss' register_asset 'stylesheets/common/wizard.scss'