w-web-perm 1.0.24 → 1.0.26
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/dist/css/{app.f22995d1.css → app.d0e43dcc.css} +1 -1
- package/dist/index.tmp +9 -1
- package/dist/js/app-legacy.b0850281.js +2 -0
- package/dist/js/app-legacy.b0850281.js.map +1 -0
- package/dist/js/app.db01fef5.js +2 -0
- package/dist/js/app.db01fef5.js.map +1 -0
- package/dist/js/chunk-vendors-legacy.0432e7bc.js +13 -0
- package/dist/js/chunk-vendors-legacy.0432e7bc.js.map +1 -0
- package/dist/js/chunk-vendors.0432e7bc.js +13 -0
- package/dist/js/chunk-vendors.0432e7bc.js.map +1 -0
- package/dist/w-web-perm.umd.js +2 -2
- package/dist/w-web-perm.umd.js.map +1 -1
- package/docs/WWebPerm.html +1 -1
- package/docs/WWebPerm.mjs.html +30 -2
- package/docs/index.html +1 -1
- package/package.json +5 -5
- package/public/index.html +8 -0
- package/server/WWebPerm.mjs +29 -1
- package/src/App.vue +6 -1
- package/src/components/Layout.vue +0 -11
- package/src/components/LayoutContent.vue +22 -22
- package/src/components/LayoutContentGrups.vue +378 -97
- package/src/components/LayoutContentPemis.vue +422 -100
- package/src/components/LayoutContentTargets.vue +225 -55
- package/src/components/LayoutContentUsers.vue +256 -69
- package/src/components/VeCgrups.vue +28 -35
- package/src/components/VeCpemis.vue +28 -35
- package/src/components/VeCrules.vue +25 -31
- package/src/components/VeGrupBlngUsers.vue +63 -36
- package/src/components/VePemiBlngGrups.vue +63 -36
- package/src/schema/tables/pemis.mjs +1 -1
- package/src/store/mutations.mjs +77 -10
- package/srv.mjs +9 -1
- package/tableTags-web-perm.json +1 -1
- package/dist/js/app-legacy.128a1ced.js +0 -2
- package/dist/js/app-legacy.128a1ced.js.map +0 -1
- package/dist/js/app.128a1ced.js +0 -2
- package/dist/js/app.128a1ced.js.map +0 -1
- package/dist/js/chunk-vendors-legacy.d89048a8.js +0 -13
- package/dist/js/chunk-vendors-legacy.d89048a8.js.map +0 -1
- package/dist/js/chunk-vendors.d89048a8.js +0 -13
- package/dist/js/chunk-vendors.d89048a8.js.map +0 -1
- package/g.mjs +0 -0
package/docs/WWebPerm.html
CHANGED
|
@@ -925,7 +925,7 @@
|
|
|
925
925
|
<br class="clear">
|
|
926
926
|
|
|
927
927
|
<footer>
|
|
928
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on
|
|
928
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Mon Jan 27 2025 12:59:51 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
929
929
|
</footer>
|
|
930
930
|
|
|
931
931
|
<script>prettyPrint();</script>
|
package/docs/WWebPerm.mjs.html
CHANGED
|
@@ -271,7 +271,18 @@ function WWebPerm(WOrm, url, db, getUserByToken, verifyBrowserUser, verifyAppUse
|
|
|
271
271
|
|
|
272
272
|
//urlRedirect
|
|
273
273
|
let urlRedirect = get(opt, 'urlRedirect', '')
|
|
274
|
-
console.log('urlRedirect', urlRedirect)
|
|
274
|
+
// console.log('urlRedirect', urlRedirect)
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
//params
|
|
278
|
+
let showModeEditTargets = get(opt, 'showModeEditTargets', 'n')
|
|
279
|
+
let showModeEditPemis = get(opt, 'showModeEditPemis', 'n')
|
|
280
|
+
let showModeEditGrups = get(opt, 'showModeEditGrups', 'n')
|
|
281
|
+
let showModeEditUsers = get(opt, 'showModeEditUsers', 'n')
|
|
282
|
+
let modeEditTargets = get(opt, 'modeEditTargets', 'n')
|
|
283
|
+
let modeEditPemis = get(opt, 'modeEditPemis', 'n')
|
|
284
|
+
let modeEditGrups = get(opt, 'modeEditGrups', 'n')
|
|
285
|
+
let modeEditUsers = get(opt, 'modeEditUsers', 'n')
|
|
275
286
|
|
|
276
287
|
|
|
277
288
|
//mappingBy
|
|
@@ -304,6 +315,15 @@ function WWebPerm(WOrm, url, db, getUserByToken, verifyBrowserUser, verifyAppUse
|
|
|
304
315
|
webName,
|
|
305
316
|
webDescription,
|
|
306
317
|
webLogo,
|
|
318
|
+
// urlRedirect, //登入失敗就需要轉址, 故須通過html模板取代提供, 無法用api提供
|
|
319
|
+
showModeEditTargets,
|
|
320
|
+
showModeEditPemis,
|
|
321
|
+
showModeEditGrups,
|
|
322
|
+
showModeEditUsers,
|
|
323
|
+
modeEditTargets,
|
|
324
|
+
modeEditPemis,
|
|
325
|
+
modeEditGrups,
|
|
326
|
+
modeEditUsers,
|
|
307
327
|
}
|
|
308
328
|
}
|
|
309
329
|
|
|
@@ -818,6 +838,14 @@ function WWebPerm(WOrm, url, db, getUserByToken, verifyBrowserUser, verifyAppUse
|
|
|
818
838
|
c = replace(c, '/mperm/', '{sfd}/') //方法同genEntry
|
|
819
839
|
c = replace(c, '{sfd}', subfolder)
|
|
820
840
|
c = replace(c, '{urlRedirect}', urlRedirect)
|
|
841
|
+
c = replace(c, '{showModeEditTargets}', showModeEditTargets)
|
|
842
|
+
c = replace(c, '{showModeEditPemis}', showModeEditPemis)
|
|
843
|
+
c = replace(c, '{showModeEditGrups}', showModeEditGrups)
|
|
844
|
+
c = replace(c, '{showModeEditUsers}', showModeEditUsers)
|
|
845
|
+
c = replace(c, '{modeEditTargets}', modeEditTargets)
|
|
846
|
+
c = replace(c, '{modeEditPemis}', modeEditPemis)
|
|
847
|
+
c = replace(c, '{modeEditGrups}', modeEditGrups)
|
|
848
|
+
c = replace(c, '{modeEditUsers}', modeEditUsers)
|
|
821
849
|
fs.writeFileSync(fpEntryOut, c, 'utf8')
|
|
822
850
|
}
|
|
823
851
|
catch (err) {
|
|
@@ -1234,7 +1262,7 @@ export default WWebPerm
|
|
|
1234
1262
|
<br class="clear">
|
|
1235
1263
|
|
|
1236
1264
|
<footer>
|
|
1237
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on
|
|
1265
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Mon Jan 27 2025 12:59:51 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
1238
1266
|
</footer>
|
|
1239
1267
|
|
|
1240
1268
|
<script>prettyPrint();</script>
|
package/docs/index.html
CHANGED
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
<br class="clear">
|
|
72
72
|
|
|
73
73
|
<footer>
|
|
74
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on
|
|
74
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Mon Jan 27 2025 12:59:51 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
75
75
|
</footer>
|
|
76
76
|
|
|
77
77
|
<script>prettyPrint();</script>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "w-web-perm",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.26",
|
|
4
4
|
"main": "dist/w-web-perm.umd.js",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@mdi/js": "^7.4.47",
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
"json5": "^2.2.3",
|
|
9
9
|
"lodash": "^4.17.21",
|
|
10
10
|
"showdown": "^2.1.0",
|
|
11
|
-
"w-component-vue": "^2.4.
|
|
11
|
+
"w-component-vue": "^2.4.7",
|
|
12
12
|
"w-data-collector": "^1.0.22",
|
|
13
13
|
"w-serv-hapi": "^1.0.13",
|
|
14
|
-
"w-serv-orm": "^1.0.
|
|
14
|
+
"w-serv-orm": "^1.0.12",
|
|
15
15
|
"w-ui-loginout": "^1.0.8",
|
|
16
|
-
"wsemi": "^1.7.
|
|
16
|
+
"wsemi": "^1.7.64"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@vue/cli-plugin-babel": "^5.0.8",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"vue": "^2.6.14",
|
|
31
31
|
"vuex": "^3.6.2",
|
|
32
32
|
"w-orm-mongodb": "^1.1.32",
|
|
33
|
-
"w-package-tools": "^1.0.
|
|
33
|
+
"w-package-tools": "^1.0.82"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"serve": "vue-cli-service serve",
|
package/public/index.html
CHANGED
|
@@ -16,6 +16,14 @@
|
|
|
16
16
|
<script>
|
|
17
17
|
window.___pmwperm___={
|
|
18
18
|
urlRedirect: '{urlRedirect}',
|
|
19
|
+
showModeEditTargets: '{showModeEditTargets}',
|
|
20
|
+
showModeEditPemis: '{showModeEditPemis}',
|
|
21
|
+
showModeEditGrups: '{showModeEditGrups}',
|
|
22
|
+
showModeEditUsers: '{showModeEditUsers}',
|
|
23
|
+
modeEditTargets: '{modeEditTargets}',
|
|
24
|
+
modeEditPemis: '{modeEditPemis}',
|
|
25
|
+
modeEditGrups: '{modeEditGrups}',
|
|
26
|
+
modeEditUsers: '{modeEditUsers}',
|
|
19
27
|
}
|
|
20
28
|
</script>
|
|
21
29
|
|
package/server/WWebPerm.mjs
CHANGED
|
@@ -224,7 +224,18 @@ function WWebPerm(WOrm, url, db, getUserByToken, verifyBrowserUser, verifyAppUse
|
|
|
224
224
|
|
|
225
225
|
//urlRedirect
|
|
226
226
|
let urlRedirect = get(opt, 'urlRedirect', '')
|
|
227
|
-
console.log('urlRedirect', urlRedirect)
|
|
227
|
+
// console.log('urlRedirect', urlRedirect)
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
//params
|
|
231
|
+
let showModeEditTargets = get(opt, 'showModeEditTargets', 'n')
|
|
232
|
+
let showModeEditPemis = get(opt, 'showModeEditPemis', 'n')
|
|
233
|
+
let showModeEditGrups = get(opt, 'showModeEditGrups', 'n')
|
|
234
|
+
let showModeEditUsers = get(opt, 'showModeEditUsers', 'n')
|
|
235
|
+
let modeEditTargets = get(opt, 'modeEditTargets', 'n')
|
|
236
|
+
let modeEditPemis = get(opt, 'modeEditPemis', 'n')
|
|
237
|
+
let modeEditGrups = get(opt, 'modeEditGrups', 'n')
|
|
238
|
+
let modeEditUsers = get(opt, 'modeEditUsers', 'n')
|
|
228
239
|
|
|
229
240
|
|
|
230
241
|
//mappingBy
|
|
@@ -257,6 +268,15 @@ function WWebPerm(WOrm, url, db, getUserByToken, verifyBrowserUser, verifyAppUse
|
|
|
257
268
|
webName,
|
|
258
269
|
webDescription,
|
|
259
270
|
webLogo,
|
|
271
|
+
// urlRedirect, //登入失敗就需要轉址, 故須通過html模板取代提供, 無法用api提供
|
|
272
|
+
showModeEditTargets,
|
|
273
|
+
showModeEditPemis,
|
|
274
|
+
showModeEditGrups,
|
|
275
|
+
showModeEditUsers,
|
|
276
|
+
modeEditTargets,
|
|
277
|
+
modeEditPemis,
|
|
278
|
+
modeEditGrups,
|
|
279
|
+
modeEditUsers,
|
|
260
280
|
}
|
|
261
281
|
}
|
|
262
282
|
|
|
@@ -771,6 +791,14 @@ function WWebPerm(WOrm, url, db, getUserByToken, verifyBrowserUser, verifyAppUse
|
|
|
771
791
|
c = replace(c, '/mperm/', '{sfd}/') //方法同genEntry
|
|
772
792
|
c = replace(c, '{sfd}', subfolder)
|
|
773
793
|
c = replace(c, '{urlRedirect}', urlRedirect)
|
|
794
|
+
c = replace(c, '{showModeEditTargets}', showModeEditTargets)
|
|
795
|
+
c = replace(c, '{showModeEditPemis}', showModeEditPemis)
|
|
796
|
+
c = replace(c, '{showModeEditGrups}', showModeEditGrups)
|
|
797
|
+
c = replace(c, '{showModeEditUsers}', showModeEditUsers)
|
|
798
|
+
c = replace(c, '{modeEditTargets}', modeEditTargets)
|
|
799
|
+
c = replace(c, '{modeEditPemis}', modeEditPemis)
|
|
800
|
+
c = replace(c, '{modeEditGrups}', modeEditGrups)
|
|
801
|
+
c = replace(c, '{modeEditUsers}', modeEditUsers)
|
|
774
802
|
fs.writeFileSync(fpEntryOut, c, 'utf8')
|
|
775
803
|
}
|
|
776
804
|
catch (err) {
|
package/src/App.vue
CHANGED
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
import get from 'lodash-es/get.js'
|
|
29
29
|
import cloneDeep from 'lodash-es/cloneDeep.js'
|
|
30
30
|
import isestr from 'wsemi/src/isestr.mjs'
|
|
31
|
+
import iseobj from 'wsemi/src/iseobj.mjs'
|
|
31
32
|
import isDev from 'wsemi/src/isDev.mjs'
|
|
32
33
|
import wui from 'w-ui-loginout/src/WUiLoginout.mjs'
|
|
33
34
|
import LoadingWinBar from './components/Common/LoadingWinBar.vue'
|
|
@@ -121,7 +122,11 @@ export default {
|
|
|
121
122
|
|
|
122
123
|
ready: function() {
|
|
123
124
|
let connState = get(this, `$store.state.connState`)
|
|
124
|
-
|
|
125
|
+
let webInfor = get(this, `$store.state.webInfor`)
|
|
126
|
+
let b1 = connState === '已連線'
|
|
127
|
+
let b2 = iseobj(webInfor)
|
|
128
|
+
let b = b1 && b2
|
|
129
|
+
return b
|
|
125
130
|
},
|
|
126
131
|
|
|
127
132
|
},
|
|
@@ -4,14 +4,6 @@
|
|
|
4
4
|
<!-- menu top, 因窄版導致名稱換行故須使用overflow-y:hidden -->
|
|
5
5
|
<div :style="`height:${heightToolbar}px; overflow-y:hidden; padding:0px 10px; background:#fff; border-bottom:1px solid #ccc; display:flex; align-items:center;`">
|
|
6
6
|
|
|
7
|
-
<WButtonCircle
|
|
8
|
-
:icon="'mdi-menu'"
|
|
9
|
-
:tooltip="'左側選單'"
|
|
10
|
-
:shadow="false"
|
|
11
|
-
@click="drawer=!drawer"
|
|
12
|
-
v-if="false"
|
|
13
|
-
></WButtonCircle>
|
|
14
|
-
|
|
15
7
|
<div style="padding-left:5px; white-space:nowrap">
|
|
16
8
|
<div style="display:flex; align-items:center;">
|
|
17
9
|
|
|
@@ -71,12 +63,9 @@ export default {
|
|
|
71
63
|
return {
|
|
72
64
|
|
|
73
65
|
mdiMenu,
|
|
74
|
-
// drawer: null, //null false
|
|
75
66
|
// menuKey: 'blocks',
|
|
76
67
|
userName: 'tester',
|
|
77
68
|
|
|
78
|
-
drawer: true, //null,
|
|
79
|
-
|
|
80
69
|
tgLangs: [
|
|
81
70
|
{
|
|
82
71
|
id: 'cht',
|
|
@@ -40,21 +40,21 @@
|
|
|
40
40
|
></WListVertical>
|
|
41
41
|
|
|
42
42
|
<div
|
|
43
|
-
:style="`position:absolute; top:
|
|
43
|
+
:style="`position:absolute; top:2px; right:4px;`"
|
|
44
44
|
v-if="drawer"
|
|
45
45
|
>
|
|
46
46
|
<WButtonCircle
|
|
47
|
-
:paddingStyle="{
|
|
48
|
-
:icon="'mdi-arrow-left'"
|
|
49
|
-
:iconSize="
|
|
50
|
-
:backgroundColor="'
|
|
51
|
-
:backgroundColorHover="'
|
|
52
|
-
:backgroundColorFocus="'
|
|
47
|
+
:paddingStyle="{h:2,v:2}"
|
|
48
|
+
:icon="'mdi-arrow-left-bold-hexagon-outline'"
|
|
49
|
+
:iconSize="20"
|
|
50
|
+
:backgroundColor="'rgba(255,255,255,0.9)'"
|
|
51
|
+
:backgroundColorHover="'rgba(255,255,255,0.7)'"
|
|
52
|
+
:backgroundColorFocus="'rgba(255,255,255,0.5)'"
|
|
53
53
|
:borderColor="'transparent'"
|
|
54
|
-
:borderColorHover="'
|
|
55
|
-
:borderColorFocus="'
|
|
56
|
-
|
|
57
|
-
:shadow="
|
|
54
|
+
:borderColorHover="'transparent'"
|
|
55
|
+
:borderColorFocus="'transparent'"
|
|
56
|
+
_tooltip="$t('menuTreeHide')"
|
|
57
|
+
:shadow="false"
|
|
58
58
|
@click="drawer=false"
|
|
59
59
|
></WButtonCircle>
|
|
60
60
|
</div>
|
|
@@ -90,21 +90,21 @@
|
|
|
90
90
|
</template>
|
|
91
91
|
|
|
92
92
|
<div
|
|
93
|
-
:style="`position:absolute; top:
|
|
93
|
+
:style="`position:absolute; top:3px; left:5px;`"
|
|
94
94
|
v-if="!drawer"
|
|
95
95
|
>
|
|
96
96
|
<WButtonCircle
|
|
97
|
-
:paddingStyle="{
|
|
98
|
-
:icon="'mdi-arrow-right'"
|
|
99
|
-
:iconSize="
|
|
100
|
-
:backgroundColor="'
|
|
101
|
-
:backgroundColorHover="'
|
|
102
|
-
:backgroundColorFocus="'
|
|
97
|
+
:paddingStyle="{h:2,v:2}"
|
|
98
|
+
:icon="'mdi-arrow-right-bold-hexagon-outline'"
|
|
99
|
+
:iconSize="20"
|
|
100
|
+
:backgroundColor="'rgba(255,255,255,0.9)'"
|
|
101
|
+
:backgroundColorHover="'rgba(255,255,255,0.7)'"
|
|
102
|
+
:backgroundColorFocus="'rgba(255,255,255,0.5)'"
|
|
103
103
|
:borderColor="'transparent'"
|
|
104
|
-
:borderColorHover="'
|
|
105
|
-
:borderColorFocus="'
|
|
106
|
-
|
|
107
|
-
:shadow="
|
|
104
|
+
:borderColorHover="'transparent'"
|
|
105
|
+
:borderColorFocus="'transparent'"
|
|
106
|
+
_tooltip="$t('menuTreeShow')"
|
|
107
|
+
:shadow="false"
|
|
108
108
|
@click="drawer=true"
|
|
109
109
|
></WButtonCircle>
|
|
110
110
|
</div>
|