Skip to content

Commit

Permalink
[fix] Loader now shows + Is on top of changelog
Browse files Browse the repository at this point in the history
- Changed style of loader
  • Loading branch information
JaavLex committed Aug 16, 2021
1 parent 8c1ddad commit 14ae67f
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
7 changes: 5 additions & 2 deletions changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@ function dateFormatting(date) {

// main app function. sorts all commits received by getCommits() function based on user's options.
async function sortCommits() {
document.getElementById("loader").innerHTML = "<center><img src='./loading.svg'></img></center>";

let urlField = document.getElementById("urlhtml").value.toString();
// if is a url converts it to something usable
if (urlField.match(new RegExp(`(\\.com\\/)(.*)`, 'i'))) {
Expand All @@ -342,11 +344,12 @@ async function sortCommits() {
const others = [];
const othersRaw = [];



if (urlField === "" || apiField === "") {
alert("Both URL and API token need to be inputted")
document.getElementById("loader").innerHTML = '';
} else {
document.getElementById("loader").innerHTML = "<center><img src='https://media.giphy.com/media/3oEjI6SIIHBdRxXI40/source.gif'></img></center>";

// \s all special characters in a string in order to input that into a regex
function quotemeta(str) {
return (str + '').replace(/([\.\\\+\*\?\[\^\]\$\(\)])/g, '\\$1');
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,12 @@ <h4>Custom keyword list 2</h4>
<button onclick="copyToClipboard()">📋 Copy MarkDown to clipboard</button>
</center>
<base target="_blank">
<div id="loader"></div>
<div id="bodyhtml"></div>
</base>
</div>
</div>
</div>
<div id="loader"></div>
<hr>
<footer>
<i>
Expand Down
25 changes: 25 additions & 0 deletions loading.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "changelog-maker",
"version": "1.6.8",
"version": "1.6.9",
"description": "Changelog maker. Takes commit messages and generates a gitlog.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 14ae67f

Please sign in to comment.