From d168ac6106d282ad21e637ba0e5cf986ef109eb3 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 18 Feb 2017 13:13:43 +0900 Subject: [PATCH] :v: --- src/web/app/common/mixins.ls | 2 +- src/web/app/common/scripts/signout.js | 5 +++++ src/web/app/common/scripts/signout.ls | 4 ---- 3 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 src/web/app/common/scripts/signout.js delete mode 100644 src/web/app/common/scripts/signout.ls diff --git a/src/web/app/common/mixins.ls b/src/web/app/common/mixins.ls index ca27e0357..3999851a9 100644 --- a/src/web/app/common/mixins.ls +++ b/src/web/app/common/mixins.ls @@ -12,7 +12,7 @@ module.exports = (me) ~> Cropper: require \cropperjs riot.mixin \signout do - signout: require './scripts/signout.ls' + signout: require './scripts/signout.js' riot.mixin \messaging-stream do MessagingStreamConnection: require './scripts/messaging-stream.ls' diff --git a/src/web/app/common/scripts/signout.js b/src/web/app/common/scripts/signout.js new file mode 100644 index 000000000..cd752423d --- /dev/null +++ b/src/web/app/common/scripts/signout.js @@ -0,0 +1,5 @@ +module.exports = () => { + localStorage.removeItem('me'); + document.cookie = `i=; domain=.${CONFIG.host}; expires=Thu, 01 Jan 1970 00:00:01 GMT;`; + location.href = '/'; +}; diff --git a/src/web/app/common/scripts/signout.ls b/src/web/app/common/scripts/signout.ls deleted file mode 100644 index a64792267..000000000 --- a/src/web/app/common/scripts/signout.ls +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = -> - local-storage.remove-item \me - document.cookie = "i=; domain=.#{CONFIG.host}; expires=Thu, 01 Jan 1970 00:00:01 GMT;" - location.href = \/