@windwalker-io/core 4.0.7 → 4.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/fusionfile.mjs CHANGED
@@ -9,7 +9,6 @@ import fusion, { watch, parallel, src, dest } from '@windwalker-io/fusion';
9
9
  import { babelBasicOptions } from '@windwalker-io/fusion/src/utilities/babel.js';
10
10
  import postcss from 'gulp-postcss';
11
11
  import tailwindcss from 'tailwindcss';
12
- import WebpackDynamicPublicPathPlugin from 'webpack-dynamic-public-path';
13
12
 
14
13
  export async function debuggers() {
15
14
  // Watch start
@@ -21,13 +20,8 @@ export async function debuggers() {
21
20
  'dist/debugger/',
22
21
  {
23
22
  override: (config) => {
24
- config.output.publicPath = "publicPathPlaceholder";
25
-
26
- config.plugins.push(
27
- new WebpackDynamicPublicPathPlugin({
28
- externalPublicPath: "window.externalPublicPath"
29
- })
30
- );
23
+ // @see https://webpack.js.org/guides/public-path/#automatic-publicpath
24
+ config.output.publicPath = "auto";
31
25
  }
32
26
  }
33
27
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windwalker-io/core",
3
- "version": "4.0.7",
3
+ "version": "4.0.8",
4
4
  "type": "module",
5
5
  "description": "Windwalker Core JS package",
6
6
  "scripts": {
@@ -15,13 +15,13 @@
15
15
  "author": "Simon Asika",
16
16
  "license": "MIT",
17
17
  "dependencies": {
18
- "axios": "^0.21.1",
19
- "webpack-dynamic-public-path": "^1.0.7"
18
+ "axios": "^0.21.1"
20
19
  },
21
20
  "devDependencies": {
22
- "@windwalker-io/fusion": "^1.0",
23
21
  "@tailwindcss/custom-forms": "^0.2.1",
24
22
  "@tailwindcss/ui": "^0.7.2",
23
+ "@windwalker-io/fusion": "^1.0",
24
+ "bootstrap": "^5.0",
25
25
  "autoprefixer": "^10.2.6",
26
26
  "axios": "^0.21.1",
27
27
  "gulp": "^4.0.2",
@@ -34,7 +34,7 @@
34
34
  "tailwindcss": "^2.1.4",
35
35
  "vue": "^3.0.11",
36
36
  "vue-router": "^4.0.8",
37
- "webpack": "^4.0"
37
+ "webpack": "^5.0"
38
38
  },
39
39
  "windwalker": {
40
40
  "vendors": [
@@ -0,0 +1,7 @@
1
+ // Part of earth file.
2
+
3
+ // Custom
4
+
5
+ @import "bootstrap/scss/functions";
6
+ @import "bootstrap/scss/variables";
7
+ @import "bootstrap/scss/mixins";
@@ -1,24 +1,7 @@
1
1
  // Part of starter file.
2
2
 
3
- @tailwind base;
4
-
5
- @layer base {
6
- h1 {
7
- @apply text-2xl;
8
- }
9
- h2 {
10
- @apply text-xl;
11
- }
12
- h3 {
13
- @apply text-lg;
14
- }
15
- a {
16
- @apply text-blue-600 underline;
17
- }
18
- }
19
-
20
- @tailwind components;
21
- @tailwind utilities;
3
+ @import "variables";
4
+ @import "bootstrap/scss/bootstrap";
22
5
 
23
6
  @import "layout/layout";
24
7
  @import "layout/sidebar";
@@ -1,6 +1,5 @@
1
1
  // Part of starter file.
2
2
 
3
3
  .h-w-sidebar {
4
- width: 250px;
5
- min-width: 250px;
4
+ //
6
5
  }
@@ -1,6 +1,11 @@
1
1
  // Part of starter file.
2
2
 
3
3
  .c-sidebar-menu-item {
4
- @apply px-4 py-3 no-underline text-gray-800 hover:text-gray-600 block border-b border-gray-300
5
- hover:bg-gray-300;
4
+ color: $dark;
5
+ padding-top: .75rem;
6
+ padding-bottom: .75rem;
7
+ }
8
+
9
+ .c-sidebar-menu-item.active {
10
+ background-color: $gray-300;
6
11
  }
@@ -1,6 +1,6 @@
1
1
  <template>
2
- <div class="c-main-wrapper min-h-screen flex flex-col">
3
- <div class="flex items-center bg-gray-800 p-3 text-white"
2
+ <div class="c-main-wrapper">
3
+ <div class="navbar navbar-expand-lg navbar-dark bg-dark"
4
4
  style="height: 60px">
5
5
  <!-- Logo -->
6
6
  <div class="h-w-sidebar">
@@ -15,37 +15,43 @@
15
15
  </div>
16
16
 
17
17
  <!-- Body -->
18
- <div class="flex flex-grow">
18
+ <div class="row gx-0 flex-wrap flex-md-nowrap">
19
19
  <!-- Sidebar -->
20
- <div class="h-w-sidebar bg-gray-200">
21
- <div class="">
22
- <router-link to="/"
23
- class="c-sidebar-menu-item">
24
- Dashboard
25
- </router-link>
26
- </div>
27
- <div>
28
- <router-link to="/system"
29
- class="c-sidebar-menu-item">
30
- System
31
- </router-link>
32
- </div>
33
- <div>
34
- <router-link to="/request"
35
- class="c-sidebar-menu-item">
36
- Request
37
- </router-link>
38
- </div>
39
- <div>
40
- <router-link to="/db"
41
- class="c-sidebar-menu-item">
42
- Database
43
- </router-link>
20
+ <div class="h-w-sidebar col-md-2">
21
+ <div class="nav flex-column bg-light h-100">
22
+ <div class="nav-item">
23
+ <router-link to="/"
24
+ class="c-sidebar-menu-item nav-link"
25
+ :class="{ active: currentRoute === 'dashboard' }">
26
+ Dashboard
27
+ </router-link>
28
+ </div>
29
+ <div class="nav-item">
30
+ <router-link to="/system"
31
+ class="c-sidebar-menu-item nav-link"
32
+ :class="{ active: currentRoute === 'system' }">
33
+ System
34
+ </router-link>
35
+ </div>
36
+ <div class="nav-item">
37
+ <router-link to="/request"
38
+ class="c-sidebar-menu-item nav-link"
39
+ :class="{ active: currentRoute === 'request' }">
40
+ Request
41
+ </router-link>
42
+ </div>
43
+ <div class="nav-item">
44
+ <router-link to="/db"
45
+ class="c-sidebar-menu-item nav-link"
46
+ :class="{ active: currentRoute === 'db' }">
47
+ Database
48
+ </router-link>
49
+ </div>
44
50
  </div>
45
51
  </div>
46
52
 
47
53
  <!-- Content Body -->
48
- <div class="bg-gray-100 flex-grow">
54
+ <div class="col-md-10">
49
55
  <router-view></router-view>
50
56
  </div>
51
57
  </div>
@@ -55,7 +61,8 @@
55
61
  </template>
56
62
 
57
63
  <script>
58
- import { RouterLink, RouterView } from 'vue-router';
64
+ import { computed } from 'vue';
65
+ import { RouterLink, RouterView, useRoute } from 'vue-router';
59
66
  import Store from './Store.vue';
60
67
 
61
68
  export default {
@@ -66,13 +73,18 @@ export default {
66
73
  RouterView
67
74
  },
68
75
  setup() {
76
+ const route = useRoute();
77
+ const currentRoute = computed(() => route.name);
78
+
69
79
  return {
70
-
80
+ currentRoute
71
81
  };
72
82
  }
73
83
  };
74
84
  </script>
75
85
 
76
- <style scoped>
86
+ <style scoped lang="scss">
87
+ .c-sidebar-menu-item.active {
77
88
 
89
+ }
78
90
  </style>
@@ -1,123 +1,127 @@
1
1
  <template>
2
2
  <!-- component -->
3
- <div :id="`query-${i}`" class="bg-white shadow-md rounded-lg overflow-hidden mx-auto">
4
- <div class="py-4 px-8 mt-3">
5
- <div class="flex items-center justify-between mb-4">
3
+ <div :id="`query-${i}`" class="card rounded-3 border-0 shadow overflow-hidden mx-auto">
4
+ <div class="card-body">
5
+ <div class="d-flex align-items-center justify-content-between mb-4">
6
6
  <div>
7
7
  <h2 class="text-gray-700 font-semibold text-2xl tracking-wide mb-2">
8
8
  Query: {{ i }}
9
9
  </h2>
10
10
  </div>
11
- <div class="text-gray-500 text-base">
11
+ <div class="text-muted">
12
12
  <button
13
13
  type="button"
14
- class="mr-2 border border-blue-500 text-blue-500 rounded-md px-4 py-1 transition duration-500 ease select-none hover:text-white hover:bg-blue-600 focus:outline-none focus:shadow-outline"
14
+ class="btn btn-outline-primary btn-sm"
15
15
  @click="copy"
16
16
  >
17
17
  <svg style="height: 14px; display: inline" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="clipboard" class="svg-inline--fa fa-clipboard fa-w-12" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="currentColor" d="M336 64h-53.88C268.9 26.8 233.7 0 192 0S115.1 26.8 101.9 64H48C21.5 64 0 85.48 0 112v352C0 490.5 21.5 512 48 512h288c26.5 0 48-21.48 48-48v-352C384 85.48 362.5 64 336 64zM192 64c17.67 0 32 14.33 32 32c0 17.67-14.33 32-32 32S160 113.7 160 96C160 78.33 174.3 64 192 64zM272 224h-160C103.2 224 96 216.8 96 208C96 199.2 103.2 192 112 192h160C280.8 192 288 199.2 288 208S280.8 224 272 224z"></path></svg>
18
- <span class="text-sm ml-2">Copy</span>
18
+ <span class="">Copy</span>
19
19
  </button>
20
20
  <button
21
21
  type="button"
22
- class="mr-2 border border-indigo-500 text-indigo-500 rounded-md px-3 py-2 transition duration-500 ease select-none hover:text-white hover:bg-indigo-600 focus:outline-none focus:shadow-outline"
22
+ class="btn btn-primary btn-sm"
23
23
  >
24
24
  <svg style="height: 14px" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="link" class="svg-inline--fa fa-link fa-w-20" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M598.6 41.41C570.1 13.8 534.8 0 498.6 0s-72.36 13.8-99.96 41.41l-43.36 43.36c15.11 8.012 29.47 17.58 41.91 30.02c3.146 3.146 5.898 6.518 8.742 9.838l37.96-37.96C458.5 72.05 477.1 64 498.6 64c20.67 0 40.1 8.047 54.71 22.66c14.61 14.61 22.66 34.04 22.66 54.71s-8.049 40.1-22.66 54.71l-133.3 133.3C405.5 343.1 386 352 365.4 352s-40.1-8.048-54.71-22.66C296 314.7 287.1 295.3 287.1 274.6s8.047-40.1 22.66-54.71L314.2 216.4C312.1 212.5 309.9 208.5 306.7 205.3C298.1 196.7 286.8 192 274.6 192c-11.93 0-23.1 4.664-31.61 12.97c-30.71 53.96-23.63 123.6 22.39 169.6C293 402.2 329.2 416 365.4 416c36.18 0 72.36-13.8 99.96-41.41L598.6 241.3c28.45-28.45 42.24-66.01 41.37-103.3C639.1 102.1 625.4 68.16 598.6 41.41zM234 387.4L196.1 425.3C181.5 439.1 162 448 141.4 448c-20.67 0-40.1-8.047-54.71-22.66c-14.61-14.61-22.66-34.04-22.66-54.71s8.049-40.1 22.66-54.71l133.3-133.3C234.5 168 253.1 160 274.6 160s40.1 8.048 54.71 22.66c14.62 14.61 22.66 34.04 22.66 54.71s-8.047 40.1-22.66 54.71L325.8 295.6c2.094 3.939 4.219 7.895 7.465 11.15C341.9 315.3 353.3 320 365.4 320c11.93 0 23.1-4.664 31.61-12.97c30.71-53.96 23.63-123.6-22.39-169.6C346.1 109.8 310.8 96 274.6 96C238.4 96 202.3 109.8 174.7 137.4L41.41 270.7c-27.6 27.6-41.41 63.78-41.41 99.96c-.0001 36.18 13.8 72.36 41.41 99.97C69.01 498.2 105.2 512 141.4 512c36.18 0 72.36-13.8 99.96-41.41l43.36-43.36c-15.11-8.012-29.47-17.58-41.91-30.02C239.6 394.1 236.9 390.7 234 387.4z"></path></svg>
25
25
  </button>
26
26
  <button
27
27
  type="button"
28
- class="border border-green-500 text-green-500 rounded-md px-3 py-2 transition duration-500 ease select-none hover:text-white hover:bg-green-600 focus:outline-none focus:shadow-outline"
28
+ class="btn btn-success btn-sm"
29
29
  @click="goToLast('/db')"
30
30
  >
31
31
  <svg style="height: 14px" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="arrow-rotate-right" class="svg-inline--fa fa-arrow-rotate-right fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M496 48V192c0 17.69-14.31 32-32 32H320c-17.69 0-32-14.31-32-32s14.31-32 32-32h63.39c-29.97-39.7-77.25-63.78-127.6-63.78C167.7 96.22 96 167.9 96 256s71.69 159.8 159.8 159.8c34.88 0 68.03-11.03 95.88-31.94c14.22-10.53 34.22-7.75 44.81 6.375c10.59 14.16 7.75 34.22-6.375 44.81c-39.03 29.28-85.36 44.86-134.2 44.86C132.5 479.9 32 379.4 32 256s100.5-223.9 223.9-223.9c69.15 0 134 32.47 176.1 86.12V48c0-17.69 14.31-32 32-32S496 30.31 496 48z"></path></svg>
32
32
  </button>
33
33
  </div>
34
34
  </div>
35
- <div class="bg-gray-100 rounded-lg py-4 px-4"
36
- v-html="item.debug_query">
37
-
35
+ <div class="">
36
+ <pre style="word-break: break-all; white-space: pre-wrap;"
37
+ class="bg-light p-4"
38
+ v-html="item.debug_query"
39
+ ></pre>
38
40
  </div>
39
41
  <div class="py-4">
40
42
  Query Time:
41
- <span class="inline-block rounded-full text-gray-600 bg-gray-100 px-2 py-1 text-xs font-bold mr-3">
43
+ <span class="badge bg-secondary">
42
44
  {{ round(item.time * 1000) }}ms
43
45
  </span>
44
46
  Memory:
45
- <span class="inline-block rounded-full text-gray-600 bg-gray-100 px-2 py-1 text-xs font-bold mr-3">
47
+ <span class="badge bg-secondary">
46
48
  {{ round(item.memory / 1024 / 1024) }}MB
47
49
  </span>
48
50
  Return Rows
49
- <span class="inline-block rounded-full text-gray-600 bg-gray-100 px-2 py-1 text-xs font-bold mr-3">
51
+ <span class="badge bg-secondary rounded-pill">
50
52
  {{ item.count }}
51
53
  </span>
52
54
  </div>
53
55
  </div>
54
56
 
55
57
  <div v-if="item.explain">
56
- <table class="min-w-full">
58
+ <table class="table">
57
59
  <thead>
58
60
  <tr>
59
- <th class="px-4 py-3 border-b-2 border-gray-300 text-left leading-4 text-blue-500 tracking-wider">
61
+ <th class="">
60
62
  ID
61
63
  </th>
62
- <th class="px-4 py-3 border-b-2 border-gray-300 text-left leading-4 text-blue-500 tracking-wider">
64
+ <th class="">
63
65
  Select Type
64
66
  </th>
65
- <th class="px-4 py-3 border-b-2 border-gray-300 text-left leading-4 text-blue-500 tracking-wider">
67
+ <th class="">
66
68
  Table
67
69
  </th>
68
- <th class="px-4 py-3 border-b-2 border-gray-300 text-left leading-4 text-blue-500 tracking-wider">
70
+ <th class="">
69
71
  Type
70
72
  </th>
71
- <th class="px-4 py-3 border-b-2 border-gray-300 text-left leading-4 text-blue-500 tracking-wider">
73
+ <th class="">
72
74
  Possible Keys
73
75
  </th>
74
- <th class="px-4 py-3 border-b-2 border-gray-300 text-left leading-4 text-blue-500 tracking-wider">
76
+ <th class="">
75
77
  Key
76
78
  </th>
77
- <th class="px-4 py-3 border-b-2 border-gray-300 text-left leading-4 text-blue-500 tracking-wider">
79
+ <th class="">
78
80
  Key Length
79
81
  </th>
80
- <th class="px-4 py-3 border-b-2 border-gray-300 text-left leading-4 text-blue-500 tracking-wider">
82
+ <th class="">
81
83
  Reference
82
84
  </th>
83
- <th class="px-4 py-3 border-b-2 border-gray-300 text-left leading-4 text-blue-500 tracking-wider">
85
+ <th class="">
84
86
  Rows
85
87
  </th>
86
- <th class="px-4 py-3 border-b-2 border-gray-300 text-left leading-4 text-blue-500 tracking-wider">
88
+ <th class="">
87
89
  Extra
88
90
  </th>
89
91
  </tr>
90
92
  </thead>
91
93
  <tbody class="bg-white">
92
94
  <tr v-for="explain of item.explain">
93
- <td class="p-4 text-xs whitespace-no-wrap border-b border-gray-500">
95
+ <td class="">
94
96
  {{ explain.id }}
95
97
  </td>
96
- <td class="p-4 text-xs whitespace-no-wrap border-b border-gray-500">
98
+ <td class="">
97
99
  {{ explain.select_type }}
98
100
  </td>
99
- <td class="p-4 text-xs whitespace-no-wrap border-b border-gray-500">
101
+ <td class="">
100
102
  {{ explain.table }}
101
103
  </td>
102
- <td class="p-4 text-xs whitespace-no-wrap border-b border-gray-500">
104
+ <td class="">
103
105
  {{ explain.type }}
104
106
  </td>
105
- <td class="p-4 text-xs whitespace-no-wrap border-b border-gray-500">
106
- {{ explain.possible_keys }}
107
+ <td class="text-wrap">
108
+ <div style="word-break: break-all">
109
+ {{ explain.possible_keys }}
110
+ </div>
107
111
  </td>
108
- <td class="p-4 text-xs whitespace-no-wrap border-b border-gray-500">
112
+ <td class="">
109
113
  {{ explain.key }}
110
114
  </td>
111
- <td class="p-4 text-xs whitespace-no-wrap border-b border-gray-500">
115
+ <td class="">
112
116
  {{ explain.key_len }}
113
117
  </td>
114
- <td class="p-4 text-xs whitespace-no-wrap border-b border-gray-500">
118
+ <td class="">
115
119
  {{ explain.ref }}
116
120
  </td>
117
- <td class="p-4 text-xs whitespace-no-wrap border-b border-gray-500">
121
+ <td class="">
118
122
  {{ explain.rows }}
119
123
  </td>
120
- <td class="p-4 text-xs whitespace-no-wrap border-b border-gray-500">
124
+ <td class="">
121
125
  {{ explain.Extra }}
122
126
  </td>
123
127
  </tr>
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <div v-if="currentData">
3
- <div class="p-6 bg-gray-300">
3
+ <div class="p-3" style="background-color: var(--bs-gray-200);">
4
4
  <h1 class="text-xl font-bold text-gray-800">
5
5
  <slot name="title"></slot>
6
6
  </h1>
7
- <div class="text-gray-600">
7
+ <div class="text-muted">
8
8
  {{ currentId }} / <a target="_blank" class="text-gray-600" :href="currentData.url">{{ currentData.url }}</a>
9
9
  </div>
10
10
  </div>
@@ -10,10 +10,10 @@ import $http from './services/http.js';
10
10
  import { currentData, currentId } from './services/store.js';
11
11
 
12
12
  const routes = [
13
- { path: '/', component: () => import('./views/Dashboard.vue') },
14
- { path: '/system/:id?', component: () => import('./views/System.vue') },
15
- { path: '/request/:id?', component: () => import('./views/Request.vue') },
16
- { path: '/db/:id?', component: () => import('./views/Database.vue') },
13
+ { name: 'dashboard', path: '/', component: () => import('./views/Dashboard.vue') },
14
+ { name: 'system', path: '/system/:id?', component: () => import('./views/System.vue') },
15
+ { name: 'request', path: '/request/:id?', component: () => import('./views/Request.vue') },
16
+ { name: 'db', path: '/db/:id?', component: () => import('./views/Database.vue') },
17
17
  ];
18
18
 
19
19
  const router = createRouter({
@@ -1,30 +0,0 @@
1
- module.exports = {
2
- purge: {
3
- enabled: true,
4
- mode: 'layers',
5
- layers: ['base', 'components', 'utilities'],
6
- content: [
7
- './src/**/*.vue',
8
- ],
9
- },
10
- darkMode: 'media', // or 'media' or 'class'
11
- theme: {
12
- container: {
13
- center: true,
14
- padding: {
15
- default: '1rem',
16
- sm: '2rem',
17
- lg: '3rem',
18
- xl: '4rem',
19
- },
20
- },
21
- extend: {},
22
- },
23
- variants: {
24
- extend: {},
25
- },
26
- plugins: [
27
- require('@tailwindcss/ui'),
28
- require('@tailwindcss/custom-forms'),
29
- ],
30
- }