mirror of
https://github.com/wekan/wekan.git
synced 2026-02-04 23:51:48 +01:00
Default Spinner can be configured through environment variables
This commit is contained in:
parent
38069c6d63
commit
ba41533128
4 changed files with 16 additions and 1 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import { ALLOWED_WAIT_SPINNERS } from '/config/const';
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
onCreated() {
|
||||
this.error = new ReactiveVar('');
|
||||
|
|
@ -390,7 +392,7 @@ Template.selectAuthenticationMethod.helpers({
|
|||
|
||||
Template.selectSpinnerName.helpers({
|
||||
spinners() {
|
||||
return ['Bounce', 'Wave']
|
||||
return ALLOWED_WAIT_SPINNERS;
|
||||
},
|
||||
isSelected(match) {
|
||||
return Template.instance().data.spinnerName === match;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
Meteor.subscribe('setting');
|
||||
|
||||
import { ALLOWED_WAIT_SPINNERS } from '/config/const';
|
||||
|
||||
export class Spinner extends BlazeComponent {
|
||||
currentSettings() {
|
||||
return Settings.findOne();
|
||||
|
|
@ -7,6 +9,10 @@ export class Spinner extends BlazeComponent {
|
|||
|
||||
getSpinnerName() {
|
||||
let ret = 'Bounce';
|
||||
let defaultWaitSpinner = Meteor.settings.public.DEFAULT_WAIT_SPINNER;
|
||||
if (defaultWaitSpinner && ALLOWED_WAIT_SPINNERS.includes(defaultWaitSpinner)) {
|
||||
ret = defaultWaitSpinner;
|
||||
}
|
||||
let settings = this.currentSettings();
|
||||
|
||||
if (settings && settings.spinnerName) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue