Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-09 20:02:54 +01:00
wip
Dieser Commit ist enthalten in:
Ursprung
fee56c2d43
Commit
27cde861b6
6 geänderte Dateien mit 48 neuen und 0 gelöschten Zeilen
|
@ -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}`;
|
||||
}
|
||||
}
|
|
@ -18,6 +18,7 @@
|
|||
}}
|
||||
|
||||
<div class="admin-actions">
|
||||
{{wizard-subscription-authorize}}
|
||||
{{wizard-subscription-badge}}
|
||||
{{wizard-subscription-cta}}
|
||||
</div>
|
||||
|
|
|
@ -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>
|
|
@ -49,6 +49,10 @@ $error: #ef1700;
|
|||
.btn-pavilion-support {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.supplier-authorize .btn-primary {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.wizard-message {
|
||||
|
|
|
@ -545,6 +545,8 @@ en:
|
|||
|
||||
subscription:
|
||||
title: Subscriber Features
|
||||
authorize: "Authorize Subscription"
|
||||
deauthorize: "De-authorize Subscription"
|
||||
subscribed:
|
||||
label: Subscribed
|
||||
title: You're subscribed and can use these features
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
# subscription_url: https://coop.pavilion.tech
|
||||
|
||||
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/wizard.scss'
|
||||
|
||||
|
|
Laden …
In neuem Issue referenzieren