Skip to content

Commit f1a91df

Browse files
author
Meyn
committed
Add Http Warning (#2)
1 parent 9b1b6f7 commit f1a91df

File tree

2 files changed

+50
-10
lines changed

2 files changed

+50
-10
lines changed

SpotifyToM3U/MVVM/View/Windows/SpotifySetupWindow.xaml

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -322,23 +322,48 @@
322322
FontSize="14"
323323
FontWeight="SemiBold"
324324
Margin="0,0,0,8" />
325-
<TextBlock Text="In your app settings, add this redirect URI:"
325+
<TextBlock Text="When creating your app, first use this HTTPS redirect URI:"
326326
FontSize="12"
327327
Foreground="#666666"
328328
Margin="0,0,0,4" />
329329

330-
<!-- Selectable TextBox for the URL -->
330+
<!-- HTTPS URL for initial creation -->
331+
<TextBox Text="https://localhost:5000/callback"
332+
Style="{StaticResource SelectableTextBox}"
333+
Margin="0,4,0,8" />
334+
335+
<TextBlock Text="⚠️ Important: After creating the app, edit it and change the redirect URI to HTTP:"
336+
FontSize="12"
337+
Foreground="#FF6B00"
338+
FontWeight="Medium"
339+
Margin="0,0,0,4" />
340+
341+
<!-- Final HTTP URL -->
331342
<TextBox Text="http://localhost:5000/callback"
332343
Style="{StaticResource SelectableTextBox}"
333344
Margin="0,4,0,8"
334-
ToolTip="Click to select all text, then copy with Ctrl+C" />
345+
ToolTip="This is the final redirect URI to use after creating your app" />
335346

336-
<Button Content="📋 Copy Redirect URI"
337-
Command="{Binding CopyRedirectUriCommand}"
338-
Background="#74C7EC"
339-
Foreground="White"
340-
Style="{StaticResource ModernDialogButton}"
341-
HorizontalAlignment="Left" />
347+
<TextBlock Text="This two-step process is required due to Spotify's security policies."
348+
FontSize="11"
349+
Foreground="#999999"
350+
FontStyle="Italic"
351+
Margin="0,0,0,8" />
352+
353+
<StackPanel Orientation="Horizontal">
354+
<Button Content="📋 Copy HTTPS URI"
355+
Command="{Binding CopyHttpsRedirectUriCommand}"
356+
Background="#74C7EC"
357+
Foreground="White"
358+
Style="{StaticResource ModernDialogButton}"
359+
Margin="0,0,8,0" />
360+
361+
<Button Content="📋 Copy HTTP URI"
362+
Command="{Binding CopyRedirectUriCommand}"
363+
Background="#74C7EC"
364+
Foreground="White"
365+
Style="{StaticResource ModernDialogButton}" />
366+
</StackPanel>
342367
</StackPanel>
343368
</Grid>
344369

SpotifyToM3U/MVVM/ViewModel/SpotifySetupVM.cs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,28 @@ private void OpenDashboard()
6464
}
6565
}
6666

67+
[RelayCommand]
68+
private void CopyHttpsRedirectUri()
69+
{
70+
try
71+
{
72+
Clipboard.SetText("https://localhost:5000/callback");
73+
StatusMessage = "HTTPS redirect URI copied to clipboard! Use this when creating your app.";
74+
}
75+
catch (Exception ex)
76+
{
77+
StatusMessage = $"Failed to copy to clipboard: {ex.Message}";
78+
Debug.WriteLine($"Failed to copy to clipboard: {ex.Message}");
79+
}
80+
}
81+
6782
[RelayCommand]
6883
private void CopyRedirectUri()
6984
{
7085
try
7186
{
7287
Clipboard.SetText("http://localhost:5000/callback");
73-
StatusMessage = "Redirect URI copied to clipboard!";
88+
StatusMessage = "HTTP redirect URI copied to clipboard! Edit your app to use this final URI.";
7489
}
7590
catch (Exception ex)
7691
{

0 commit comments

Comments
 (0)