From fbfbd48eb8698278ab41920d26638b1a9c9d7e36 Mon Sep 17 00:00:00 2001 From: Dave Mc Nicoll Date: Tue, 19 Sep 2023 23:39:28 -0400 Subject: [PATCH] - Reworked the UI a bit --- meta/i18n/en/lean.caching.json | 5 ++- meta/i18n/en/lean.console.json | 2 +- meta/i18n/en/lean.request.json | 1 + meta/i18n/en/lean.storage.json | 3 +- meta/i18n/en/lean.templating.json | 6 +++ meta/i18n/en/lean.update.json | 8 ++++ meta/i18n/fr/lean.console.json | 1 - meta/i18n/fr/lean.debugging.json | 4 +- meta/i18n/fr/lean.storage.json | 5 ++- src/Lib/ConsoleControllerTrait.php | 7 +++- view/lean-console/base/asset/lean.css | 35 +++++++++-------- view/lean-console/base/console/main-nav.phtml | 5 ++- view/lean-console/base/layout.phtml | 28 ++++++++++---- view/lean-console/page/caching/picea.phtml | 11 ++++-- view/lean-console/page/debugging/logs.phtml | 8 +++- view/lean-console/page/request/route.phtml | 8 +++- view/lean-console/page/storage/database.phtml | 17 ++++++--- view/lean-console/page/storage/session.phtml | 8 +++- view/lean-console/page/templating/picea.phtml | 9 +++-- view/lean-console/page/update/index.phtml | 38 +++++++++---------- 20 files changed, 138 insertions(+), 71 deletions(-) create mode 100644 meta/i18n/en/lean.templating.json create mode 100644 meta/i18n/en/lean.update.json diff --git a/meta/i18n/en/lean.caching.json b/meta/i18n/en/lean.caching.json index 6ab8de2..4a5dcd9 100644 --- a/meta/i18n/en/lean.caching.json +++ b/meta/i18n/en/lean.caching.json @@ -1,3 +1,6 @@ { - "clear": "Clear" + "title": "Caching -- LEAN", + "page-title": "LEAN - Caching", + "clear": "Clear", + "breadcrumb": "Caching" } \ No newline at end of file diff --git a/meta/i18n/en/lean.console.json b/meta/i18n/en/lean.console.json index 63c3e28..ad4d34f 100644 --- a/meta/i18n/en/lean.console.json +++ b/meta/i18n/en/lean.console.json @@ -1,5 +1,5 @@ { "title": "Console -- LEAN", - "page-title": "LEAN - Console" + "page-title": "Console" } \ No newline at end of file diff --git a/meta/i18n/en/lean.request.json b/meta/i18n/en/lean.request.json index 18015de..36b1ac1 100644 --- a/meta/i18n/en/lean.request.json +++ b/meta/i18n/en/lean.request.json @@ -2,6 +2,7 @@ "title": "Request -- LEAN", "page-title": "LEAN - Request", "route": { + "breadcrumb": "Routes", "header": "List of active routes", "name": "Name", "uri": "URI", diff --git a/meta/i18n/en/lean.storage.json b/meta/i18n/en/lean.storage.json index 5c1d124..f08c9bd 100644 --- a/meta/i18n/en/lean.storage.json +++ b/meta/i18n/en/lean.storage.json @@ -4,6 +4,7 @@ "database": { "header": "List of databases", + "breadcrumb": "Database", "name": "Database", "adapter": "Adapter", "host": "Hostname:port", @@ -13,7 +14,7 @@ "table": { "header": "Tables details", "fields": "{$count} fields", - "name": "Name", + "name": "Table Name", "actions": "Actions", "table-fields" : "Fields in table", "create": "Create table", diff --git a/meta/i18n/en/lean.templating.json b/meta/i18n/en/lean.templating.json new file mode 100644 index 0000000..3f256e1 --- /dev/null +++ b/meta/i18n/en/lean.templating.json @@ -0,0 +1,6 @@ +{ + "title": "Templating -- LEAN", + "page-title": "LEAN - Templating", + "breadcrumb": "Templating", + "header": "Views" +} \ No newline at end of file diff --git a/meta/i18n/en/lean.update.json b/meta/i18n/en/lean.update.json new file mode 100644 index 0000000..274bacb --- /dev/null +++ b/meta/i18n/en/lean.update.json @@ -0,0 +1,8 @@ +{ + "title": "Update -- LEAN", + "page-title": "LEAN - Update", + "git": { + "breadcrumb": "Update", + "header": "Git Status" + } +} \ No newline at end of file diff --git a/meta/i18n/fr/lean.console.json b/meta/i18n/fr/lean.console.json index 0758a4d..709dcbc 100644 --- a/meta/i18n/fr/lean.console.json +++ b/meta/i18n/fr/lean.console.json @@ -2,6 +2,5 @@ "title" : "Console -- LEAN", "page-title": "Console", "breadcrumb" : { - "index" : "Negundo" } } diff --git a/meta/i18n/fr/lean.debugging.json b/meta/i18n/fr/lean.debugging.json index 168b549..83aef26 100644 --- a/meta/i18n/fr/lean.debugging.json +++ b/meta/i18n/fr/lean.debugging.json @@ -1,7 +1,7 @@ { "title" : "Debugging -- LEAN", "page-title": "Déboguage", - "breadcrumb" : { - "index" : "Negundo" + "logs": { + "breadcrumb": "Logs" } } diff --git a/meta/i18n/fr/lean.storage.json b/meta/i18n/fr/lean.storage.json index a7f3ec7..3d67def 100644 --- a/meta/i18n/fr/lean.storage.json +++ b/meta/i18n/fr/lean.storage.json @@ -13,7 +13,7 @@ "table": { "header": "Tables details", "fields": "{$count} fields", - "name": "Name", + "name": "Table Name", "actions": "Actions", "table-fields" : "Fields in table", "create": "Create table", @@ -22,7 +22,8 @@ } }, "session": { - "header": "List of sessions", + "header": "Liste des sessions", + "breadcrumb": "Sessions", "count": "{$count} session(s)" } diff --git a/src/Lib/ConsoleControllerTrait.php b/src/Lib/ConsoleControllerTrait.php index bc28880..901c0e8 100644 --- a/src/Lib/ConsoleControllerTrait.php +++ b/src/Lib/ConsoleControllerTrait.php @@ -15,7 +15,7 @@ use Picea; #[Security(locked: false)] #[Taxus("dev")] -#[\Notes\Route\Attribute\Object\Route(method: [ 'GET', 'POST', 'DELETE'] , base: "/~")] +#[\Notes\Route\Attribute\Object\Route(method: [ 'GET', 'POST' ] , base: "/~")] trait ConsoleControllerTrait { use \Lean\ControllerTrait; @@ -27,4 +27,9 @@ trait ConsoleControllerTrait $this->session = $session; $this->container = $container; } + + public function version() : string + { + return "0.4.1"; + } } diff --git a/view/lean-console/base/asset/lean.css b/view/lean-console/base/asset/lean.css index 589b2c7..3e9038b 100644 --- a/view/lean-console/base/asset/lean.css +++ b/view/lean-console/base/asset/lean.css @@ -14,33 +14,38 @@ .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);} +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;} -h1 {font-size:2rem;color:#525960} body {font-family:Helvetica Neue, Helvetica, Arial, sans-serif;} summary {cursor:pointer;} -#body-main {background:#dfe3f9;min-height:calc(100vh - 90px);display:flex} +#body-main {min-height:calc(100vh - 30px);display:flex} /* Header */ -#body-header {background: #5e5e5e; color:#fff; min-height:60px;line-height:60px;padding:0 1rem;border-bottom: 2px solid #9b9595;} -#body-header .page-title {font-size:1.5rem} -#body-header .page-title:before {content:"🔳"; margin-right:10px} +#body-header {background: #fff; color:#fff; min-height:60px;line-height:60px;padding:0 1rem;position:sticky;top:0;border-bottom:1px solid #ebedee;} +#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 .breadcrumb-item + .breadcrumb-item:before {content:"›";padding:0 6px;} /* Footer */ -#body-footer {background: #475262;color: #fff;height: 30px;line-height: 30px;font-size: 0.8rem;padding: 0 0.5rem;text-align: right;border-top:2px solid #434446;} +#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:#1e1e1e;border-top:2px solid #46494f;min-width:210px;color:#fff;font-family:consolas, courier new, monospace;font-size:0.9rem} -#main-nav label {color: #a4a4a4;background:rgba(0,0,0,0.2);text-transform:uppercase ; display:block;padding:0.8rem 1rem;font-size:1.15em;} +#main-nav {background:#242528;width:240px;color:#fff;font-family:consolas, courier new, monospace;font-size:0.9rem;position:fixed;top:0;bottom:0;overflow-y:scroll;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 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:0rem 1rem;background:rgba(255,255,255,0.05);transition:all 0.3s ease;line-height:3em;font-size:0.9em} +#main-nav a {color: #efecec;text-decoration:none;display:block;padding:0 1rem 0 2rem;transition:all 0.3s ease;line-height:3em;font-size:0.9em} #main-nav a:before {content:"›"; margin-right:10px;line-height:3em} #main-nav a:hover {background:rgba(255,255,255,0.1)} -#main-nav li + li {border-top:1px solid #555} /* Main content */ -#main-content {padding:4vh 2vw;border-top:2px solid #7d7d7d;width:100%;} -#main-content section {border-radius:4px;box-shadow: 1px 1px 3px rgba(0,0,0,0.5)} -#main-content section article {font-family: Courier New , Courier, monospace;font-size: 0.8em;background:#fff;padding:2vh 1vw;} -#main-content section header {background:#e8e8e8;padding:2vh 1vw;font-size:1.4em;color: #4b4848;border-top-left-radius: 4px;border-top-right-radius: 4px;} -#main-content section footer {background:#f9f9f9;padding:2vh 1vw;border-bottom-left-radius: 4px;bottom: 4px;} \ No newline at end of file +#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)} +#main-content section article {border-radius:0.3rem;font-family: Courier New , Courier, monospace;font-size: 0.8em;background:#fff;padding:1.5rem;} +#main-content section header {border-top-left:0.3rem;border-top-right:4px;background:#fff;padding:1rem 1rem;font-size:1.2em;color: #4b4848;border-bottom:1px solid #e9ebec;display:flex;align-items:center} +#main-content section footer {border-bottom-left:0.3rem;border-bottom-right:0.3rem;background:#f9f9f9;padding:2vh 1vw;} + diff --git a/view/lean-console/base/console/main-nav.phtml b/view/lean-console/base/console/main-nav.phtml index 3956629..e48d2b2 100644 --- a/view/lean-console/base/console/main-nav.phtml +++ b/view/lean-console/base/console/main-nav.phtml @@ -1,4 +1,6 @@ \ No newline at end of file + diff --git a/view/lean-console/base/layout.phtml b/view/lean-console/base/layout.phtml index 01d9ba1..f2423b5 100644 --- a/view/lean-console/base/layout.phtml +++ b/view/lean-console/base/layout.phtml @@ -21,18 +21,30 @@ -
- {% section "header" %}{% endsection %} -
-
{% section "nav" %} - {% view "lean-console/base/console/main-nav" %} + {% view "lean-console/base/console/main-nav" %} {% endsection %} -
- {% section "content" %}{% endsection %} -
+
+
+ {% section "header" %}{% endsection %} +
+ +
+

{% section "subheader" %}{% _ "page-title" %}{% endsection %}

+ {% section "breadcrumb" %} + + {% endsection %} +
+ +
+ {% section "content" %}{% endsection %} +
+