From c29b8f7fff9e6b4eb7bb02da3284b015493b2a3a Mon Sep 17 00:00:00 2001 From: FoskyM Date: Sun, 1 Oct 2023 19:14:59 +0800 Subject: [PATCH] feat: authorize page --- js/dist/forum.js | Bin 4090 -> 6146 bytes js/dist/forum.js.map | Bin 13659 -> 20023 bytes .../forum/components/oauth/AuthorizePage.js | 167 ++++++++++---- less/forum.less | 1 + less/forum/oauth.less | 218 ++++++++++++++++++ 5 files changed, 338 insertions(+), 48 deletions(-) create mode 100644 less/forum/oauth.less diff --git a/js/dist/forum.js b/js/dist/forum.js index 2422d75c017c9af68f12a51062aefe48d9701d4a..1ab32a43bd8d0d323de5467aa6080d1f4d66182b 100644 GIT binary patch literal 6146 zcmd5=Z;unl8GqkTVJ51ztE|@sluBK9gVLxGdp{C#%BrI zM1=-Qk|tE7pp+MpqDlpnv<-pK`!KQ1@v2{;znR&!_wMWqY5SrPf%VKY&pglX`9FqX zx-SnmJzf#+FmY)9gSoU?rFN@D)7M#$Mf8-Uqjo?$UKR;Q{c3V5GM-d~9T?0SdJY?z z78_ZCV^E7pz8%I5$(vWgq{2*LGZ1pKT0JH|srp=LuTvi^XeUhQSDi-Fv;hBV1y z%Dr|(onsBFONGN$`P#@FSAK`nDNG+;uI5c0NO1`W}azzp^KE$WARVEDq+QBOeaIjS-4QT2w zA(dNY(jHqXfZUR#qdZhRM5K_v4Vb71#>`zc;1>pm)y}~`sR`=^fkBv;iC#?$m=Y^B z*Q{uvufplFxDE%&9ks686uED4iP%+;c%>O+_- zGam}xJkM*&yq04VmEY98k-m|<^C*?{v9z$A_SlxO zjZj5}eyPzg^LiND97iFkRLL-#QV-YVMQRO$otdxu-7I^2@|vqwhJK7fSbBMq!Y?h*fAQe3*XR1$UJyklSU~WvRrsqtTuE+ zQe~bdb&D;#obCY;WTD$D9fMSe`Eu>}sbzF&KMJ83sGQX$G;2yn6|v>Q)nVzzAg<+k z5b1|<2=P{ig4Ckh2%%P4B!XtKcHD&r6_QEnInLNVsQdF@iw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Hd(Ml>WT#dB>n&rOC%&DIQNb%S^>5+_nznXo$sDU zUxa>s`|ID1g)%f4{y6LzA_MakdJvxJDk1$6jty3f>%sznD~38yB*F6NY-H%UvboLK zuDPWnhmbIGKD14CWF}OkFC+1;DWu1dwNQqV!W!&J%i7Y^N7eyK%EmD9@L~#S)2FhLw*SIgP37AT$x)!y1rUyG&4Fqs3u?o;Knsn5YIOs&`9ND#GOO6Cw-Z6v?=vf8X z&I%|c6%GDaOqhq5msf>{IZm_8JBI8IViVBXQv$HTp6qR9Y}GoxO#r)Y90Y?hdz?j< zC>SgcpkzVrz}RXaG%p$~NV_#_38|d4Q$?OLxshs@{y$WJRA!y3rc6$6bNPX+=U$mL zkq6wnmVb%?zkbO`NeZ9$ju-Y`}^STkH+Tgl-34Zwx{R|1b@k5-@(iqa zT2y%cWt5Az*+RwT@q|xnPpO@-ru^j&j8H%TKnyjk4EWQe`%k^R25po~Gqp$M$@-y@u;vrC;$9 z-HK`SQEcX!{T*+|qwium{ShmYtq=9=YqndrwRhS5ss0juqc2gfc$t2h8m9O4Q}mv= z(3`J%bzf`L9Em~q;sf+X{P|PTTXpS8x4JtnV-t)`kK^}fPMoF1sb2aa9;fdo=by4a znKIh;alu?P_1l-F@}@kBqNdetf6eh-dwfE1TS>U|ZQ=z`DNV<|6ZmD7Q`E-K`z5D7 z84RupWI)quw%@3E+Su4X0JM_Gk7~L$#(!OVqO4tg%ga{m2{p`7;v8ko7?q~`=!5Ao zdN_B2?wirW53$g#*Y{k app.modal.show(LogInModal), 500); - } + params = []; + client = null; - const params = m.route.param(); - - if (params.client_id == null || params.response_type == null || params.redirect_uri == null) { - m.route.set('/'); - } else { - this.params = params; - app.store.find('oauth-clients', params.client_id).then(client => { - if (client.length === 0) { - m.route.set('/'); - } else { - this.client = client[0]; - const uris = client.redirect_uri.split(' '); - console.log(uris); - if (app.forum.attribute('foskym-oauth-center.require_exact_redirect_uri') && uris.indexOf(params.redirect_uri) == -1) { - m.route.set('/'); - } - if (app.forum.attribute('foskym-oauth-center.allow_implicit') && params.response_type == 'token') { - m.route.set('/'); - } - if (app.forum.attribute('foskym-oauth-center.enforce_state') && params.enforce_state == null) { - m.route.set('/'); - } + oninit(vnode) { + super.oninit(vnode); + if (!app.session.user) { + setTimeout(() => app.modal.show(LogInModal), 500); } - }); - } - } - setTitle() { - app.setTitle(extractText(app.translator.trans('foskym-oauth-center.forum.page.title.authorize'))); - app.setTitleCount(0); - } - view() { - if (!this.client) { - return ''; + const params = m.route.param(); + + if (params.client_id == null || params.response_type == null || params.redirect_uri == null) { + m.route.set('/'); + } else { + this.params = params; + app.store.find('oauth-clients', params.client_id).then(client => { + if (client.length === 0) { + m.route.set('/'); + } else { + this.client = client[0]; + let uris = null; + if (this.client.redirect_uri().indexOf(' ') > -1) { + uris = this.client.redirect_uri().split(' '); + } else { + uris = [this.client.redirect_uri()]; + } + + if (app.forum.attribute('foskym-oauth-center.require_exact_redirect_uri') && uris.indexOf(params.redirect_uri) == -1) { + m.route.set('/'); + } + if (app.forum.attribute('foskym-oauth-center.allow_implicit') && params.response_type == 'token') { + m.route.set('/'); + } + if (app.forum.attribute('foskym-oauth-center.enforce_state') && params.enforce_state == null) { + m.route.set('/'); + } + } + }); + } + } + + setTitle() { + app.setTitle(extractText(app.translator.trans('foskym-oauth-center.forum.page.title.authorize'))); + app.setTitleCount(0); + } + + view() { + if (!this.client) { + return ''; + } + return ( +
+
+
+
+
+

{app.forum.attribute('title')}

+

+ {app.translator.trans('foskym-oauth-center.forum.authorize.access')} {this.client.client_name()} +

+ +
+
+ +
+ + + + + +
+
+
+
+ +
+
+
+ 保持对已向 计量便民平台 授予访问权限的数据的访问权限
+ + 即使当前没有使用该应用,也允许 计量便民平台 查看和更新你授予其访问权限的数据。这不会向 + 计量便民平台 授予任何其他权限。 +
+
+
+
+ +
+
+
+ 读取用户个人资料
+ + 访问该用户(mouse123)的个人信息、最新动态等 +
+
+
+
+ + + + + +
+ + +
+
+ + +
+
+
+
+
+ ); } - app.setTitle(extractText(app.translator.trans('foskym-oauth-center.forum.page.title.authorize') + ' ' + this.client.client_name)); - app.setTitleCount(0); - return ( -
-
-
-
- ); - } } diff --git a/less/forum.less b/less/forum.less index e69de29..8a23319 100644 --- a/less/forum.less +++ b/less/forum.less @@ -0,0 +1 @@ +@import url('./forum/oauth'); diff --git a/less/forum/oauth.less b/less/forum/oauth.less new file mode 100644 index 0000000..b76de17 --- /dev/null +++ b/less/forum/oauth.less @@ -0,0 +1,218 @@ +.oauth-area { + display: block !important; + position: relative; + left: 0; + top: 0; + padding: 110px 0; + min-height: 100%; + box-sizing: border-box; +} + +.oauth-main { + position: relative; + width: 376px; + margin: 0 auto; + box-sizing: border-box; +} + +.oauth-main::before { + backdrop-filter: blur(20px); + content: ''; + position: absolute; + width: 100%; + height: 100%; + left: 0; + top: 0; + box-shadow: 0 25px 50px #00000030; + background: hsla(0, 0%, 100%, .3); +} + +.oauth-box { + padding: 20px; + background-color: #f3f3f3; +} + +.oauth-header { + backdrop-filter: blur(0); + text-align: center; + box-shadow: 0 5px 10px -5px #d2d2d2; +} + +.oauth-header h2 { + margin-bottom: 8px; + font-weight: 600; + font-size: 40px; + color: #000; +} + +.oauth-header p { + font-weight: 400; + font-size: 20px; + color: #333; +} + +.oauth-body .oauth-form-item { + position: relative; + margin-bottom: 15px; + clear: both; + *zoom: 1; +} + +.oauth-body .oauth-form-item:after { + content: '\20'; + clear: both; + *zoom: 1; + display: block; + height: 0; +} + +.oauth-icon { + position: absolute; + left: 4px; + top: 1px; + width: auto; + line-height: 35px; + text-align: center; + color: #999; + padding: 0 8px; + font-size: 14px; +} + +label:before { + color: #999; +} + +@media screen and (max-width: 768px) { + .oauth-area { + padding-top: 60px + } + + .oauth-main { + width: 300px + } + + .oauth-box { + padding: 10px + } + + .oauth-main::before { + backdrop-filter: none; + } + + .oauth-header { + background-color: #fff; + } + + body { + margin: 0 + } +} + +@media screen and (max-width: 600px) { + .oauth-area { + padding-top: 0 + } + + body { + background: #f3f3f3 !important; + } + + .oauth-main { + width: 100%; + } + + .oauth-main::before { + box-shadow: none !important; + } + + .oauth-header { + box-shadow: none; + } + + .oauth-box:last-child { + box-shadow: 0 5px 10px -5px #d2d2d2; + } +} + +.oauth-top { + text-align: center; + padding-bottom: 20px; + position: relative; +} + +.oauth-top img { + width: 64px; + border-radius: 50%; + border: #4950578c solid 1px; + box-shadow: 1px 0 0 0 #e8e8e8, 0 1px 0 0 #e8e8e8, 1px 1px 0 0 #e8e8e8, inset 1px 0 0 0 #e8e8e8, inset 0 1px 0 0 #e8e8e8; + transition: all .3s; +} + +.oauth-top img:hover { + box-shadow: 0 2px 8px rgba(0, 0, 0, .3); +} + +.oauth-top i { + top: -24px; + position: relative; + padding-left: 10px; + padding-right: 10px; + color: #111; +} + +.oauth-scope-area { + padding-top: 10px; + padding-bottom: 10px; + overflow: auto; + max-height: 350px; + position: relative; +} + +.oauth-scope { + margin-top: 15px; +} + +.oauth-scope:first-child { + margin-top: 0; +} + +.oauth-scope, .oauth-scope-body { + overflow: hidden; + zoom: 1; +} + +.oauth-scope-body, .oauth-scope-left, .oauth-scope-right { + display: table-cell; + vertical-align: top; +} + +.oauth-scope-left, .oauth-scope > .pull-left { + padding-right: 10px; + min-width: 42px; + text-align: center; +} + +img.oauth-scope-object { + display: block; + vertical-align: middle; + border: 0; + width: 32px; + height: 32px; +} + +.oauth-scope-body { + width: 10000px; + padding-left: 8px; +} + +.oauth-scope-heading { + margin-top: 0; + font-weight: 800; + color: #382e2e; +} + +.oauth-scope-body small { + font-weight: 500; + font-size: 12px; + color: #aaa; +}