This commit is contained in:
xhyrom 2021-12-22 11:06:22 +01:00
parent 635ee044c3
commit a4beab6615
6 changed files with 30 additions and 2 deletions

View file

@ -49,6 +49,19 @@ $('pre[id=jsonPre].copy').click((e) => {
}) })
}) })
$('button[id=buttonCopy]').click((e) => {
const element = $('pre[id=jsonPre].copy')[0];
navigator.clipboard.writeText(element?.currentTarget?.textContent || element.textContent);
Swal.fire({
position: 'top-end',
icon: 'success',
title: 'Copied!',
showConfirmButton: false,
timer: 1500
})
})
$(window).on('load', () => { $(window).on('load', () => {
$('input').toArray().forEach((i) => i.value = ''); $('input').toArray().forEach((i) => i.value = '');
document.getElementById('json').innerHTML = hljs.highlight(JSON.stringify(json), { language: 'json' }).value; document.getElementById('json').innerHTML = hljs.highlight(JSON.stringify(json), { language: 'json' }).value;

View file

@ -32,6 +32,13 @@ max-width: 900px;
cursor: pointer; cursor: pointer;
} }
.responsive {
width: 100%;
padding: 10px;
max-width: 100rem;
height: auto;
}
@media screen and (max-width:600px) { @media screen and (max-width:600px) {
input { input {
font-size: 1rem; font-size: 1rem;

BIN
src/web/assets/slash.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View file

@ -146,6 +146,13 @@ input {
cursor: pointer; cursor: pointer;
} }
.responsive {
width: 100%;
padding: 10px;
max-width: 100rem;
height: auto;
}
@media screen and (max-width: 600px) { @media screen and (max-width: 600px) {
input { input {
font-size: 1rem; font-size: 1rem;

View file

@ -1,6 +1,6 @@
{ {
"version": 3, "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,C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EACpC,KAAK,EAAE,KAAK;EACZ,SAAS,EAAE,IAAI;EACf,eAAe,EAAE,IAAI;EACrB,WAAW,EAAE,GAAG;CACnB;;ACzBD,AAAA,MAAM,CAAC;EACH,gBAAgB,EAAE,aAAa;EAC/B,aAAa,EAAE,KAAK;EACpB,YAAY,EAAE,IAAI;EAClB,UAAU,EAAE,KAAK;EACjB,SAAS,EAAE,MAAM;EACjB,OAAO,EAAE,WAAW;EACpB,MAAM,EAAE,gCAAgC;EACxC,UAAU,EAAE,GAAG;EACf,MAAM,EAAE,OAAO;CAKlB;;AAdD,AAWI,MAXE,AAWD,MAAM,CAAA;EACH,gBAAgB,EAAE,kBAAkB;CACvC;;AAGL,AAAA,KAAK,CAAC;EACF,KAAK,EAAE,KAAK;EACZ,OAAO,EAAE,WAAW;EACpB,gBAAgB,EAAE,gBAAgB;EAClC,UAAU,EAAE,KAAK;EACjB,SAAS,EAAE,MAAM;EACjB,YAAY,EAAE,IAAI;EAClB,aAAa,EAAE,KAAK;CACvB;;AAED,AAAA,KAAK,CAAA;EACL,SAAS,EAAE,KAAK;CACf;;AAED,AAAA,KAAK,CAAC;EACF,MAAM,EAAE,OAAO;CAClB;;AAED,AAAA,WAAW,CAAC;EACR,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,IAAI;EACb,SAAS,EAAE,MAAM;EACjB,MAAM,EAAE,IAAI;CACf;;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;EACD,AAAA,KAAK,CAAA;IACD,SAAS,EAAE,KAAK;GACf",
"sources": [ "sources": [
"../app/scss/style.scss", "../app/scss/style.scss",
"../app/scss/_globals.scss", "../app/scss/_globals.scss",

View file

@ -25,8 +25,9 @@
</form> </form>
<button id='addRole'>Add Role</button> <button id='addRole'>Add Role</button>
<button id='buttonCopy'>Copy</button>
<img src='assets/slash.png' class='responsive' />
<pre class='hljs language-json copy' id='jsonPre'><code id='json' class="code"></code></pre> <pre class='hljs language-json copy' id='jsonPre'><code id='json' class="code"></code></pre>
Put json from ^ to /setup
</div> </div>
</section> </section>
<script src='//cdn.jsdelivr.net/npm/sweetalert2@11'></script> <script src='//cdn.jsdelivr.net/npm/sweetalert2@11'></script>