w-web-sso 1.0.13 → 1.0.15

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.
Files changed (76) hide show
  1. package/db/wsso/ips/data.mdb +0 -0
  2. package/db/wsso/ips/lock.mdb +0 -0
  3. package/db/wsso/tokens/data.mdb +0 -0
  4. package/db/wsso/tokens/lock.mdb +0 -0
  5. package/db/wsso/users/data.mdb +0 -0
  6. package/db/wsso/users/lock.mdb +0 -0
  7. package/dist/css/{app.03a2f95c.css → app.e4367a2b.css} +1 -1
  8. package/dist/index.tmp +6 -2
  9. package/dist/js/app-legacy.4ebeee34.js +2 -0
  10. package/dist/js/app-legacy.4ebeee34.js.map +1 -0
  11. package/dist/js/app.d1707f92.js +2 -0
  12. package/dist/js/app.d1707f92.js.map +1 -0
  13. package/dist/js/chunk-vendors-legacy.7380957a.js +15 -0
  14. package/dist/js/chunk-vendors-legacy.7380957a.js.map +1 -0
  15. package/dist/js/chunk-vendors.7380957a.js +15 -0
  16. package/dist/js/chunk-vendors.7380957a.js.map +1 -0
  17. package/dist/w-web-sso.umd.js +2 -2
  18. package/dist/w-web-sso.umd.js.map +1 -1
  19. package/docs/WWebSso.html +4 -112
  20. package/docs/WWebSso.mjs.html +460 -111
  21. package/docs/index.html +1 -1
  22. package/g.getSettings.mjs +0 -1
  23. package/g.initialData.mjs +8 -10
  24. package/g.mjs +0 -0
  25. package/package.json +7 -6
  26. package/public/index.html +13 -0
  27. package/server/WWebSso.mjs +459 -110
  28. package/server/procCore.mjs +871 -277
  29. package/server/procProtect.mjs +746 -0
  30. package/server/procStaInfor.mjs +393 -0
  31. package/server/provideUsers.mjs +0 -1
  32. package/server/srlog.mjs +12 -0
  33. package/server/staLogs/staIp.callWorker.mjs +35 -0
  34. package/server/staLogs/staIp.mjs +118 -0
  35. package/server/staLogs/staIp.shellWorker.mjs +18 -0
  36. package/server/staLogs/staToken.callWorker.mjs +35 -0
  37. package/server/staLogs/staToken.mjs +118 -0
  38. package/server/staLogs/staToken.shellWorker.mjs +18 -0
  39. package/server/staLogs/staUserAccountLogin.callWorker.mjs +35 -0
  40. package/server/staLogs/staUserAccountLogin.mjs +136 -0
  41. package/server/staLogs/staUserAccountLogin.shellWorker.mjs +18 -0
  42. package/server/staLogs/test_staIp.mjs +27 -0
  43. package/server/staLogs/test_staToken.mjs +27 -0
  44. package/server/staLogs/test_staUserAccountLogin.mjs +30 -0
  45. package/settings.json +15 -1
  46. package/src/components/Layout.vue +70 -15
  47. package/src/components/LayoutContent.vue +35 -33
  48. package/src/components/LayoutContentIps.vue +757 -0
  49. package/src/components/LayoutContentStaInfor.vue +917 -0
  50. package/src/components/LayoutContentTokens.vue +961 -0
  51. package/src/components/{LayoutContentInfor.vue → LayoutContentUserInfor.vue} +366 -73
  52. package/src/components/LayoutContentUsers.vue +21 -34
  53. package/src/components/PageLogin.vue +1 -1
  54. package/src/components/VeUser.vue.txt +9 -10
  55. package/src/components/ruleGroup.vue.txt +5 -6
  56. package/src/main.js +7 -13
  57. package/src/plugins/mLang.mjs +853 -520
  58. package/src/plugins/mShare.mjs +141 -3
  59. package/src/plugins/mUI.mjs +30 -21
  60. package/src/schema/index.mjs +2 -0
  61. package/src/schema/tables/ips.mjs +0 -9
  62. package/src/schema/tables/tokens.mjs +5 -1
  63. package/src/schema/tables/users.mjs +2 -14
  64. package/src/store/mutations.mjs +3 -3
  65. package/src/store/types.mjs +1 -1
  66. package/srv.mjs +55 -38
  67. package/_/350/246/217/345/212/203.md +0 -275
  68. package/dist/js/app-legacy.d468ef7f.js +0 -2
  69. package/dist/js/app-legacy.d468ef7f.js.map +0 -1
  70. package/dist/js/app.d468ef7f.js +0 -2
  71. package/dist/js/app.d468ef7f.js.map +0 -1
  72. package/dist/js/chunk-vendors-legacy.f51f58bb.js +0 -13
  73. package/dist/js/chunk-vendors-legacy.f51f58bb.js.map +0 -1
  74. package/dist/js/chunk-vendors.f51f58bb.js +0 -13
  75. package/dist/js/chunk-vendors.f51f58bb.js.map +0 -1
  76. package/src/components/LayoutContentSettings.vue +0 -1248
