Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a9d7fd7f4c | ||
|
|
58c61a8f01 | ||
|
|
f5014e1cee | ||
|
|
502795d688 |
No files matched your search
@@ -0,0 +1,2 @@
|
||||
import {ConsoleTest} from "./console-test.mjs";
|
||||
window.customElements.get('console-test') || window.customElements.define("console-test", ConsoleTest);
|
||||
@@ -0,0 +1,33 @@
|
||||
import { Webcomponent } from "./webcomponent.js";
|
||||
|
||||
export class ConsoleTest extends Webcomponent {
|
||||
constructor() {
|
||||
super({
|
||||
template: {
|
||||
fetch : false
|
||||
}
|
||||
});
|
||||
|
||||
this.init();
|
||||
}
|
||||
|
||||
init() {
|
||||
this.buttonRunFullClass().addEventListener("click", this.runAllTests.bind(this));
|
||||
}
|
||||
|
||||
runAllTests() {
|
||||
this.listTests().forEach((e) => this.runTest(e));
|
||||
}
|
||||
|
||||
runTest(elem) {
|
||||
console.log(elem);
|
||||
}
|
||||
|
||||
buttonRunFullClass() {
|
||||
return this.querySelector("button.run-full");
|
||||
}
|
||||
|
||||
listTests() {
|
||||
return this.querySelectorAll(".single-test");
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 15 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="34" height="34" viewBox="0 0 34 34"><metadata><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"><rdf:Description><dc:creator>RealFaviconGenerator</dc:creator><dc:source>https://realfavicongenerator.net</dc:source></rdf:Description></rdf:RDF></metadata><image width="34" height="34" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAABhGlDQ1BJQ0MgcHJvZmlsZQAAKJF9kb9Lw0AcxV9TRdFWBzuIOGSoThZERRy1CkWoEGqFVh1MLv0FTRqSFBdHwbXg4I/FqoOLs64OroIg+APEP0CcFF2kxO8lhRYxHhz34d29x907QKiXmWZ1jAOabpupRFzMZFfFrlf0IoQwBPTJzDLmJCkJ3/F1jwBf72I8y//cnyOs5iwGBETiWWaYNvEG8fSmbXDeJ46woqwSnxOPmXRB4keuKx6/cS64LPDMiJlOzRNHiMVCGyttzIqmRjxFHFU1nfKFjMcq5y3OWrnKmvfkLwzl9JVlrtMcRgKLWIIEEQqqKKEMGzFadVIspGg/7uMfcv0SuRRylcDIsYAKNMiuH/wPfndr5ScnvKRQHOh8cZyPEaBrF2jUHOf72HEaJ0DwGbjSW/5KHZj5JL3W0qJHQP82cHHd0pQ94HIHGHwyZFN2pSBNIZ8H3s/om7LAwC3Qs+b11tzH6QOQpq6SN8DBITBaoOx1n3d3t/f275lmfz/7dnJ3c8n9YwAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAuIwAALiMBeKU/dgAAAAd0SU1FB+oLDA0CMS097QYAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAACWUlEQVRYw2OUkpJiQAaMjIwM2AAucWrpYWIYJICFVA1ynE7/pTgtGIRZtRh4WWQY2Jn5GRgYGBh+/v3I8PnPE4a3v68xPP9xkuHR932MpJjLSEzUsDHxMOjyJ/1X4w5m4GAWJMrgH3/fM9z6upbh6ucFjL//fyUYNQQdosYT+N9YoIBoB2Bz0LmPExnufNvISLZDLISq/mvyRlAlDdz4spLh1IcORpITq71IB9UcwcDAwKDBE85gK9T2H5c8VodYCFX9V+L2onrOUOTyZDATqPhPlEPUeAKpGhLYQkaFy/8/XoewMfEwGAsU0LzMMOLPZ2Bl5MbtEF3+pP/k5g5SAAezIIM2b8J/nA5R5wmhW0mqyhWEPUTkuZw/0yM0kENFlsPxP4ZDpDgteIivGFgY3FcIMTQfEWQItibfMZIc5pghIsKmTfeKTphVC9MhvCwydHcID7M0pkNgtSg9AbKdg6Y9AnfIz78f6W45sp1wh3z+84TuDvny9ymmQ978ukp3h7z9fQ2zqfjs+4kvmrwRPCSZxMjIoN8hxKCHJPR182eG3q7fDH+J0P78x0nMEHn4bS/vj7/vSfYVIxMDAxMaJrbl9vjHfkasjeebX9Yw6POnEjblzx+GnRHvGHZSEC23v63DXfte/jiPkZxQIacde/XzAkacDvn17wvD2Q8TaO6Qcx8nMqC37DFi9NaX9YzXP6+gmSNufFmJ0aLHWbKeeNfGeO/rNqo74v637SgteaJa8QffVFA1ZG58Wclw+F0VI9k9vUHRwRpUXU50cVI64aQMSzCOjo+gAQAvDdjAWfkBlAAAAABJRU5ErkJggg=="></image></svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "MyWebSite",
|
||||
"short_name": "MySite",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/web-app-manifest-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "/web-app-manifest-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
}
|
||||
],
|
||||
"theme_color": "#ffffff",
|
||||
"background_color": "#ffffff",
|
||||
"display": "standalone"
|
||||
}
|
||||
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 112 KiB |
@@ -1,7 +1,8 @@
|
||||
/*! minireset.css v0.0.6 | MIT License | github.com/jgthms/minireset.css */html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}ul{list-style:none}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*::before,*::after{box-sizing:inherit}img,video{height:auto;max-width:100%}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}td:not([align]),th:not([align]){text-align:left}
|
||||
.grid{box-sizing:border-box;display:-webkit-flex;display:-ms-flexbox;display:-webkit-box;display:flex;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;-webkit-box-flex:0;flex:0 1 auto;-webkit-flex-direction:row;-ms-flex-direction:row;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;margin:0 -8px 0 -8px}.grid.grid-nogutter{margin:0}.grid.grid-nogutter>.col{padding:0}.col{box-sizing:border-box;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-flex-grow:1;-ms-flex-positive:1;-webkit-box-flex:1;flex-grow:1;-ms-flex-preferred-size:0;-webkit-flex-basis:0;flex-basis:0;max-width:100%;min-width:0;padding:0 8px 0 8px}.col-align-top{-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start}.col-align-bottom{align-self:flex-end}.col-align-middle{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.col-top{justify-content:flex-start !important;flex-direction:column;display:flex}.col-bottom{justify-content:flex-end !important;flex-direction:column;display:flex}.col-middle{justify-content:center;flex-direction:column;display:flex}.grid-start{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.grid-center{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.grid-end{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.grid-around{justify-content:space-around}.grid-between{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.col-first{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.col-last{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.grid-reverse{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.col-fixed{flex:initial}.col-grow-2{flex-grow:2}.col-grow-3{flex-grow:3}.col-grow-4{flex-grow:4}.col-grow-5{flex-grow:5}.col-grow-6{flex-grow:6}.col-grow-7{flex-grow:7}.col-grow-8{flex-grow:8}.col-grow-9{flex-grow:9}.col-grow-10{flex-grow:10}.col-grow-11{flex-grow:11}.col-1{-ms-flex-preferred-size:8.33333%;-webkit-flex-basis:8.33333%;flex-basis:8.33333%;max-width:8.33333%}.col-2{-ms-flex-preferred-size:16.66667%;-webkit-flex-basis:16.66667%;flex-basis:16.66667%;max-width:16.66667%}.col-3{-ms-flex-preferred-size:25%;-webkit-flex-basis:25%;flex-basis:25%;max-width:25%}.col-4{-ms-flex-preferred-size:33.33333%;-webkit-flex-basis:33.33333%;flex-basis:33.33333%;max-width:33.33333%}.col-5{-ms-flex-preferred-size:41.66667%;-webkit-flex-basis:41.66667%;flex-basis:41.66667%;max-width:41.66667%}.col-6{-ms-flex-preferred-size:50%;-webkit-flex-basis:50%;flex-basis:50%;max-width:50%}.col-7{-ms-flex-preferred-size:58.33333%;-webkit-flex-basis:58.33333%;flex-basis:58.33333%;max-width:58.33333%}.col-8{-ms-flex-preferred-size:66.66667%;-webkit-flex-basis:66.66667%;flex-basis:66.66667%;max-width:66.66667%}.col-9{-ms-flex-preferred-size:75%;-webkit-flex-basis:75%;flex-basis:75%;max-width:75%}.col-10{-ms-flex-preferred-size:83.33333%;-webkit-flex-basis:83.33333%;flex-basis:83.33333%;max-width:83.33333%}.col-11{-ms-flex-preferred-size:91.66667%;-webkit-flex-basis:91.66667%;flex-basis:91.66667%;max-width:91.66667%}.col-12{-ms-flex-preferred-size:100%;-webkit-flex-basis:100%;flex-basis:100%;max-width:100%}@media only screen and (max-width: 480px){.col-sm{flex:100%;max-width:100%}}@media only screen and (max-width: 624px){.col-md{flex:100%;max-width:100%}}@media only screen and (max-width: 744px){.col-lg{flex:100%;max-width:100%}}
|
||||
/*! minireset.css v0.0.6 | MIT License | github.com/jgthms/minireset.css */
|
||||
html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}ul{list-style:none}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*::before,*::after{box-sizing:inherit}img,video{height:auto;max-width:100%}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}td:not([align]),th:not([align]){text-align:left}
|
||||
.grid{box-sizing:border-box;display:-webkit-flex;display:-ms-flexbox;display:-webkit-box;display:flex;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;-webkit-box-flex:0;flex:0 1 auto;-webkit-flex-direction:row;-ms-flex-direction:row;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;margin:0 -8px 0 -8px}.grid.grid-nogutter{margin:0}.grid.grid-nogutter>.col{padding:0}.col{box-sizing:border-box;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-flex-grow:1;-ms-flex-positive:1;-webkit-box-flex:1;flex-grow:1;-ms-flex-preferred-size:0;-webkit-flex-basis:0;flex-basis:0;max-width:100%;min-width:0;padding:0 8px 0 8px}.col-align-top{-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start}.col-align-bottom{align-self:flex-end}.col-align-middle{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.col-top{justify-content:flex-start !important;flex-direction:column;display:flex}.col-bottom{justify-content:flex-end !important;flex-direction:column;display:flex}.col-middle{justify-content:center;flex-direction:column;display:flex}.grid-start{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.grid-center{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.grid-end{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.grid-around{justify-content:space-around}.grid-between{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.col-first{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.col-last{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.grid-reverse{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.col-fixed{flex:initial}.col-grow-2{flex-grow:2}.col-grow-3{flex-grow:3}.col-grow-4{flex-grow:4}.col-grow-5{flex-grow:5}.col-grow-6{flex-grow:6}.col-grow-7{flex-grow:7}.col-grow-8{flex-grow:8}.col-grow-9{flex-grow:9}.col-grow-10{flex-grow:10}.col-grow-11{flex-grow:11}.col-1{-ms-flex-preferred-size:8.33333%;-webkit-flex-basis:8.33333%;flex-basis:8.33333%;max-width:8.33333%}.col-2{-ms-flex-preferred-size:16.66667%;-webkit-flex-basis:16.66667%;flex-basis:16.66667%;max-width:16.66667%}.col-3{-ms-flex-preferred-size:25%;-webkit-flex-basis:25%;flex-basis:25%;max-width:25%}.col-4{-ms-flex-preferred-size:33.33333%;-webkit-flex-basis:33.33333%;flex-basis:33.33333%;max-width:33.33333%}.col-5{-ms-flex-preferred-size:41.66667%;-webkit-flex-basis:41.66667%;flex-basis:41.66667%;max-width:41.66667%}.col-6{-ms-flex-preferred-size:50%;-webkit-flex-basis:50%;flex-basis:50%;max-width:50%}.col-7{-ms-flex-preferred-size:58.33333%;-webkit-flex-basis:58.33333%;flex-basis:58.33333%;max-width:58.33333%}.col-8{-ms-flex-preferred-size:66.66667%;-webkit-flex-basis:66.66667%;flex-basis:66.66667%;max-width:66.66667%}.col-9{-ms-flex-preferred-size:75%;-webkit-flex-basis:75%;flex-basis:75%;max-width:75%}.col-10{-ms-flex-preferred-size:83.33333%;-webkit-flex-basis:83.33333%;flex-basis:83.33333%;max-width:83.33333%}.col-11{-ms-flex-preferred-size:91.66667%;-webkit-flex-basis:91.66667%;flex-basis:91.66667%;max-width:91.66667%}.col-12{-ms-flex-preferred-size:100%;-webkit-flex-basis:100%;flex-basis:100%;max-width:100%}@media only screen and (max-width: 480px){.col-sm{flex:100%;max-width:100%}}@media only screen and (max-width: 624px){.col-md{flex:100%;max-width:100%}}@media only screen and (max-width: 744px){.col-lg{flex:100%;max-width:100%}}@media only screen and (max-width: 864px){.col-xl{flex:100%;max-width:100%}}@media only screen and (max-width: 984px){.col-xxl{flex:100%;max-width:100%}}
|
||||
.align-items-center{align-items:center}.align-items-top{align-items:start}
|
||||
.justify-content-around{justify-content: space-around;}.justify-content-end{justify-content: end}
|
||||
.justify-content-around{justify-content: space-around;}.justify-content-end{justify-content: end}.justify-content-between{justify-content: space-between}
|
||||
.flex {display:flex}
|
||||
|
||||
:root {--color-red: #d47474}
|
||||
@@ -9,52 +10,92 @@
|
||||
.m-0 {margin:0!important}.mx-0 {margin-left:0!important;margin-right:0!important}.my-0 {margin-top:0!important;margin-bottom:0!important}
|
||||
.p-0 {padding:0!important}.px-0 {padding-left:0!important;padding-right:0!important}.py-0 {padding-top:0!important;padding-bottom:0!important}
|
||||
|
||||
[class^="btn-"], [class~=" btn-"] { display: inline-block; font-weight: 400; font-size:16px; text-align: center; white-space: nowrap; vertical-align: middle; user-select: none; border: 1px solid transparent; padding: .375rem .75rem; line-height: 1.5; border-radius: .25rem; cursor:pointer; transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out; background:rgba(0,0,0,0.3); color:rgba(255,255,255,0.8); text-decoration:none; }
|
||||
[class^="btn-"]:hover, [class~=" btn-"]:hover {border-color: rgba(0, 0, 0, 0.5);text-decoration: underline;}
|
||||
.btn-red {background: rgba(155,0,0,0.5);color: rgba(255, 255, 255, 0.9);}
|
||||
.btn-green {background: rgba(0,155,0,0.5);color: rgba(255, 255, 255, 0.9);}
|
||||
.btn-blue {background: rgba(0,0,155,0.5);color: rgba(255, 255, 255, 0.9);}
|
||||
.btn-yellow {background: rgba(249, 200, 11, 0.69);color: rgba(255, 255, 255, 0.9);}
|
||||
[class^="btn-"]:not(.btn-wrapper), [class~=" btn-"]:not(.btn-wrapper) { display: inline-block; font-weight: 400; font-size:14px; text-align: center; white-space: nowrap; vertical-align: middle; user-select: none; border: 1px solid transparent; padding: .375rem .75rem; line-height: 1.5; border-radius: .45rem; cursor:pointer; transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out; background:rgba(0,0,0,0.3); color:rgba(255,255,255,0.8); text-decoration:none; }
|
||||
[class^="btn-"]:not(.btn-wrapper):hover, [class~=" btn-"]:not(.btn-wrapper):hover {border-color: rgba(104, 102, 102, 0.5);filter: contrast(150%);}
|
||||
[class^="btn-"]:not(.btn-wrapper):active, [class~=" btn-"]:not(.btn-wrapper):active {filter:grayscale(20%)}
|
||||
.btn-gray:not(.btn-wrapper) {background: linear-gradient(135deg, rgb(159 159 159) 0%, rgb(108, 107, 107) 100%);color: rgba(255, 255, 255, 0.9);}
|
||||
.btn-red:not(.btn-wrapper):not([disabled]) {background: linear-gradient(135deg, rgb(240, 108, 108) 0%, rgb(209, 75, 75) 100%);color: rgba(255, 255, 255, 0.9);}
|
||||
.btn-purple:not(.btn-wrapper):not([disabled]) {background: linear-gradient(135deg, rgb(134 77 181) 0%, rgb(109 48 174) 100%);color: rgba(255, 255, 255, 0.9);}
|
||||
.btn-green:not(.btn-wrapper):not([disabled]) {background:linear-gradient(135deg, rgb(77, 181, 137) 0%, rgb(48, 174, 85) 100%);color: rgba(255, 255, 255, 0.9);}
|
||||
.btn-blue:not(.btn-wrapper):not([disabled]){background: linear-gradient(135deg, #4b66d1 0%, #3e6ca8 100%);color: rgba(255, 255, 255, 0.9);}
|
||||
.btn-yellow:not(.btn-wrapper):not([disabled]) {background:linear-gradient(135deg, #dbb20d 0%, #b58920 100%);color: rgba(255, 255, 255, 0.9);}
|
||||
.btn-pink:not(.btn-wrapper):not([disabled]) {background:linear-gradient(135deg, #e878ec 0%, #c146b1 100%);color: rgba(255, 255, 255, 0.9);}
|
||||
.btn-sm:not(.btn-wrapper) {font-size:0.85rem;padding: .25rem .55rem;border-radius: 5px;}
|
||||
.bg-yellow {background:#c09f1f!important}
|
||||
|
||||
[class*="http-method-"]:not(:last-child):after {content: ",";color: #5e5e5e}
|
||||
.http-method-get {color:#0f6ab4}
|
||||
.http-method-post {color:#10a44a}
|
||||
.http-method-patch {color: #ed7419}
|
||||
.http-method-delete {color:#d73c41}
|
||||
.http-method-put {color:#bda20e}
|
||||
.http-method-head {color:#ca6aa5}
|
||||
.http-method-option {color:#a4a4a4}
|
||||
|
||||
body{background:#f3f3f9}
|
||||
code {white-space:pre-line;font-family:monospace;color: #e6e6e6;background: #343537;display: block;padding: 1rem;line-height: 1.5em;border: 1px solid #2e2e30;}
|
||||
code {white-space:pre-line; font-family:monospace; display: block;flex: 2; background: #f8f9fb; border: 1px solid #e4e7ec; border-radius: 10px; padding: 14px 16px; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #4b5563; line-height: 1.6;}
|
||||
|
||||
code:before {position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, #777 0%, transparent 100%);content:" "}
|
||||
code .empty {display: flex; align-items: center; justify-content: center; padding: 22px 0; color: #52525b; font-size: 14px; font-style: italic;}
|
||||
code .empty svg {margin: 0 auto 8px; opacity: 0.5;}
|
||||
body {font-family:Helvetica Neue, Helvetica, Arial, sans-serif;}
|
||||
summary {cursor:pointer;}
|
||||
|
||||
|
||||
#body-main {min-height:calc(100vh - 30px);display:flex}
|
||||
|
||||
/* Header */
|
||||
#body-header {background: #fff; color:#fff; min-height:60px;line-height:60px;padding:0 1rem;position:sticky;top:0;border-bottom:1px solid #ebedee;}
|
||||
#body-header {background: #fff; color:#fff; min-height:60px;line-height:60px;padding:0 1rem;position:sticky;top:0;border-bottom:1px solid #ebedee;z-index:10}
|
||||
#body-header > div {min-height: 60px;}
|
||||
#right-panel {max-width:calc(100% - 240px);width:100%;margin-left:auto}
|
||||
#subheader {background:#fff; padding: 1rem 1.4rem;display:flex;justify-content: space-between;box-shadow:0 1px 2px rgba(55,65,75,0.15)}
|
||||
#subheader h1 {font-size:1.1rem;font-size:inherit; font-weight:bold}
|
||||
#subheader .breadcrumb {font-size:0.9rem;display:flex;align-items:end}
|
||||
#subheader {background:#fff; padding: 1rem 1.4rem;display:flex;justify-content: space-between;box-shadow:0 1px 2px rgba(55,65,75,0.15);}
|
||||
#subheader h1 {color:#b0b0b0;font-size:1.1rem;font-size:inherit; font-weight:bold}
|
||||
#subheader .breadcrumb {font-size:0.9rem;display:flex;align-items:end;font-variant: small-caps;letter-spacing: 1.25px;}
|
||||
#subheader .breadcrumb-item + .breadcrumb-item:before {content:"›";padding:0 6px;}
|
||||
#subheader .breadcrumb-item:nth-child(1) {color:#71717a}
|
||||
#subheader .breadcrumb-item:nth-child(2) {color: #9797a1}
|
||||
#subheader .breadcrumb-item:nth-child(3) {color:#a1a1aa}
|
||||
#subheader .breadcrumb-item:last-child {color: #5132ca}
|
||||
|
||||
/* Footer */
|
||||
#body-footer {background: #fff;color: #333;height: 30px;line-height: 30px;font-size: 0.8rem;padding: 0 0.5rem;text-align: right;border-top:1px solid #ebedee;}
|
||||
|
||||
/* Sidebar */
|
||||
#main-nav {background:#373737;width:240px;color:#fff;font-family:consolas, courier new, monospace;font-size:0.9rem;position:fixed;top:0;bottom:0;overflow-y:auto;padding-bottom:2rem;border-right: 2px solid #333;}
|
||||
#main-nav .app-title {font-size:1.3rem; text-align:center;padding:1.8rem 0}
|
||||
#main-nav .app-title:before {content:"🔳"; margin-right:10px}
|
||||
#main-nav {background:linear-gradient(90deg, #131313 0%, #373737 100%);width:240px;color:#fff;font-family:consolas, courier new, monospace;font-size:0.9rem;position:fixed;top:0;bottom:0;overflow-y:auto;padding-bottom:2rem;border-right: 2px solid #333;display:flex; flex-direction: column;justify-content: space-between;}
|
||||
#main-nav .app-title {font-size:1.3rem; text-align:center;padding:1.5rem 0 0.85rem 0;display:flex;align-items: center; font-family: 'Segoe UI', system-ui, sans-serif; gap:10px; justify-content: center;}
|
||||
#main-nav .app-title svg {max-width:40px; max-height:40px; margin-right:15px;fill: #2a003e;}
|
||||
#main-nav .button {margin:0 auto; }
|
||||
#main-nav .button a {font-size:90%}
|
||||
#main-nav label {color: #a4a4a4;text-transform:uppercase ; display:block;padding:0.8rem 1rem;font-size:1.15em;}
|
||||
#main-nav label:before {content:"⊙"; margin-right:10px}
|
||||
#main-nav a {color: #efecec;text-decoration:none;display:block;padding:0 1rem 0 2rem;transition:all 0.3s ease;line-height:2.5em;font-size:0.9em}
|
||||
#main-nav a:before {content:"›"; margin-right:10px;}
|
||||
#main-nav a:hover {background:rgba(255,255,255,0.1)}
|
||||
#main-nav .active {background: #5f2b7787;}
|
||||
#main-nav nav a {color: #efecec;text-decoration:none;display:block;padding:0 1rem 0 2rem;transition:all 0.3s ease;line-height:2.5em;font-size:0.9em}
|
||||
#main-nav nav a:before {content:"›"; margin-right:10px;}
|
||||
#main-nav nav a:hover {background:rgba(255,255,255,0.1)}
|
||||
|
||||
/* Main content */
|
||||
#main-content {padding:4vh 2vw;width:100%;margin-left:auto;}
|
||||
#main-content section {border-radius:0.3rem;box-shadow: 0 1px 2px rgba(56,65,74,.15);display: flex;flex-direction: column;}
|
||||
#main-content section article {border-radius:0.3rem;font-family: Courier New , Courier, monospace;font-size: 0.8em;background:#fff;padding:1.5rem;border: 1px solid #00000029;}
|
||||
#main-content section h3 {font-size:120%; margin:10px 0;}
|
||||
#main-content section {border-radius:0.2rem;box-shadow: 0 1px 2px rgba(56,65,74,.15);display: flex;flex-direction: column;}
|
||||
#main-content section article {border-radius:0.2rem;font-family: Courier New , Courier, monospace;font-size: 0.8em;background:#fff;padding:1rem;border: 1px solid #00000029;}
|
||||
#main-content section article.has-table {padding:0}
|
||||
#main-content section header + article {border-top:0;border-top-left-radius: unset;border-top-right-radius: unset}
|
||||
#main-content section header:has(+ article) {border: 1px solid #00000029;border-bottom:0}
|
||||
#main-content section header {border-top-left-radius:0.3rem;border-top-right-radius:0.3rem;background:#373737;padding:1rem 1rem;font-size:1.2em;color: #fff;border-bottom:1px solid #7b7b7b;display:flex;align-items:center}
|
||||
#main-content section header {border-top-left-radius:0.3rem;border-top-right-radius:0.3rem;padding:0.75rem 1rem;font-size:1.2em;display:flex;align-items:center;background: #fff;color: black;border: 1px solid #DFDFDF;box-shadow: 0px -5px 4px #ececec inset;border-bottom:1px solid #d7d7d7;line-height:2.1rem}
|
||||
#main-content section [class*="icon-"] {margin-right:15px;width:40px;height:40px;border-radius:10px;display:flex; align-items: center; justify-content: center;}
|
||||
#main-content section .icon-sm {width:30px!important;height:30px!important;}
|
||||
#main-content section article:has(+ footer) {border-bottom-left-radius:unset;border-bottom-right-radius:unset;border-bottom:0}
|
||||
#main-content section footer {border-bottom-left-radius:0.3rem;border-bottom-right-radius:0.3rem;background:#f9f9f9;padding:1.5vh 1vw;line-height:1.5vh}
|
||||
#main-content section footer {border-bottom-left-radius:0.3rem;border-bottom-right-radius:0.3rem;background:#f9f9f9;padding:1.5vh 1vw;line-height:1.5vh;box-shadow:0px -3px 2px #ececec inset}
|
||||
#main-content section article + footer {border: 1px solid #00000029;border-top:0}
|
||||
#main-content section article [class*="col-"] {overflow-x:auto}
|
||||
#main-content section .icon-gray {background: linear-gradient(135deg, #e6e6e6 0%, #b8b8b8 100%);color: #707070;}
|
||||
#main-content section .icon-yellow {background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);color: #d97706;}
|
||||
#main-content section .icon-red {background: linear-gradient(135deg, #fec7c7 0%, #fd8a8a 100%);color: #d90606;}
|
||||
#main-content section .icon-green {background: linear-gradient(135deg, #cbfec7 0%, #63cc69 100%);color: #259b4d;}
|
||||
#main-content section .icon-purple {background: linear-gradient(135deg, #dbafff 0%, #a38afd 100%);color: #771aa4;}
|
||||
#main-content section .icon-pink {background: linear-gradient(135deg, #ffafe6 0%, #f98afd 100%);color: #a41a92;}
|
||||
#main-content section + section {margin-top:20px}
|
||||
#main-content .sticky {position:sticky;top:60px;z-index:15}
|
||||
|
||||
#main-content .message {border: 1px solid #d29d9d;padding: 15px;border-radius: 4px;margin-bottom: 20px;line-height: 1.5rem;}
|
||||
#main-content .message-content {white-space: pre-line;}
|
||||
#main-content .message.type-danger {background: #fff5f5;color: #530000;}
|
||||
@@ -0,0 +1,79 @@
|
||||
|
||||
class Webcomponent extends HTMLElement {
|
||||
#config = {
|
||||
template: {
|
||||
fetch : true
|
||||
}
|
||||
};
|
||||
|
||||
constructor(config) {
|
||||
super();
|
||||
|
||||
if (config) {
|
||||
this.#config = {...this.#config, ...( config ? config : {} ) };
|
||||
}
|
||||
|
||||
if (this.config.template.fetch) {
|
||||
this.fetchTemplate();
|
||||
}
|
||||
}
|
||||
|
||||
fetchTemplate() {
|
||||
this.attachShadow({mode: 'open'}).appendChild(
|
||||
document.querySelector("template#" + this.tagName.toLowerCase()).content.cloneNode(true)
|
||||
);
|
||||
}
|
||||
|
||||
getName() {
|
||||
return Object.getPrototypeOf(this).constructor.name;
|
||||
}
|
||||
|
||||
getSlot(name) {
|
||||
return this.querySelector('[slot="' + name + '"]');
|
||||
}
|
||||
|
||||
emptyElement(element) {
|
||||
while (element.lastChild) {
|
||||
element.removeChild(element.lastChild);
|
||||
}
|
||||
|
||||
return element;
|
||||
}
|
||||
|
||||
buildUrl(url, data) {
|
||||
return url + ( Object.entries(data).length ? "?" + Object.keys(data).map(function(key) {
|
||||
return [key, data[key]].map(encodeURIComponent).join("=");
|
||||
}).join("&") : "" );
|
||||
}
|
||||
|
||||
on(type, listener, options) {
|
||||
this.addEventListener(type, listener, options);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
off(type, listener, options) {
|
||||
this.removeEventListener(type, listener, options);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
emit(name, detail, bubbles, cancelable, composed) {
|
||||
this.dispatchEvent(new CustomEvent(name, {
|
||||
detail: detail ? detail : null,
|
||||
bubbles: !! bubbles,
|
||||
cancelable: !! cancelable,
|
||||
composed: !! composed,
|
||||
}));
|
||||
}
|
||||
|
||||
get config() {
|
||||
return this.#config;
|
||||
}
|
||||
|
||||
set config(value) {
|
||||
return this.#config = value;
|
||||
}
|
||||
}
|
||||
|
||||
export { Webcomponent };
|
||||
@@ -10,7 +10,8 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"mcnd/lean": "^1.4.2"
|
||||
"mcnd/lean": "^1.4.2",
|
||||
"mcnd/ulmus-api": "^1.3.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use Psr\Container\ContainerInterface;
|
||||
use Lean\Console\Lib\Testing\TestFetcher;
|
||||
use Lean\Console\Lib\DatabaseMigrations;
|
||||
|
||||
$path = dirname(__DIR__, 2);
|
||||
@@ -11,14 +13,14 @@ return [
|
||||
|
||||
'view' => [
|
||||
[
|
||||
'path' => implode(DIRECTORY_SEPARATOR, [ $path , "view", '' ]),
|
||||
'path' => Lean\Lean::path($path, 'view'),
|
||||
'order' => 99,
|
||||
],
|
||||
],
|
||||
|
||||
'asset' => [
|
||||
[
|
||||
'path' => implode(DIRECTORY_SEPARATOR, [ $path, "asset", '' ]),
|
||||
'path' => Lean\Lean::path($path, 'asset'),
|
||||
'order' => 10
|
||||
],
|
||||
],
|
||||
@@ -26,29 +28,37 @@ return [
|
||||
|
||||
'ulmus' => [
|
||||
'entities' => [
|
||||
Lean\Console\Entity\Firewall::class => implode(DIRECTORY_SEPARATOR, [ $path , "src", "Entity", "Firewall" ]),
|
||||
# Lean\Console\Entity::class => Lean\Lean::path($path, 'src', 'Entity'),
|
||||
],
|
||||
],
|
||||
|
||||
'tell' => [
|
||||
'json' => [
|
||||
[
|
||||
'path' => implode(DIRECTORY_SEPARATOR, [ $path, "meta", "i18n", "" ]),
|
||||
'path' => Lean\Lean::path($path, 'meta', 'i18n'),
|
||||
'order' => 99,
|
||||
],
|
||||
]
|
||||
],
|
||||
|
||||
'cli' => [
|
||||
'Lean\\Console\\Cli' => implode(DIRECTORY_SEPARATOR, [ $path, "src", "Cli", "" ]),
|
||||
'Lean\\Console\\Cli' => Lean\Lean::path($path, 'src', 'Cli'),
|
||||
],
|
||||
|
||||
'routes' => ! getenv('DEBUG') ? [] : [
|
||||
Lean\Console\Controller::class => implode(DIRECTORY_SEPARATOR, [ $path, "src", "Controller", "" ]),
|
||||
'tests' => [
|
||||
Lean\Console\Controller::class => Lean\Lean::path($path, 'src', 'Controller'),
|
||||
],
|
||||
|
||||
'routes' => [
|
||||
Lean\Console\Controller::class => Lean\Lean::path($path, 'src', 'Controller'),
|
||||
],
|
||||
],
|
||||
|
||||
DatabaseMigrations::class => function($c) {
|
||||
DatabaseMigrations::class => function(ContainerInterface $c) {
|
||||
return new DatabaseMigrations( $c->get(Lean\Lean::class)->getEntities() );
|
||||
},
|
||||
|
||||
TestFetcher::class => function(ContainerInterface $c) {
|
||||
return new TestFetcher($c->get(Lean\Lean::class)->getTests(), null, $c->get('routes.caching'));
|
||||
},
|
||||
];
|
||||
@@ -2,5 +2,11 @@
|
||||
"title": "Caching -- LEAN",
|
||||
"page-title": "LEAN - Caching",
|
||||
"clear": "Clear",
|
||||
"breadcrumb": "Caching"
|
||||
"breadcrumb": "Caching",
|
||||
"header": "",
|
||||
"table": {
|
||||
"name": "Compiled file",
|
||||
"namespace": "Namespace",
|
||||
"view": "View path"
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"lean": {
|
||||
"label": "Lean",
|
||||
"core": {
|
||||
"label": "Core",
|
||||
"dashboard": "Dashboard",
|
||||
"update": "Update(s)"
|
||||
},
|
||||
@@ -27,6 +27,9 @@
|
||||
"phpinfo": "PhpInfo"
|
||||
},
|
||||
|
||||
"testing": {
|
||||
"label": "Testing"
|
||||
},
|
||||
|
||||
"request": {
|
||||
"label": "Request",
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
"add": "Create",
|
||||
"breadcrumb": "Insert",
|
||||
"readonly": "This field is read-only",
|
||||
|
||||
"table": {
|
||||
"column": "Column",
|
||||
"type": "Data type",
|
||||
@@ -39,5 +38,14 @@
|
||||
"attributes": "Attributs",
|
||||
"value": "Value"
|
||||
}
|
||||
},
|
||||
|
||||
"session": {
|
||||
"header": "Sessions list",
|
||||
"breadcrumb": "Sessions",
|
||||
"count": "{$count} session(s)",
|
||||
"table": {
|
||||
"view": "View"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,5 +2,9 @@
|
||||
"title": "Templating -- LEAN",
|
||||
"page-title": "LEAN - Templating",
|
||||
"breadcrumb": "Templating",
|
||||
"header": "Views"
|
||||
"header": "Views",
|
||||
"filename": "Chemin du fichier",
|
||||
"table": {
|
||||
"empty": "Empty folder"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"title": "Testing -- LEAN",
|
||||
"page-title": "LEAN - Testing",
|
||||
"breadcrumb": "Testing",
|
||||
"header": "Tests"
|
||||
}
|
||||
@@ -3,6 +3,8 @@
|
||||
"page-title": "LEAN - Update",
|
||||
"git": {
|
||||
"breadcrumb": "Update",
|
||||
"header": "Git Status"
|
||||
"header": "Source code versioning",
|
||||
"status:nothing": "Empty",
|
||||
"diff:nothing": "Empty"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"title": "Caching -- LEAN",
|
||||
"page-title": "LEAN - Caching",
|
||||
"clear": "Clear",
|
||||
"breadcrumb": "Caching",
|
||||
"header": "Caching des vues Picea",
|
||||
"table": {
|
||||
"name": "Fichier compilé",
|
||||
"namespace": "Namespace",
|
||||
"view": "Chemin de la vue"
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
{
|
||||
"lean": {
|
||||
"label": "Lean",
|
||||
"dashboard": "Dashboard"
|
||||
"core": {
|
||||
"label": "Noyau",
|
||||
"dashboard": "Dashboard",
|
||||
"update": "Mise(s) à jour"
|
||||
},
|
||||
|
||||
"storage": {
|
||||
@@ -26,6 +27,11 @@
|
||||
"phpinfo": "PhpInfo"
|
||||
},
|
||||
|
||||
"testing": {
|
||||
"label": "Testing",
|
||||
"tests": "Tests automatisés"
|
||||
},
|
||||
|
||||
"request": {
|
||||
"label": "Request",
|
||||
"routes": "Routes"
|
||||
|
||||
@@ -3,28 +3,34 @@
|
||||
"page-title": "LEAN - Storage",
|
||||
|
||||
"database": {
|
||||
"header": "List of databases",
|
||||
"header": "Liste des bases de données",
|
||||
"breadcrumb": "Bases de données",
|
||||
"name": "Database",
|
||||
"adapter": "Adapter",
|
||||
"host": "Hostname:port",
|
||||
"username": "Username",
|
||||
"connection": "Connection",
|
||||
|
||||
"connection": "Connection <u>{$name}</u>",
|
||||
"table": {
|
||||
"header": "Tables details",
|
||||
"fields": "{$count} fields",
|
||||
"fields": "{$count} field(s)",
|
||||
"entries": "{$count} entrie(s)",
|
||||
"name": "Table Name",
|
||||
"actions": "Actions",
|
||||
"table-fields" : "Fields in table",
|
||||
"create": "Create table",
|
||||
"createAll": "Create all tables",
|
||||
"query": "SQL Query"
|
||||
"query": "SQL Query",
|
||||
"uptodate": "Cette table est à jour"
|
||||
}
|
||||
},
|
||||
|
||||
"session": {
|
||||
"header": "Liste des sessions",
|
||||
"breadcrumb": "Sessions",
|
||||
"count": "{$count} session(s)"
|
||||
"count": "{$count} session(s)",
|
||||
"table": {
|
||||
"view": "Voir"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
{
|
||||
"title" : "Console -- LEAN",
|
||||
"page-title": "Console",
|
||||
"breadcrumb" : {
|
||||
"index" : "Negundo"
|
||||
"title": "Mise(s)-à-jour -- LEAN",
|
||||
"page-title": "LEAN - Mise(s)-à-jour",
|
||||
"git": {
|
||||
"breadcrumb": "Mise(s)-à-jour",
|
||||
"header": "Versionnage du code",
|
||||
"status:nothing": "Vide",
|
||||
"diff:nothing": "Vide"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Lean\Console\Attribute;
|
||||
|
||||
#[\Attribute(flags: \Attribute::IS_REPEATABLE | \Attribute::TARGET_METHOD)]
|
||||
readonly class Test
|
||||
{
|
||||
public function __construct(
|
||||
public string $name,
|
||||
public ? string $after = null,
|
||||
public string $method = "GET",
|
||||
public array $arguments = [],
|
||||
public array $withParsedBody = [],
|
||||
public array $withQueryParams = [],
|
||||
) {}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Lean\Console\Attribute;
|
||||
|
||||
#[\Attribute(flags: \Attribute::TARGET_CLASS)]
|
||||
readonly class TestParameter
|
||||
{
|
||||
public function __construct(
|
||||
public ? string $waitFor = null,
|
||||
) { }
|
||||
}
|
||||
@@ -6,10 +6,9 @@ use League\Route\Router;
|
||||
use Picea\{FileFetcher, Picea, Caching\Opcache, Extension\UrlExtension, Ui\Method\FormHandler};
|
||||
use Psr\Http\Message\{ ResponseInterface, ServerRequestInterface };
|
||||
use Lean\Console\{ Form, Lib };
|
||||
use Notes\Tell\Attribute\Language, Notes\Route\Attribute\Method\Route;
|
||||
use Notes\Route\Attribute\Method\Route;
|
||||
|
||||
class Caching extends Console {
|
||||
use Lib\ConsoleControllerTrait;
|
||||
|
||||
#[Route(route: "/caching/picea", name: "lean.console:caching")]
|
||||
public function picea(ServerRequestInterface $request, array $arguments) : ResponseInterface
|
||||
@@ -17,9 +16,16 @@ class Caching extends Console {
|
||||
$list = [];
|
||||
|
||||
if ( isset($this->picea) ) {
|
||||
new FormHandler($request, new Form\Caching\Picea($this->picea, $list), $this->pushContext(new Lib\FormContext($request, "caching.picea")));
|
||||
$context =$this->pushContext(new Lib\FormContext($request, "caching.picea"));
|
||||
|
||||
new FormHandler($request, new Form\Caching\Picea($this->picea, $list), $context);
|
||||
|
||||
if ($context->getExecutionStatus()) {
|
||||
return $this->redirect($this->route('lean.console:caching'));
|
||||
}
|
||||
}
|
||||
|
||||
return $this->renderView("lean-console/page/caching/picea", get_defined_vars());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,24 +11,4 @@ use \Lean\Console\{ Lib, Form };
|
||||
|
||||
class Console {
|
||||
use Lib\ConsoleControllerTrait;
|
||||
|
||||
#[Route(route: "/", name: "lean.console:home")]
|
||||
public function home(ServerRequestInterface $request, array $arguments) : ResponseInterface
|
||||
{
|
||||
return $this->renderView("lean-console/page/dashboard/index", [
|
||||
|
||||
]);
|
||||
}
|
||||
|
||||
#[Route(route: "/update", name: "lean.console:update")]
|
||||
public function update(ServerRequestInterface $request, array $arguments) : ResponseInterface
|
||||
{
|
||||
new FormHandler($request, $git = new Form\Update\Git(getenv('PROJECT_PATH')));
|
||||
|
||||
$status = iterator_to_array($git->run("/usr/bin/git status -s"));
|
||||
$diff = iterator_to_array($git->run("/usr/bin/git diff"));
|
||||
$lastUpdate = iterator_to_array($git->run("/usr/bin/git show --no-patch --format=%ci"))[0] ?? null;
|
||||
|
||||
return $this->renderView("lean-console/page/update/index", get_defined_vars());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace Lean\Console\Controller;
|
||||
|
||||
use Picea\Ui\Method\FormHandler;
|
||||
use Psr\Http\Message\{ ResponseInterface, ServerRequestInterface };
|
||||
|
||||
use Notes\Tell\Attribute\Language, Notes\Route\Attribute\Method\Route;
|
||||
|
||||
use \Lean\Console\{ Lib, Form };
|
||||
|
||||
class Core extends Console {
|
||||
|
||||
#[Route(route: "/", name: "lean.console:home")]
|
||||
public function home(ServerRequestInterface $request, array $arguments) : ResponseInterface
|
||||
{
|
||||
return $this->renderView("lean-console/page/dashboard/index", get_defined_vars());
|
||||
}
|
||||
|
||||
#[Route(route: "/update", name: "lean.console:update")]
|
||||
public function update(ServerRequestInterface $request, array $arguments) : ResponseInterface
|
||||
{
|
||||
new FormHandler($request, $git = new Form\Update\Git(getenv('PROJECT_PATH')));
|
||||
|
||||
$status = iterator_to_array($git->run("/usr/bin/git status -s"));
|
||||
$diff = iterator_to_array($git->run("/usr/bin/git diff"));
|
||||
$lastUpdate = iterator_to_array($git->run("/usr/bin/git show --no-patch --format=%ci"))[0] ?? null;
|
||||
|
||||
return $this->renderView("lean-console/page/update/index", get_defined_vars());
|
||||
}
|
||||
}
|
||||
@@ -39,6 +39,12 @@ class Debugging extends Console {
|
||||
$phpinfo = ob_get_contents() ;
|
||||
ob_end_clean() ;
|
||||
|
||||
$phpinfo = str_replace([
|
||||
'body {background-color: #fff;'
|
||||
], [
|
||||
'body {'
|
||||
], $phpinfo);
|
||||
|
||||
return $this->renderView("lean-console/page/debugging/phpinfo", get_defined_vars());
|
||||
}
|
||||
}
|
||||
@@ -2,20 +2,15 @@
|
||||
|
||||
namespace Lean\Console\Controller;
|
||||
|
||||
use League\Route\Router;
|
||||
|
||||
use Picea\Ui\Method\FormHandler;
|
||||
use Psr\Http\Message\{ ResponseInterface, ServerRequestInterface };
|
||||
|
||||
use Notes\Tell\Attribute\Language, Notes\Route\Attribute\Method\Route;
|
||||
use Notes\Route\Attribute\Method\Route;
|
||||
|
||||
use \Lean\Console\Lib,
|
||||
\Lean\Console\Form;
|
||||
use Lean\Console\Lib,
|
||||
Lean\Console\Form;
|
||||
|
||||
use Picea\Extension\UrlExtension;
|
||||
|
||||
use Ulmus\Annotation\Classes\Table,
|
||||
Ulmus\Container\AdapterProxy;
|
||||
use Ulmus\Container\AdapterProxy;
|
||||
|
||||
class Storage extends Console {
|
||||
use Lib\ConsoleControllerTrait;
|
||||
@@ -69,15 +64,7 @@ class Storage extends Console {
|
||||
#[Route(route: "/storage/session/content/{hash}", name: "lean.console:storage.session_content")] # migrated from: "/storage/session/content/{hash}", "name" => "lean.console:storage.session_content"
|
||||
public function sessionContent(ServerRequestInterface $request, array $arguments) : ResponseInterface
|
||||
{
|
||||
$sess = session_encode();
|
||||
|
||||
session_decode(file_get_contents($this->sessionPath() . $arguments['hash']));
|
||||
|
||||
$data = array_combine(array_keys($_SESSION), array_values($_SESSION));
|
||||
|
||||
session_decode($sess);
|
||||
|
||||
return $this->renderJson($data);
|
||||
return $this->renderText(file_get_contents($this->sessionPath() . $arguments['hash']) ?: "-");
|
||||
}
|
||||
|
||||
protected function sessionPath() : string
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace Lean\Console\Controller;
|
||||
|
||||
use DI\Attribute\Inject;
|
||||
use Psr\Http\Message\{ ResponseInterface, ServerRequestInterface };
|
||||
|
||||
use Notes\Route\Attribute\Method\Route;
|
||||
|
||||
use Lean\Console\{ Lib, Form };
|
||||
|
||||
class Testing extends Console {
|
||||
use Lib\ConsoleControllerTrait;
|
||||
|
||||
#[Inject]
|
||||
protected Lib\Testing\TestFetcher $testFetcher;
|
||||
|
||||
#[Route(route: "/testing/tests", name: "lean.console:testing.tests", method: [ 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTION', 'HEAD' ])]
|
||||
public function tests(ServerRequestInterface $request, array $arguments) : ResponseInterface
|
||||
{
|
||||
$context = new Form\Testing\TestContext($request, "tests.run");
|
||||
|
||||
$this->form(new Form\Testing\Test($this->container, $this->testFetcher), $context);
|
||||
|
||||
if ($context->formExecuted) {
|
||||
return $context->formExecutionStatus;
|
||||
}
|
||||
|
||||
return $this->renderView("lean-console/page/testing/tests", get_defined_vars());
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Lean\Console\Entity\Mysql;
|
||||
namespace Lean\Console\Entity\Sqlite;
|
||||
|
||||
use Ulmus\Common\EntityField;
|
||||
use Ulmus\Entity\Field\Datetime,
|
||||
@@ -11,7 +11,7 @@ use Ulmus\Migration\FieldDefinition;
|
||||
use Ulmus\Attribute\Obj\Table;
|
||||
|
||||
#[Table(name: "columns", database: "information_schema")]
|
||||
class Column extends Sqlite
|
||||
class Column extends Sqlite\Column
|
||||
{
|
||||
public function differsFromFieldDefinition(FieldDefinition $definition) : bool
|
||||
{
|
||||
|
||||
@@ -45,7 +45,7 @@ class Picea implements FormInterface
|
||||
return $context->valid();
|
||||
}
|
||||
|
||||
public function execute(FormContextInterface $context) : void
|
||||
public function execute(FormContextInterface $context) : mixed
|
||||
{
|
||||
$deleted = $failed = 0;
|
||||
|
||||
@@ -57,6 +57,7 @@ class Picea implements FormInterface
|
||||
}
|
||||
|
||||
if ($deleted) {
|
||||
return true;
|
||||
# $context->pushMessage();
|
||||
}
|
||||
|
||||
|
||||
@@ -23,8 +23,6 @@ class GenerateEntity implements FormInterface
|
||||
|
||||
public function validate(FormContextInterface $context) : bool
|
||||
{
|
||||
|
||||
|
||||
return $context->valid();
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ use \Lean\Console\Lib;
|
||||
|
||||
use Picea\Compiler\Context;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Ulmus\Attribute\Property\Field\Migration;
|
||||
use Ulmus\Common\EntityResolver;
|
||||
use \Ulmus\Entity\InformationSchema\Table;
|
||||
use Ulmus\Ulmus;
|
||||
@@ -48,6 +49,11 @@ class Migrate implements FormInterface
|
||||
$this->definition[$entity]['columns'] = new Lib\Database\DefinitionCollection();
|
||||
|
||||
foreach($table->fieldList(EntityResolver::KEY_COLUMN_NAME, true) as $field => $definition) {
|
||||
if ($migration = $definition->getAttribute(Migration::class)) {
|
||||
if ($migration->object->skipField) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset($definition->value) ) {
|
||||
$definition->value = $entity::repository()->adapter->adapter()->writableValue($definition->value);
|
||||
@@ -131,22 +137,27 @@ class Migrate implements FormInterface
|
||||
|
||||
$alter = $context->alterAll ? explode(',', $context->alterAll) : [ $context->alter ];
|
||||
|
||||
foreach(array_filter($alter) as $entity) {
|
||||
try {
|
||||
foreach (array_filter($alter) as $entity) {
|
||||
if ($this->definition[$entity]['table']->modifier->type === Lib\Database\ModifierTypeEnum::Alter) {
|
||||
$adapter = $entity::resolveEntity()->sqlAdapter()->adapter();
|
||||
|
||||
$def = $this->definition[$entity]['columns']->filterAlter();
|
||||
|
||||
if ( $adapter->splitAlterQuery() ) {
|
||||
$def->walk(fn(Lib\Database\Definition $definition) =>
|
||||
$entity::repository()->alterTable([ $definition->toArray() ])
|
||||
if ($adapter->splitAlterQuery()) {
|
||||
$def->walk(fn(Lib\Database\Definition $definition) => $entity::repository()->alterTable([$definition->toArray()])
|
||||
);
|
||||
}
|
||||
else {
|
||||
$entity::repository()->alterTable($def->map( fn(Lib\Database\Definition $e) => $e->toArray() ));
|
||||
} else {
|
||||
$entity::repository()->alterTable($def->map(fn(Lib\Database\Definition $e) => $e->toArray()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(\Throwable $t) {
|
||||
$context->pushMessage(
|
||||
Lib\Message::generateError($t->getMessage())
|
||||
);
|
||||
}
|
||||
|
||||
$this->initialize($context);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
namespace Lean\Console\Form\Testing;
|
||||
|
||||
use Picea\Ui\Method\{ FormInterface, FormContextInterface };
|
||||
|
||||
use Lean\Console\{Attribute\TestParameter, Lib, Entity};
|
||||
|
||||
use Ulmus\{ EntityCollection };
|
||||
use Psr\Container\ContainerInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
class Test implements FormInterface
|
||||
{
|
||||
protected Lib\Testing\TestPreprocessorInterface $waitFor;
|
||||
|
||||
protected Lib\Testing\TestFetcherItem $definition;
|
||||
|
||||
public function __construct(
|
||||
protected ContainerInterface $container,
|
||||
protected Lib\Testing\TestFetcher $testFetcher,
|
||||
) {}
|
||||
|
||||
public function initialize(FormContextInterface $context) : void
|
||||
{
|
||||
if ($context->class ?? false) {
|
||||
$this->definition = $this->testFetcher->compile()[$context->class];
|
||||
}
|
||||
}
|
||||
|
||||
public function validate(FormContextInterface $context) : bool
|
||||
{
|
||||
if (isset($this->definition->attribute) && $this->definition->attribute->waitFor) {
|
||||
$this->waitFor = new $this->definition->attribute->waitFor();
|
||||
}
|
||||
|
||||
return $context->valid();
|
||||
}
|
||||
|
||||
public function execute(FormContextInterface $context) : mixed
|
||||
{
|
||||
if (isset($this->waitFor)) {
|
||||
$this->waitFor->run();
|
||||
}
|
||||
|
||||
$controller = $this->container->get($context->class);
|
||||
|
||||
$test = $this->definition->methods->filtersOne(fn($e) => $e->attribute->name === $context->name);
|
||||
|
||||
$request = $context->getRequest()
|
||||
->withMethod($context->method)
|
||||
->withAttribute('arguments', $test->attribute->arguments)
|
||||
->withQueryParams($test->attribute->withQueryParams)
|
||||
->withParsedBody($test->attribute->withParsedBody);
|
||||
|
||||
$arguments = []; # @todo
|
||||
|
||||
$result = $controller->{$test->name}($request, $arguments);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function attributeCollection(array $collection) : EntityCollection
|
||||
{
|
||||
$collection = new EntityCollection(...$collection);
|
||||
$collection->entityClass = static::class;
|
||||
|
||||
return $collection;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Lean\Console\Form\Testing;
|
||||
|
||||
use \Lean\Console\{ Lib, Entity };
|
||||
|
||||
class TestContext extends Lib\FormContext
|
||||
{
|
||||
public string $class;
|
||||
|
||||
public string $name;
|
||||
|
||||
public string $method;
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Lean\Console\Lib;
|
||||
|
||||
use Picea\Ui\Method\FormMessage;
|
||||
|
||||
class Message implements FormMessage {
|
||||
|
||||
const MESSAGE_TYPE = [
|
||||
'success' => [
|
||||
'class' => 'success',
|
||||
'header' => 'Succès !',
|
||||
'message' => ''
|
||||
],
|
||||
|
||||
'error' => [
|
||||
'class' => 'danger',
|
||||
'header' => 'Error !',
|
||||
'message' => ''
|
||||
],
|
||||
|
||||
'warning' => [
|
||||
'class' => 'warning',
|
||||
'header' => 'Attention !',
|
||||
'message' => ''
|
||||
],
|
||||
];
|
||||
|
||||
public string $type;
|
||||
|
||||
public string $message;
|
||||
|
||||
public string $class;
|
||||
|
||||
public ? string $header = null;
|
||||
|
||||
public function __construct(string $message, string $type = "error", ? string $header = null, ? string $class = null)
|
||||
{
|
||||
$this->message = $message;
|
||||
|
||||
$this->type = $type;
|
||||
|
||||
if ( $header !== null ) {
|
||||
$this->header = $header;
|
||||
}
|
||||
else {
|
||||
$this->header = static::MESSAGE_TYPE[$type]['header'];
|
||||
}
|
||||
|
||||
if ( $class !== null ) {
|
||||
$this->class = $class;
|
||||
}
|
||||
else {
|
||||
$this->class = static::MESSAGE_TYPE[$type]['class'];
|
||||
}
|
||||
}
|
||||
|
||||
public function render() : string
|
||||
{
|
||||
return <<<HTML
|
||||
<article class="message type-{$this->class}" role="alert">
|
||||
<div class="message-body">
|
||||
<strong class="message-header">{$this->header}</strong>
|
||||
<span class="message-content">{$this->message}</span>
|
||||
</div>
|
||||
</article>
|
||||
HTML;
|
||||
}
|
||||
|
||||
public function renderJson() : array
|
||||
{
|
||||
return [
|
||||
'name' => 'show-notification',
|
||||
'type' => [
|
||||
'error' => 'danger',
|
||||
'success' => 'success',
|
||||
'warning' => 'warning',
|
||||
][$this->type],
|
||||
'shake' => '.wrapper',
|
||||
'message' => $this->message,
|
||||
];
|
||||
}
|
||||
|
||||
public function isError() : bool
|
||||
{
|
||||
return $this->type === "error";
|
||||
}
|
||||
|
||||
public static function generateSuccess(string $message, ? string $header = null, ? string $class = null) : self
|
||||
{
|
||||
return new static($message, 'success', $header, $class);
|
||||
}
|
||||
|
||||
public static function generateError(string $message, ? string $header = null, ? string $class = null) : self
|
||||
{
|
||||
return new static($message, 'error', $header, $class);
|
||||
}
|
||||
|
||||
public static function generateWarning(string $message, ? string $header = null, ? string $class = null) : self
|
||||
{
|
||||
return new static($message, 'warning', $header, $class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
<?php namespace Lean\Console\Lib\Testing;
|
||||
|
||||
use Kash\HandleCacheTrait;
|
||||
use Lean\Api\Entity\ArrayCollection;
|
||||
use Lean\Console\Attribute;
|
||||
use Notes\ObjectResolver;
|
||||
|
||||
use Psr\SimpleCache\CacheInterface;
|
||||
use RuntimeException, DirectoryIterator, Generator;
|
||||
|
||||
class TestFetcher {
|
||||
use HandleCacheTrait;
|
||||
|
||||
protected array $folderList;
|
||||
|
||||
protected array $annotations;
|
||||
|
||||
public function __construct( ?array $folderList = null, ?array $annotations = null, ? CacheInterface $cache = null)
|
||||
{
|
||||
$this->cache = $cache;
|
||||
|
||||
if ($folderList !== null) {
|
||||
$this->folderList = $folderList;
|
||||
}
|
||||
|
||||
if ($annotations !== null) {
|
||||
$this->annotations = $annotations;
|
||||
}
|
||||
else {
|
||||
$this->annotations = [
|
||||
'object' => [ Attribute\TestParameter::class ],
|
||||
'method' => [ Attribute\Test::class ],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
public function addFolder($folder) : void
|
||||
{
|
||||
$this->folderList[] = $folder;
|
||||
}
|
||||
|
||||
public function setFolderList(array $list) : void
|
||||
{
|
||||
$this->folderList = $list;
|
||||
}
|
||||
|
||||
public function getNodeList() : array
|
||||
{
|
||||
$list = [];
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
||||
public function compile() : array
|
||||
{
|
||||
return $this->handleCaching(substr(md5(serialize($this->annotations)), 0, 7), function() : array {
|
||||
foreach($this->scan() as $namespace => $file) {
|
||||
if ($file->getExtension() !== "php") {
|
||||
continue;
|
||||
}
|
||||
|
||||
$class = $this->generateClassname($file->getBasename(".php"), $namespace);
|
||||
$objectResolver = new ObjectResolver($class, $this->cache);
|
||||
|
||||
$testParam = $objectResolver->reflectedClass->getClassAttributeListFromClassname($this->annotations['object'], true, false)[0] ?? false;
|
||||
|
||||
if ($testParam) {
|
||||
$entity = new TestFetcherItem();
|
||||
|
||||
$entity->attribute = $testParam;
|
||||
$entity->methods = ArrayCollection::instance();
|
||||
|
||||
/* $list[$class] = [
|
||||
'attribute' => $testParam,
|
||||
'methods' => [],
|
||||
];
|
||||
*/
|
||||
foreach ($objectResolver->reflectedClass->getMethodAttributeListFromClassname($this->annotations['method'], false, false) as $method => $controllers) {
|
||||
foreach ($controllers as $test) {
|
||||
/*$list[$class]['methods'][] = [
|
||||
'name' => $method,
|
||||
'attribute' => $test
|
||||
] ;*/
|
||||
$entity->methods->push(new TestFetcherMethod(
|
||||
name: $method,
|
||||
attribute: $test
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
$list[$class] = $entity;
|
||||
}
|
||||
}
|
||||
|
||||
return $list ?? [];
|
||||
});
|
||||
}
|
||||
|
||||
private function scan(? array $folders = null) : Generator
|
||||
{
|
||||
foreach($folders ?: $this->folderList as $namespace => $folder) {
|
||||
if ( ! file_exists($folder) ) {
|
||||
throw new RuntimeException(sprintf("Folder `%s` can not be found or scanned", $folder));
|
||||
}
|
||||
|
||||
foreach (new DirectoryIterator($folder) as $fileinfo) {
|
||||
if ( ! $fileinfo->isDot() ) {
|
||||
if ( $fileinfo->isDir() ) {
|
||||
foreach($this->scan([ "{$namespace}\\" . $fileinfo->getBasename() => $fileinfo->getPathname() ]) as $ns2 => $fi2) {
|
||||
yield $ns2 => $fi2;
|
||||
}
|
||||
}
|
||||
else {
|
||||
yield $namespace => $fileinfo;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function generateClassname($file, $namespace)
|
||||
{
|
||||
return "\\$namespace\\$file";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Lean\Console\Lib\Testing;
|
||||
|
||||
use Lean\Api\Entity\ArrayCollection;
|
||||
use Ulmus\Attribute\Property\ArrayOf;
|
||||
use Ulmus\Attribute\Property\Field;
|
||||
|
||||
class TestFetcherItem
|
||||
{
|
||||
#[Field]
|
||||
public \Lean\Console\Attribute\TestParameter $attribute;
|
||||
|
||||
#[Field, ArrayOf(TestFetcherMethod::class)]
|
||||
public ArrayCollection $methods;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Lean\Console\Lib\Testing;
|
||||
|
||||
use Picea\Ui\Method\Context\FormContextCastableInterface;
|
||||
use Ulmus\Attribute\Property\Field;
|
||||
use Ulmus\Entity\JsonUnserializable;
|
||||
|
||||
|
||||
class TestFetcherMethod
|
||||
{
|
||||
public function __construct(
|
||||
public string $name,
|
||||
public \Lean\Console\Attribute\Test $attribute,
|
||||
) {}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Lean\Console\Lib\Testing;
|
||||
|
||||
use Lean\Console\Attribute\Test;
|
||||
|
||||
class TestNode
|
||||
{
|
||||
public function __construct(
|
||||
public Test $attribute,
|
||||
public array/*<TestNode>*/ $children = [],
|
||||
) {}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Lean\Console\Lib\Testing;
|
||||
|
||||
interface TestPreprocessorInterface
|
||||
{
|
||||
public function run() : void;
|
||||
}
|
||||
@@ -1,40 +1,62 @@
|
||||
<nav id="main-nav">
|
||||
<div class="app-title">LEAN {{ $this->version() }}</div>
|
||||
{% use Psr\Http\Message\ServerRequestInterface %}
|
||||
|
||||
<label>{% lang "lean.nav.lean.label" %}</label>
|
||||
{% function.inline navItem(ServerRequestInterface $request, string $route, string $lang) %}
|
||||
<li class="{% if $request->getAttribute('lean.route')->match($route) %}active{% endif %}">
|
||||
<a href="{% route $route %}">{% lang $lang %}</a>
|
||||
</li>
|
||||
{% endfunction %}
|
||||
|
||||
<div id="main-nav">
|
||||
<nav>
|
||||
<div class="app-title" style="">
|
||||
<div style="width:30px; height:30px; border-radius:50%; background:#7c3aed; display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700; font-size:14px;">L</div>
|
||||
<div>LEAN {{ $this->version() }}</div>
|
||||
</div>
|
||||
|
||||
<label>{% lang "lean.nav.core.label" %}</label>
|
||||
<ul>
|
||||
<li><a href="{% route 'lean.console:home' %}">{% lang "lean.nav.lean.dashboard" %}</a></li>
|
||||
<li><a href="{% route 'lean.console:update' %}">{% lang "lean.nav.lean.update" %}</a></li>
|
||||
{{= $navItem($request, 'lean.console:home', "lean.nav.core.dashboard") }}
|
||||
{{= $navItem($request, 'lean.console:update', "lean.nav.core.update") }}
|
||||
|
||||
</ul>
|
||||
|
||||
<label>{% lang "lean.nav.request.label" %}</label>
|
||||
<ul>
|
||||
<li><a href="{% route 'lean.console:request.route' %}">{% lang "lean.nav.request.routes" %}</a></li>
|
||||
{{= $navItem($request, 'lean.console:request.route', "lean.nav.request.routes") }}
|
||||
</ul>
|
||||
|
||||
<label>{% lang "lean.nav.storage.label" %}</label>
|
||||
<ul>
|
||||
{#<li><a href="{{ url('~/storage') }}">{% lang "lean.nav.storage.summary" %}</a></li>#}
|
||||
<li><a href="{% route 'lean.console:storage.database' %}">{% lang "lean.nav.storage.database" %}</a></li>
|
||||
<li><a href="{% route 'lean.console:storage.session' %}">{% lang "lean.nav.storage.session" %}</a></li>
|
||||
{{= $navItem($request, 'lean.console:storage.database', "lean.nav.storage.database") }}
|
||||
{{= $navItem($request, 'lean.console:storage.session', "lean.nav.storage.session") }}
|
||||
</ul>
|
||||
|
||||
<label>{% lang "lean.nav.templating.label" %}</label>
|
||||
<ul>
|
||||
<li><a href="{% route 'lean.console:templating.picea' %}">{% lang "lean.nav.templating.picea" %}</a></li>
|
||||
{{= $navItem($request, 'lean.console:templating.picea', "lean.nav.templating.picea") }}
|
||||
</ul>
|
||||
|
||||
<label>{% lang "lean.nav.caching.label" %}</label>
|
||||
<ul>
|
||||
<li><a href="{% route 'lean.console:caching' %}">{% lang "lean.nav.templating.picea" %}</a></li>
|
||||
{{= $navItem($request, 'lean.console:caching', "lean.nav.templating.picea") }}
|
||||
</ul>
|
||||
|
||||
<label>{% lang "lean.nav.testing.label" %}</label>
|
||||
<ul>
|
||||
{{= $navItem($request, 'lean.console:testing.tests', "lean.nav.testing.tests") }}
|
||||
</ul>
|
||||
|
||||
<label>{% lang "lean.nav.debugging.label" %}</label>
|
||||
<ul>
|
||||
<li><a href="{% route 'lean.console:debugging-logs' %}">{% lang "lean.nav.debugging.logs" %}</a></li>
|
||||
{{= $navItem($request, 'lean.console:debugging-logs', "lean.nav.debugging.logs") }}
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="{% route 'lean.console:debugging-phpinfo' %}">{% lang "lean.nav.debugging.phpinfo" %}</a></li>
|
||||
{{= $navItem($request, 'lean.console:debugging-phpinfo', "lean.nav.debugging.phpinfo") }}
|
||||
</ul>
|
||||
</nav>
|
||||
<hr>
|
||||
</nav>
|
||||
|
||||
<div class="button">
|
||||
<a class="btn-purple" href="{% url %}">⇠ Exit Console</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -8,9 +8,13 @@
|
||||
<meta name="author" content="Dave Mc Nicoll">
|
||||
<meta name="msapplication-TileColor" content="#ccc">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<link rel="icon" href="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3E%3Ctext%20x='0'%20y='14'%3E🔳%3C/text%3E%3C/svg%3E" type="image/svg+xml" />
|
||||
<link rel="icon" type="image/png" href="{% asset:path 'lean-console/favicon/favicon-96x96.png' %}" sizes="96x96" />
|
||||
<link rel="icon" type="image/svg+xml" href="{% asset:path 'lean-console/favicon/favicon.svg' %}" />
|
||||
<link rel="shortcut icon" href="{% asset:path 'lean-console/favicon/favicon.ico' %}" />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{% asset:path 'lean-console/favicon/apple-touch-icon.png' %}" />
|
||||
<meta name="apple-mobile-web-app-title" content="Lean Console" />
|
||||
<link rel="stylesheet" href='{% asset:path "lean-console/lean-console-bw.css" %}'>
|
||||
<script type="module" src="{% asset 'static/lean-console/app.js' %}"></script>
|
||||
|
||||
<title>{{ title() }}</title>
|
||||
|
||||
@@ -25,24 +29,24 @@
|
||||
|
||||
<div id="right-panel">
|
||||
<header id="body-header">
|
||||
{% section "header" %}
|
||||
<div class="flex align-items-center justify-content-end">
|
||||
<a class="btn-blue" href="{% url %}">⇠ Return</a>
|
||||
</div>
|
||||
{% endsection %}
|
||||
{% section "header" %}{% endsection %}
|
||||
</header>
|
||||
|
||||
<div id="subheader">
|
||||
<h1>{% section "subheader" %}{% _ "page-title" %}{% endsection %}</h1>
|
||||
{% section "breadcrumb" %}
|
||||
<ul class="breadcrumb">
|
||||
<li class="breadcrumb-item">Console</li>
|
||||
{% section "breadcrumb-items" %}{% endsection %}
|
||||
</ul>
|
||||
{% endsection %}
|
||||
<h1>{% section "subheader" %}{% _ "page-title" %}{% endsection %}</h1>
|
||||
</div>
|
||||
|
||||
<section id="main-content">
|
||||
{% section "message" %}
|
||||
{% view "lean/widget/message" %}
|
||||
{% endsection %}
|
||||
|
||||
{% section "content" %}{% endsection %}
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -9,42 +9,64 @@
|
||||
{% endsection %}
|
||||
|
||||
{% section "content" %}
|
||||
{% foreach $list as $path => $folder %}
|
||||
<section>
|
||||
<section class="picea">
|
||||
<header>
|
||||
<h2>{{ $path }}</h2>
|
||||
<div class="flex align-items-center">
|
||||
<div class="icon-picea icon-purple">
|
||||
{% include "lean-console/svg/icon-picea.svg" %}
|
||||
</div>
|
||||
|
||||
<h2>{% _ "header" %}</h2>
|
||||
</div>
|
||||
|
||||
{% ui:form.post "caching.picea" %}
|
||||
<button class="btn-red" type="submit">{% _ 'clear' %}</button>
|
||||
{% ui:endform %}
|
||||
</header>
|
||||
|
||||
<article class="picea">
|
||||
<article class="has-table">
|
||||
<strong class="grid grid-nogutter sticky">
|
||||
<div class="col-4 name">{% _ "table.name" %}</div>
|
||||
|
||||
<div class="col-2 namespace">
|
||||
{% _ "table.namespace" %}
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
{% _ "table.view" %}
|
||||
</div>
|
||||
</strong>
|
||||
|
||||
{% foreach $list as $path => $folder %}
|
||||
<div class="path">{{ $path }}</div>
|
||||
|
||||
{% foreach $folder as $file %}
|
||||
{% php $import = include($file) %}
|
||||
|
||||
<div class="grid">
|
||||
<strong class="col route-name">{{ substr($file, strlen($path)) }}</strong>
|
||||
<div class="grid grid-nogutter content">
|
||||
<div class="col-4 name">{{ substr((string) $file, strlen($path)) }}</div>
|
||||
|
||||
<div class="col">
|
||||
<div class="col-2 namespace">
|
||||
{{ $import['namespace'] }}
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<div class="col-6 view-path">
|
||||
{{ $import['view'] }}
|
||||
</div>
|
||||
</div>
|
||||
{% endforeach %}
|
||||
{% endforeach %}
|
||||
</article>
|
||||
</section>
|
||||
{% endforeach %}
|
||||
|
||||
<style>
|
||||
section > header {display:flex;justify-content: space-between}
|
||||
.picea h5 {font-size:1.5em; line-height:2em; font-weight:bold;text-decoration:underline}
|
||||
.picea strong.grid {background: #242528;color: #fff;}
|
||||
.picea strong.grid {background: #8b93a4;color: #fff;}
|
||||
.picea .grid {padding:0.66rem 0.3rem;align-items:center}
|
||||
.picea .grid strong {color:#444}
|
||||
.picea .grid:nth-child(even) {background: #e3e3e3 }
|
||||
.picea .path {background: #eee;font-weight: bold;line-height: 1.8rem;padding: 0 8px;color: #797979;border-top: 1px solid #ccc;border-bottom: 1px solid #ccc;}
|
||||
.picea .content .name {color:#7c3aed;font-weight:600}
|
||||
.picea .content .view-path {font-size:90%;color:#666}
|
||||
.picea .grid:nth-child(even) {background: #fafafa }
|
||||
</style>
|
||||
{% endsection %}
|
||||
@@ -7,7 +7,12 @@
|
||||
{% section "content" %}
|
||||
<section>
|
||||
<header>
|
||||
<div class="flex align-items-center">
|
||||
<div class="icon-logs icon-purple">
|
||||
{% include "lean-console/svg/icon-logs.svg" %}
|
||||
</div>
|
||||
<h2>{{ $path }}</h2>
|
||||
</div>
|
||||
|
||||
{% ui:form.get current_url() %}
|
||||
<small>{% _ 'logs.line' %} {% ui:text 'line', get('line') ?? 100, [ 'onchange' => "this.closest('form').submit()" ] %}</small>
|
||||
|
||||
@@ -9,28 +9,36 @@
|
||||
{% endsection %}
|
||||
|
||||
{% function routeHtml($route) %}
|
||||
<div class="grid">
|
||||
<strong class="col-2 route-name">{{ $route->name }}</strong>
|
||||
<div class="grid grid-nogutter content">
|
||||
<strong class="col-3 route-name">{{ $route->name }}</strong>
|
||||
<div class="col-3 route-uri">{{ $route->getRoute() }}</div>
|
||||
<div class="col-2 route-methods">{{ implode(', ', (array) ( $route->method ?? $route->methods )) }}</div>
|
||||
<div class="col-1 route-methods">
|
||||
{% foreach (array) $route->method as $method %}
|
||||
<span class="http-method-{% echo.lc $method %}">{{ $method }}</span>
|
||||
{% endforeach %}
|
||||
</div>
|
||||
<div class="col controller-method">
|
||||
<span class="class">{{ $route->class }}</span>::<span>{{ $route->classMethod }}</span>
|
||||
<span class="class">{{ ltrim($route->class, '\\') }}</span>::<span>{{ $route->classMethod }}</span>
|
||||
</div>
|
||||
</div>
|
||||
{% endfunction %}
|
||||
|
||||
{% section "content" %}
|
||||
<section>
|
||||
<section class="routes">
|
||||
<header>
|
||||
<div class="icon-routes icon-purple">
|
||||
{% include "lean-console/svg/icon-route.svg" %}
|
||||
</div>
|
||||
|
||||
<h2>{% _ 'route.header' %}</h2>
|
||||
</header>
|
||||
|
||||
<article class="routes">
|
||||
<article class="has-table">
|
||||
{% if $routes %}
|
||||
<strong class="grid">
|
||||
<div class="col-2 route-name">{% _ 'route.name' %}</div>
|
||||
<strong class="grid grid-nogutter">
|
||||
<div class="col-3 route-name">{% _ 'route.name' %}</div>
|
||||
<div class="col-3 route-uri">{% _ 'route.uri' %}</div>
|
||||
<div class="col-2 route-methods">{% _ 'route.methods' %}</div>
|
||||
<div class="col-1 route-methods">{% _ 'route.methods' %}</div>
|
||||
<div class="col controller-method">{% _ 'route.target' %}</div>
|
||||
</strong>
|
||||
|
||||
@@ -52,9 +60,13 @@
|
||||
</section>
|
||||
|
||||
<style>
|
||||
.routes strong.grid {background: #242528;color: #fff;}
|
||||
[class*="http-method-"]:not(:last-child):after {content: ",";color: #5e5e5e}
|
||||
.routes strong.grid {background: #8b93a4;color: #fff;}
|
||||
.routes .content .route-name {color:#7c3aed}
|
||||
.routes .content .route-methods {font-weight:normal}
|
||||
.routes .content .controller-method {color:#777;font-size:90%}
|
||||
.routes .content .route-uri {font-size:90%}
|
||||
.routes .grid {padding:0.66rem 0.3rem}
|
||||
.routes .grid strong {color:#444}
|
||||
.routes .grid:nth-child(even) {background: #e3e3e3 }
|
||||
.routes .grid:nth-child(even) {background: #fafafa}
|
||||
</style>
|
||||
{% endsection %}
|
||||
@@ -12,111 +12,88 @@
|
||||
|
||||
{% section "content" %}
|
||||
{% if $connections %}
|
||||
{% foreach $connections as $connection %}
|
||||
<section>
|
||||
{% php $conf = $connection->getConfiguration(); %}
|
||||
<article class="databases">
|
||||
<strong class="grid db-grid">
|
||||
<div class="col db-connection">{% _ 'database.connection' %}</div>
|
||||
<div class="col db-adapter">{% _ 'database.adapter' %}</div>
|
||||
<div class="col db-host">{% _ 'database.host' %}</div>
|
||||
<div class="col db-name">{% _ 'database.name' %}</div>
|
||||
<div class="col db-username">{% _ 'database.username' %}</div>
|
||||
</strong>
|
||||
|
||||
<div class="grid db-grid">
|
||||
<div class="col db-connection">{{ $connection->name }}</div>
|
||||
<div class="col db-adapter">{{ $connection->adapter()::class }}</div>
|
||||
<div class="col db-host">{{ $connection->adapter()->hostname ?? '-' }}:{{ $connection->adapter()->port ?? '-' }}</div>
|
||||
<div class="col db-name">{{ $connection->adapter()->database ?? $connection->adapter()->path ?? '-' }}</div>
|
||||
<div class="col db-username">{{ $connection->adapter()->username ?? '-' }}</div>
|
||||
</div>
|
||||
|
||||
<div class="tables">
|
||||
<strong class="grid table-item">
|
||||
<div class="col col-4">{% _ 'database.table.name' %}</div>
|
||||
<div class="col col-2 text-center">{% _ 'database.table.table-fields' %}</div>
|
||||
<div class="col col-3 text-center">{% _ 'database.table.query' %}</div>
|
||||
<div class="col col-2 text-center">{% _ 'database.table.count' %}</div>
|
||||
<div class="col col-1 text-center">{% _ 'database.table.actions' %}</div>
|
||||
</strong>
|
||||
|
||||
{% ui:form.post "database.migrate", current_url() %}
|
||||
{% foreach $connections as $connection %}
|
||||
{% php $conf = $connection->getConfiguration(); %}
|
||||
|
||||
<section class="connection">
|
||||
<header>
|
||||
<div class="icon-database icon-purple">
|
||||
{% include "lean-console/svg/icon-database.svg" %}
|
||||
</div>
|
||||
|
||||
<h2>{% _.raw 'database.connection', [ 'name' => $connection->name ] %}</h2>
|
||||
</header>
|
||||
|
||||
<article>
|
||||
{% foreach array_filter($migrations->entities, fn($e) => $e->databaseAdapter() === $connection) as $entity => $item %}
|
||||
<div class="grid table-item align-items-center">
|
||||
<div class="col col-4"><span>📄</span> <span>{{ $item->tableName() }}</span></div>
|
||||
<div class="col col-2 text-center">{% _ "database.table.fields", [ 'count' => count( $item->fieldList() ) ] %}</div>
|
||||
<div class="col col-3 text-center">
|
||||
{% if $context->definition[$entity]['table']->modifier->query ?? false %}
|
||||
<code>{{= implode('<br><br>',(array) $context->definition[$entity]['table']->modifier->query) }}</code>
|
||||
{% else %}
|
||||
<div style="color:#abecab">✓ {% _ 'database.table.uptodate' %}</div>
|
||||
{% if empty($context->definition[$entity]) %}
|
||||
{% continue %}
|
||||
{% endif %}
|
||||
|
||||
<div class="single-table grid">
|
||||
<div class="col-5 col-xxl flex align-items-center">
|
||||
<div class="icon-yellow">
|
||||
{% include "lean-console/svg/icon-table.svg" %}
|
||||
</div>
|
||||
|
||||
<div class="col col-2 text-center">
|
||||
<div>
|
||||
<div class="tablename">{{ $item->tableName() }}</div>
|
||||
<div class="classname">{{ $entity }}</div>
|
||||
<div class="tableinfo">
|
||||
<span class="fieldcount">{% _ "database.table.fields", [ 'count' => count( $item->fieldList() ) ] %}</span>
|
||||
|
||||
{% if $context->definition[$entity]['table']->modifier->type !== ModifierTypeEnum::Create %}
|
||||
{{ $entity::repository()->count() }}
|
||||
<span class="entriescount">{% _.raw 'database.table.entries', [ 'count' => $entity::repository()->count() ] %}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-5 col-lg flex align-items-center">
|
||||
{% if $context->definition[$entity]['table']->modifier->query ?? false %}
|
||||
<code class="query">{{= implode('<br><br>',(array) $context->definition[$entity]['table']->modifier->query) }}</code>
|
||||
{% else %}
|
||||
<code class="uptodate">✓ {% _ 'database.table.uptodate' %}</code>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="col col-1 text-center">
|
||||
<div class="col-2 col-lg flex align-items-center">
|
||||
<div class="btn-wrapper">
|
||||
{% switch $context->definition[$entity]['table']->modifier->type ?? false %}
|
||||
{% case ModifierTypeEnum::Create %}
|
||||
{% php $createAll[] = $entity %}
|
||||
|
||||
<div class="text-right">
|
||||
<button name="create" value="{{$entity}}" class="btn-blue">✓ {% _ 'database.table.create' %}</button>
|
||||
</div>
|
||||
<button name="create" value="{{$entity}}" class="btn-red btn-sm">✓ {% _ 'database.table.create' %}</button>
|
||||
{% break %}
|
||||
|
||||
{% case ModifierTypeEnum::Alter %}
|
||||
{% php $alterAll[] = $entity %}
|
||||
|
||||
<div class="text-right">
|
||||
<button name="alter" value="{{$entity}}" class="btn-blue">✓ {% _ 'database.table.alter' %}</button>
|
||||
</div>
|
||||
<button name="alter" value="{{$entity}}" class="btn-blue btn-sm">✓ {% _ 'database.table.alter' %}</button>
|
||||
{% break %}
|
||||
|
||||
{% endswitch %}
|
||||
|
||||
<div class="text-right">
|
||||
<a href="{% route 'lean.console:storage.database_insert', [ 'source' => $entity ] %}" class="btn-gray">{% _ 'database.table.add-column' %}</a>
|
||||
<a href="{% route 'lean.console:storage.database_insert', [ 'source' => $entity ] %}" class="btn-purple btn-sm">{% _ 'database.table.add-column' %}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endforeach %}
|
||||
|
||||
{% if ($createAll ?? 0) > 1 %}
|
||||
<div class="text-right" style="padding:0.5rem 0">
|
||||
<button name="createAll" value="{{ implode(',', $createAll) }}" class="btn-red">✓ {% _ 'database.table.createAll' %}</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if ($alterAll ?? 0) > 1 %}
|
||||
<div class="text-right" style="padding:0.5rem 0">
|
||||
<button name="alterAll" value="{{ implode(',', $alterAll) }}" class="btn-red">✓ {% _ 'database.table.alterAll' %}</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% ui:endform %}
|
||||
</div>
|
||||
</article>
|
||||
</section>
|
||||
{% endforeach %}
|
||||
{% ui:endform %}
|
||||
{% endif %}
|
||||
|
||||
<style>
|
||||
.databases strong.grid {background: #888a91;color:#fff}
|
||||
|
||||
.databases .db-grid {padding:0.66rem 0.3rem}
|
||||
.databases .db-grid strong {color:#444}
|
||||
.databases .db-grid:nth-child(even) {background: #e3e3e3;line-height: 1.5em;font-size: 1.3em;}
|
||||
|
||||
.databases .tables .table-item {padding:0.33rem 0;background:rgba(255,255,255,0.1);line-height: 1.8em;}
|
||||
.databases .tables .table-item:nth-child(even) {background:rgba(255,255,255,0.2)}
|
||||
.databases summary {background: #172841;color:#fff;margin: 0 -8px 0 -8px;padding:7px 10px}
|
||||
|
||||
.tables {background: #2d3137;margin: 0 -8px 0 -8px;color: #fff;padding: 2px 10px;}
|
||||
.tables label {padding:10px 5px;display:block}
|
||||
section + section { margin-top:15px; }
|
||||
.connection .single-table {padding: 10px 5px 10px 5px;}
|
||||
.connection .single-table:nth-child(2n + 1) {background: #fafafa;}
|
||||
.connection .single-table + .single-table {border-top: 1px solid #eaeaea;}
|
||||
.connection + .connection { margin-top:25px ;}
|
||||
.connection .tablename {font-weight:bold;margin-bottom:5px;text-transform: uppercase}
|
||||
.connection .tableinfo {color: #9c9b9b;font-size:85%;margin-top:2px}
|
||||
.connection .classname {color: #601a7b; line-height:1.2rem}
|
||||
.connection .entriescount:before {content:"•"; padding-right: 8px; padding-left: 2px}
|
||||
.connection .query {color:#6f0463;white-space: pre;border-color:#c9a5c7}
|
||||
.connection .uptodate {color:#0a9178;border-color:#a0d2ca}
|
||||
.connection .btn-wrapper {display:flex; flex-direction:column; gap:5px; max-width:80%; margin-left:auto }
|
||||
</style>
|
||||
{% endsection %}
|
||||
@@ -0,0 +1,123 @@
|
||||
{% use Lean\Console\Lib\Database\ModifierTypeEnum %}
|
||||
|
||||
{% extends "lean-console/base/layout" %}
|
||||
|
||||
{% language.set "lean.storage" %}
|
||||
|
||||
{% title _("title") %}
|
||||
|
||||
{% section "breadcrumb-items" %}
|
||||
<li class="breadcrumb-item">{% _ 'database.breadcrumb' %}</li>
|
||||
{% endsection %}
|
||||
|
||||
{% section "content" %}
|
||||
{% if $connections %}
|
||||
{% foreach $connections as $connection %}
|
||||
<section>
|
||||
{% php $conf = $connection->getConfiguration(); %}
|
||||
|
||||
<article class="databases">
|
||||
<strong class="grid db-grid">
|
||||
<div class="col db-connection">{% _ 'database.connection' %}</div>
|
||||
<div class="col db-adapter">{% _ 'database.adapter' %}</div>
|
||||
<div class="col db-host">{% _ 'database.host' %}</div>
|
||||
<div class="col db-name">{% _ 'database.name' %}</div>
|
||||
<div class="col db-username">{% _ 'database.username' %}</div>
|
||||
</strong>
|
||||
|
||||
<div class="grid db-grid">
|
||||
<div class="col db-connection">{{ $connection->name }}</div>
|
||||
<div class="col db-adapter">{{ $connection->adapter()::class }}</div>
|
||||
<div class="col db-host">{{ $connection->adapter()->hostname ?? '-' }}:{{ $connection->adapter()->port ?? '-' }}</div>
|
||||
<div class="col db-name">{{ $connection->adapter()->database ?? $connection->adapter()->path ?? '-' }}</div>
|
||||
<div class="col db-username">{{ $connection->adapter()->username ?? '-' }}</div>
|
||||
</div>
|
||||
|
||||
<div class="tables">
|
||||
<strong class="grid table-item">
|
||||
<div class="col col-4">{% _ 'database.table.name' %}</div>
|
||||
<div class="col col-2 text-center">{% _ 'database.table.table-fields' %}</div>
|
||||
<div class="col col-3 text-center">{% _ 'database.table.query' %}</div>
|
||||
<div class="col col-2 text-center">{% _ 'database.table.count' %}</div>
|
||||
<div class="col col-1 text-center">{% _ 'database.table.actions' %}</div>
|
||||
</strong>
|
||||
|
||||
{% ui:form.post "database.migrate", current_url() %}
|
||||
{% foreach array_filter($migrations->entities, fn($e) => $e->databaseAdapter() === $connection) as $entity => $item %}
|
||||
<div class="grid table-item align-items-center">
|
||||
<div class="col col-4"><span>📄</span> <span>{{ $item->tableName() }}</span></div>
|
||||
<div class="col col-2 text-center">{% _ "database.table.fields", [ 'count' => count( $item->fieldList() ) ] %}</div>
|
||||
<div class="col col-3 text-center">
|
||||
{% if $context->definition[$entity]['table']->modifier->query ?? false %}
|
||||
<code>{{= implode('<br><br>',(array) $context->definition[$entity]['table']->modifier->query) }}</code>
|
||||
{% else %}
|
||||
<div style="color:#abecab">✓ {% _ 'database.table.uptodate' %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="col col-2 text-center">
|
||||
{% if $context->definition[$entity]['table']->modifier->type !== ModifierTypeEnum::Create %}
|
||||
{{ $entity::repository()->count() }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="col col-1 text-center">
|
||||
{% switch $context->definition[$entity]['table']->modifier->type ?? false %}
|
||||
{% case ModifierTypeEnum::Create %}
|
||||
{% php $createAll[] = $entity %}
|
||||
|
||||
<div class="text-right">
|
||||
<button name="create" value="{{$entity}}" class="btn-blue">✓ {% _ 'database.table.create' %}</button>
|
||||
</div>
|
||||
{% break %}
|
||||
|
||||
{% case ModifierTypeEnum::Alter %}
|
||||
{% php $alterAll[] = $entity %}
|
||||
|
||||
<div class="text-right">
|
||||
<button name="alter" value="{{$entity}}" class="btn-blue">✓ {% _ 'database.table.alter' %}</button>
|
||||
</div>
|
||||
{% break %}
|
||||
{% endswitch %}
|
||||
|
||||
<div class="text-right">
|
||||
<a href="{% route 'lean.console:storage.database_insert', [ 'source' => $entity ] %}" class="btn-gray">{% _ 'database.table.add-column' %}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endforeach %}
|
||||
|
||||
{% if ($createAll ?? 0) > 1 %}
|
||||
<div class="text-right" style="padding:0.5rem 0">
|
||||
<button name="createAll" value="{{ implode(',', $createAll) }}" class="btn-red">✓ {% _ 'database.table.createAll' %}</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if ($alterAll ?? 0) > 1 %}
|
||||
<div class="text-right" style="padding:0.5rem 0">
|
||||
<button name="alterAll" value="{{ implode(',', $alterAll) }}" class="btn-red">✓ {% _ 'database.table.alterAll' %}</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% ui:endform %}
|
||||
</div>
|
||||
</article>
|
||||
</section>
|
||||
{% endforeach %}
|
||||
{% endif %}
|
||||
|
||||
<style>
|
||||
.databases strong.grid {background: #888a91;color:#fff}
|
||||
|
||||
.databases .db-grid {padding:0.66rem 0.3rem}
|
||||
.databases .db-grid strong {color:#444}
|
||||
.databases .db-grid:nth-child(even) {background: #e3e3e3;line-height: 1.5em;font-size: 1.3em;}
|
||||
|
||||
.databases .tables .table-item {padding:0.33rem 0;background:rgba(255,255,255,0.1);line-height: 1.8em;}
|
||||
.databases .tables .table-item:nth-child(even) {background:rgba(255,255,255,0.2)}
|
||||
.databases summary {background: #172841;color:#fff;margin: 0 -8px 0 -8px;padding:7px 10px}
|
||||
|
||||
.tables {background: #2d3137;margin: 0 -8px 0 -8px;color: #fff;padding: 2px 10px;}
|
||||
.tables label {padding:10px 5px;display:block}
|
||||
section + section { margin-top:15px; }
|
||||
</style>
|
||||
{% endsection %}
|
||||
@@ -1,31 +1,36 @@
|
||||
{% extends "lean-console/base/layout" %}
|
||||
|
||||
{% language.set "lean.storage" %}
|
||||
{% language.set "lean.storage.session" %}
|
||||
|
||||
{% title _("title") %}
|
||||
|
||||
{% section "breadcrumb-items" %}
|
||||
<li class="breadcrumb-item">{% _ 'session.breadcrumb' %}</li>
|
||||
<li class="breadcrumb-item">{% _ 'breadcrumb' %}</li>
|
||||
{% endsection %}
|
||||
|
||||
{% section "content" %}
|
||||
<section>
|
||||
<section class="sessions">
|
||||
<header>
|
||||
<h2>{% _ 'session.header' %}</h2>
|
||||
<div class="icon-session icon-purple">
|
||||
{% include "lean-console/svg/icon-user.svg" %}
|
||||
</div>
|
||||
|
||||
<h2>{% _ 'header' %}</h2>
|
||||
</header>
|
||||
|
||||
<article class="sessions">
|
||||
<strong class="grid">
|
||||
<div class="col route-name">{% _ 'session.count', [ 'count' => count($sessions) ] %}</div>
|
||||
<article class="has-table">
|
||||
<strong class="grid grid-nogutter">
|
||||
<div class="col filename">{% _ 'count', [ 'count' => count($sessions) ] %}</div>
|
||||
</strong>
|
||||
|
||||
{% foreach $sessions as $session %}
|
||||
<div class="grid">
|
||||
<strong class="col route-name">{{ $session }}</strong>
|
||||
<div class="grid grid-nogutter content">
|
||||
<div class="col filename">{{ $session }}</div>
|
||||
<div class="col">{{ filesize(realpath($path . DIRECTORY_SEPARATOR . $session)) }} byte(s)</div>
|
||||
<div class="col">{{ date('Y-m-d H:i:s', filemtime(realpath($path . DIRECTORY_SEPARATOR . $session))) }}</div>
|
||||
<div class="col text-right">
|
||||
<a target="_blank" class="btn-red" href="{% route 'lean.console:storage.session_content', [ 'hash' => $session ] %}">
|
||||
Voir
|
||||
<a target="_blank" class="btn-purple btn-sm" href="{% route 'lean.console:storage.session_content', [ 'hash' => $session ] %}">
|
||||
{% _ "table.view" %}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -34,9 +39,10 @@
|
||||
</section>
|
||||
|
||||
<style>
|
||||
.sessions strong.grid {background: #242528;color: #fff;}
|
||||
.sessions strong.grid {background: #8b93a4;color: #fff;}
|
||||
.sessions .grid {padding:0.66rem 0.3rem;align-items:center;justify-content:space-between;}
|
||||
.sessions .grid strong {color:#444}
|
||||
.sessions .grid:nth-child(even) {background: #e3e3e3 }
|
||||
.sessions .content .filename {color:#7c3aed;font-weight:bold}
|
||||
.sessions .grid {padding:0.66rem 0.3rem}
|
||||
.sessions .grid:nth-child(even) {background: #fafafa }
|
||||
</style>
|
||||
{% endsection %}
|
||||
@@ -9,33 +9,49 @@
|
||||
{% endsection %}
|
||||
|
||||
{% section "content" %}
|
||||
{% foreach $list as $path => $folder %}
|
||||
<section>
|
||||
<section class="picea">
|
||||
<header>
|
||||
<h2>{{ $path }}</h2>
|
||||
<div class="icon-picea icon-purple">
|
||||
{% include "lean-console/svg/icon-picea.svg" %}
|
||||
</div>
|
||||
|
||||
<h2>{% _ "header" %}</h2>
|
||||
</header>
|
||||
|
||||
<article class="picea">
|
||||
<article class="has-table">
|
||||
<strong class="grid grid-nogutter">
|
||||
<div class="col folder">{% _ "filename" %}</div>
|
||||
</strong>
|
||||
|
||||
{% foreach $list as $path => $folder %}
|
||||
<div class="path">{{ $path }}</div>
|
||||
|
||||
{% foreach $folder as $file %}
|
||||
<div class="grid">
|
||||
<strong class="col route-name">{{ substr($file, strlen($path)) }}</strong>
|
||||
<div>
|
||||
{#<a target="_blank" class="btn-red" href="">
|
||||
<div class="grid grid-nogutter content">
|
||||
<strong class="col filename">{{ substr((string) $file, strlen($path)) }}</strong>
|
||||
|
||||
{#<div>
|
||||
<a target="_blank" class="btn-red" href="">
|
||||
Voir
|
||||
</a>#}
|
||||
</a>
|
||||
</div>#}
|
||||
</div>
|
||||
{% or %}
|
||||
<div class="grid grid-nogutter content">
|
||||
<i class="col empty">{% _ "table.empty" %}</i>
|
||||
</div>
|
||||
{% endforeach %}
|
||||
{% endforeach %}
|
||||
</article>
|
||||
</section>
|
||||
{% endforeach %}
|
||||
|
||||
<style>
|
||||
.picea h5 {font-size:1.5em; line-height:2em; font-weight:bold;text-decoration:underline}
|
||||
.picea strong.grid {background: #242528;color: #fff;}
|
||||
.picea strong.grid {background: #8b93a4;color: #fff;}
|
||||
.picea .grid {padding:0.66rem 0.3rem;align-items:center}
|
||||
.picea .grid strong {color:#444}
|
||||
.picea .grid:nth-child(even) {background: #e3e3e3 }
|
||||
section + section {margin-top:1.2rem}
|
||||
.picea .path {background: #eee;font-weight:bold; line-height:1.8rem; padding: 0 8px;color: #797979;border-top: 1px solid #ccc;border-bottom: 1px solid #ccc;}
|
||||
.picea .content .filename {color:#7c3aed}
|
||||
.picea .empty {color:#888}
|
||||
.picea .grid.content:nth-child(even) {background: #fafafa }
|
||||
</style>
|
||||
{% endsection %}
|
||||
@@ -0,0 +1,92 @@
|
||||
{% extends "lean-console/base/layout" %}
|
||||
|
||||
{% language.set "lean.testing" %}
|
||||
|
||||
{% title _("title") %}
|
||||
|
||||
{% section "breadcrumb-items" %}
|
||||
<li class="breadcrumb-item">{% _ 'breadcrumb' %}</li>
|
||||
{% endsection %}
|
||||
|
||||
{% section "content" %}
|
||||
<section class="test-suite">
|
||||
<header class="justify-content-between">
|
||||
<div class="flex align-items-center">
|
||||
<div class="icon-test icon-purple">
|
||||
{% include "lean-console/svg/icon-test.svg" %}
|
||||
</div>
|
||||
<h2>{% _ "header" %}</h2>
|
||||
</div>
|
||||
|
||||
<div><button class="btn-green btn-sm">Run all >︎</button></div>
|
||||
</header>
|
||||
|
||||
<article>
|
||||
{% foreach $this->testFetcher->compile() as $class => $definition %}
|
||||
<console-test class="test-class" data-class="{{ $class }}">
|
||||
<div class="subheader flex align-items-center w-100">
|
||||
<div class="icon-pink">
|
||||
{% include "lean-console/svg/icon-php.svg" %}
|
||||
</div>
|
||||
|
||||
<div class="classname">
|
||||
<h3>{{ ltrim($class, '\\') }}</h3>
|
||||
<button class="btn-pink btn-sm run-full">Run full class >︎</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% foreach $definition->methods as $method %}
|
||||
<div class="single-test grid align-items-center" data-status="awaiting" data-method="{{ $method->name }}" data-http-method="{% echo.uc $method->attribute->method %}" data-name="{{ $method->attribute->name }}">
|
||||
<div class="col-6 basic-info flex align-items-center">
|
||||
<div class="icon-gray icon-sm awaiting">{% include "lean-console/svg/icon-awaiting.svg" %}</div>
|
||||
<div class="icon-yellow icon-sm pending">{% include "lean-console/svg/icon-pending.svg" %}</div>
|
||||
<div class="icon-red icon-sm failure">{% include "lean-console/svg/icon-failure.svg" %}</div>
|
||||
<div class="icon-green icon-sm success">{% include "lean-console/svg/icon-success.svg" %}</div>
|
||||
|
||||
<span class="method-name">{{ $method->name }}()</span><span class="method-description">{{ $method->attribute->name }}</span>
|
||||
</div>
|
||||
|
||||
<div class="col-5">
|
||||
<span class="http-method-{% echo.lc $method->attribute->method %}">{{ $method->attribute->method }}</span>
|
||||
</div>
|
||||
|
||||
<div class="col-1 text-right">
|
||||
{% ui:form.post "tests.run" %}
|
||||
{% ui:hidden "class", $class %}
|
||||
{% ui:hidden "name", $method->attribute->name %}
|
||||
{% ui:hidden "method", $method->attribute->method %}
|
||||
|
||||
<button type="submit" class="btn-purple btn-sm " {% if $method->attribute->after %}disabled="disabled"{% endif %}>Run ></button>
|
||||
{% ui:endform %}
|
||||
</div>
|
||||
</div>
|
||||
{% endforeach %}
|
||||
</console-test>
|
||||
{% endforeach %}
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<style>
|
||||
#main-content section [data-status] [class*="icon-"] {display:none}
|
||||
#main-content section [data-status="awaiting"] .awaiting,
|
||||
#main-content section [data-status="failure"] .failure,
|
||||
#main-content section [data-status="pending"] .pending,
|
||||
#main-content section [data-status="success"] .success {display:flex;}
|
||||
|
||||
.test-suite [data-status="awaiting"] .single-test {color: #727272;}
|
||||
.test-suite [data-status="failure"] .single-test {color: #bd1e1e;}
|
||||
.test-suite [data-status="pending"] .single-test {color: #c8a704;}
|
||||
.test-suite [data-status="success"] .single-test {color: #2fac31;}
|
||||
|
||||
.test-suite console-test {display:block;}
|
||||
.test-suite .test-class + .test-class {margin-top:15px}
|
||||
.test-suite .single-test:nth-child(2n+1) {background: #f7f7f7;}
|
||||
.test-suite .classname {border-bottom: 1px solid #a41a92;padding:6px 0 0 0; margin-bottom:10px; display:flex;justify-content: space-between; align-items:center; flex:1}
|
||||
.test-suite .classname .btn-sm {margin-bottom:5px;}
|
||||
.test-suite h3 {color:#a41a92;font-weight: 600;text-transform: uppercase}
|
||||
.test-suite .method-name {color:#b24286;min-width:100px;}
|
||||
.test-suite .method-description {padding-left:8px}
|
||||
.test-suite .basic-info {padding:3px 0 3px 15px;}
|
||||
.test-suite .icon-database-table {background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);color: #d97706;}
|
||||
</style>
|
||||
{% endsection %}
|
||||
@@ -29,14 +29,15 @@
|
||||
{% endfunction %}
|
||||
|
||||
{% section "content" %}
|
||||
<section>
|
||||
<section class="updates">
|
||||
<header>
|
||||
<div class="icon-updates">{% include "lean-console/svg/icon-update.svg" %}</div>
|
||||
<h1>{% _ 'git.header' %}</h1>
|
||||
</header>
|
||||
|
||||
<article class="updates">
|
||||
<article>
|
||||
<div class="git-status">
|
||||
<strong style="display:block;margin-bottom:7px">'git status' output</strong>
|
||||
<div class="git-cmd">'git status' output</div>
|
||||
|
||||
<code style="white-space:normal;font-size:120%">
|
||||
{% foreach $status as $line %}
|
||||
@@ -45,12 +46,19 @@
|
||||
{{ $line }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% or %}
|
||||
<div class="empty">
|
||||
<div style="text-align: center;">
|
||||
{% include "lean-console/svg/icon-empty.svg" %}
|
||||
<div>{% _ "git.status:nothing" %}</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endforeach %}
|
||||
</code>
|
||||
</div>
|
||||
|
||||
<div class="git-diff" style="margin-top:2rem">
|
||||
<strong style="display:block;margin-bottom:7px">'git diff' output</strong>
|
||||
<div class="git-cmd">'git diff' output</div>
|
||||
|
||||
<code style="white-space:normal;font-size:120%">
|
||||
{% foreach $diff as $line %}
|
||||
@@ -59,18 +67,45 @@
|
||||
{{ $line }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% or %}
|
||||
<div class="empty">
|
||||
<div style="text-align: center;">
|
||||
{% include "lean-console/svg/icon-empty.svg" %}
|
||||
<div>{% _ "git.status:nothing" %}</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endforeach %}
|
||||
</code>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<footer>
|
||||
<div class="flex justify-content-between stats">
|
||||
<div class="commits">
|
||||
<h5>Commits</h5>
|
||||
<div>24<br></div>
|
||||
<div><small>1 this month</small></div>
|
||||
</div>
|
||||
<div class="branches">
|
||||
<h5>Branches</h5>
|
||||
2<br>
|
||||
<div><small>master, production</small></div>
|
||||
</div>
|
||||
<div class="stash">
|
||||
<h5>Stash</h5>
|
||||
No stashed changes
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ $lastUpdate }}
|
||||
</footer>
|
||||
</section>
|
||||
{% endsection %}
|
||||
|
||||
<style>
|
||||
.action-delete {color:#f88}
|
||||
.action-add {color: #88ff8a}
|
||||
.action-group {color:#88bcff}
|
||||
.git-status {margin-bottom: 20px}
|
||||
.stats {text-align:center; max-width: 90%;margin: auto;color: #535353;font-size:90%}
|
||||
.stats h5 {font-size: 1.3rem; line-height:2rem}
|
||||
.updates .git-cmd {display:block;margin-bottom:7px;color: #a1a1aa;}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,4 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M9 9.5 C9 7 10.5 5.5 12 5.5 C13.8 5.5 15 7 15 8.5 C15 10.5 13 11 12 12.5"/>
|
||||
<line x1="12" y1="16.5" x2="12" y2="17"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 290 B |
@@ -0,0 +1 @@
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M9 11l3 3L22 4"></path><path d="M21 12v7a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h11"></path></svg>
|
||||
|
After Width: | Height: | Size: 208 B |
@@ -0,0 +1 @@
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"></circle><path d="M12 6v6l4 2"></path></svg>
|
||||
|
After Width: | Height: | Size: 174 B |
@@ -0,0 +1 @@
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M16 18l6-6-6-6M8 6l-6 6 6 6"></path></svg>
|
||||
|
After Width: | Height: | Size: 150 B |
@@ -0,0 +1 @@
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="7" height="9" rx="1"></rect><rect x="14" y="3" width="7" height="5" rx="1"></rect><rect x="14" y="12" width="7" height="9" rx="1"></rect><rect x="3" y="16" width="7" height="5" rx="1"></rect></svg>
|
||||
|
After Width: | Height: | Size: 321 B |
@@ -0,0 +1 @@
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><ellipse cx="12" cy="5" rx="9" ry="3"></ellipse><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"></path><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"></path></svg>
|
||||
|
After Width: | Height: | Size: 257 B |
@@ -0,0 +1 @@
|
||||
<svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="12" cy="12" r="10"></circle><path d="M8 12h8"></path></svg>
|
||||
|
After Width: | Height: | Size: 172 B |
@@ -0,0 +1,4 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M6 6 L18 18"/>
|
||||
<path d="M18 6 L6 18"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 211 B |
@@ -0,0 +1 @@
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"></path><path d="M14 2v6h6M16 13H8M16 17H8M10 9H8"></path></svg>
|
||||
|
After Width: | Height: | Size: 226 B |
@@ -0,0 +1 @@
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z"></path></svg>
|
||||
|
After Width: | Height: | Size: 154 B |
@@ -0,0 +1,33 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80" width="80" height="80">
|
||||
<defs>
|
||||
<!-- Dégradé grayscale -->
|
||||
<linearGradient id="leanGray" x1="0%" y1="0%" x2="100%" y2="100%">
|
||||
<stop offset="0%" stop-color="#e4e4e7"/>
|
||||
<stop offset="50%" stop-color="#a1a1aa"/>
|
||||
<stop offset="100%" stop-color="#52525b"/>
|
||||
</linearGradient>
|
||||
|
||||
<!-- Ombre douce -->
|
||||
<filter id="softShadow" x="-20%" y="-20%" width="140%" height="140%">
|
||||
<feDropShadow dx="0" dy="2" stdDeviation="4" flood-color="#000000" flood-opacity="0.4"/>
|
||||
</filter>
|
||||
</defs>
|
||||
|
||||
<!-- Icône : dodécagone + L monogramme -->
|
||||
<g filter="url(#softShadow)">
|
||||
<!-- Forme principale : dodécagone régulier -->
|
||||
<path d="M 40 4 L 58.04 8.82 L 71.18 21.96 L 76 40 L 71.18 58.04 L 58.04 71.18 L 40 76 L 21.96 71.18 L 8.82 58.04 L 4 40 L 8.82 21.96 L 21.96 8.82 Z"
|
||||
fill="url(#leanGray)" opacity="0.12"/>
|
||||
<path d="M 40 4 L 58.04 8.82 L 71.18 21.96 L 76 40 L 71.18 58.04 L 58.04 71.18 L 40 76 L 21.96 71.18 L 8.82 58.04 L 4 40 L 8.82 21.96 L 21.96 8.82 Z"
|
||||
stroke="url(#leanGray)" stroke-width="2.5" stroke-linejoin="round"/>
|
||||
|
||||
<!-- L monogramme -->
|
||||
<path d="M 31 25 L 31 54 L 57 54"
|
||||
stroke="url(#leanGray)" stroke-width="7"
|
||||
stroke-linecap="round" stroke-linejoin="round"/>
|
||||
|
||||
<!-- Accent : point de données -->
|
||||
<circle cx="57" cy="29" r="4.5" fill="#d4d4d8"/>
|
||||
<circle cx="57" cy="29" r="8" fill="none" stroke="#d4d4d8" stroke-width="1" opacity="0.35"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,13 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
||||
<!-- document -->
|
||||
<path d="M6 3 H14 L18 7 V17"/>
|
||||
<path d="M6 3 H14 L18 7 V21 H6 Z"/>
|
||||
<!-- log lines -->
|
||||
<line x1="8.5" y1="10.5" x2="15.5" y2="10.5"/>
|
||||
<line x1="8.5" y1="13.5" x2="15.5" y2="13.5"/>
|
||||
<line x1="8.5" y1="16.5" x2="12" y2="16.5"/>
|
||||
<!-- alert badge -->
|
||||
<circle cx="17.5" cy="17.5" r="3.2"/>
|
||||
<line x1="17.5" y1="15.8" x2="17.5" y2="18"/>
|
||||
<line x1="17.5" y1="19.2" x2="17.5" y2="19.4"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 595 B |
@@ -0,0 +1,5 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
||||
<line x1="4" y1="12" x2="4.01" y2="12"/>
|
||||
<line x1="12" y1="12" x2="12.01" y2="12"/>
|
||||
<line x1="20" y1="12" x2="20.01" y2="12"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 294 B |
@@ -0,0 +1,6 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
||||
<!-- ellipse badge -->
|
||||
<ellipse cx="12" cy="12" rx="10" ry="6.5"/>
|
||||
<!-- plain php text -->
|
||||
<text x="12" y="14" text-anchor="middle" font-family="monospace" font-size="7" font-weight="700" fill="currentColor" stroke="none">php</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 404 B |
@@ -0,0 +1,10 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
||||
<!-- left brace: top hook, diagonal to point, diagonal back, bottom hook -->
|
||||
<path d="M7 4 H5.5 C4.5 4 4 4.8 4 6 V9.2 C4 10 3.5 10.6 2.5 11 C3.5 11.4 4 12 4 12.8 V16 C4 17.2 4.5 18 5.5 18 H7"/>
|
||||
<!-- right brace: mirrored -->
|
||||
<path d="M17 4 H18.5 C19.5 4 20 4.8 20 6 V9.2 C20 10 20.5 10.6 21.5 11 C20.5 11.4 20 12 20 12.8 V16 C20 17.2 19.5 18 18.5 18 H17"/>
|
||||
<!-- mini spruce -->
|
||||
<path d="M12 7.5 L10.3 10.2 H13.7 Z"/>
|
||||
<path d="M12 9.8 L9.2 13.8 H14.8 Z"/>
|
||||
<line x1="12" y1="13.8" x2="12" y2="16.5"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 686 B |
@@ -0,0 +1,6 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
||||
<line x1="12" y1="3" x2="12" y2="21"/>
|
||||
<line x1="7" y1="21" x2="17" y2="21"/>
|
||||
<path d="M12 6 H5.5 L3 8.5 L5.5 11 H12 Z"/>
|
||||
<path d="M12 13 H18.5 L21 15.5 L18.5 18 H12 Z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 342 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M4.5 12.5 L9.5 17.5 L19.5 6.5"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 201 B |
@@ -0,0 +1 @@
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="3"></circle><path d="M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9l2.1 2.1M17 17l2.1 2.1M4.9 19.1L7 17M17 7l2.1-2.1"></path></svg>
|
||||
|
After Width: | Height: | Size: 249 B |
@@ -0,0 +1 @@
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2"></rect><path d="M3 9h18M3 15h18M9 3v18M15 3v18"></path></svg>
|
||||
|
After Width: | Height: | Size: 208 B |
@@ -0,0 +1,13 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
||||
<!-- document outline -->
|
||||
<rect x="4" y="3" width="16" height="18" rx="2"/>
|
||||
<!-- row 1: line + check -->
|
||||
<line x1="7" y1="8" x2="12.5" y2="8"/>
|
||||
<path d="M14.5 7.5 L15.5 8.5 L18 6"/>
|
||||
<!-- row 2: line + check -->
|
||||
<line x1="7" y1="12" x2="12.5" y2="12"/>
|
||||
<path d="M14.5 11.5 L15.5 12.5 L18 10"/>
|
||||
<!-- row 3: line + check -->
|
||||
<line x1="7" y1="16" x2="12.5" y2="16"/>
|
||||
<path d="M14.5 15.5 L15.5 16.5 L18 14"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 603 B |
@@ -0,0 +1,12 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
||||
<!-- top commit -->
|
||||
<circle cx="6" cy="6" r="2.5"/>
|
||||
<!-- bottom commit -->
|
||||
<circle cx="6" cy="18" r="2.5"/>
|
||||
<!-- right commit -->
|
||||
<circle cx="18" cy="12" r="2.5"/>
|
||||
<!-- branch lines -->
|
||||
<path d="M6 8.5 V15.5"/>
|
||||
<path d="M8.2 6.8 C13 7.5 13 10.5 15.8 11.3"/>
|
||||
<path d="M8.2 17.2 C13 16.5 13 13.5 15.8 12.7"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 502 B |
@@ -0,0 +1,6 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
||||
<!-- head -->
|
||||
<circle cx="12" cy="8" r="4"/>
|
||||
<!-- shoulders -->
|
||||
<path d="M4.5 20 C4.5 16 8 14 12 14 C16 14 19.5 16 19.5 20"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 297 B |