From db0d55e0fc28128c7e33287a8c41e9b39bf2ffe3 Mon Sep 17 00:00:00 2001 From: yannickFuereder Date: Tue, 19 Dec 2023 14:48:00 +0100 Subject: [PATCH] social icons --- Assets/css/profile.css | 7 +++++- Assets/js/profile.js | 9 ++++---- profile/index.html | 52 +++++++++++++++++++++++++++++++++--------- 3 files changed, 52 insertions(+), 16 deletions(-) diff --git a/Assets/css/profile.css b/Assets/css/profile.css index d4dc5fc..9218516 100644 --- a/Assets/css/profile.css +++ b/Assets/css/profile.css @@ -438,4 +438,9 @@ button.success { button.error { background-color: #d01d1d; border: 2px solid #d01d1d; -} \ No newline at end of file +} + +a { + color: #fff; + text-decoration: none; +} diff --git a/Assets/js/profile.js b/Assets/js/profile.js index 57c76ba..f36072a 100644 --- a/Assets/js/profile.js +++ b/Assets/js/profile.js @@ -222,6 +222,7 @@ async function LinkAccount(code) { } localStorage.removeItem('linkType'); + const urlParams = new URLSearchParams(window.location.search); urlParams.delete('code'); window.history.replaceState({}, document.title, window.location.pathname + window.location.search); @@ -637,15 +638,15 @@ function LinkAccounts(type) { switch (type) { case 'spotify': { - window.location.href = 'https://accounts.spotify.com/de/authorize?client_id=a7c2014c0531405983d7050277dee3cb&response_type=code&redirect_uri=https://new.netdb.at/profile&scope=user-read-private%20user-read-email'; + window.location.href = 'https://accounts.spotify.com/de/authorize?client_id=a7c2014c0531405983d7050277dee3cb&response_type=code&redirect_uri=https://netdb.at/profile&scope=user-read-private%20user-read-email'; break; } case 'discord': { - window.location.href = 'https://discord.com/api/oauth2/authorize?client_id=802237562625196084&redirect_uri=https://new.netdb.at/profile&response_type=code&scope=identify%20email'; + window.location.href = 'https://discord.com/api/oauth2/authorize?client_id=802237562625196084&redirect_uri=https://netdb.at/profile&response_type=code&scope=identify%20email'; break; } case 'twitch': { - window.location.href = 'https://id.twitch.tv/oauth2/authorize?client_id=okxhfdyyoyx724c5zf0h869x9ry1sx&redirect_uri=https://new.netdb.at/profile&response_type=code&scope=user_read'; + window.location.href = 'https://id.twitch.tv/oauth2/authorize?client_id=okxhfdyyoyx724c5zf0h869x9ry1sx&redirect_uri=https://netdb.at/profile&response_type=code&scope=user_read'; break; } case 'github': { @@ -654,7 +655,7 @@ function LinkAccounts(type) { } case 'google': { window.location.href = - 'https://accounts.google.com/o/oauth2/v2/auth?scope=https%3A//www.googleapis.com/auth/userinfo.email&access_type=offline&include_granted_scopes=true&response_type=code&state=state_parameter_passthrough_value&redirect_uri=https://new.netdb.at/profile&client_id=736018590984-nh2ifch6ps8art9v35avipv16se1b720.apps.googleusercontent.com'; + 'https://accounts.google.com/o/oauth2/v2/auth?scope=https%3A//www.googleapis.com/auth/userinfo.email&access_type=offline&include_granted_scopes=true&response_type=code&state=state_parameter_passthrough_value&redirect_uri=https://netdb.at/profile&client_id=736018590984-nh2ifch6ps8art9v35avipv16se1b720.apps.googleusercontent.com'; break; } } diff --git a/profile/index.html b/profile/index.html index 364ebd3..e509bcb 100644 --- a/profile/index.html +++ b/profile/index.html @@ -111,7 +111,9 @@

Connected Accounts

- Spotify + + + @@ -121,13 +123,20 @@

Disconnect

-

-

- - Twitch - - - +

+

+ + + + + + + + + + + + @@ -137,7 +146,25 @@

Disconnect

- Discord + + + + + + + + + + + + + + + + + + + @@ -150,7 +177,7 @@

Disconnect

- Google + @@ -163,7 +190,10 @@

Disconnect

- Apple + + + +