@@ -70,10 +70,9 @@
70
70
  :icon="mdiTableHeadersEye"
71
71
  :backgroundColor="'#fff'"
72
72
  :backgroundColorHover="'#f2f2f2'"
73
- _textColor="'#eee'"
74
- _textColorHover="'#fff'"
75
73
  :iconColor="'#444'"
76
74
  :iconColorHover="'#222'"
75
+ :iconColorFocus="'#222'"
77
76
  :shadow="false"
78
77
  _click=""
79
78
  ></WButtonCircle>
@@ -116,10 +115,9 @@
116
115
  :icon="mdiPlus"
117
116
  :backgroundColor="'#fff'"
118
117
  :backgroundColorHover="'#f2f2f2'"
119
- _textColor="'#eee'"
120
- _textColorHover="'#fff'"
121
118
  :iconColor="'#444'"
122
119
  :iconColorHover="'#222'"
120
+ :iconColorFocus="'#222'"
123
121
  :shadow="false"
124
122
  @click="addItem"
125
123
  ></WButtonCircle>
@@ -136,10 +134,9 @@
136
134
  :icon="mdiContentCopy"
137
135
  :backgroundColor="'#fff'"
138
136
  :backgroundColorHover="'#f2f2f2'"
139
- _textColor="'#eee'"
140
- _textColorHover="'#fff'"
141
137
  :iconColor="'#444'"
142
138
  :iconColorHover="'#222'"
139
+ :iconColorFocus="'#222'"
143
140
  :shadow="false"
144
141
  @click="copyItem"
145
142
  ></WButtonCircle>
@@ -156,10 +153,9 @@
156
153
  :icon="mdiTrashCanOutline"
157
154
  :backgroundColor="'#fff'"
158
155
  :backgroundColorHover="'#f2f2f2'"
159
- _textColor="'#eee'"
160
- _textColorHover="'#fff'"
161
156
  :iconColor="'#444'"
162
157
  :iconColorHover="'#222'"
158
+ :iconColorFocus="'#222'"
163
159
  :shadow="false"
164
160
  @click="deleteItemsCheck"
165
161
  ></WButtonCircle>
@@ -176,10 +172,9 @@
176
172
  :icon="mdiCloudUploadOutline"
177
173
  :backgroundColor="'rgba(255,0,50,0.7)'"
178
174
  :backgroundColorHover="'rgba(255,0,50,0.8)'"
179
- :textColor="'#eee'"
180
- :textColorHover="'#fff'"
181
175
  :iconColor="'#eee'"
182
176
  :iconColorHover="'#fff'"
177
+ :iconColorFocus="'#fff'"
183
178
  :shadow="false"
184
179
  @click="saveUsers"
185
180
  ></WButtonCircle>
@@ -219,8 +214,7 @@
219
214
  </template>
220
215
 
