mirror of
https://github.com/wekan/wekan.git
synced 2026-01-27 03:36:09 +01:00
More translations. Added support page to Admin Panel / Settings / Layout.
Thanks to xet7 !
This commit is contained in:
parent
4227377449
commit
a7400dca45
14 changed files with 246 additions and 16 deletions
41
client/components/main/support.js
Normal file
41
client/components/main/support.js
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
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
|
||||
BlazeComponent.extendComponent({
|
||||
onCreated() {
|
||||
this.error = new ReactiveVar('');
|
||||
this.loading = new ReactiveVar(false);
|
||||
|
||||
Meteor.subscribe('setting');
|
||||
},
|
||||
...supportHelpers
|
||||
}).register('support');
|
||||
|
||||
// Header bar component
|
||||
BlazeComponent.extendComponent({
|
||||
onCreated() {
|
||||
Meteor.subscribe('setting');
|
||||
},
|
||||
...supportHelpers
|
||||
}).register('supportHeaderBar');
|
||||
Loading…
Add table
Add a link
Reference in a new issue