Skip to content

Commit

Permalink
Feat: add version in the footer
Browse files Browse the repository at this point in the history
  • Loading branch information
hepabolu committed Sep 11, 2024
1 parent 2fff01b commit b76ea7c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xkpasswdjs",
"version": "0.1.0",
"version": "2.5.0",
"description": "The Official JavaScript Port of Crypt::HSXKPasswd",
"author": "Bartificer creations",
"license": "ISC",
Expand Down
3 changes: 2 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -429,12 +429,13 @@ <h6><i class="bi bi-graph-up"></i> Statistics</h6>
</div>

<footer class="row bg-primary-subtle py-3 mt-3 rounded">
<div class="col">
<div class="col-11">
Inspired by <a href="https://xkcd.com/936/" target="_blank" class="link">XKCD</a> and <a
href="https://www.grc.com/haystack.htm" target="_blank" class="link">Password Hay Stacks</a> |
Powered by <a href="https://github.com/bartificer/xkpasswd-js" target="_blank" class="link">XKPasswd on
GitHub</a>
</div>
<div class="col-1"></div>
</footer>
</div>

Expand Down
5 changes: 5 additions & 0 deletions src/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ import {PasswordController} from './web/passwordcontroller.mjs';
import {ConfigController} from './web/configcontroller.mjs';
import {ConfigView} from './web/configview.mjs';

// import package.json
import pkgJson from '../package.json';
/**
* Object defining all custom variables and functions
* @namespace XKP
Expand Down Expand Up @@ -105,4 +107,7 @@ $(() => {
fouc.style.visibility = 'visible';
}
}

// set the version in the footer
$('footer div.col-1').html(`v${pkgJson.version}`);
});

0 comments on commit b76ea7c

Please sign in to comment.