221
216
  <script>
222
- import { mdiAccountGroupOutline, mdiVectorPolylinePlus, mdiCheckboxMarkedCircle, mdiCloudUploadOutline, mdiTrashCanOutline, mdiTableHeadersEye, mdiPlus, mdiPencilOutline, mdiContentCopy } from '@mdi/js/mdi.js'
223
- import JSON5 from 'json5'
217
+ import { mdiAccountGroupOutline, mdiCloudUploadOutline, mdiTrashCanOutline, mdiTableHeadersEye, mdiPlus, mdiContentCopy } from '@mdi/js/mdi.js'
224
218
  import ot from 'dayjs'
225
219
  import get from 'lodash-es/get.js'
226
220
  import set from 'lodash-es/set.js'
@@ -232,11 +226,8 @@ import cloneDeep from 'lodash-es/cloneDeep.js'
232
226
  import haskey from 'wsemi/src/haskey.mjs'
233
227
  import isestr from 'wsemi/src/isestr.mjs'
234
228
  import iseobj from 'wsemi/src/iseobj.mjs'
235
- import isnum from 'wsemi/src/isnum.mjs'
236
- import istime from 'wsemi/src/istime.mjs'
237
- import istimeTZ from 'wsemi/src/istimeTZ.mjs'
229
+ import istimemsTZ from 'wsemi/src/istimemsTZ.mjs'
238
230
  import isEmail from 'wsemi/src/isEmail.mjs'
239
- import cdbl from 'wsemi/src/cdbl.mjs'
240
231
  import cstr from 'wsemi/src/cstr.mjs'
241
232
  import arrPull from 'wsemi/src/arrPull.mjs'
242
233
  import domShowInputDatatime from 'wsemi/src/domShowInputDatatime.mjs'
