From bf8be55f76bc7be3ee1f17464900322649ccecef Mon Sep 17 00:00:00 2001 From: Andy Pack Date: Sun, 13 Nov 2022 21:01:34 +0000 Subject: [PATCH 1/4] adding privacy policy, adding more data to user dump --- Selector.Model/ApplicationUser.cs | 4 ++++ Selector.Web/Pages/Privacy.cshtml | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Selector.Model/ApplicationUser.cs b/Selector.Model/ApplicationUser.cs index 6de0988..ebf21d4 100644 --- a/Selector.Model/ApplicationUser.cs +++ b/Selector.Model/ApplicationUser.cs @@ -8,13 +8,17 @@ namespace Selector.Model { public class ApplicationUser : IdentityUser { + [PersonalData] public bool SpotifyIsLinked { get; set; } + [PersonalData] public DateTime SpotifyLastRefresh { get; set; } public int SpotifyTokenExpiry { get; set; } public string SpotifyAccessToken { get; set; } public string SpotifyRefreshToken { get; set; } + [PersonalData] public string LastFmUsername { get; set; } + [PersonalData] public bool SaveScrobbles { get; set; } public List Watchers { get; set; } diff --git a/Selector.Web/Pages/Privacy.cshtml b/Selector.Web/Pages/Privacy.cshtml index 8c3afc0..08809de 100644 --- a/Selector.Web/Pages/Privacy.cshtml +++ b/Selector.Web/Pages/Privacy.cshtml @@ -5,4 +5,12 @@ }

@ViewData["Title"]

-

Use this page to detail your site's privacy policy.

+

Selector is a side project that I don't/won't/can't monetise. No extra personal information is stored and all information can be deleted whenever you like. Your credentials are a username, email and password only, I don’t want your name/phone number. No analytics/ad libraries are used.

+ +

Selector relies on a link to your Spotify account in order to see what you're listening to and respond. When you link your Spotify account, Selector is provided with a key that it can use to make requests of Spotify. You can unlink Spotify from the Selector settings, doing so clears all stored Spotify credentials, completely removing Selector's ability to access your Spotify account. If and when you would like to prevent Selector's access to your Spotify account, you can also revoke Selector's access from your Spotify account settings.

+ +

Selector also has Last.fm integrations, enabled by providing your username in the Selector settings page. Selector only uses publicly available Last.fm data, no authentication with Last.fm is required and removing the username from Selector’s settings disables the integration.

+ +

You can manage your personal data here. From this page you can download or delete your data.

+ +

If you have any questions or concerns about your data, you can contact me using the form on sarsoo.xyz.

\ No newline at end of file From 38a9bed8f404026fe55e52ad992aaffc58918332 Mon Sep 17 00:00:00 2001 From: Andy Pack Date: Sun, 13 Nov 2022 21:34:46 +0000 Subject: [PATCH 2/4] QOL tweaks --- .../Pages/Account/Manage/Index.cshtml | 5 ---- .../Pages/Account/Manage/Index.cshtml.cs | 18 ++---------- .../Identity/Pages/Account/Register.cshtml | 29 ++++++++----------- Selector.Web/Pages/Shared/_Layout.cshtml | 6 ++++ .../Pages/Shared/_LoginPartial.cshtml | 4 +-- 5 files changed, 22 insertions(+), 40 deletions(-) diff --git a/Selector.Web/Areas/Identity/Pages/Account/Manage/Index.cshtml b/Selector.Web/Areas/Identity/Pages/Account/Manage/Index.cshtml index 100a45c..f4055e0 100644 --- a/Selector.Web/Areas/Identity/Pages/Account/Manage/Index.cshtml +++ b/Selector.Web/Areas/Identity/Pages/Account/Manage/Index.cshtml @@ -15,11 +15,6 @@ -
- - - -
diff --git a/Selector.Web/Areas/Identity/Pages/Account/Manage/Index.cshtml.cs b/Selector.Web/Areas/Identity/Pages/Account/Manage/Index.cshtml.cs index a262199..d2f96b2 100644 --- a/Selector.Web/Areas/Identity/Pages/Account/Manage/Index.cshtml.cs +++ b/Selector.Web/Areas/Identity/Pages/Account/Manage/Index.cshtml.cs @@ -35,21 +35,18 @@ namespace Selector.Web.Areas.Identity.Pages.Account.Manage public class InputModel { - [Phone] - [Display(Name = "Phone number")] - public string PhoneNumber { get; set; } + } private async Task LoadAsync(ApplicationUser user) { var userName = await _userManager.GetUserNameAsync(user); - var phoneNumber = await _userManager.GetPhoneNumberAsync(user); Username = userName; Input = new InputModel { - PhoneNumber = phoneNumber + }; } @@ -79,17 +76,6 @@ namespace Selector.Web.Areas.Identity.Pages.Account.Manage return Page(); } - var phoneNumber = await _userManager.GetPhoneNumberAsync(user); - if (Input.PhoneNumber != phoneNumber) - { - var setPhoneResult = await _userManager.SetPhoneNumberAsync(user, Input.PhoneNumber); - if (!setPhoneResult.Succeeded) - { - StatusMessage = "Unexpected error when trying to set phone number."; - return RedirectToPage(); - } - } - await _signInManager.RefreshSignInAsync(user); StatusMessage = "Your profile has been updated"; return RedirectToPage(); diff --git a/Selector.Web/Areas/Identity/Pages/Account/Register.cshtml b/Selector.Web/Areas/Identity/Pages/Account/Register.cshtml index e742ef7..03c8493 100644 --- a/Selector.Web/Areas/Identity/Pages/Account/Register.cshtml +++ b/Selector.Web/Areas/Identity/Pages/Account/Register.cshtml @@ -34,21 +34,16 @@
-
-

