w-web-sso 1.0.37 → 1.0.39
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/.github/workflows/ci-test.yml +2 -2
- package/_gh-pages-deploy/.nojekyll +0 -0
- package/_gh-pages-deploy/WWebSso.html +400 -0
- package/_gh-pages-deploy/fonts/Montserrat/Montserrat-Bold.eot +0 -0
- package/_gh-pages-deploy/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
- package/_gh-pages-deploy/fonts/Montserrat/Montserrat-Bold.woff +0 -0
- package/_gh-pages-deploy/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
- package/_gh-pages-deploy/fonts/Montserrat/Montserrat-Regular.eot +0 -0
- package/_gh-pages-deploy/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
- package/_gh-pages-deploy/fonts/Montserrat/Montserrat-Regular.woff +0 -0
- package/_gh-pages-deploy/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
- package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
- package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
- package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
- package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
- package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
- package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
- package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
- package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
- package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
- package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
- package/_gh-pages-deploy/index.html +84 -0
- package/_gh-pages-deploy/scripts/collapse.js +39 -0
- package/_gh-pages-deploy/scripts/commonNav.js +28 -0
- package/_gh-pages-deploy/scripts/linenumber.js +25 -0
- package/_gh-pages-deploy/scripts/nav.js +12 -0
- package/_gh-pages-deploy/scripts/polyfill.js +4 -0
- package/_gh-pages-deploy/scripts/prettify/Apache-License-2.0.txt +202 -0
- package/_gh-pages-deploy/scripts/prettify/lang-css.js +2 -0
- package/_gh-pages-deploy/scripts/prettify/prettify.js +28 -0
- package/_gh-pages-deploy/scripts/search.js +99 -0
- package/{docs/WWebSso.mjs.html → _gh-pages-deploy/server_WWebSso.mjs.html} +1333 -1149
- package/_gh-pages-deploy/src_components_Common_CheckYesNo.vue.html +195 -0
- package/_gh-pages-deploy/styles/jsdoc.css +776 -0
- package/_gh-pages-deploy/styles/prettify.css +80 -0
- package/dist/css/app.5f246189.css +1 -0
- package/dist/css/chunk-vendors.f831c81d.css +1 -0
- package/dist/index.tmp +2 -6
- package/dist/js/app-legacy.73f3eae0.js +1 -0
- package/dist/js/app.73f3eae0.js +1 -0
- package/dist/js/chunk-vendors-legacy.7c56bceb.js +21 -0
- package/dist/js/chunk-vendors.7c56bceb.js +21 -0
- package/dist/w-web-sso.umd.js +6 -4
- package/dist/w-web-sso.umd.js.map +1 -1
- package/docs/WWebSso.html +2 -2
- package/docs/index.html +1 -1
- package/docs/server_WWebSso.mjs.html +1402 -0
- package/docs/src_components_Common_CheckYesNo.vue.html +195 -0
- package/g.getSettings.mjs +49 -3
- package/g.initialData.mjs +103 -78
- package/package.json +17 -13
- package/public/index.html +3 -16
- package/server/WWebSso.mjs +1330 -1146
- package/server/genRandomPassword.mjs +120 -0
- package/server/procCore.mjs +700 -176
- package/server/procLang.mjs +1231 -1047
- package/server/procProtect.mjs +40 -12
- package/server/procStaInfor.mjs +46 -26
- package/server/template/changePasswordEmail-cht.html +1 -0
- package/server/template/changePasswordEmail-eng.html +1 -0
- package/server/template/regVerifyEmail-cht.html +1 -0
- package/server/template/regVerifyEmail-eng.html +1 -0
- package/server/template/resetPasswordEmail-cht.html +1 -0
- package/server/template/resetPasswordEmail-eng.html +1 -0
- package/server/template/verifyEmailResult.html +26 -0
- package/settings.json +49 -12
- package/src/App.vue +30 -13
- package/src/components/Common/CheckYes.vue +18 -1
- package/src/components/Common/CheckYesNo.vue +32 -0
- package/src/components/Layout.vue +19 -8
- package/src/components/LayoutContent.vue +23 -0
- package/src/components/LayoutContentIps.vue +119 -111
- package/src/components/LayoutContentStaInfor.vue +146 -43
- package/src/components/LayoutContentTokens.vue +174 -215
- package/src/components/LayoutContentUserInfor.vue +518 -1017
- package/src/components/LayoutContentUsers.vue +475 -395
- package/src/components/PageLogin.vue +467 -21
- package/src/components/PageUser.vue +109 -37
- package/src/main.js +1 -5
- package/src/plugins/mShare.mjs +0 -215
- package/src/plugins/mUI.mjs +188 -66
- package/src/schema/tables/users.mjs +12 -1
- package/src/store/mutations.mjs +4 -4
- package/src/store/types.mjs +1 -1
- package/srv.mjs +21 -2
- package/db/wsso/ips/data.mdb +0 -0
- package/db/wsso/ips/lock.mdb +0 -0
- package/db/wsso/tokens/data.mdb +0 -0
- package/db/wsso/tokens/lock.mdb +0 -0
- package/db/wsso/users/data.mdb +0 -0
- package/db/wsso/users/lock.mdb +0 -0
- package/dist/css/app.beea8385.css +0 -1
- package/dist/js/app-legacy.93c91f21.js +0 -1
- package/dist/js/app.93c91f21.js +0 -1
- package/dist/js/chunk-vendors-legacy.3ce45600.js +0 -14
- package/dist/js/chunk-vendors.3ce45600.js +0 -14
- package/g.provideUsers.mjs +0 -45
- package/server/provideTabs.mjs +0 -71
- package/src/components/Common/LabelItem.vue +0 -106
- package/src/components/ruleGroup.vue.txt +0 -644
- package/src/plugins/mDataSupport.mjs +0 -23
- package/test/all.test.mjs +0 -10
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<title>src/components/Common/CheckYesNo.vue - Documentation</title>
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
<script src="scripts/prettify/prettify.js"></script>
|
|
10
|
+
<script src="scripts/prettify/lang-css.js"></script>
|
|
11
|
+
<!--[if lt IE 9]>
|
|
12
|
+
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
13
|
+
<![endif]-->
|
|
14
|
+
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
|
|
15
|
+
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
|
|
16
|
+
<script src="scripts/nav.js" defer></script>
|
|
17
|
+
|
|
18
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
19
|
+
</head>
|
|
20
|
+
<body>
|
|
21
|
+
|
|
22
|
+
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
|
|
23
|
+
<label for="nav-trigger" class="navicon-button x">
|
|
24
|
+
<div class="navicon"></div>
|
|
25
|
+
</label>
|
|
26
|
+
|
|
27
|
+
<label for="nav-trigger" class="overlay"></label>
|
|
28
|
+
|
|
29
|
+
<nav >
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="WWebSso.html">WWebSso</a></li></ul>
|
|
33
|
+
|
|
34
|
+
</nav>
|
|
35
|
+
|
|
36
|
+
<div id="main">
|
|
37
|
+
|
|
38
|
+
<h1 class="page-title">src/components/Common/CheckYesNo.vue</h1>
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<section>
|
|
47
|
+
<article>
|
|
48
|
+
<pre class="prettyprint source linenums"><code><template>
|
|
49
|
+
<WConfirm
|
|
50
|
+
:show.sync="bShow"
|
|
51
|
+
:title="$t('systemMessage')"
|
|
52
|
+
:content="content"
|
|
53
|
+
:_contentColor="'white'"
|
|
54
|
+
:_contentIconColor="'white'"
|
|
55
|
+
:_contentBackgroundColor="'orange lighten-5'"
|
|
56
|
+
:_titleColor="'white'"
|
|
57
|
+
:headerBackgroundColor="'grey lighten-3'"
|
|
58
|
+
:noBtnText="$t('no')"
|
|
59
|
+
:yesBtnText="$t('yes')"
|
|
60
|
+
@click-no="clickBtn(false)"
|
|
61
|
+
@click-yes="clickBtn(true)"
|
|
62
|
+
></WConfirm>
|
|
63
|
+
</template>
|
|
64
|
+
|
|
65
|
+
<script>
|
|
66
|
+
import Vue from 'vue'
|
|
67
|
+
import genPm from 'wsemi/src/genPm.mjs'
|
|
68
|
+
import WConfirm from 'w-component-vue/src/components/WConfirm.vue'
|
|
69
|
+
|
|
70
|
+
export default {
|
|
71
|
+
components: {
|
|
72
|
+
WConfirm,
|
|
73
|
+
},
|
|
74
|
+
props: {
|
|
75
|
+
},
|
|
76
|
+
data: function() {
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
bShow: false,
|
|
80
|
+
pm: null,
|
|
81
|
+
|
|
82
|
+
content: '',
|
|
83
|
+
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
mounted: function() {
|
|
87
|
+
//console.log('mounted')
|
|
88
|
+
|
|
89
|
+
let vo = this
|
|
90
|
+
|
|
91
|
+
//set
|
|
92
|
+
Vue.prototype.$dg.showCheckYesNo = vo.show
|
|
93
|
+
|
|
94
|
+
},
|
|
95
|
+
computed: {
|
|
96
|
+
},
|
|
97
|
+
methods: {
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* 顯示 Yes/No 確認對話框並回傳 Promise。
|
|
101
|
+
*
|
|
102
|
+
* **Contract** (caller 須遵守):
|
|
103
|
+
* - 使用者點 **Yes** → Promise `resolve()` (無值, 進 `.then()`)
|
|
104
|
+
* - 使用者點 **No** → Promise `reject('close')` (進 `.catch(err => err === 'close')`)
|
|
105
|
+
*
|
|
106
|
+
* 正確 caller pattern:
|
|
107
|
+
*
|
|
108
|
+
* vo.$dg.showCheckYesNo('確定要 X?')
|
|
109
|
+
* .then(() => {
|
|
110
|
+
* //使用者點 Yes
|
|
111
|
+
* doX()
|
|
112
|
+
* })
|
|
113
|
+
* .catch((err) => {
|
|
114
|
+
* //使用者點 No (err === 'close') 為正常路徑, 靜默處理
|
|
115
|
+
* if (err === 'close') return
|
|
116
|
+
* //非預期錯誤 (CheckYesNo 本身故障等)
|
|
117
|
+
* console.log('showCheckYesNo unexpected error', err)
|
|
118
|
+
* })
|
|
119
|
+
*
|
|
120
|
+
* **錯誤 pattern (歷史踩過坑, 不要再寫)**:
|
|
121
|
+
*
|
|
122
|
+
* // ❌ 永遠錯: 假設 resolve(true/false) 來判斷 Yes/No
|
|
123
|
+
* vo.$dg.showCheckYesNo(text).then(agree => {
|
|
124
|
+
* if (agree) { doX() } //agree 永遠 undefined (resolve 無值) → 永不執行 doX
|
|
125
|
+
* })
|
|
126
|
+
* //雙重 bug: Yes silent fail (本段) + No unhandled rejection (沒 .catch)
|
|
127
|
+
*
|
|
128
|
+
* @param {string} content - 顯示在 modal 中的訊息文字
|
|
129
|
+
* @returns {Promise<void>} Yes → resolve(); No → reject('close')
|
|
130
|
+
*/
|
|
131
|
+
show: function (content) {
|
|
132
|
+
//console.log('methods show', content)
|
|
133
|
+
|
|
134
|
+
let vo = this
|
|
135
|
+
|
|
136
|
+
//pm
|
|
137
|
+
vo.pm = genPm()
|
|
138
|
+
|
|
139
|
+
//save
|
|
140
|
+
vo.content = content
|
|
141
|
+
|
|
142
|
+
//show
|
|
143
|
+
vo.bShow = true
|
|
144
|
+
|
|
145
|
+
return vo.pm
|
|
146
|
+
},
|
|
147
|
+
|
|
148
|
+
clickBtn: function(mode) {
|
|
149
|
+
//console.log('methods clickBtn', mode)
|
|
150
|
+
|
|
151
|
+
let vo = this
|
|
152
|
+
|
|
153
|
+
if (mode) {
|
|
154
|
+
vo.pm.resolve()
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
vo.pm.reject('close')
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
//hide
|
|
161
|
+
vo.bShow = false
|
|
162
|
+
|
|
163
|
+
},
|
|
164
|
+
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
</script>
|
|
168
|
+
|
|
169
|
+
<style scoped>
|
|
170
|
+
</style>
|
|
171
|
+
</code></pre>
|
|
172
|
+
</article>
|
|
173
|
+
</section>
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
</div>
|
|
181
|
+
|
|
182
|
+
<br class="clear">
|
|
183
|
+
|
|
184
|
+
<footer>
|
|
185
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Mon Jun 22 2026 15:43:55 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
186
|
+
</footer>
|
|
187
|
+
|
|
188
|
+
<script>prettyPrint();</script>
|
|
189
|
+
<script src="scripts/polyfill.js"></script>
|
|
190
|
+
<script src="scripts/linenumber.js"></script>
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
</body>
|
|
195
|
+
</html>
|