@@ -266,17 +257,12 @@ export default {
266
257
  data: function() {
267
258
  return {
268
259
  mdiAccountGroupOutline,
269
- mdiVectorPolylinePlus,
270
- mdiCheckboxMarkedCircle,
271
260
  mdiCloudUploadOutline,
272
261
  mdiTrashCanOutline,
273
262
  mdiTableHeadersEye,
274
263
  mdiPlus,
275
- mdiPencilOutline,
276
264
  mdiContentCopy,
277
265
 
278
- ttt: '',
279
-
280
266
  panelWidth: 100,
281
267
  panelHeight: 100,
282
268
  headHeight: 100,
@@ -626,9 +612,9 @@ export default {
626
612
  'redir': vo.$t('redir'),
627
613
  'isAdmin': vo.$t('isAdmin'),
628
614
  'isVerified': vo.$t('isVerified'),
629
- 'timeVerified': vo.$t('timeVerified'),
630
- 'timeExpired': vo.$t('timeExpired'),
631
- 'timeBlocked': vo.$t('timeBlocked'),
615
+ 'timeVerified': vo.$t('userTimeVerified'),
616
+ 'timeExpired': vo.$t('userTimeExpired'),
617
+ 'timeBlocked': vo.$t('userTimeBlocked'),
632
618
  'userId': vo.$t('userId'),
633
619
  'timeCreate': vo.$t('timeCreate'),
634
620
  'userIdUpdate': vo.$t('userIdUpdate'),
@@ -909,9 +895,9 @@ export default {
909
895
  //vv, vm
910
896
  let vv = ''
911
897
  let vm = vo.$t('userTimeEmpty')
912
- if (istimeTZ(v)) { //原始數據為timeTZ格式
898
+ if (istimemsTZ(v)) { //原始數據為timemsTZ格式
913
899
  let vt = ot(v)
914
- vv = vt.format('YYYY-MM-DDTHH:mm')
900
+ vv = vt.format('YYYY-MM-DDTHH:mm:ss.SSSZ')
915
901
  vm = vt.format('YYYY-MM-DD HH:mm')
916
902
  }
917
903
  // console.log('vv', vv)
@@ -936,9 +922,9 @@ export default {
936
922
  //vv, vm
937
923
  let vv = ''
938
924
  let vm = vo.$t('userTimeEmpty')
939
- if (istimeTZ(v)) { //原始數據為timeTZ格式
925
+ if (istimemsTZ(v)) { //原始數據為timemsTZ格式
940
926
  let vt = ot(v)
941
- vv = vt.format('YYYY-MM-DDTHH:mm')
927
+ vv = vt.format('YYYY-MM-DDTHH:mm:ss.SSSZ')
942
928
  vm = vt.format('YYYY-MM-DD HH:mm')
943
929
  }
944
930
  // console.log('vv', vv)
@@ -963,9 +949,9 @@ export default {
963
949
  //vv, vm
964
950
  let vv = ''
965
951
  let vm = vo.$t('userTimeEmpty')
966
- if (istimeTZ(v)) { //原始數據為timeTZ格式
952
+ if (istimemsTZ(v)) { //原始數據為timemsTZ格式
967
953
  let vt = ot(v)
968
- vv = vt.format('YYYY-MM-DDTHH:mm')
954
+ vv = vt.format('YYYY-MM-DDTHH:mm:ss.SSSZ')
969
955
  vm = vt.format('YYYY-MM-DD HH:mm')
970
956
  }
971
957
  // console.log('vv', vv)
@@ -1174,11 +1160,12 @@ export default {
1174
1160
  return
1175
1161
  }
1176
1162
 
1177
- //timePrev
1163
+ //timePrev, 須給予秒時間, 要滿足istime才能展示初始值
1178
1164
  let timePrev = ''
1179
- if (istime(t)) {
1180
- timePrev = t
1165
+ if (istimemsTZ(t)) {
1166
+ timePrev = ot(t).format('YYYY-MM-DDTHH:mm:ss')
1181
1167
  }
1168
+ // console.log('timePrev', timePrev)
1182
1169
 
1183
1170
  //domShowInputDatatime
1184
1171
  let type = 'datetime-local' //'datetime-local', 'date'
@@ -1208,7 +1195,7 @@ export default {
1208
1195
 
1209
1196
  //v
1210
1197
  let vt = ot(timeNew, 'YYYY-MM-DDTHH:mm') //domShowInputDatatime數據為年月日時分
1211
- let v = vt.format('YYYY-MM-DDTHH:mm:ssZ') //轉回原始數據為timeTZ格式
1198
+ let v = vt.format('YYYY-MM-DDTHH:mm:ss.SSSZ') //轉回原始數據為timemsTZ格式
1212
1199
  // console.log('v', v)
1213
1200
 
1214
1201
  //set
@@ -191,7 +191,7 @@ export default {
191
191
  showPassword: false,
192
192
  password: '',
193
193
 
194
- //申請註冊使用者 bbb
194
+ //待加入 申請註冊使用者 bbb
195
195
 
196
196
  }
197
197
  },
@@ -153,16 +153,15 @@
153
153
  <script>
154
154
  import { mdiAccountEdit, mdiFileTree } from '@mdi/js/mdi.js'
155
155
  import Vue from 'vue'
156
- // import JSON5 from 'json5'
157
- import get from 'lodash-es/get.js'
158
- import each from 'lodash-es/each.js'
159
- import map from 'lodash-es/map.js'
160
- import trim from 'lodash-es/trim.js'
161
- import uniq from 'lodash-es/uniq.js'
162
- import filter from 'lodash-es/filter.js'
163
- import join from 'lodash-es/join.js'
164
- import sortBy from 'lodash-es/sortBy.js'
165
- import cloneDeep from 'lodash-es/cloneDeep.js'
156
+ import get from 'lodash-es/get.js'
157
+ import each from 'lodash-es/each.js'
158
+ import map from 'lodash-es/map.js'
159
+ import trim from 'lodash-es/trim.js'
160
+ import uniq from 'lodash-es/uniq.js'
161
+ import filter from 'lodash-es/filter.js'
162
+ import join from 'lodash-es/join.js'
163
+ import sortBy from 'lodash-es/sortBy.js'
164
+ import cloneDeep from 'lodash-es/cloneDeep.js'
166
165
  import genPm from 'wsemi/src/genPm.mjs'
167
166
  import sep from 'wsemi/src/sep.mjs'
168
167
  import timemsTZ2day from 'wsemi/src/timemsTZ2day.mjs'
@@ -208,12 +208,11 @@
208
208
 
209
209
  <script>
210
210
  import { mdiEyeCheck, mdiEyeOff, mdiEyedropper, mdiEyedropperOff } from '@mdi/js/mdi.js'
211
- import JSON5 from 'json5'
212
- import get from 'lodash-es/get.js'
213
- import set from 'lodash-es/set.js'
214
- import each from 'lodash-es/each.js'
215
- import size from 'lodash-es/size.js'
216
- import cloneDeep from 'lodash-es/cloneDeep.js'
211
+ import get from 'lodash-es/get.js'
212
+ import set from 'lodash-es/set.js'
213
+ import each from 'lodash-es/each.js'
214
+ import size from 'lodash-es/size.js'
215
+ import cloneDeep from 'lodash-es/cloneDeep.js'
217
216
  import iseobj from 'wsemi/src/iseobj.mjs'
218
217
  import isobj from 'wsemi/src/isobj.mjs'
219
218
  import isestr from 'wsemi/src/isestr.mjs'
package/src/main.js CHANGED
@@ -48,12 +48,13 @@ Vue.directive('dommutation', domMutation())
48
48
  Vue.directive('domdragdrop', domDragDrop())
49
49
 
50
50
  //WServHapiClient
51
- // let bFirstSync = false
51
+ // let bFirstSync = false //不需要bFirstSync, 由getWebInfor結束代表第1次完成同步
52
52
  WServHapiClient({
53
53
  showLog: false,
54
54
  url: window.location.origin + window.location.pathname,
55
55
  useWaitToken: false,
56
56
  apiName: 'api',
57
+ tokenType: 'Bearer',
57
58
  getToken: () => {
58
59
  let token = get(Vue.prototype, `$store.state.userToken`, '')
59
60
  // console.log('getToken', token)
@@ -69,30 +70,23 @@ WServHapiClient({
69
70
  _fapi.getWebInfor() //已有fapi時優先取得web資訊
70
71
  .then((wi) => {
71
72
  // console.log('$fapi getWebInfor', wi)
73
+
72
74
  Vue.prototype.$store.commit(Vue.prototype.$store.types.UpdateWebInfor, wi)
73
75
  ui.setLang(null, 'get webInfor') //因更新webInfor可取得webName與webDescription, 得要重刷語系才能依照語言取得顯示文字
76
+
77
+ //commit syncState
78
+ Vue.prototype.$store.commit(Vue.prototype.$store.types.UpdateSyncState, true)
79
+
74
80
  })
75
81
  .catch((err) => {
76
82
  console.log(err)
77
83
  })
78
84
 
79
- //commit syncState
80
- Vue.prototype.$store.commit(Vue.prototype.$store.types.UpdateSyncState, true)
81
-
82
85
  },
83
86
  recvData: (r) => {
84
87
  // console.log('sync data', r.tableName, r.data)
85
88
  Vue.prototype.$store.commit(Vue.prototype.$store.types.UpdateTableData, r)
86
89
  },
87
- // getAfterUpdateTableTags: (r) => {
88
- // // console.log('getAfterUpdateTableTags', r, 'needToRefresh', JSON.stringify(r.oldTableTags) !== JSON.stringify(r.newTableTags))
89
- // if (bFirstSync) {
90
- // return
91
- // }
92
- // bFirstSync = true
93
- // // console.log('first-sync')
94
- // Vue.prototype.$store.commit(Vue.prototype.$store.types.UpdateSyncState, true)
95
- // },
96
90
  })
97
91
 
98
92
  //new