Use another service to register.

-
- @{ - if ((Model.ExternalLogins?.Count ?? 0) == 0) - { -
-

- There are no external authentication services configured. See this article - for details on setting up this ASP.NET application to support logging in via external services. -

-
- } - else - { + @{ + if ((Model.ExternalLogins?.Count ?? 0) == 0) + { + + } + else + { +
+

Use another service to register.

+

@@ -59,9 +54,9 @@

- } +
} -
+ }
diff --git a/Selector.Web/Pages/Shared/_Layout.cshtml b/Selector.Web/Pages/Shared/_Layout.cshtml index 237c220..d7249b0 100644 --- a/Selector.Web/Pages/Shared/_Layout.cshtml +++ b/Selector.Web/Pages/Shared/_Layout.cshtml @@ -17,6 +17,12 @@ + + diff --git a/Selector.Web/Pages/Shared/_LoginPartial.cshtml b/Selector.Web/Pages/Shared/_LoginPartial.cshtml index f0e203d..0ab0a87 100644 --- a/Selector.Web/Pages/Shared/_LoginPartial.cshtml +++ b/Selector.Web/Pages/Shared/_LoginPartial.cshtml @@ -19,10 +19,10 @@ else { } From 39864d7c313ec49bd8c7aaccd453ed6201dcb6ed Mon Sep 17 00:00:00 2001 From: Andy Pack Date: Sun, 13 Nov 2022 21:44:02 +0000 Subject: [PATCH 3/4] tweaking chart sizing --- Selector.Web/CSS/now.scss | 14 ++++++++------ Selector.Web/scripts/Now/PlayCountGraph.ts | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Selector.Web/CSS/now.scss b/Selector.Web/CSS/now.scss index 60a05e8..48ff727 100644 --- a/Selector.Web/CSS/now.scss +++ b/Selector.Web/CSS/now.scss @@ -31,8 +31,10 @@ $shadow-color: #1e1e1e; .chart-card { // width: 500px; - width: 100%; - max-width: max-content; + margin-top: 10px; + margin-bottom: 10px; + // width: 100%; + // max-width: max-content; } @media only screen and (min-width: 768px) { @@ -50,10 +52,6 @@ $shadow-color: #1e1e1e; width: 250px; } - - .chart-card { - width: 500px; - } } @media only screen and (min-width: 768px) { @@ -61,6 +59,10 @@ $shadow-color: #1e1e1e; min-width: 200px; max-width: 500px; } + + .chart-card { + width: 500px; + } } .spotify-logo { diff --git a/Selector.Web/scripts/Now/PlayCountGraph.ts b/Selector.Web/scripts/Now/PlayCountGraph.ts index aa7182c..3f9aa69 100644 --- a/Selector.Web/scripts/Now/PlayCountGraph.ts +++ b/Selector.Web/scripts/Now/PlayCountGraph.ts @@ -28,7 +28,7 @@ export let PlayCountChartCard: Vue.Component = { }, template: ` -
+

{{ title }}

@@ -89,7 +89,7 @@ export let CombinedPlayCountChartCard: Vue.Component = { }, template: ` -
+
From e0cf6b67142c542a9349ee18cfa42f484781d37b Mon Sep 17 00:00:00 2001 From: Andy Pack Date: Sun, 13 Nov 2022 21:58:03 +0000 Subject: [PATCH 4/4] changing signature link to about page --- Selector.Web/Pages/Shared/_Layout.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Selector.Web/Pages/Shared/_Layout.cshtml b/Selector.Web/Pages/Shared/_Layout.cshtml index d7249b0..8c1be46 100644 --- a/Selector.Web/Pages/Shared/_Layout.cshtml +++ b/Selector.Web/Pages/Shared/_Layout.cshtml @@ -40,7 +40,7 @@ © 2021 - Selector.Web - Privacy