diff --git a/web/static/main.js b/web/static/main.js
index afad64c..7e1cca2 100644
--- a/web/static/main.js
+++ b/web/static/main.js
@@ -26,6 +26,7 @@ function formatResult( result ) {
function onGenerateClick() {
$( '.genresult' ).empty();
+ $( '#genresult-progress' ).show();
$.getJSON( '/api/generate', {
word: morphemechipsInstance.getDataString()
}, ( data ) => {
@@ -33,15 +34,18 @@ function onGenerateClick() {
$.each( result, ( key, value ) => {
$( '.genresult' ).append( $( '
' ).addClass( 'result' ).text( value ) );
} );
+ $( '#genresult-progress' ).hide();
} );
}
function onAnalysisClick() {
$( '.analresult' ).find( 'tbody' ).empty();
$( '.analresult' ).show();
+ $( '#analresult-progress' ).show();
$.post( '/api/analyse', {
text: $( 'textarea[name="text"]' ).val()
}, ( data ) => {
+ $( '#analresult-progress' ).hide();
let result = data.result;
$.each( result, ( key, values ) => {
if ( !key || !key.trim() ) {
@@ -80,6 +84,8 @@ function fetchTags() {
}
$( function () {
+ $( '#analresult-progress' ).hide();
+ $( '#genresult-progress' ).hide();
fetchTags().then( ( tags )=>{
tagInfo = tags;
init();
diff --git a/web/static/style.css b/web/static/style.css
index b27fbc7..c7731e6 100644
--- a/web/static/style.css
+++ b/web/static/style.css
@@ -50,3 +50,8 @@ header {
.morphemes .autocomplete-content img {
display: none;
}
+
+progress {
+ width: 100%;
+ height: 5px;
+}
diff --git a/web/templates/mlmorph.html b/web/templates/mlmorph.html
index de2f46f..198143f 100644
--- a/web/templates/mlmorph.html
+++ b/web/templates/mlmorph.html
@@ -7,6 +7,7 @@
Analysis
Analyse
+
@@ -29,6 +30,7 @@ Generation
Generate
+
{% endblock %}