hide historical view from admintools and reject keyboard shortcut if not

availeble
This commit is contained in:
HF 2021-07-07 09:19:19 +02:00
parent e1801e0ee5
commit def4777573
2 changed files with 80 additions and 77 deletions

View File

@ -391,7 +391,8 @@ function Admintools() {
>
{(submitting) ? '...' : t`Submit`}
</button>
{(window.ssv && window.ssv.backupurl) && (
<div>
<br />
<div className="modaldivider" />
<h3 className="modaltitle">{t`Rollback to Date`}</h3>
@ -465,7 +466,8 @@ function Admintools() {
>
{(submitting) ? '...' : t`Submit`}
</button>
</div>
)}
{(userlvl === 1) && (
<div>
<br />
@ -510,7 +512,6 @@ function Admintools() {
{(submitting) ? '...' : t`Submit`}
</button>
<br />
<div className="modaldivider" />
<h3 className="modaltitle">{t`Manage Moderators`}</h3>
<p className="modalcotext">

View File

@ -62,7 +62,9 @@ function onKeyPress(event: KeyboardEvent) {
: t`Grid OFF`));
return;
case 'h':
if (window.ssv && window.ssv.backupurl) {
store.dispatch(toggleHistoricalView());
}
return;
case 'x':
store.dispatch(togglePixelNotify());