2020-07-03 23:32:39 +02:00
|
|
|
import * as React from 'react';
|
2020-10-18 22:52:10 +02:00
|
|
|
import { CommandDeclaration, CommandRuntime, CommandContext } from 'lib/services/CommandService';
|
2020-07-03 23:32:39 +02:00
|
|
|
|
|
|
|
export const declaration:CommandDeclaration = {
|
|
|
|
name: 'showModalMessage',
|
|
|
|
};
|
|
|
|
|
|
|
|
export const runtime = (comp:any):CommandRuntime => {
|
|
|
|
return {
|
2020-10-18 22:52:10 +02:00
|
|
|
execute: async (_context:CommandContext, message:string) => {
|
2020-07-03 23:32:39 +02:00
|
|
|
comp.setState({
|
|
|
|
modalLayer: {
|
|
|
|
visible: true,
|
|
|
|
message:
|
|
|
|
<div className="modal-message">
|
|
|
|
<div id="loading-animation" />
|
|
|
|
<div className="text">{message}</div>
|
|
|
|
</div>,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|