mirror of
https://github.com/wekan/wekan.git
synced 2025-04-20 12:07:11 -04: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) {
|
||||
|
|
|
@ -49,3 +49,7 @@ export const TYPE_LINKED_BOARD = 'cardType-linkedBoard';
|
|||
export const TYPE_LINKED_CARD = 'cardType-linkedCard';
|
||||
export const TYPE_TEMPLATE_BOARD = 'template-board';
|
||||
export const TYPE_TEMPLATE_CONTAINER = 'template-container';
|
||||
export const ALLOWED_WAIT_SPINNERS = [
|
||||
'Bounce',
|
||||
'Wave'
|
||||
];
|
||||
|
|
3
server/spinner.js
Normal file
3
server/spinner.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
Meteor.startup(() => {
|
||||
Meteor.settings.public.DEFAULT_WAIT_SPINNER = process.env.DEFAULT_WAIT_SPINNER;
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue