mirror of
https://github.com/xHyroM/roles-bot.git
synced 2024-11-25 09:41:05 +01:00
Add files via upload
This commit is contained in:
parent
fd76dbf571
commit
8d00dc7041
11 changed files with 385 additions and 0 deletions
43
src/web/app/js/script.js
Normal file
43
src/web/app/js/script.js
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
let json = {
|
||||||
|
roles: []
|
||||||
|
}
|
||||||
|
|
||||||
|
$('input').change((e) => {
|
||||||
|
json[e.currentTarget.id] = e.currentTarget.value;
|
||||||
|
|
||||||
|
document.getElementById('json').innerText = JSON.stringify(json);
|
||||||
|
})
|
||||||
|
|
||||||
|
$('button[id=addRole]').click((e) => {
|
||||||
|
Swal.fire({
|
||||||
|
title: 'Add Role',
|
||||||
|
html:
|
||||||
|
'<input id="swal-input1" class="swal2-input" placeholder="Button Label*" required>' +
|
||||||
|
'<input id="swal-input2" class="swal2-input" placeholder="Role Id*" required>' +
|
||||||
|
'<input id="swal-input3" class="swal2-input" placeholder="Emoji">',
|
||||||
|
preConfirm: function () {
|
||||||
|
return new Promise(function (resolve) {
|
||||||
|
resolve([
|
||||||
|
$('#swal-input1').val(),
|
||||||
|
$('#swal-input2').val(),
|
||||||
|
$('#swal-input3').val()
|
||||||
|
])
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}).then(function (result) {
|
||||||
|
if (result.value?.[0] && result.value?.[1]) {
|
||||||
|
json.roles.push({
|
||||||
|
id: result.value[1],
|
||||||
|
label: result.value[0],
|
||||||
|
emoji: result.value[2] || null
|
||||||
|
})
|
||||||
|
|
||||||
|
document.getElementById('json').innerText = JSON.stringify(json);
|
||||||
|
} else Swal.fire('Missing parameters')
|
||||||
|
}).catch(swal.noop)
|
||||||
|
})
|
||||||
|
|
||||||
|
$(window).on('load', () => {
|
||||||
|
$('input').toArray().forEach((i) => i.value = '');
|
||||||
|
document.getElementById('json').innerText = JSON.stringify(json);
|
||||||
|
})
|
37
src/web/app/scss/_containers.scss
Normal file
37
src/web/app/scss/_containers.scss
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
.flex-container{
|
||||||
|
height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
|
//border-style: dashed;
|
||||||
|
//border-color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
background-color: #0e0e0e;
|
||||||
|
filter: drop-shadow(0 0 0.75rem #0e0e0e);
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 4rem 8rem;
|
||||||
|
border-radius: 1.2rem;
|
||||||
|
//border-style: dashed;
|
||||||
|
//border-color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
form{
|
||||||
|
flex-direction: column;
|
||||||
|
//border-style: dashed;
|
||||||
|
//border-color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width:600px) {
|
||||||
|
.container {
|
||||||
|
padding: 1rem 1.2rem;
|
||||||
|
border-radius: 1.2rem;
|
||||||
|
//border-style: dashed;
|
||||||
|
//border-color: white;
|
||||||
|
}
|
||||||
|
}
|
41
src/web/app/scss/_forumstyle.scss
Normal file
41
src/web/app/scss/_forumstyle.scss
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
button {
|
||||||
|
background-color: var(--yellow);
|
||||||
|
border-radius: .2rem;
|
||||||
|
border-style: none;
|
||||||
|
margin-top: .8rem;
|
||||||
|
font-size: 1.2rem;
|
||||||
|
padding: .2rem .8rem;
|
||||||
|
filter: drop-shadow(0 0 0.75rem #363636);
|
||||||
|
transition: .2s;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:hover{
|
||||||
|
background-color: var(--yellow-dark);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
color: white;
|
||||||
|
padding: .2rem .5rem;
|
||||||
|
background-color: var(--codeblock);
|
||||||
|
margin-top: .3rem;
|
||||||
|
font-size: 1.2rem;
|
||||||
|
border-style: none;
|
||||||
|
border-radius: .2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.code{
|
||||||
|
background-color: var(--codeblock);
|
||||||
|
border-radius: .2rem;
|
||||||
|
padding: .2rem .5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width:600px) {
|
||||||
|
input {
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
button {
|
||||||
|
font-size: 1rem;
|
||||||
|
padding: .1rem .5rem;
|
||||||
|
}
|
||||||
|
}
|
17
src/web/app/scss/_globals.scss
Normal file
17
src/web/app/scss/_globals.scss
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
html {
|
||||||
|
font-size: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
*,
|
||||||
|
*::before,
|
||||||
|
*::after {
|
||||||
|
box-sizing: inherit;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
line-height: 1.3;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
background-color: var(--darkmode);
|
||||||
|
color: white;
|
||||||
|
}
|
26
src/web/app/scss/_textstyle.scss
Normal file
26
src/web/app/scss/_textstyle.scss
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
p {
|
||||||
|
font-family: 'Open Sans', sans-serif;
|
||||||
|
//color: white;
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 200;
|
||||||
|
}
|
||||||
|
h1{
|
||||||
|
font-family: 'Open Sans', sans-serif;
|
||||||
|
color: white;
|
||||||
|
font-size: 2rem;
|
||||||
|
font-weight: 800;
|
||||||
|
}
|
||||||
|
a{
|
||||||
|
font-family: 'Open Sans', sans-serif;
|
||||||
|
color: white;
|
||||||
|
font-size: 1rem;
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
button {
|
||||||
|
font-family: 'Open Sans', sans-serif;
|
||||||
|
color: white;
|
||||||
|
font-size: 1rem;
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
7
src/web/app/scss/_vars.scss
Normal file
7
src/web/app/scss/_vars.scss
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
:root {
|
||||||
|
--hyro: #eeee32;
|
||||||
|
--yellow: #ead800;
|
||||||
|
--yellow-dark: #d8a603;
|
||||||
|
--darkmode: #151515;
|
||||||
|
--codeblock: #242424;
|
||||||
|
}
|
6
src/web/app/scss/style.scss
Normal file
6
src/web/app/scss/style.scss
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
@import "globals";
|
||||||
|
@import "vars";
|
||||||
|
@import "containers";
|
||||||
|
@import "textstyle";
|
||||||
|
@import "forumstyle";
|
||||||
|
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,500;0,600;0,800;1,300;1,600;1,700&display=swap'); //font-family: 'Open Sans', sans-serif;
|
BIN
src/web/assets/logo.ico
Normal file
BIN
src/web/assets/logo.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 122 KiB |
156
src/web/dist/style.css
vendored
Normal file
156
src/web/dist/style.css
vendored
Normal file
|
@ -0,0 +1,156 @@
|
||||||
|
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,500;0,600;0,800;1,300;1,600;1,700&display=swap");
|
||||||
|
html {
|
||||||
|
font-size: 100%;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
*,
|
||||||
|
*::before,
|
||||||
|
*::after {
|
||||||
|
-webkit-box-sizing: inherit;
|
||||||
|
box-sizing: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
line-height: 1.3;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
background-color: var(--darkmode);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--hyro: #eeee32;
|
||||||
|
--yellow: #ead800;
|
||||||
|
--yellow-dark: #d8a603;
|
||||||
|
--darkmode: #151515;
|
||||||
|
--codeblock: #242424;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-container {
|
||||||
|
height: 100vh;
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-pack: center;
|
||||||
|
-ms-flex-pack: center;
|
||||||
|
justify-content: center;
|
||||||
|
-webkit-box-align: center;
|
||||||
|
-ms-flex-align: center;
|
||||||
|
align-items: center;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-box-direction: normal;
|
||||||
|
-ms-flex-direction: column;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
background-color: #0e0e0e;
|
||||||
|
-webkit-filter: drop-shadow(0 0 0.75rem #0e0e0e);
|
||||||
|
filter: drop-shadow(0 0 0.75rem #0e0e0e);
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-pack: center;
|
||||||
|
-ms-flex-pack: center;
|
||||||
|
justify-content: center;
|
||||||
|
-webkit-box-align: center;
|
||||||
|
-ms-flex-align: center;
|
||||||
|
align-items: center;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-box-direction: normal;
|
||||||
|
-ms-flex-direction: column;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 4rem 8rem;
|
||||||
|
border-radius: 1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
form {
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-box-direction: normal;
|
||||||
|
-ms-flex-direction: column;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 600px) {
|
||||||
|
.container {
|
||||||
|
padding: 1rem 1.2rem;
|
||||||
|
border-radius: 1.2rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
font-family: 'Open Sans', sans-serif;
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 200;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-family: 'Open Sans', sans-serif;
|
||||||
|
color: white;
|
||||||
|
font-size: 2rem;
|
||||||
|
font-weight: 800;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
font-family: 'Open Sans', sans-serif;
|
||||||
|
color: white;
|
||||||
|
font-size: 1rem;
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
font-family: 'Open Sans', sans-serif;
|
||||||
|
color: white;
|
||||||
|
font-size: 1rem;
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
background-color: var(--yellow);
|
||||||
|
border-radius: .2rem;
|
||||||
|
border-style: none;
|
||||||
|
margin-top: .8rem;
|
||||||
|
font-size: 1.2rem;
|
||||||
|
padding: .2rem .8rem;
|
||||||
|
-webkit-filter: drop-shadow(0 0 0.75rem #363636);
|
||||||
|
filter: drop-shadow(0 0 0.75rem #363636);
|
||||||
|
-webkit-transition: .2s;
|
||||||
|
transition: .2s;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:hover {
|
||||||
|
background-color: var(--yellow-dark);
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
color: white;
|
||||||
|
padding: .2rem .5rem;
|
||||||
|
background-color: var(--codeblock);
|
||||||
|
margin-top: .3rem;
|
||||||
|
font-size: 1.2rem;
|
||||||
|
border-style: none;
|
||||||
|
border-radius: .2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.code {
|
||||||
|
background-color: var(--codeblock);
|
||||||
|
border-radius: .2rem;
|
||||||
|
padding: .2rem .5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 600px) {
|
||||||
|
input {
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
button {
|
||||||
|
font-size: 1rem;
|
||||||
|
padding: .1rem .5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*# sourceMappingURL=style.css.map */
|
14
src/web/dist/style.css.map
vendored
Normal file
14
src/web/dist/style.css.map
vendored
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"mappings": "AAKA,OAAO,CAAC,0HAAI;ACLZ,AAAA,IAAI,CAAC;EACH,SAAS,EAAE,IAAI;EACf,UAAU,EAAE,UAAU;CACvB;;AACD,AAAA,CAAC;AACD,CAAC,AAAA,QAAQ;AACT,CAAC,AAAA,OAAO,CAAC;EACP,UAAU,EAAE,OAAO;CACpB;;AACD,AAAA,IAAI,CAAC;EACH,WAAW,EAAE,4BAA4B;EACzC,WAAW,EAAE,GAAG;EAChB,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,CAAC;EACV,gBAAgB,EAAE,eAAe;EACjC,KAAK,EAAE,KAAK;CACb;;AChBD,AAAA,KAAK,CAAC;EACF,MAAM,CAAA,QAAC;EACP,QAAQ,CAAA,QAAC;EACT,aAAa,CAAA,QAAC;EACd,UAAU,CAAA,QAAC;EACX,WAAW,CAAA,QAAC;CACf;;ACND,AAAA,eAAe,CAAA;EACX,MAAM,EAAE,KAAK;EACb,OAAO,EAAE,IAAI;EACb,eAAe,EAAE,MAAM;EACvB,WAAW,EAAE,MAAM;EACnB,cAAc,EAAE,MAAM;CAGzB;;AAED,AAAA,UAAU,CAAC;EACP,gBAAgB,EAAE,OAAO;EACzB,MAAM,EAAE,gCAAgC;EACxC,OAAO,EAAE,IAAI;EACb,eAAe,EAAE,MAAM;EACvB,WAAW,EAAE,MAAM;EACnB,cAAc,EAAE,MAAM;EACtB,OAAO,EAAE,SAA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AY,EAAE,IAAI;EAClB,aAAa,EAAE,KAAK;CACvB;;AAED,AAAA,KAAK,CAAA;EACD,gBAAgB,EAAE,gBAAgB;EAClC,aAAa,EAAE,KAAK;EACpB,OAAO,EAAE,WAAW;CACvB;;AAED,MAAM,CAAC,MAAM,MAAM,SAAS,EAAE,KAAK;EAC/B,AAAA,KAAK,CAAC;IACF,SAAS,EAAE,IAAI;GAClB;EACD,AAAA,MAAM,CAAC;IACH,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,WAAW;GACvB",
|
||||||
|
"sources": [
|
||||||
|
"../app/scss/style.scss",
|
||||||
|
"../app/scss/_globals.scss",
|
||||||
|
"../app/scss/_vars.scss",
|
||||||
|
"../app/scss/_containers.scss",
|
||||||
|
"../app/scss/_textstyle.scss",
|
||||||
|
"../app/scss/_forumstyle.scss"
|
||||||
|
],
|
||||||
|
"names": [],
|
||||||
|
"file": "style.css"
|
||||||
|
}
|
38
src/web/index.html
Normal file
38
src/web/index.html
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
<!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>Roles Bot</title>
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" integrity="sha512-c42qTSw/wPZ3/5LBzD+Bw5f7bSF2oxou6wEb+I/lqeaKV5FDIfMvvRp772y4jcJLKuGUOpbJMdg/BTl50fJYAw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||||
|
<meta name="keywords" content="ReactionRoles, discord, discordbot, discordroles, roles-bot">
|
||||||
|
<meta property="og:site_name" content="Roles Bot">
|
||||||
|
<meta property="og:title" content="Roles Bot">
|
||||||
|
<meta property="og:description" content="">
|
||||||
|
<meta property="og:image" content="https://i.imgur.com/MSdTu2M.png">
|
||||||
|
<meta name="author" content="xHyroM">
|
||||||
|
<meta name="theme-color" content=#ead800>
|
||||||
|
<link rel="stylesheet" href="dist/style.css">
|
||||||
|
<link rel="icon" href="assets/logo.ico">
|
||||||
|
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.3.1/styles/default.min.css">
|
||||||
|
<script src="https://kit.fontawesome.com/5acf4d9e80.js" crossorigin="anonymous"></script>
|
||||||
|
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js'></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<section class="flex-container">
|
||||||
|
<div class="container">
|
||||||
|
<h1>Generate</h1>
|
||||||
|
<form>
|
||||||
|
<input placeholder="Message" name="message" id="message"/><br> <!--Message-->
|
||||||
|
<input placeholder="Channel Id" name="channel" id="channel"/> <!--Channel Id-->
|
||||||
|
</form>
|
||||||
|
<button id='addRole'>Add Role</button>
|
||||||
|
<pre><code class="language-json"><p class="code" id='json'></p></code></pre>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.3.1/highlight.min.js"></script>
|
||||||
|
<script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||||
|
<script src="app/js/script.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in a new issue