From 5149b3880aac2c2dfeb554aed995bedf3fb7806a Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Thu, 20 May 2021 16:03:47 +0200 Subject: [PATCH 1/6] refactor(console): users devices into session --- app/config/auth.php | 2 +- app/views/console/users/index.phtml | 3 ++- app/views/console/users/user.phtml | 10 ++++++---- public/images/users/{oauth2 => }/amazon.png | Bin public/images/users/{oauth2 => }/apple.png | Bin public/images/users/{oauth2 => }/bitbucket.png | Bin public/images/users/{oauth2 => }/bitly.png | Bin public/images/users/{oauth2 => }/box.png | Bin public/images/users/{oauth2 => }/discord.png | Bin public/images/users/{oauth2 => }/dropbox.png | Bin .../images/users/{email-password.png => email.png} | Bin public/images/users/{oauth2 => }/facebook.png | Bin public/images/users/{oauth2 => }/github.png | Bin public/images/users/{oauth2 => }/gitlab.png | Bin public/images/users/{oauth2 => }/google.png | Bin public/images/users/{oauth2 => }/linkedin.png | Bin public/images/users/{oauth2 => }/microsoft.png | Bin public/images/users/{oauth2 => }/paypal.png | Bin public/images/users/{oauth2 => }/paypalsandbox.png | Bin public/images/users/{oauth2 => }/salesforce.png | Bin public/images/users/{oauth2 => }/slack.png | Bin public/images/users/{oauth2 => }/spotify.png | Bin public/images/users/{oauth2 => }/tradeshift.png | Bin public/images/users/{oauth2 => }/tradeshiftbox.png | Bin public/images/users/{oauth2 => }/twitch.png | Bin public/images/users/{oauth2 => }/twitter.png | Bin public/images/users/{oauth2 => }/vk.png | Bin public/images/users/{oauth2 => }/wordpress.png | Bin public/images/users/{oauth2 => }/yahoo.png | Bin public/images/users/{oauth2 => }/yandex.png | Bin 30 files changed, 9 insertions(+), 6 deletions(-) rename public/images/users/{oauth2 => }/amazon.png (100%) rename public/images/users/{oauth2 => }/apple.png (100%) rename public/images/users/{oauth2 => }/bitbucket.png (100%) rename public/images/users/{oauth2 => }/bitly.png (100%) rename public/images/users/{oauth2 => }/box.png (100%) rename public/images/users/{oauth2 => }/discord.png (100%) rename public/images/users/{oauth2 => }/dropbox.png (100%) rename public/images/users/{email-password.png => email.png} (100%) rename public/images/users/{oauth2 => }/facebook.png (100%) rename public/images/users/{oauth2 => }/github.png (100%) rename public/images/users/{oauth2 => }/gitlab.png (100%) rename public/images/users/{oauth2 => }/google.png (100%) rename public/images/users/{oauth2 => }/linkedin.png (100%) rename public/images/users/{oauth2 => }/microsoft.png (100%) rename public/images/users/{oauth2 => }/paypal.png (100%) rename public/images/users/{oauth2 => }/paypalsandbox.png (100%) rename public/images/users/{oauth2 => }/salesforce.png (100%) rename public/images/users/{oauth2 => }/slack.png (100%) rename public/images/users/{oauth2 => }/spotify.png (100%) rename public/images/users/{oauth2 => }/tradeshift.png (100%) rename public/images/users/{oauth2 => }/tradeshiftbox.png (100%) rename public/images/users/{oauth2 => }/twitch.png (100%) rename public/images/users/{oauth2 => }/twitter.png (100%) rename public/images/users/{oauth2 => }/vk.png (100%) rename public/images/users/{oauth2 => }/wordpress.png (100%) rename public/images/users/{oauth2 => }/yahoo.png (100%) rename public/images/users/{oauth2 => }/yandex.png (100%) diff --git a/app/config/auth.php b/app/config/auth.php index 8e718e6804..11b89dd9ec 100644 --- a/app/config/auth.php +++ b/app/config/auth.php @@ -6,7 +6,7 @@ return [ 'email-password' => [ 'name' => 'Email/Password', 'key' => 'usersAuthEmailPassword', - 'icon' => '/images/users/email-password.png', + 'icon' => '/images/users/email.png', 'docs' => 'https://appwrite.io/docs/client/account?sdk=web#accountCreateSession', 'enabled' => true, ], diff --git a/app/views/console/users/index.phtml b/app/views/console/users/index.phtml index 8cb4b7e55c..0b5641807b 100644 --- a/app/views/console/users/index.phtml +++ b/app/views/console/users/index.phtml @@ -78,6 +78,7 @@ $auth = $this->getParam('auth', []); ----- + Anonymous User @@ -479,7 +480,7 @@ $auth = $this->getParam('auth', []); - <?php echo $this->escape(ucfirst($provider)); ?> Logo + <?php echo $this->escape(ucfirst($provider)); ?> Logo escape($name); ?> sandbox beta diff --git a/app/views/console/users/user.phtml b/app/views/console/users/user.phtml index 048d870071..b9dfcb8ea3 100644 --- a/app/views/console/users/user.phtml +++ b/app/views/console/users/user.phtml @@ -12,7 +12,8 @@
  - Unknown + Unknown + Anonymous User @@ -180,8 +181,8 @@ -
  • -

    Devices

    +
  • +

    Sessions

    + on @@ -244,7 +246,7 @@ data-failure-param-alert-text="Failed to logout all sessions" data-failure-param-alert-classname="error"> - +
    diff --git a/public/images/users/oauth2/amazon.png b/public/images/users/amazon.png similarity index 100% rename from public/images/users/oauth2/amazon.png rename to public/images/users/amazon.png diff --git a/public/images/users/oauth2/apple.png b/public/images/users/apple.png similarity index 100% rename from public/images/users/oauth2/apple.png rename to public/images/users/apple.png diff --git a/public/images/users/oauth2/bitbucket.png b/public/images/users/bitbucket.png similarity index 100% rename from public/images/users/oauth2/bitbucket.png rename to public/images/users/bitbucket.png diff --git a/public/images/users/oauth2/bitly.png b/public/images/users/bitly.png similarity index 100% rename from public/images/users/oauth2/bitly.png rename to public/images/users/bitly.png diff --git a/public/images/users/oauth2/box.png b/public/images/users/box.png similarity index 100% rename from public/images/users/oauth2/box.png rename to public/images/users/box.png diff --git a/public/images/users/oauth2/discord.png b/public/images/users/discord.png similarity index 100% rename from public/images/users/oauth2/discord.png rename to public/images/users/discord.png diff --git a/public/images/users/oauth2/dropbox.png b/public/images/users/dropbox.png similarity index 100% rename from public/images/users/oauth2/dropbox.png rename to public/images/users/dropbox.png diff --git a/public/images/users/email-password.png b/public/images/users/email.png similarity index 100% rename from public/images/users/email-password.png rename to public/images/users/email.png diff --git a/public/images/users/oauth2/facebook.png b/public/images/users/facebook.png similarity index 100% rename from public/images/users/oauth2/facebook.png rename to public/images/users/facebook.png diff --git a/public/images/users/oauth2/github.png b/public/images/users/github.png similarity index 100% rename from public/images/users/oauth2/github.png rename to public/images/users/github.png diff --git a/public/images/users/oauth2/gitlab.png b/public/images/users/gitlab.png similarity index 100% rename from public/images/users/oauth2/gitlab.png rename to public/images/users/gitlab.png diff --git a/public/images/users/oauth2/google.png b/public/images/users/google.png similarity index 100% rename from public/images/users/oauth2/google.png rename to public/images/users/google.png diff --git a/public/images/users/oauth2/linkedin.png b/public/images/users/linkedin.png similarity index 100% rename from public/images/users/oauth2/linkedin.png rename to public/images/users/linkedin.png diff --git a/public/images/users/oauth2/microsoft.png b/public/images/users/microsoft.png similarity index 100% rename from public/images/users/oauth2/microsoft.png rename to public/images/users/microsoft.png diff --git a/public/images/users/oauth2/paypal.png b/public/images/users/paypal.png similarity index 100% rename from public/images/users/oauth2/paypal.png rename to public/images/users/paypal.png diff --git a/public/images/users/oauth2/paypalsandbox.png b/public/images/users/paypalsandbox.png similarity index 100% rename from public/images/users/oauth2/paypalsandbox.png rename to public/images/users/paypalsandbox.png diff --git a/public/images/users/oauth2/salesforce.png b/public/images/users/salesforce.png similarity index 100% rename from public/images/users/oauth2/salesforce.png rename to public/images/users/salesforce.png diff --git a/public/images/users/oauth2/slack.png b/public/images/users/slack.png similarity index 100% rename from public/images/users/oauth2/slack.png rename to public/images/users/slack.png diff --git a/public/images/users/oauth2/spotify.png b/public/images/users/spotify.png similarity index 100% rename from public/images/users/oauth2/spotify.png rename to public/images/users/spotify.png diff --git a/public/images/users/oauth2/tradeshift.png b/public/images/users/tradeshift.png similarity index 100% rename from public/images/users/oauth2/tradeshift.png rename to public/images/users/tradeshift.png diff --git a/public/images/users/oauth2/tradeshiftbox.png b/public/images/users/tradeshiftbox.png similarity index 100% rename from public/images/users/oauth2/tradeshiftbox.png rename to public/images/users/tradeshiftbox.png diff --git a/public/images/users/oauth2/twitch.png b/public/images/users/twitch.png similarity index 100% rename from public/images/users/oauth2/twitch.png rename to public/images/users/twitch.png diff --git a/public/images/users/oauth2/twitter.png b/public/images/users/twitter.png similarity index 100% rename from public/images/users/oauth2/twitter.png rename to public/images/users/twitter.png diff --git a/public/images/users/oauth2/vk.png b/public/images/users/vk.png similarity index 100% rename from public/images/users/oauth2/vk.png rename to public/images/users/vk.png diff --git a/public/images/users/oauth2/wordpress.png b/public/images/users/wordpress.png similarity index 100% rename from public/images/users/oauth2/wordpress.png rename to public/images/users/wordpress.png diff --git a/public/images/users/oauth2/yahoo.png b/public/images/users/yahoo.png similarity index 100% rename from public/images/users/oauth2/yahoo.png rename to public/images/users/yahoo.png diff --git a/public/images/users/oauth2/yandex.png b/public/images/users/yandex.png similarity index 100% rename from public/images/users/oauth2/yandex.png rename to public/images/users/yandex.png From 5dc1759901f74bfac91a1777d51cd2e83f1f8232 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Thu, 20 May 2021 16:16:19 +0200 Subject: [PATCH 2/6] docs(oauth): fixed tutorial image path --- docs/tutorials/add-oauth2-provider.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/add-oauth2-provider.md b/docs/tutorials/add-oauth2-provider.md index c06d7c0872..6f36a6b716 100644 --- a/docs/tutorials/add-oauth2-provider.md +++ b/docs/tutorials/add-oauth2-provider.md @@ -25,7 +25,7 @@ Make sure to fill all data needed and that your provider array key name: ### Add Provider Logo -Add a logo image to your new provider in this path: `./public/images/oauth2`. Your logo should be a png 100×100px file with the name of your provider (all lowercase). Please make sure to leave about 30px padding around the logo to be consistent with other logos. +Add a logo image to your new provider in this path: `./public/images/users`. Your logo should be a png 100×100px file with the name of your provider (all lowercase). Please make sure to leave about 30px padding around the logo to be consistent with other logos. ### Add Provider Class From 54baea36f30761ae8a3d1287c7e3a9ab8878428c Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Thu, 20 May 2021 16:17:50 +0200 Subject: [PATCH 3/6] fix(console): switch browser with provider icon in users session --- app/views/console/users/user.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/console/users/user.phtml b/app/views/console/users/user.phtml index b9dfcb8ea3..abab76587f 100644 --- a/app/views/console/users/user.phtml +++ b/app/views/console/users/user.phtml @@ -218,8 +218,8 @@ - + on From b54747b3ace0e2d3b3f922547f9e8bd427ca790e Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Wed, 26 May 2021 10:40:52 +0200 Subject: [PATCH 4/6] refactor(console): sessions icons --- app/views/console/users/user.phtml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/views/console/users/user.phtml b/app/views/console/users/user.phtml index abab76587f..14724c79af 100644 --- a/app/views/console/users/user.phtml +++ b/app/views/console/users/user.phtml @@ -217,9 +217,13 @@ - - - +
    + + +
    + +
    +
    on From b34d09f8a8711bd43118e02f462bd8fdee7a3b6e Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Wed, 26 May 2021 10:41:17 +0200 Subject: [PATCH 5/6] refactor(console): add provider to session in account --- app/views/console/account/index.phtml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/app/views/console/account/index.phtml b/app/views/console/account/index.phtml index 3f1e7decc9..4ad919cc2b 100644 --- a/app/views/console/account/index.phtml +++ b/app/views/console/account/index.phtml @@ -193,8 +193,8 @@
  • -
  • -

    Devices

    +
  • +

    Sessions

    - +
    + + +
    + +
    +
    Unknown on @@ -283,7 +289,7 @@ data-failure-param-alert-text="Logout from All Sessions Failed" data-failure-param-alert-classname="error"> - +
  • From 76c5fcf7742ade3fcbb398b54f6a33c1e3340a85 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Wed, 26 May 2021 13:51:08 +0200 Subject: [PATCH 6/6] docs(changelog): add changelog for devices refactor --- CHANGES.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 0bedf0b12d..50ee022a06 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,11 @@ +# NOT PUBLISHED YET + +## Features +- Refactored Devices page in Console: + - Renamed *Devices* to *Sessions* + - Add Provider Icon to each Session + - Add Anonymous Account Placeholder + # Version 0.8.0 ## Features