Add command arguments to placeholder in admin panel, add play icon to execute command button

This commit is contained in:
jvyden 2021-11-24 01:06:47 -05:00
commit 929e878680
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278
4 changed files with 9 additions and 2 deletions

View file

@ -12,6 +12,8 @@ namespace LBPUnion.ProjectLighthouse.CommandLine
public string FirstAlias => this.Aliases()[0];
public string Arguments();
public int RequiredArgs();
}
}

View file

@ -16,6 +16,7 @@ namespace LBPUnion.ProjectLighthouse.CommandLine
{
"makeAdmin",
};
public string Arguments() => "<username/userId>";
public int RequiredArgs() => 1;
public async Task Run(string[] args)

View file

@ -16,6 +16,7 @@ namespace LBPUnion.ProjectLighthouse.CommandLine
{
"setPassword", "resetPassword", "passwd", "password",
};
public string Arguments() => "<username/userId> <sha256/plaintext>";
public int RequiredArgs() => 2;
public async Task Run(string[] args)

View file

@ -16,10 +16,13 @@
<h3>@command.Name()</h3>
<form>
<div class="ui input" style="width: 100%;">
<input type="text" name="args" placeholder="Arguments">
<input type="text" name="args" placeholder="@command.Arguments()">
</div><br><br>
<input type="text" name="command" style="display: none;" value="@command.FirstAlias">
<input type="submit" value="Execute Command" class="ui green button" style="width: 100%;">
<button type="submit" class="ui green button" style="width: 100%;">
<i class="play icon"></i>
Execute
</button>
</form>
</div>
</div>