mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 01:55:40 +00:00
refactored sitekey routes
This commit is contained in:
@@ -20,7 +20,7 @@ import {Router} from './router';
|
||||
import * as login from './auth/login';
|
||||
import * as register from './auth/register';
|
||||
import * as panel from './panel/index';
|
||||
import * as addSiteKey from './panel/add-site-key/';
|
||||
import * as addSiteKey from './panel/sitekey/add/';
|
||||
|
||||
import VIEWS from './views/v1/routes';
|
||||
|
||||
@@ -29,8 +29,9 @@ import './panel/main.scss';
|
||||
import './panel/header/sidebar/main.scss';
|
||||
import './panel/taskbar/main.scss';
|
||||
import './panel/help-banner/main.scss';
|
||||
import './panel/add-site-key/main.scss';
|
||||
import './panel/site-keys/main.scss';
|
||||
import './panel/sitekey/add/main.scss';
|
||||
import './panel/sitekey/list/main.scss';
|
||||
|
||||
import './errors/main.scss';
|
||||
|
||||
const router = new Router();
|
||||
@@ -41,3 +42,6 @@ router.register(VIEWS.loginUser, login.index);
|
||||
router.register(VIEWS.addSiteKey, addSiteKey.index);
|
||||
|
||||
router.route();
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
<. include!("../../components/headers.html"); .> <. include!("../header/index.html");
|
||||
.>
|
||||
|
||||
<main>
|
||||
<. include!("../taskbar/index.html"); .> <.
|
||||
include!("../help-banner/index.html"); .>
|
||||
<!-- Main content container -->
|
||||
<div class="inner-container">
|
||||
<!-- Main menu/ important actions roaster -->
|
||||
|
||||
<. include!("../add-site-key/form.html"); .>
|
||||
</div>
|
||||
<!-- end of container -->
|
||||
</main>
|
||||
<. include!("../../components/footers.html"); .>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 MiB |
@@ -17,12 +17,12 @@
|
||||
|
||||
import {LEVELS} from './levels';
|
||||
|
||||
import isBlankString from '../../utils/isBlankString';
|
||||
import getFormUrl from '../../utils/getFormUrl';
|
||||
import genJsonPayload from '../../utils/genJsonPayload';
|
||||
import isNumber from '../../utils/isNumber';
|
||||
import isBlankString from '../../../utils/isBlankString';
|
||||
import getFormUrl from '../../../utils/getFormUrl';
|
||||
import genJsonPayload from '../../../utils/genJsonPayload';
|
||||
import isNumber from '../../../utils/isNumber';
|
||||
|
||||
import VIEWS from '../../views/v1/routes';
|
||||
import VIEWS from '../../../views/v1/routes';
|
||||
|
||||
const SITE_KEY_FORM_CLASS = 'sitekey-form';
|
||||
const FORM = <HTMLFormElement>document.querySelector(`.${SITE_KEY_FORM_CLASS}`);
|
||||
15
templates/panel/sitekey/add/index.html
Normal file
15
templates/panel/sitekey/add/index.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<. include!("../../../components/headers.html"); .> <. include!("../../header/index.html");
|
||||
.>
|
||||
|
||||
<main>
|
||||
<. include!("../../taskbar/index.html"); .> <.
|
||||
include!("../../help-banner/index.html"); .>
|
||||
<!-- Main content container -->
|
||||
<div class="inner-container">
|
||||
<!-- Main menu/ important actions roaster -->
|
||||
|
||||
<. include!("../add/form.html"); .>
|
||||
</div>
|
||||
<!-- end of container -->
|
||||
</main>
|
||||
<. include!("../../../components/footers.html"); .>
|
||||
@@ -18,7 +18,7 @@
|
||||
import {Level} from './index';
|
||||
import CONST from '../const';
|
||||
|
||||
import isNumber from '../../../utils/isNumber';
|
||||
import isNumber from '../../../../utils/isNumber';
|
||||
|
||||
/** Fetches level from DOM using the ID passesd and validates */
|
||||
const getLevelFields = (id: number) => {
|
||||
@@ -15,10 +15,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@import '../../reset';
|
||||
@import '../../vars';
|
||||
@import '../../components/button';
|
||||
@import '../../components/forms';
|
||||
@import '../../../reset';
|
||||
@import '../../../vars';
|
||||
@import '../../../components/button';
|
||||
@import '../../../components/forms';
|
||||
|
||||
.sitekey-form {
|
||||
display: flex;
|
||||
@@ -1,9 +1,9 @@
|
||||
<. include!("../../components/headers.html"); .> <.
|
||||
include!("../header/index.html"); .>
|
||||
<. include!("../../../components/headers.html"); .> <.
|
||||
include!("../../header/index.html"); .>
|
||||
|
||||
<main>
|
||||
<. include!("../taskbar/index.html"); .> <.
|
||||
include!("../help-banner/index.html"); .>
|
||||
<. include!("../../taskbar/index.html"); .> <.
|
||||
include!("../../help-banner/index.html"); .>
|
||||
<!-- Main content container -->
|
||||
<div class="inner-container">
|
||||
<!-- Main menu/ important actions roaster -->
|
||||
@@ -27,4 +27,4 @@ include!("../header/index.html"); .>
|
||||
</div>
|
||||
<!-- end of container -->
|
||||
</main>
|
||||
<. include!("../../components/footers.html"); .>
|
||||
<. include!("../../../components/footers.html"); .>
|
||||
@@ -15,9 +15,9 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@import '../../reset';
|
||||
@import '../../vars';
|
||||
@import '../../components/box';
|
||||
@import '../../../reset';
|
||||
@import '../../../vars';
|
||||
@import '../../../components/box';
|
||||
|
||||
.sitekey-list__box {
|
||||
@include box;
|
||||
Reference in New Issue
Block a user