mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 10:05:41 +00:00
view sitekey
This commit is contained in:
55
templates/panel/sitekey/view/css/main.scss
Normal file
55
templates/panel/sitekey/view/css/main.scss
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@import '../../../../reset';
|
||||
@import '../../../../vars';
|
||||
@import '../../../../components/box';
|
||||
|
||||
.sitekey-list__box {
|
||||
@include box;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
.sitekey-list__title {
|
||||
@include box-title;
|
||||
}
|
||||
|
||||
.sitekey-list__item-container {
|
||||
display: block;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 0.1px solid $light-grey;
|
||||
padding: 20px;
|
||||
color: $black-text;
|
||||
}
|
||||
|
||||
.sitekey-list__item {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.sitekey-list__item-container:hover {
|
||||
background-color: $light-grey;
|
||||
}
|
||||
|
||||
.sitekey-list__name {
|
||||
flex: 3;
|
||||
}
|
||||
|
||||
.sitekey-list__key {
|
||||
flex: 1;
|
||||
}
|
||||
29
templates/panel/sitekey/view/existing-level.html
Normal file
29
templates/panel/sitekey/view/existing-level.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<. let num = count + 1; .>
|
||||
<fieldset class="sitekey__level-container" id="level-group-<.= num .>">
|
||||
<legend class="sitekey__level-title">
|
||||
Level <.= num .>
|
||||
</legend>
|
||||
<label class="sitekey-form__level-label" for="visitor<.= num .>"
|
||||
>Visitor
|
||||
<input
|
||||
class="sitekey-form__level-input"
|
||||
type="number"
|
||||
name="visitor<.= num .>"
|
||||
value="<.= level.visitor_threshold .>"
|
||||
readonly
|
||||
id="visitor<.= num .>"
|
||||
/>
|
||||
</label>
|
||||
|
||||
<label class="sitekey-form__level-label" for="difficulty<.= num .>">
|
||||
Difficulty
|
||||
<input
|
||||
type="number"
|
||||
id="difficulty<.= num .>"
|
||||
class="sitekey-form__level-input"
|
||||
value="<.= level.difficulty_factor .>"
|
||||
readonly
|
||||
id="difficulty<.= num .>"
|
||||
/>
|
||||
</label>
|
||||
</fieldset>
|
||||
51
templates/panel/sitekey/view/index.html
Normal file
51
templates/panel/sitekey/view/index.html
Normal file
@@ -0,0 +1,51 @@
|
||||
<. include!("../../../components/headers.html"); .> <.
|
||||
include!("../../header/index.html"); .>
|
||||
|
||||
<main class="panel-main">
|
||||
<. include!("../../taskbar/index.html"); .> <.
|
||||
include!("../../help-banner/index.html"); .>
|
||||
<!-- Main content container -->
|
||||
<div class="inner-container">
|
||||
<!-- Main menu/ important actions roaster -->
|
||||
|
||||
<form class="sitekey-form" action="<.= crate::V1_API_ROUTES.levels.add .>" method="post">
|
||||
<h1 class="form__title">
|
||||
Sitekey: <.= name .>
|
||||
</h1>
|
||||
<label class="sitekey-form__label" for="description">
|
||||
Description
|
||||
<input
|
||||
class="sitekey-form__input"
|
||||
type="text"
|
||||
name="description"
|
||||
id="description"
|
||||
required
|
||||
<. if name.trim().len() > 0 { .>
|
||||
value="<.= name .>"
|
||||
<. } .>
|
||||
/>
|
||||
</label>
|
||||
|
||||
<label class="sitekey-form__label" for="duration">
|
||||
Cooldown Duratoin(in seconds)
|
||||
<input
|
||||
class="sitekey-form__input"
|
||||
type="number"
|
||||
name="duration"
|
||||
id="duration"
|
||||
min=0
|
||||
required
|
||||
value="<.= duration .>"
|
||||
/>
|
||||
</label>
|
||||
|
||||
|
||||
<. for (count, level) in levels.iter().enumerate() { .>
|
||||
<. include!("./existing-level.html"); .>
|
||||
<. } .>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<!-- end of container -->
|
||||
</main>
|
||||
<. include!("../../../components/footers.html"); .>
|
||||
18
templates/panel/sitekey/view/ts/index.ts
Normal file
18
templates/panel/sitekey/view/ts/index.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export const index = () => {};
|
||||
Reference in New Issue
Block a user