Lint ui files and change .prettierignore file

This commit is contained in:
Théophile Diot 2022-12-14 17:18:17 +01:00
parent 5cc80d2ba8
commit d81c526540
No known key found for this signature in database
GPG Key ID: E752C80DB72BB014
15 changed files with 3256 additions and 2685 deletions

View File

@ -10,4 +10,4 @@ CONTRIBUTING.md
LICENSE.md
README.md
SECURITY.md
ui
src/ui/static

View File

@ -1,42 +1,42 @@
<div class="col-xl-3 col-md-6 mb-4">
<div class="card border-left-primary shadow h-100 py-2">
<div class="card-body">
<div class="row no-gutters align-items-center">
<div class="col mr-2">
<div
class="text-xs font-weight-bold text-primary text-uppercase mb-1"
>
BunkerWeb version
</div>
{% if check_version %}
<div class="h5 mb-0 font-weight-bold text-gray-800">
{{ version }} {% if not remote_version %}
<span class="h6 mb-0 text-warning"
>(couldn't fetch remote version)</span
>
{% endif %}
</div>
{% else %}
<div class="h5 mb-0 font-weight-bold">
<span class="text-warning">{{ version }} (your version)</span>
<i class="fa-solid fa-arrow-right-long"></i>
<span class="text-success">{{ remote_version }} (latest)</span>
</div>
{% endif %}
</div>
{% if not check_version %}
<div class="col-auto">
<a
href="https://github.com/bunkerity/bunkerweb"
class="btn btn-success"
>Update</a
>
</div>
{% endif %}
<div class="col-auto">
<i class="fa-solid fa-code-branch fa-2x text-gray-300"></i>
</div>
</div>
</div>
</div>
</div>
<div class="col-xl-3 col-md-6 mb-4">
<div class="card border-left-primary shadow h-100 py-2">
<div class="card-body">
<div class="row no-gutters align-items-center">
<div class="col mr-2">
<div
class="text-xs font-weight-bold text-primary text-uppercase mb-1"
>
BunkerWeb version
</div>
{% if check_version %}
<div class="h5 mb-0 font-weight-bold text-gray-800">
{{ version }} {% if not remote_version %}
<span class="h6 mb-0 text-warning"
>(couldn't fetch remote version)</span
>
{% endif %}
</div>
{% else %}
<div class="h5 mb-0 font-weight-bold">
<span class="text-warning">{{ version }} (your version)</span>
<i class="fa-solid fa-arrow-right-long"></i>
<span class="text-success">{{ remote_version }} (latest)</span>
</div>
{% endif %}
</div>
{% if not check_version %}
<div class="col-auto">
<a
href="https://github.com/bunkerity/bunkerweb"
class="btn btn-success"
>Update</a
>
</div>
{% endif %}
<div class="col-auto">
<i class="fa-solid fa-code-branch fa-2x text-gray-300"></i>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,20 +1,20 @@
<ul class="list-unstyled pages">
<li>
<a href="https://www.bunkerweb.io" target="_blank">BunkerWeb</a>
</li>
<li>
<a href="https://docs.bunkerweb.io" target="_blank">Documentation</a>
</li>
<li>
<a
href="https://github.com/bunkerity/bunkerweb/blob/master/LICENSE"
target="_blank"
>License</a
>
</li>
<li>
<a href="https://www.bunkerweb.io/privacy-policy" target="_blank"
>Privacy Policy</a
>
</li>
</ul>
<ul class="list-unstyled pages">
<li>
<a href="https://www.bunkerweb.io" target="_blank">BunkerWeb</a>
</li>
<li>
<a href="https://docs.bunkerweb.io" target="_blank">Documentation</a>
</li>
<li>
<a
href="https://github.com/bunkerity/bunkerweb/blob/master/LICENSE"
target="_blank"
>License</a
>
</li>
<li>
<a href="https://www.bunkerweb.io/privacy-policy" target="_blank"
>Privacy Policy</a
>
</li>
</ul>

View File

@ -1,36 +1,36 @@
<form
action="https://bunkerity.us1.list-manage.com/subscribe/post?u=ec5b1577cf427972b9bd491a6&amp;id=37076d9d67"
method="POST"
class="needs-validation"
id="subscribe-newsletter"
>
<div class="input-group mb-2">
<input
type="text"
id="newsletter-email"
name="EMAIL"
class="form-control"
placeholder="John.doe@example.com"
pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-z]{2,}$"
required=""
/>
<button class="btn btn-outline-light" type="submit" formtarget="_blank">
Subscribe
</button>
</div>
<div class="input-group align-items-center">
<input
class="col-auto form-check form-switch"
type="checkbox"
id="newsletter-check"
required=""
/>
&nbsp;&nbsp;
<h6 class="col-auto h6 mb-0">
I've read and agree to the
<a href="https://www.bunkerity.com/privacy-policy/" _target="_blank"
>privacy policy</a
>
</h6>
</div>
</form>
<form
action="https://bunkerity.us1.list-manage.com/subscribe/post?u=ec5b1577cf427972b9bd491a6&amp;id=37076d9d67"
method="POST"
class="needs-validation"
id="subscribe-newsletter"
>
<div class="input-group mb-2">
<input
type="text"
id="newsletter-email"
name="EMAIL"
class="form-control"
placeholder="John.doe@example.com"
pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-z]{2,}$"
required=""
/>
<button class="btn btn-outline-light" type="submit" formtarget="_blank">
Subscribe
</button>
</div>
<div class="input-group align-items-center">
<input
class="col-auto form-check form-switch"
type="checkbox"
id="newsletter-check"
required=""
/>
&nbsp;&nbsp;
<h6 class="col-auto h6 mb-0">
I've read and agree to the
<a href="https://www.bunkerity.com/privacy-policy/" _target="_blank"
>privacy policy</a
>
</h6>
</div>
</form>

View File

@ -1,25 +1,25 @@
<div class="col-lg-2 footer-social animated fadeInDown">
<h4>Follow Us</h4>
<ul class="list-unstyled">
<li>
<a href="https://twitter.com/bunkerity" target="_blank"
><i class="bi bi-twitter" aria-label="Twitter"></i>Twitter</a
>
</li>
<li>
<a href="https://www.linkedin.com/company/bunkerity/" target="_blank"
><i class="bi bi-linkedin" aria-label="LinkedIn"></i>LinkedIn</a
>
</li>
<li>
<a href="https://discord.gg/fTf46FmtyD" target="_blank"
><i class="bi bi-discord" aria-label="Discord"></i>Discord</a
>
</li>
<li>
<a href="https://github.com/bunkerity" target="_blank"
><i class="bi bi-github" aria-label="GitHub"></i>GitHub</a
>
</li>
</ul>
</div>
<div class="col-lg-2 footer-social animated fadeInDown">
<h4>Follow Us</h4>
<ul class="list-unstyled">
<li>
<a href="https://twitter.com/bunkerity" target="_blank"
><i class="bi bi-twitter" aria-label="Twitter"></i>Twitter</a
>
</li>
<li>
<a href="https://www.linkedin.com/company/bunkerity/" target="_blank"
><i class="bi bi-linkedin" aria-label="LinkedIn"></i>LinkedIn</a
>
</li>
<li>
<a href="https://discord.gg/fTf46FmtyD" target="_blank"
><i class="bi bi-discord" aria-label="Discord"></i>Discord</a
>
</li>
<li>
<a href="https://github.com/bunkerity" target="_blank"
><i class="bi bi-github" aria-label="GitHub"></i>GitHub</a
>
</li>
</ul>
</div>

View File

@ -1,20 +1,20 @@
<!-- simple alert -->
<div class="relative w-full p-4 text-white bg-blue-500 rounded-lg">
Alert blue
</div>
<!-- dismiss alert -->
<div
alert
class="relative p-4 pr-12 mb-4 text-white border border-blue-300 border-solid rounded-lg bg-gradient-to-tl from-blue-500 to-violet-500"
>
A simple blue alert with
<a href="javascript:;" class="font-semibold text-white">an example link</a>.
Give it a click if you like.
<button
alert-close
type="button"
class="box-content absolute top-0 right-0 w-4 h-4 p-4 text-sm text-white bg-transparent border-0 rounded z-2"
>
<span aria-hidden="true" class="text-center cursor-pointer">&#10005;</span>
</button>
</div>
<!-- simple alert -->
<div class="relative w-full p-4 text-white bg-blue-500 rounded-lg">
Alert blue
</div>
<!-- dismiss alert -->
<div
alert
class="relative p-4 pr-12 mb-4 text-white border border-blue-300 border-solid rounded-lg bg-gradient-to-tl from-blue-500 to-violet-500"
>
A simple blue alert with
<a href="javascript:;" class="font-semibold text-white">an example link</a>.
Give it a click if you like.
<button
alert-close
type="button"
class="box-content absolute top-0 right-0 w-4 h-4 p-4 text-sm text-white bg-transparent border-0 rounded z-2"
>
<span aria-hidden="true" class="text-center cursor-pointer">&#10005;</span>
</button>
</div>

View File

@ -1,6 +1,6 @@
<button
type="button"
class="dark:brightness-90 inline-block px-6 py-3 font-bold text-center text-white uppercase align-middle transition-all rounded-lg cursor-pointer bg-gradient-to-tl bg-primary hover:bg-primary/80 focus:bg-primary/80 leading-normal text-xs ease-in tracking-tight-rem shadow-xs bg-150 bg-x-25 hover:-translate-y-px active:opacity-85 hover:shadow-md"
>
Button
</button>
<button
type="button"
class="dark:brightness-90 inline-block px-6 py-3 font-bold text-center text-white uppercase align-middle transition-all rounded-lg cursor-pointer bg-gradient-to-tl bg-primary hover:bg-primary/80 focus:bg-primary/80 leading-normal text-xs ease-in tracking-tight-rem shadow-xs bg-150 bg-x-25 hover:-translate-y-px active:opacity-85 hover:shadow-md"
>
Button
</button>

View File

@ -1,40 +1,40 @@
<!-- CONTAINER -->
<div
class="relative flex flex-col min-w-0 break-words bg-white shadow-xl dark:bg-slate-850 dark:shadow-dark-xl rounded-2xl bg-clip-border"
></div>
<!-- CONTAINER -->
<!-- TITLE -->
<p class="mb-0 font-sans font-semibold leading-normal uppercase text-sm">
Today's Money
</p>
<!-- TITLE -->
<!-- DATA -->
<h5 class="mb-2 font-bold dark:text-white">$53,000</h5>
<!-- DATA -->
<!-- DETAIL-->
<p class="mb-0 dark:text-white dark:opacity-60">
<span class="font-bold leading-normal text-sm text-emerald-500">+55%</span>
since yesterday
</p>
<!-- DETAIL-->
<!-- ICON -->
<div class="inline-block w-12 h-12 text-center rounded-circle bg-primaryr">
<i class="fa fa-coins text-lg relative top-3.5 text-white"></i>
</div>
<!-- ICON -->
<!-- LEARN MORE -->
<a
class="mt-auto mb-0 font-semibold leading-normal text-sm group text-slate-500"
href="javascript:;"
>
Read More
<i
class="fas fa-arrow-right ease-bounce text-sm group-hover:translate-x-1.25 ml-1 leading-normal transition-all duration-200"
></i>
</a>
<!-- LEARN MORE -->
<!-- CONTAINER -->
<div
class="relative flex flex-col min-w-0 break-words bg-white shadow-xl dark:bg-slate-850 dark:shadow-dark-xl rounded-2xl bg-clip-border"
></div>
<!-- CONTAINER -->
<!-- TITLE -->
<p class="mb-0 font-sans font-semibold leading-normal uppercase text-sm">
Today's Money
</p>
<!-- TITLE -->
<!-- DATA -->
<h5 class="mb-2 font-bold dark:text-white">$53,000</h5>
<!-- DATA -->
<!-- DETAIL-->
<p class="mb-0 dark:text-white dark:opacity-60">
<span class="font-bold leading-normal text-sm text-emerald-500">+55%</span>
since yesterday
</p>
<!-- DETAIL-->
<!-- ICON -->
<div class="inline-block w-12 h-12 text-center rounded-circle bg-primaryr">
<i class="fa fa-coins text-lg relative top-3.5 text-white"></i>
</div>
<!-- ICON -->
<!-- LEARN MORE -->
<a
class="mt-auto mb-0 font-semibold leading-normal text-sm group text-slate-500"
href="javascript:;"
>
Read More
<i
class="fas fa-arrow-right ease-bounce text-sm group-hover:translate-x-1.25 ml-1 leading-normal transition-all duration-200"
></i>
</a>
<!-- LEARN MORE -->

View File

@ -1,20 +1,20 @@
<div class="relative">
<input
required
id="newsletter-check"
class="absolute w-5 h-5 ease text-base -ml-7 rounded-1.4 checked:bg-primary duration-250 float-left mt-1 cursor-pointer appearance-none border border-solid border-slate-150 bg-white bg-contain bg-center bg-no-repeat align-top transition-all after:absolute after:flex after:h-full after:w-full after:items-center after:justify-center after:text-white after:opacity-0 after:transition-all checked:border-0 checked:border-transparent checked:bg-transparent checked:after:opacity-100"
type="checkbox"
/>
<svg
checkbox-handler="newsletter-check"
class="absolute fill-white cursor-pointer -translate-x-6 translate-y-2 h-3 w-3"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 512 512"
>
<path
checkbox-handler="newsletter-check"
d="M470.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L192 338.7 425.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"
/>
</svg>
</div>
<label class="text-sm" for="newsletter-check"> checkbox </label>
<div class="relative">
<input
required
id="newsletter-check"
class="absolute w-5 h-5 ease text-base -ml-7 rounded-1.4 checked:bg-primary duration-250 float-left mt-1 cursor-pointer appearance-none border border-solid border-slate-150 bg-white bg-contain bg-center bg-no-repeat align-top transition-all after:absolute after:flex after:h-full after:w-full after:items-center after:justify-center after:text-white after:opacity-0 after:transition-all checked:border-0 checked:border-transparent checked:bg-transparent checked:after:opacity-100"
type="checkbox"
/>
<svg
checkbox-handler="newsletter-check"
class="absolute fill-white cursor-pointer -translate-x-6 translate-y-2 h-3 w-3"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 512 512"
>
<path
checkbox-handler="newsletter-check"
d="M470.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L192 338.7 425.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"
/>
</svg>
</div>
<label class="text-sm" for="newsletter-check"> checkbox </label>

View File

@ -1,4 +1,4 @@
<span
class="py-1.4 px-2.5 text-xs rounded-1.8 inline-block whitespace-nowrap text-center bg-gradient-to-tl from-blue-500 to-violet-500 align-baseline font-bold uppercase leading-none text-white"
>chip blue</span
>
<span
class="py-1.4 px-2.5 text-xs rounded-1.8 inline-block whitespace-nowrap text-center bg-gradient-to-tl from-blue-500 to-violet-500 align-baseline font-bold uppercase leading-none text-white"
>chip blue</span
>

View File

@ -1,117 +1,117 @@
//recup depuis jinja
//multisite
//name: service ou folder
//config
const folders = {
name: "configs",
type: "folder",
path: "/opt/bunkerweb/configs",
can_create_files: False,
can_create_folders: False,
can_edit: False,
can_delete: False,
children: [
{
name: "default-server-http",
type: "folder",
path: "/opt/bunkerweb/configs/default-server-http",
can_create_files: True,
can_create_folders: True,
can_edit: False,
can_delete: False,
children: [],
},
{
name: "default-server-stream",
type: "folder",
path: "/opt/bunkerweb/configs/default-server-stream",
can_create_files: True,
can_create_folders: True,
can_edit: False,
can_delete: False,
children: [],
},
{
name: "http",
type: "folder",
path: "/opt/bunkerweb/configs/http",
can_create_files: True,
can_create_folders: True,
can_edit: False,
can_delete: False,
children: [],
},
{
name: "modsec",
type: "folder",
path: "/opt/bunkerweb/configs/modsec",
can_create_files: True,
can_create_folders: True,
can_edit: False,
can_delete: False,
children: [],
},
{
name: "modsec-crs",
type: "folder",
path: "/opt/bunkerweb/configs/modsec-crs",
can_create_files: True,
can_create_folders: True,
can_edit: False,
can_delete: False,
children: [],
},
{
name: "server-http",
type: "folder",
path: "/opt/bunkerweb/configs/server-http",
can_create_files: True,
can_create_folders: True,
can_edit: False,
can_delete: False,
children: [
{
name: "www.example.com",
type: "folder",
path: "/opt/bunkerweb/configs/server-http/www.example.com",
can_create_files: True,
can_create_folders: True,
can_edit: True,
can_delete: True,
children: [
{
name: "hello-world.conf",
type: "file",
path: "/opt/bunkerweb/configs/server-http/www.example.com/hello-world.conf",
can_edit: True,
can_download: False,
content:
"CmxvY2F0aW9uIC9oZWxsbyB7CglkZWZhdWx0X3R5cGUgJ3RleHQvcGxhaW4nOwoJY29udGVudF9ieV9sdWFfYmxvY2sgewoJCW5neC5zYXkoJ3dvcmxkJykKCX0KfQo=",
},
],
},
],
},
{
name: "server-stream",
type: "folder",
path: "/opt/bunkerweb/configs/server-stream",
can_create_files: True,
can_create_folders: True,
can_edit: False,
can_delete: False,
children: [],
},
{
name: "stream",
type: "folder",
path: "/opt/bunkerweb/configs/stream",
can_create_files: True,
can_create_folders: True,
can_edit: False,
can_delete: False,
children: [],
},
],
};
//recup depuis jinja
//multisite
//name: service ou folder
//config
const folders = {
name: "configs",
type: "folder",
path: "/opt/bunkerweb/configs",
can_create_files: False,
can_create_folders: False,
can_edit: False,
can_delete: False,
children: [
{
name: "default-server-http",
type: "folder",
path: "/opt/bunkerweb/configs/default-server-http",
can_create_files: True,
can_create_folders: True,
can_edit: False,
can_delete: False,
children: [],
},
{
name: "default-server-stream",
type: "folder",
path: "/opt/bunkerweb/configs/default-server-stream",
can_create_files: True,
can_create_folders: True,
can_edit: False,
can_delete: False,
children: [],
},
{
name: "http",
type: "folder",
path: "/opt/bunkerweb/configs/http",
can_create_files: True,
can_create_folders: True,
can_edit: False,
can_delete: False,
children: [],
},
{
name: "modsec",
type: "folder",
path: "/opt/bunkerweb/configs/modsec",
can_create_files: True,
can_create_folders: True,
can_edit: False,
can_delete: False,
children: [],
},
{
name: "modsec-crs",
type: "folder",
path: "/opt/bunkerweb/configs/modsec-crs",
can_create_files: True,
can_create_folders: True,
can_edit: False,
can_delete: False,
children: [],
},
{
name: "server-http",
type: "folder",
path: "/opt/bunkerweb/configs/server-http",
can_create_files: True,
can_create_folders: True,
can_edit: False,
can_delete: False,
children: [
{
name: "www.example.com",
type: "folder",
path: "/opt/bunkerweb/configs/server-http/www.example.com",
can_create_files: True,
can_create_folders: True,
can_edit: True,
can_delete: True,
children: [
{
name: "hello-world.conf",
type: "file",
path: "/opt/bunkerweb/configs/server-http/www.example.com/hello-world.conf",
can_edit: True,
can_download: False,
content:
"CmxvY2F0aW9uIC9oZWxsbyB7CglkZWZhdWx0X3R5cGUgJ3RleHQvcGxhaW4nOwoJY29udGVudF9ieV9sdWFfYmxvY2sgewoJCW5neC5zYXkoJ3dvcmxkJykKCX0KfQo=",
},
],
},
],
},
{
name: "server-stream",
type: "folder",
path: "/opt/bunkerweb/configs/server-stream",
can_create_files: True,
can_create_folders: True,
can_edit: False,
can_delete: False,
children: [],
},
{
name: "stream",
type: "folder",
path: "/opt/bunkerweb/configs/stream",
can_create_files: True,
can_create_folders: True,
can_edit: False,
can_delete: False,
children: [],
},
],
};

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,9 @@
<input
type="text"
id="newsletter-email"
name="EMAIL"
class="dark:border-slate-600 dark:bg-slate-700 dark:text-gray-300 disabled:opacity-75 valid:border-green-500 invalid:border-red-500 outline-none focus:border-primary text-sm leading-5.6 ease block w-full appearance-none rounded-lg border border-solid border-gray-300 bg-white bg-clip-padding px-3 py-2 font-normal text-gray-700 transition-all placeholder:text-gray-500"
placeholder="John.doe@example.com"
pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-z]{2,}$"
required
/>
<input
type="text"
id="newsletter-email"
name="EMAIL"
class="dark:border-slate-600 dark:bg-slate-700 dark:text-gray-300 disabled:opacity-75 valid:border-green-500 invalid:border-red-500 outline-none focus:border-primary text-sm leading-5.6 ease block w-full appearance-none rounded-lg border border-solid border-gray-300 bg-white bg-clip-padding px-3 py-2 font-normal text-gray-700 transition-all placeholder:text-gray-500"
placeholder="John.doe@example.com"
pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-z]{2,}$"
required
/>

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body></body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body></body>
</html>