diff --git a/resources/views/Caesar.vue b/resources/views/Caesar.vue index 428f25b..5a05701 100644 --- a/resources/views/Caesar.vue +++ b/resources/views/Caesar.vue @@ -13,7 +13,16 @@ false-value="En" :label="`Language: ${codeLang}`" > - + + +
Code
@@ -30,7 +39,16 @@ false-value="En" :label="`Language: ${decodeLang}`" > - + + +
Decode
@@ -59,7 +77,9 @@ export default { decodeText: '', decodeShift: 0, codeLang: 'En', - decodeLang: 'En' + decodeLang: 'En', + isLoadingCode: false, + isLoadingDecode: false }), methods: { caesarCipher(cd){ @@ -69,14 +89,18 @@ export default { } if (cd === 0){ + this.isLoadingCode = true; this.codeOutput = ''; getResp(cd, this.codeText, this.codeShift, this.codeLang).then( (res) => { this.codeOutput = res; + this.isLoadingCode = false; }); } else if (cd === 1){ + this.isLoadingDecode = true; this.decodeOutput = ''; getResp(cd, this.decodeText, this.decodeShift, this.decodeLang).then((res) => { this.decodeOutput = res; + this.isLoadingDecode = false; }); } },