mirror of
https://github.com/wekan/wekan.git
synced 2026-03-13 17:06:13 +01:00
Convert all remaining BlazeComponent-based components to native Meteor Template pattern: activities, comments, all rules actions/triggers, swimlanes, users, gantt, import, and main utility components.
39 lines
1.2 KiB
JavaScript
39 lines
1.2 KiB
JavaScript
import { ReactiveCache } from '/imports/reactiveCache';
|
|
import { TAPi18n } from '/imports/i18n';
|
|
|
|
// Shared helpers for both support templates
|
|
const supportHelpers = {
|
|
supportTitle() {
|
|
const setting = ReactiveCache.getCurrentSetting();
|
|
return setting && setting.supportTitle ? setting.supportTitle : TAPi18n.__('support');
|
|
},
|
|
supportContent() {
|
|
const setting = ReactiveCache.getCurrentSetting();
|
|
return setting && setting.supportPageText ? setting.supportPageText : TAPi18n.__('support-info-not-added-yet');
|
|
},
|
|
isSupportEnabled() {
|
|
const setting = ReactiveCache.getCurrentSetting();
|
|
return setting && setting.supportPageEnabled;
|
|
},
|
|
isSupportPublic() {
|
|
const setting = ReactiveCache.getCurrentSetting();
|
|
return setting && setting.supportPagePublic;
|
|
}
|
|
};
|
|
|
|
// Main support page component
|
|
Template.support.onCreated(function () {
|
|
this.error = new ReactiveVar('');
|
|
this.loading = new ReactiveVar(false);
|
|
|
|
Meteor.subscribe('setting');
|
|
});
|
|
|
|
Template.support.helpers(supportHelpers);
|
|
|
|
// Header bar component
|
|
Template.supportHeaderBar.onCreated(function () {
|
|
Meteor.subscribe('setting');
|
|
});
|
|
|
|
Template.supportHeaderBar.helpers(supportHelpers);
|