File tree Expand file tree Collapse file tree 2 files changed +4
-20
lines changed
Expand file tree Collapse file tree 2 files changed +4
-20
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ export class BaseForm extends LitElement {
7171 . join ( '-' )
7272 . replaceAll ( / - + / g, '-' ) } `;
7373
74- return `/console/ login?redirect_uri=${ encodeURIComponent ( window . location . href + parentDomId ) } ` ;
74+ return `/login?redirect_uri=${ encodeURIComponent ( window . location . pathname + parentDomId ) } ` ;
7575 }
7676
7777 get showCaptcha ( ) {
@@ -98,25 +98,9 @@ export class BaseForm extends LitElement {
9898 }
9999
100100 async handleLogout ( ) {
101- if ( window . confirm ( '确定要退出登录吗? ' ) ) {
101+ if ( window . confirm ( '点击确定将跳转至退出登录页面,请确保正在编辑的内容已保存。 ' ) ) {
102102 try {
103- const response = await fetch ( `${ this . baseUrl } /logout` , {
104- method : 'POST' ,
105- headers : {
106- 'X-Xsrf-Token' :
107- document . cookie
108- . split ( '; ' )
109- . find ( ( row ) => row . startsWith ( 'XSRF-TOKEN' ) )
110- ?. split ( '=' ) [ 1 ] || '' ,
111- } ,
112- credentials : 'same-origin' ,
113- } ) ;
114-
115- if ( ! response . ok ) {
116- throw new Error ( 'Failed to logout' ) ;
117- }
118-
119- window . location . reload ( ) ;
103+ window . location . href = '/logout' ;
120104 } catch ( error ) {
121105 console . error ( 'Failed to logout' , error ) ;
122106 }
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ metadata:
88 " store.halo.run/app-id " : " app-YXyaD"
99spec :
1010 enabled : true
11- requires : " >=2.17 .0"
11+ requires : " >=2.20 .0"
1212 author :
1313 name : Halo
1414 website : https://github.com/halo-dev
You can’t perform that action at this time.
0 commit comments