Aggiunta Media Browser e restyling UI tema scuro
- Introdotti MediaBrowserViewModel e MediaBrowserPage per esplorazione e gestione media scaricati, con filtri e ricerca - Aggiornata App.xaml con palette colori, gradienti e nuovi stili scuri per card, bottoni, textbox e titoli - Restyling completo di Dashboard, Targets e Settings con layout moderni, card, icone e badge - Aggiornata NavigationView con nuova voce "Esplora Media", header grafico e footer con stato/versione - Navigazione verso MediaBrowserPage e dimensione finestra iniziale più ampia - Rimosse risorse legacy "Data" dal progetto, aggiunto launchSettings.json - Esperienza utente più moderna, coerente e accessibile
This commit is contained in:
205
Teti/App.xaml
205
Teti/App.xaml
@@ -2,17 +2,220 @@
|
||||
x:Class="InstaArchive.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:converters="using:InstaArchive.Converters">
|
||||
xmlns:converters="using:InstaArchive.Converters"
|
||||
RequestedTheme="Dark">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<!-- Converters -->
|
||||
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"/>
|
||||
<converters:InverseBoolToVisibilityConverter x:Key="InverseBoolToVisibilityConverter"/>
|
||||
<converters:NullToVisibilityConverter x:Key="NullToVisibilityConverter"/>
|
||||
<converters:TimeFormatConverter x:Key="TimeFormatConverter"/>
|
||||
|
||||
<!-- Dark Theme Color Palette -->
|
||||
<Color x:Key="PrimaryColor">#E1306C</Color>
|
||||
<Color x:Key="PrimaryLightColor">#F77EA4</Color>
|
||||
<Color x:Key="PrimaryDarkColor">#C13584</Color>
|
||||
<Color x:Key="AccentColor">#5B51D8</Color>
|
||||
<Color x:Key="AccentLightColor">#7B72E8</Color>
|
||||
<Color x:Key="SuccessColor">#34C759</Color>
|
||||
<Color x:Key="WarningColor">#FF9500</Color>
|
||||
<Color x:Key="ErrorColor">#FF3B30</Color>
|
||||
<Color x:Key="InfoColor">#5856D6</Color>
|
||||
|
||||
<!-- Dark Theme Backgrounds -->
|
||||
<Color x:Key="DarkBackground">#0A0A0A</Color>
|
||||
<Color x:Key="DarkSurface">#141414</Color>
|
||||
<Color x:Key="DarkCard">#1C1C1E</Color>
|
||||
<Color x:Key="DarkElevated">#2C2C2E</Color>
|
||||
<Color x:Key="DarkBorder">#38383A</Color>
|
||||
|
||||
<!-- Text Colors -->
|
||||
<Color x:Key="TextPrimary">#FFFFFF</Color>
|
||||
<Color x:Key="TextSecondary">#8E8E93</Color>
|
||||
<Color x:Key="TextTertiary">#48484A</Color>
|
||||
|
||||
<!-- Brushes -->
|
||||
<SolidColorBrush x:Key="PrimaryBrush" Color="{StaticResource PrimaryColor}"/>
|
||||
<SolidColorBrush x:Key="PrimaryLightBrush" Color="{StaticResource PrimaryLightColor}"/>
|
||||
<SolidColorBrush x:Key="PrimaryDarkBrush" Color="{StaticResource PrimaryDarkColor}"/>
|
||||
<SolidColorBrush x:Key="AccentBrush" Color="{StaticResource AccentColor}"/>
|
||||
<SolidColorBrush x:Key="AccentLightBrush" Color="{StaticResource AccentLightColor}"/>
|
||||
<SolidColorBrush x:Key="SuccessBrush" Color="{StaticResource SuccessColor}"/>
|
||||
<SolidColorBrush x:Key="WarningBrush" Color="{StaticResource WarningColor}"/>
|
||||
<SolidColorBrush x:Key="ErrorBrush" Color="{StaticResource ErrorColor}"/>
|
||||
<SolidColorBrush x:Key="InfoBrush" Color="{StaticResource InfoColor}"/>
|
||||
|
||||
<SolidColorBrush x:Key="DarkBackgroundBrush" Color="{StaticResource DarkBackground}"/>
|
||||
<SolidColorBrush x:Key="DarkSurfaceBrush" Color="{StaticResource DarkSurface}"/>
|
||||
<SolidColorBrush x:Key="DarkCardBrush" Color="{StaticResource DarkCard}"/>
|
||||
<SolidColorBrush x:Key="DarkElevatedBrush" Color="{StaticResource DarkElevated}"/>
|
||||
<SolidColorBrush x:Key="DarkBorderBrush" Color="{StaticResource DarkBorder}"/>
|
||||
|
||||
<SolidColorBrush x:Key="TextPrimaryBrush" Color="{StaticResource TextPrimary}"/>
|
||||
<SolidColorBrush x:Key="TextSecondaryBrush" Color="{StaticResource TextSecondary}"/>
|
||||
<SolidColorBrush x:Key="TextTertiaryBrush" Color="{StaticResource TextTertiary}"/>
|
||||
|
||||
<!-- Gradient Brushes -->
|
||||
<LinearGradientBrush x:Key="InstagramGradient" StartPoint="0,0" EndPoint="1,1">
|
||||
<GradientStop Color="#F58529" Offset="0"/>
|
||||
<GradientStop Color="#DD2A7B" Offset="0.5"/>
|
||||
<GradientStop Color="#8134AF" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<LinearGradientBrush x:Key="PrimaryGradient" StartPoint="0,0" EndPoint="1,0">
|
||||
<GradientStop Color="{StaticResource PrimaryColor}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource AccentColor}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<LinearGradientBrush x:Key="DarkGradient" StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientStop Color="{StaticResource DarkSurface}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource DarkBackground}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<!-- Modern Card Styles -->
|
||||
<Style x:Key="DarkCardStyle" TargetType="Border">
|
||||
<Setter Property="Background" Value="{StaticResource DarkCardBrush}"/>
|
||||
<Setter Property="CornerRadius" Value="16"/>
|
||||
<Setter Property="Padding" Value="24"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource DarkBorderBrush}"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ElevatedCardStyle" TargetType="Border">
|
||||
<Setter Property="Background" Value="{StaticResource DarkElevatedBrush}"/>
|
||||
<Setter Property="CornerRadius" Value="20"/>
|
||||
<Setter Property="Padding" Value="28"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource DarkBorderBrush}"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="StatCardStyle" TargetType="Border">
|
||||
<Setter Property="Background" Value="{StaticResource DarkCardBrush}"/>
|
||||
<Setter Property="CornerRadius" Value="16"/>
|
||||
<Setter Property="Padding" Value="24"/>
|
||||
<Setter Property="MinHeight" Value="140"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource DarkBorderBrush}"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="GlassCardStyle" TargetType="Border">
|
||||
<Setter Property="Background" Value="#1A1C1C1E"/>
|
||||
<Setter Property="CornerRadius" Value="16"/>
|
||||
<Setter Property="Padding" Value="24"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="BorderBrush" Value="#33FFFFFF"/>
|
||||
</Style>
|
||||
|
||||
<!-- Button Styles -->
|
||||
<Style x:Key="PrimaryButtonStyle" TargetType="Button">
|
||||
<Setter Property="Background" Value="{StaticResource PrimaryBrush}"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="CornerRadius" Value="12"/>
|
||||
<Setter Property="Padding" Value="24,14"/>
|
||||
<Setter Property="FontWeight" Value="SemiBold"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="MinHeight" Value="44"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SecondaryButtonStyle" TargetType="Button">
|
||||
<Setter Property="Background" Value="{StaticResource DarkElevatedBrush}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextPrimaryBrush}"/>
|
||||
<Setter Property="CornerRadius" Value="12"/>
|
||||
<Setter Property="Padding" Value="24,14"/>
|
||||
<Setter Property="FontWeight" Value="SemiBold"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="MinHeight" Value="44"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource DarkBorderBrush}"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SecondaryToggleButtonStyle" TargetType="ToggleButton">
|
||||
<Setter Property="Background" Value="{StaticResource DarkElevatedBrush}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextPrimaryBrush}"/>
|
||||
<Setter Property="CornerRadius" Value="12"/>
|
||||
<Setter Property="Padding" Value="24,14"/>
|
||||
<Setter Property="FontWeight" Value="SemiBold"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="MinHeight" Value="44"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource DarkBorderBrush}"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="IconButtonStyle" TargetType="Button">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="CornerRadius" Value="10"/>
|
||||
<Setter Property="Padding" Value="10"/>
|
||||
<Setter Property="MinWidth" Value="44"/>
|
||||
<Setter Property="MinHeight" Value="44"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="IconToggleButtonStyle" TargetType="ToggleButton">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="CornerRadius" Value="10"/>
|
||||
<Setter Property="Padding" Value="10"/>
|
||||
<Setter Property="MinWidth" Value="44"/>
|
||||
<Setter Property="MinHeight" Value="44"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="AccentButtonStyle" TargetType="Button">
|
||||
<Setter Property="Background" Value="{StaticResource AccentBrush}"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="CornerRadius" Value="12"/>
|
||||
<Setter Property="Padding" Value="24,14"/>
|
||||
<Setter Property="FontWeight" Value="SemiBold"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="MinHeight" Value="44"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
</Style>
|
||||
|
||||
<!-- TextBox Styles -->
|
||||
<Style x:Key="DarkTextBoxStyle" TargetType="TextBox">
|
||||
<Setter Property="CornerRadius" Value="12"/>
|
||||
<Setter Property="Padding" Value="16,14"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource DarkBorderBrush}"/>
|
||||
<Setter Property="Background" Value="{StaticResource DarkElevatedBrush}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextPrimaryBrush}"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="MinHeight" Value="44"/>
|
||||
</Style>
|
||||
|
||||
<!-- Title Styles -->
|
||||
<Style x:Key="PageTitleStyle" TargetType="TextBlock">
|
||||
<Setter Property="FontSize" Value="32"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextPrimaryBrush}"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SectionTitleStyle" TargetType="TextBlock">
|
||||
<Setter Property="FontSize" Value="20"/>
|
||||
<Setter Property="FontWeight" Value="SemiBold"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextPrimaryBrush}"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="CardTitleStyle" TargetType="TextBlock">
|
||||
<Setter Property="FontSize" Value="16"/>
|
||||
<Setter Property="FontWeight" Value="SemiBold"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextPrimaryBrush}"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="BodyTextStyle" TargetType="TextBlock">
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextSecondaryBrush}"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="CaptionTextStyle" TargetType="TextBlock">
|
||||
<Setter Property="FontSize" Value="12"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextSecondaryBrush}"/>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
|
||||
@@ -59,6 +59,7 @@ public partial class App : Application
|
||||
services.AddTransient<DashboardViewModel>();
|
||||
services.AddTransient<TargetsViewModel>();
|
||||
services.AddTransient<SettingsViewModel>();
|
||||
services.AddTransient<MediaBrowserViewModel>();
|
||||
|
||||
Services = services.BuildServiceProvider();
|
||||
}
|
||||
|
||||
@@ -17,6 +17,12 @@
|
||||
<WindowsPackageType>None</WindowsPackageType>
|
||||
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Remove="Data\**" />
|
||||
<EmbeddedResource Remove="Data\**" />
|
||||
<None Remove="Data\**" />
|
||||
<Page Remove="Data\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="Assets\SplashScreen.scale-200.png" />
|
||||
@@ -43,6 +49,21 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Data\" />
|
||||
<PRIResource Remove="Data\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="Teti.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="Views\MediaBrowserPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
|
||||
@@ -7,18 +7,110 @@
|
||||
mc:Ignorable="d"
|
||||
Title="InstaArchive">
|
||||
|
||||
<Grid>
|
||||
<Grid Background="{StaticResource DarkBackgroundBrush}">
|
||||
<NavigationView x:Name="NavView"
|
||||
IsBackButtonVisible="Collapsed"
|
||||
PaneDisplayMode="Left"
|
||||
SelectionChanged="NavView_SelectionChanged">
|
||||
IsPaneToggleButtonVisible="True"
|
||||
IsSettingsVisible="False"
|
||||
SelectionChanged="NavView_SelectionChanged"
|
||||
OpenPaneLength="280"
|
||||
CompactModeThresholdWidth="640"
|
||||
CompactPaneLength="56"
|
||||
Background="{StaticResource DarkSurfaceBrush}">
|
||||
|
||||
<NavigationView.PaneHeader>
|
||||
<Grid Height="100" Padding="20,16">
|
||||
<StackPanel VerticalAlignment="Center" Spacing="12">
|
||||
<Border Background="{StaticResource InstagramGradient}"
|
||||
Width="48" Height="48"
|
||||
CornerRadius="14"
|
||||
HorizontalAlignment="Left">
|
||||
<FontIcon Glyph=""
|
||||
FontSize="24"
|
||||
Foreground="White"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
<StackPanel>
|
||||
<TextBlock Text="InstaArchive"
|
||||
FontSize="20"
|
||||
FontWeight="Bold"
|
||||
Foreground="{StaticResource TextPrimaryBrush}"/>
|
||||
<TextBlock Text="Instagram Media Archiver"
|
||||
FontSize="11"
|
||||
Foreground="{StaticResource TextSecondaryBrush}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</NavigationView.PaneHeader>
|
||||
|
||||
<NavigationView.MenuItems>
|
||||
<NavigationViewItem Content="Pannello" Tag="Dashboard" Icon="Home"/>
|
||||
<NavigationViewItem Content="Obiettivi" Tag="Targets" Icon="People"/>
|
||||
<NavigationViewItem Content="Impostazioni" Tag="Settings" Icon="Setting"/>
|
||||
<NavigationViewItem Content="Dashboard" Tag="Dashboard">
|
||||
<NavigationViewItem.Icon>
|
||||
<FontIcon Glyph="" FontSize="18"/>
|
||||
</NavigationViewItem.Icon>
|
||||
</NavigationViewItem>
|
||||
|
||||
<NavigationViewItem Content="Obiettivi" Tag="Targets">
|
||||
<NavigationViewItem.Icon>
|
||||
<FontIcon Glyph="" FontSize="18"/>
|
||||
</NavigationViewItem.Icon>
|
||||
</NavigationViewItem>
|
||||
|
||||
<NavigationViewItem Content="Esplora Media" Tag="MediaBrowser">
|
||||
<NavigationViewItem.Icon>
|
||||
<FontIcon Glyph="" FontSize="18"/>
|
||||
</NavigationViewItem.Icon>
|
||||
</NavigationViewItem>
|
||||
|
||||
<NavigationViewItemSeparator/>
|
||||
|
||||
<NavigationViewItem Content="Impostazioni" Tag="Settings">
|
||||
<NavigationViewItem.Icon>
|
||||
<FontIcon Glyph="" FontSize="18"/>
|
||||
</NavigationViewItem.Icon>
|
||||
</NavigationViewItem>
|
||||
</NavigationView.MenuItems>
|
||||
|
||||
<NavigationView.PaneFooter>
|
||||
<StackPanel Padding="16,8,16,16" Spacing="12">
|
||||
<!-- Status Indicator -->
|
||||
<Border Background="{StaticResource DarkCardBrush}"
|
||||
CornerRadius="12"
|
||||
Padding="16"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{StaticResource DarkBorderBrush}">
|
||||
<StackPanel Spacing="8">
|
||||
<TextBlock Text="STATO"
|
||||
FontSize="11"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{StaticResource TextTertiaryBrush}"/>
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<Ellipse Width="10" Height="10" Fill="{StaticResource SuccessBrush}">
|
||||
<Ellipse.RenderTransform>
|
||||
<TranslateTransform Y="2"/>
|
||||
</Ellipse.RenderTransform>
|
||||
</Ellipse>
|
||||
<TextBlock Text="Monitoraggio Attivo"
|
||||
FontSize="13"
|
||||
FontWeight="Medium"
|
||||
Foreground="{StaticResource TextPrimaryBrush}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Version Info -->
|
||||
<TextBlock Text="v1.0.0"
|
||||
FontSize="11"
|
||||
Foreground="{StaticResource TextTertiaryBrush}"
|
||||
HorizontalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</NavigationView.PaneFooter>
|
||||
|
||||
<Frame x:Name="ContentFrame"/>
|
||||
<Frame x:Name="ContentFrame"
|
||||
Padding="0"
|
||||
Background="{StaticResource DarkBackgroundBrush}"/>
|
||||
</NavigationView>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
@@ -10,9 +10,21 @@ public sealed partial class MainWindow : Window
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
// Set window properties
|
||||
ExtendsContentIntoTitleBar = true;
|
||||
SetTitleBar(null);
|
||||
|
||||
// Set initial size
|
||||
var appWindow = Microsoft.UI.Windowing.AppWindow.GetFromWindowId(Microsoft.UI.Win32Interop.GetWindowIdFromWindow(
|
||||
WinRT.Interop.WindowNative.GetWindowHandle(this)));
|
||||
|
||||
if (appWindow != null)
|
||||
{
|
||||
appWindow.Resize(new Windows.Graphics.SizeInt32(1400, 900));
|
||||
}
|
||||
|
||||
// Navigate to Dashboard
|
||||
ContentFrame.Navigate(typeof(DashboardPage));
|
||||
}
|
||||
|
||||
@@ -25,11 +37,12 @@ public sealed partial class MainWindow : Window
|
||||
{
|
||||
"Dashboard" => typeof(DashboardPage),
|
||||
"Targets" => typeof(TargetsPage),
|
||||
"MediaBrowser" => typeof(MediaBrowserPage),
|
||||
"Settings" => typeof(SettingsPage),
|
||||
_ => null
|
||||
};
|
||||
|
||||
if (pageType != null)
|
||||
if (pageType != null && ContentFrame.CurrentSourcePageType != pageType)
|
||||
{
|
||||
ContentFrame.Navigate(pageType);
|
||||
}
|
||||
|
||||
11
Teti/Properties/launchSettings.json
Normal file
11
Teti/Properties/launchSettings.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"profiles": {
|
||||
"WSL": {
|
||||
"commandName": "WSL2",
|
||||
"distributionName": ""
|
||||
},
|
||||
"InstaArchive": {
|
||||
"commandName": "Project"
|
||||
}
|
||||
}
|
||||
}
|
||||
0
Teti/Teti.csproj
Normal file
0
Teti/Teti.csproj
Normal file
134
Teti/ViewModels/MediaBrowserViewModel.cs
Normal file
134
Teti/ViewModels/MediaBrowserViewModel.cs
Normal file
@@ -0,0 +1,134 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using InstaArchive.Models;
|
||||
using InstaArchive.Repositories;
|
||||
|
||||
namespace InstaArchive.ViewModels;
|
||||
|
||||
public partial class MediaBrowserViewModel : ObservableObject
|
||||
{
|
||||
private readonly FileBasedMediaRepository _mediaRepository;
|
||||
private readonly FileBasedUserRepository _userRepository;
|
||||
|
||||
[ObservableProperty]
|
||||
private ObservableCollection<MediaItem> allMedia = new();
|
||||
|
||||
[ObservableProperty]
|
||||
private ObservableCollection<MediaItem> filteredMedia = new();
|
||||
|
||||
[ObservableProperty]
|
||||
private ObservableCollection<InstagramUser> allUsers = new();
|
||||
|
||||
[ObservableProperty]
|
||||
private InstagramUser? selectedUserFilter;
|
||||
|
||||
[ObservableProperty]
|
||||
private string searchQuery = string.Empty;
|
||||
|
||||
[ObservableProperty]
|
||||
private MediaItem? selectedMedia;
|
||||
|
||||
public MediaBrowserViewModel(
|
||||
FileBasedMediaRepository mediaRepository,
|
||||
FileBasedUserRepository userRepository)
|
||||
{
|
||||
_mediaRepository = mediaRepository;
|
||||
_userRepository = userRepository;
|
||||
|
||||
_ = LoadDataAsync();
|
||||
}
|
||||
|
||||
partial void OnSearchQueryChanged(string value)
|
||||
{
|
||||
FilterMedia();
|
||||
}
|
||||
|
||||
partial void OnSelectedUserFilterChanged(InstagramUser? value)
|
||||
{
|
||||
FilterMedia();
|
||||
}
|
||||
|
||||
private void FilterMedia()
|
||||
{
|
||||
var filtered = AllMedia.AsEnumerable();
|
||||
|
||||
// Filter by search query
|
||||
if (!string.IsNullOrWhiteSpace(SearchQuery))
|
||||
{
|
||||
var query = SearchQuery.ToLower();
|
||||
filtered = filtered.Where(m =>
|
||||
m.FileName.ToLower().Contains(query) ||
|
||||
m.Caption?.ToLower().Contains(query) == true
|
||||
);
|
||||
}
|
||||
|
||||
// Filter by user
|
||||
if (SelectedUserFilter != null)
|
||||
{
|
||||
filtered = filtered.Where(m => m.UserId == SelectedUserFilter.UserId);
|
||||
}
|
||||
|
||||
FilteredMedia.Clear();
|
||||
foreach (var item in filtered)
|
||||
{
|
||||
FilteredMedia.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private async Task RefreshAsync()
|
||||
{
|
||||
await LoadDataAsync();
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void OpenMedia(MediaItem media)
|
||||
{
|
||||
if (media == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Open media in default application
|
||||
_ = Windows.System.Launcher.LaunchUriAsync(
|
||||
new System.Uri($"file:///{media.LocalPath}")
|
||||
);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private async Task DeleteMediaAsync(MediaItem media)
|
||||
{
|
||||
if (media == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: Implement delete confirmation and deletion
|
||||
AllMedia.Remove(media);
|
||||
FilterMedia();
|
||||
await Task.CompletedTask;
|
||||
}
|
||||
|
||||
private async Task LoadDataAsync()
|
||||
{
|
||||
var mediaList = await _mediaRepository.GetAllMediaAsync();
|
||||
var userList = await _userRepository.GetAllUsersAsync();
|
||||
|
||||
AllMedia.Clear();
|
||||
foreach (var item in mediaList.OrderByDescending(m => m.DownloadedAt))
|
||||
{
|
||||
AllMedia.Add(item);
|
||||
}
|
||||
|
||||
AllUsers.Clear();
|
||||
foreach (var user in userList)
|
||||
{
|
||||
AllUsers.Add(user);
|
||||
}
|
||||
|
||||
FilterMedia();
|
||||
}
|
||||
}
|
||||
@@ -4,42 +4,62 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d">
|
||||
mc:Ignorable="d"
|
||||
Background="{StaticResource DarkBackgroundBrush}">
|
||||
|
||||
<ScrollViewer>
|
||||
<Grid Margin="24">
|
||||
<Grid Margin="32,24,32,32" MaxWidth="1600">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Header -->
|
||||
<Grid Grid.Row="0" Margin="0,0,0,24">
|
||||
<!-- Header Section -->
|
||||
<Grid Grid.Row="0" Margin="0,0,0,32">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="Pannello di Controllo"
|
||||
Style="{ThemeResource TitleTextBlockStyle}"/>
|
||||
<StackPanel Spacing="8">
|
||||
<TextBlock Text="Dashboard"
|
||||
Style="{StaticResource PageTitleStyle}"/>
|
||||
<TextBlock Text="Monitora e archivia i tuoi contenuti Instagram preferiti"
|
||||
Style="{StaticResource BodyTextStyle}"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="12">
|
||||
<Button Content="Avvia Monitoraggio"
|
||||
Command="{x:Bind ViewModel.StartMonitoringCommand}"
|
||||
Visibility="{x:Bind ViewModel.IsMonitoring, Mode=OneWay, Converter={StaticResource InverseBoolToVisibilityConverter}}"/>
|
||||
<Button Content="Ferma Monitoraggio"
|
||||
Command="{x:Bind ViewModel.StopMonitoringCommand}"
|
||||
Visibility="{x:Bind ViewModel.IsMonitoring, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}"/>
|
||||
<Button Command="{x:Bind ViewModel.RefreshCommand}">
|
||||
<SymbolIcon Symbol="Refresh"/>
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="12" VerticalAlignment="Center">
|
||||
<Button Command="{x:Bind ViewModel.StartMonitoringCommand}"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Visibility="{x:Bind ViewModel.IsMonitoring, Mode=OneWay, Converter={StaticResource InverseBoolToVisibilityConverter}}">
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<FontIcon Glyph="" FontSize="16"/>
|
||||
<TextBlock Text="Avvia Monitoraggio" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<Button Command="{x:Bind ViewModel.StopMonitoringCommand}"
|
||||
Style="{StaticResource SecondaryButtonStyle}"
|
||||
Visibility="{x:Bind ViewModel.IsMonitoring, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}">
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<FontIcon Glyph="" FontSize="16"/>
|
||||
<TextBlock Text="Ferma Monitoraggio" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<Button Command="{x:Bind ViewModel.RefreshCommand}"
|
||||
Style="{StaticResource IconButtonStyle}"
|
||||
ToolTipService.ToolTip="Aggiorna">
|
||||
<FontIcon Glyph="" FontSize="18"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<!-- Stats Ribbon -->
|
||||
<Grid Grid.Row="1" Margin="0,0,0,24">
|
||||
<!-- Stats Cards Grid -->
|
||||
<Grid Grid.Row="1" Margin="0,0,0,32">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
@@ -47,78 +67,180 @@
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Border Grid.Column="0" Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||
CornerRadius="8" Padding="20" Margin="0,0,12,0">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Media Totali"
|
||||
Style="{ThemeResource CaptionTextBlockStyle}"
|
||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"/>
|
||||
<TextBlock Text="{x:Bind ViewModel.TotalMediaCount, Mode=OneWay}"
|
||||
Style="{ThemeResource TitleTextBlockStyle}"
|
||||
Margin="0,4,0,0"/>
|
||||
<!-- Media Totali Card -->
|
||||
<Border Grid.Column="0" Style="{StaticResource StatCardStyle}" Margin="0,0,16,0">
|
||||
<StackPanel Spacing="16">
|
||||
<Grid>
|
||||
<StackPanel>
|
||||
<TextBlock Text="MEDIA TOTALI"
|
||||
Style="{StaticResource CaptionTextStyle}"
|
||||
FontWeight="SemiBold"/>
|
||||
<TextBlock Text="{x:Bind ViewModel.TotalMediaCount, Mode=OneWay}"
|
||||
FontSize="36"
|
||||
FontWeight="Bold"
|
||||
Foreground="{StaticResource TextPrimaryBrush}"
|
||||
Margin="0,8,0,0"/>
|
||||
</StackPanel>
|
||||
<Border Background="{StaticResource PrimaryBrush}"
|
||||
Width="48" Height="48"
|
||||
CornerRadius="12"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top">
|
||||
<FontIcon Glyph=""
|
||||
FontSize="24"
|
||||
Foreground="White"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
<StackPanel Orientation="Horizontal" Spacing="6">
|
||||
<FontIcon Glyph=""
|
||||
FontSize="12"
|
||||
Foreground="{StaticResource SuccessBrush}"
|
||||
VerticalAlignment="Center"/>
|
||||
<TextBlock Text="+12% questo mese"
|
||||
Style="{StaticResource CaptionTextStyle}"
|
||||
Foreground="{StaticResource SuccessBrush}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border Grid.Column="1" Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||
CornerRadius="8" Padding="20" Margin="0,0,12,0">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Obiettivi Attivi"
|
||||
Style="{ThemeResource CaptionTextBlockStyle}"
|
||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"/>
|
||||
<TextBlock Text="{x:Bind ViewModel.ActiveTargetsCount, Mode=OneWay}"
|
||||
Style="{ThemeResource TitleTextBlockStyle}"
|
||||
Margin="0,4,0,0"/>
|
||||
<!-- Obiettivi Attivi Card -->
|
||||
<Border Grid.Column="1" Style="{StaticResource StatCardStyle}" Margin="0,0,16,0">
|
||||
<StackPanel Spacing="16">
|
||||
<Grid>
|
||||
<StackPanel>
|
||||
<TextBlock Text="OBIETTIVI ATTIVI"
|
||||
Style="{StaticResource CaptionTextStyle}"
|
||||
FontWeight="SemiBold"/>
|
||||
<TextBlock Text="{x:Bind ViewModel.ActiveTargetsCount, Mode=OneWay}"
|
||||
FontSize="36"
|
||||
FontWeight="Bold"
|
||||
Foreground="{StaticResource TextPrimaryBrush}"
|
||||
Margin="0,8,0,0"/>
|
||||
</StackPanel>
|
||||
<Border Background="{StaticResource AccentBrush}"
|
||||
Width="48" Height="48"
|
||||
CornerRadius="12"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top">
|
||||
<FontIcon Glyph=""
|
||||
FontSize="24"
|
||||
Foreground="White"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
<TextBlock Text="utenti monitorati"
|
||||
Style="{StaticResource CaptionTextStyle}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border Grid.Column="2" Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||
CornerRadius="8" Padding="20" Margin="0,0,12,0">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Download Oggi"
|
||||
Style="{ThemeResource CaptionTextBlockStyle}"
|
||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"/>
|
||||
<TextBlock Text="{x:Bind ViewModel.TodayDownloadsCount, Mode=OneWay}"
|
||||
Style="{ThemeResource TitleTextBlockStyle}"
|
||||
Margin="0,4,0,0"/>
|
||||
<!-- Download Oggi Card -->
|
||||
<Border Grid.Column="2" Style="{StaticResource StatCardStyle}" Margin="0,0,16,0">
|
||||
<StackPanel Spacing="16">
|
||||
<Grid>
|
||||
<StackPanel>
|
||||
<TextBlock Text="DOWNLOAD OGGI"
|
||||
Style="{StaticResource CaptionTextStyle}"
|
||||
FontWeight="SemiBold"/>
|
||||
<TextBlock Text="{x:Bind ViewModel.TodayDownloadsCount, Mode=OneWay}"
|
||||
FontSize="36"
|
||||
FontWeight="Bold"
|
||||
Foreground="{StaticResource TextPrimaryBrush}"
|
||||
Margin="0,8,0,0"/>
|
||||
</StackPanel>
|
||||
<Border Background="{StaticResource InfoBrush}"
|
||||
Width="48" Height="48"
|
||||
CornerRadius="12"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top">
|
||||
<FontIcon Glyph=""
|
||||
FontSize="24"
|
||||
Foreground="White"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
<ProgressBar Value="65"
|
||||
Maximum="100"
|
||||
Foreground="{StaticResource InfoBrush}"
|
||||
Background="{StaticResource DarkElevatedBrush}"
|
||||
Height="4"
|
||||
CornerRadius="2"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border Grid.Column="3" Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||
CornerRadius="8" Padding="20">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Spazio Utilizzato"
|
||||
Style="{ThemeResource CaptionTextBlockStyle}"
|
||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"/>
|
||||
<TextBlock Text="{x:Bind ViewModel.StorageUsed, Mode=OneWay}"
|
||||
Style="{ThemeResource TitleTextBlockStyle}"
|
||||
Margin="0,4,0,0"/>
|
||||
<!-- Spazio Utilizzato Card -->
|
||||
<Border Grid.Column="3" Style="{StaticResource StatCardStyle}">
|
||||
<StackPanel Spacing="16">
|
||||
<Grid>
|
||||
<StackPanel>
|
||||
<TextBlock Text="SPAZIO UTILIZZATO"
|
||||
Style="{StaticResource CaptionTextStyle}"
|
||||
FontWeight="SemiBold"/>
|
||||
<TextBlock Text="{x:Bind ViewModel.StorageUsed, Mode=OneWay}"
|
||||
FontSize="36"
|
||||
FontWeight="Bold"
|
||||
Foreground="{StaticResource TextPrimaryBrush}"
|
||||
Margin="0,8,0,0"/>
|
||||
</StackPanel>
|
||||
<Border Background="{StaticResource WarningBrush}"
|
||||
Width="48" Height="48"
|
||||
CornerRadius="12"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top">
|
||||
<FontIcon Glyph=""
|
||||
FontSize="24"
|
||||
Foreground="White"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
<TextBlock Text="su disco locale"
|
||||
Style="{StaticResource CaptionTextStyle}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<!-- Recent Activity -->
|
||||
<Border Grid.Row="2" Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||
CornerRadius="8" Padding="20" Margin="0,0,0,24">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Attività Recenti"
|
||||
Style="{ThemeResource SubtitleTextBlockStyle}"
|
||||
Margin="0,0,0,12"/>
|
||||
<!-- Recent Activity Section -->
|
||||
<Border Grid.Row="2" Style="{StaticResource DarkCardStyle}" Margin="0,0,0,24">
|
||||
<StackPanel Spacing="20">
|
||||
<Grid>
|
||||
<TextBlock Text="Attività Recenti"
|
||||
Style="{StaticResource SectionTitleStyle}"/>
|
||||
<Button Style="{StaticResource SecondaryButtonStyle}"
|
||||
Padding="16,10"
|
||||
HorizontalAlignment="Right">
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<TextBlock Text="Vedi tutto" VerticalAlignment="Center"/>
|
||||
<FontIcon Glyph="" FontSize="14"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
<GridView ItemsSource="{x:Bind ViewModel.RecentMedia, Mode=OneWay}"
|
||||
SelectionMode="None"
|
||||
IsItemClickEnabled="False">
|
||||
IsItemClickEnabled="False"
|
||||
Padding="0">
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border Width="120" Height="120"
|
||||
Background="{ThemeResource LayerFillColorDefaultBrush}"
|
||||
CornerRadius="4">
|
||||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<SymbolIcon Symbol="Pictures" />
|
||||
<TextBlock Text="{Binding MediaType}"
|
||||
Style="{ThemeResource CaptionTextBlockStyle}"
|
||||
HorizontalAlignment="Center"
|
||||
Margin="0,4,0,0"/>
|
||||
</StackPanel>
|
||||
<Border Background="{StaticResource DarkElevatedBrush}"
|
||||
Width="160" Height="160"
|
||||
CornerRadius="12"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{StaticResource DarkBorderBrush}">
|
||||
<Grid>
|
||||
<FontIcon Glyph=""
|
||||
FontSize="48"
|
||||
Foreground="{StaticResource TextTertiaryBrush}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
|
||||
<Border Background="{StaticResource InstagramGradient}"
|
||||
Padding="10,6"
|
||||
CornerRadius="8"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top"
|
||||
Margin="12">
|
||||
<TextBlock Text="{Binding MediaType}"
|
||||
FontSize="11"
|
||||
Foreground="White"
|
||||
FontWeight="SemiBold"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
@@ -126,26 +248,57 @@
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Log Console -->
|
||||
<Border Grid.Row="3" Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||
CornerRadius="8" Padding="20">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Registro Attività"
|
||||
Style="{ThemeResource SubtitleTextBlockStyle}"
|
||||
Margin="0,0,0,12"/>
|
||||
<!-- Activity Log Section -->
|
||||
<Border Grid.Row="3" Style="{StaticResource DarkCardStyle}" Margin="0,0,0,0">
|
||||
<StackPanel Spacing="20">
|
||||
<Grid>
|
||||
<TextBlock Text="Registro Attività"
|
||||
Style="{StaticResource SectionTitleStyle}"/>
|
||||
<ToggleButton Style="{StaticResource SecondaryToggleButtonStyle}"
|
||||
Padding="16,10"
|
||||
HorizontalAlignment="Right">
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<FontIcon Glyph="" FontSize="14"/>
|
||||
<TextBlock Text="Filtra" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</ToggleButton>
|
||||
</Grid>
|
||||
|
||||
<ScrollViewer MaxHeight="300">
|
||||
<ScrollViewer MaxHeight="400">
|
||||
<ItemsControl ItemsSource="{x:Bind ViewModel.RecentLogs, Mode=OneWay}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Margin="0,4">
|
||||
<TextBlock>
|
||||
<Run Text="{Binding Timestamp, Converter={StaticResource TimeFormatConverter}}"
|
||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"/>
|
||||
<Run Text=" - "/>
|
||||
<Run Text="{Binding Message}"/>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<Border Background="{StaticResource DarkElevatedBrush}"
|
||||
CornerRadius="10"
|
||||
Padding="16,14"
|
||||
Margin="0,0,0,8"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{StaticResource DarkBorderBrush}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Ellipse Width="10" Height="10"
|
||||
Fill="{StaticResource SuccessBrush}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,14,0"/>
|
||||
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding Message}"
|
||||
Foreground="{StaticResource TextPrimaryBrush}"
|
||||
VerticalAlignment="Center"
|
||||
TextWrapping="Wrap"/>
|
||||
|
||||
<TextBlock Grid.Column="2"
|
||||
Text="{Binding Timestamp, Converter={StaticResource TimeFormatConverter}}"
|
||||
Style="{StaticResource CaptionTextStyle}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="12,0,0,0"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
229
Teti/Views/MediaBrowserPage.xaml
Normal file
229
Teti/Views/MediaBrowserPage.xaml
Normal file
@@ -0,0 +1,229 @@
|
||||
<Page
|
||||
x:Class="InstaArchive.Views.MediaBrowserPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:models="using:InstaArchive.Models"
|
||||
mc:Ignorable="d"
|
||||
Background="{StaticResource DarkBackgroundBrush}">
|
||||
|
||||
<Grid Margin="32,24,32,32" MaxWidth="1800">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Header -->
|
||||
<Grid Grid.Row="0" Margin="0,0,0,32">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<StackPanel Spacing="8">
|
||||
<TextBlock Text="Esplora Media"
|
||||
Style="{StaticResource PageTitleStyle}"/>
|
||||
<TextBlock Text="Naviga e gestisci i contenuti scaricati"
|
||||
Style="{StaticResource BodyTextStyle}"/>
|
||||
</StackPanel>
|
||||
|
||||
<ComboBox Grid.Column="1"
|
||||
PlaceholderText="Ordina per..."
|
||||
SelectedIndex="0"
|
||||
MinWidth="220"
|
||||
VerticalAlignment="Bottom">
|
||||
<ComboBoxItem Content="Più recenti"/>
|
||||
<ComboBoxItem Content="Più vecchi"/>
|
||||
<ComboBoxItem Content="Per tipo"/>
|
||||
<ComboBoxItem Content="Per utente"/>
|
||||
</ComboBox>
|
||||
</Grid>
|
||||
|
||||
<!-- Filter Bar -->
|
||||
<Border Grid.Row="1" Style="{StaticResource DarkCardStyle}" Margin="0,0,0,24">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Spacing="16">
|
||||
<!-- Search Box -->
|
||||
<Border Background="{StaticResource DarkElevatedBrush}"
|
||||
CornerRadius="12"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{StaticResource DarkBorderBrush}"
|
||||
Padding="16,12"
|
||||
MinWidth="320">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<FontIcon Glyph=""
|
||||
FontSize="16"
|
||||
Foreground="{StaticResource TextSecondaryBrush}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,12,0"/>
|
||||
|
||||
<TextBox Grid.Column="1"
|
||||
PlaceholderText="Cerca media..."
|
||||
Text="{x:Bind ViewModel.SearchQuery, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
BorderThickness="0"
|
||||
Background="Transparent"
|
||||
Foreground="{StaticResource TextPrimaryBrush}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- Filter by User -->
|
||||
<ComboBox PlaceholderText="Filtra per utente"
|
||||
ItemsSource="{x:Bind ViewModel.AllUsers, Mode=OneWay}"
|
||||
SelectedItem="{x:Bind ViewModel.SelectedUserFilter, Mode=TwoWay}"
|
||||
DisplayMemberPath="CurrentUsername"
|
||||
MinWidth="220"/>
|
||||
|
||||
<!-- Filter by Type -->
|
||||
<ComboBox PlaceholderText="Tipo di media"
|
||||
SelectedIndex="0"
|
||||
MinWidth="180">
|
||||
<ComboBoxItem Content="Tutti"/>
|
||||
<ComboBoxItem Content="Foto"/>
|
||||
<ComboBoxItem Content="Video"/>
|
||||
<ComboBoxItem Content="Storie"/>
|
||||
<ComboBoxItem Content="Reels"/>
|
||||
<ComboBoxItem Content="Highlights"/>
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="12">
|
||||
<Button Style="{StaticResource IconButtonStyle}"
|
||||
ToolTipService.ToolTip="Aggiorna">
|
||||
<FontIcon Glyph="" FontSize="18"/>
|
||||
</Button>
|
||||
<ToggleButton IsChecked="True"
|
||||
Style="{StaticResource IconToggleButtonStyle}"
|
||||
ToolTipService.ToolTip="Vista griglia">
|
||||
<FontIcon Glyph="" FontSize="18"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Style="{StaticResource IconToggleButtonStyle}"
|
||||
ToolTipService.ToolTip="Vista lista">
|
||||
<FontIcon Glyph="" FontSize="18"/>
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- Media Grid -->
|
||||
<ScrollViewer Grid.Row="2">
|
||||
<GridView ItemsSource="{x:Bind ViewModel.FilteredMedia, Mode=OneWay}"
|
||||
SelectionMode="Multiple"
|
||||
IsItemClickEnabled="True"
|
||||
Padding="0">
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate x:DataType="models:MediaItem">
|
||||
<Border Background="{StaticResource DarkCardBrush}"
|
||||
Width="240" Height="320"
|
||||
CornerRadius="16"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{StaticResource DarkBorderBrush}"
|
||||
Padding="14">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Media Preview -->
|
||||
<Border Grid.Row="0"
|
||||
Background="{StaticResource DarkElevatedBrush}"
|
||||
CornerRadius="12"
|
||||
Margin="0,0,0,14"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{StaticResource DarkBorderBrush}">
|
||||
<Grid>
|
||||
<FontIcon Glyph=""
|
||||
FontSize="56"
|
||||
Foreground="{StaticResource TextTertiaryBrush}"/>
|
||||
|
||||
<!-- Type Badge -->
|
||||
<Border Background="{StaticResource InstagramGradient}"
|
||||
Padding="12,6"
|
||||
CornerRadius="10"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top"
|
||||
Margin="14">
|
||||
<TextBlock Text="{x:Bind MediaType}"
|
||||
FontSize="12"
|
||||
Foreground="White"
|
||||
FontWeight="SemiBold"/>
|
||||
</Border>
|
||||
|
||||
<!-- Video/Play Icon -->
|
||||
<Border Background="#AA000000"
|
||||
Width="48" Height="48"
|
||||
CornerRadius="24"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Visibility="Collapsed">
|
||||
<FontIcon Glyph=""
|
||||
FontSize="24"
|
||||
Foreground="White"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- Media Info -->
|
||||
<StackPanel Grid.Row="1" Spacing="10">
|
||||
<TextBlock Text="{x:Bind FileName}"
|
||||
FontSize="15"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{StaticResource TextPrimaryBrush}"
|
||||
TextTrimming="CharacterEllipsis"
|
||||
MaxLines="1"/>
|
||||
|
||||
<Grid>
|
||||
<StackPanel Orientation="Horizontal" Spacing="6">
|
||||
<FontIcon Glyph=""
|
||||
FontSize="13"
|
||||
Foreground="{StaticResource TextSecondaryBrush}"/>
|
||||
<TextBlock Text="{x:Bind UserId}"
|
||||
Style="{StaticResource CaptionTextStyle}"/>
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock Text="{x:Bind DownloadedAt}"
|
||||
Style="{StaticResource CaptionTextStyle}"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<Button Style="{StaticResource IconButtonStyle}"
|
||||
Padding="6"
|
||||
ToolTipService.ToolTip="Apri file">
|
||||
<FontIcon Glyph="" FontSize="15"/>
|
||||
</Button>
|
||||
<Button Style="{StaticResource IconButtonStyle}"
|
||||
Padding="6"
|
||||
ToolTipService.ToolTip="Apri cartella">
|
||||
<FontIcon Glyph="" FontSize="15"/>
|
||||
</Button>
|
||||
<Button Style="{StaticResource IconButtonStyle}"
|
||||
Padding="6"
|
||||
ToolTipService.ToolTip="Elimina">
|
||||
<FontIcon Glyph=""
|
||||
FontSize="15"
|
||||
Foreground="{StaticResource ErrorBrush}"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
</GridView>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Page>
|
||||
17
Teti/Views/MediaBrowserPage.xaml.cs
Normal file
17
Teti/Views/MediaBrowserPage.xaml.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using InstaArchive.ViewModels;
|
||||
|
||||
namespace InstaArchive.Views;
|
||||
|
||||
public sealed partial class MediaBrowserPage : Page
|
||||
{
|
||||
public MediaBrowserViewModel ViewModel { get; }
|
||||
|
||||
public MediaBrowserPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
ViewModel = App.Services.GetRequiredService<MediaBrowserViewModel>();
|
||||
DataContext = ViewModel;
|
||||
}
|
||||
}
|
||||
@@ -4,28 +4,45 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d">
|
||||
mc:Ignorable="d"
|
||||
Background="{StaticResource DarkBackgroundBrush}">
|
||||
|
||||
<ScrollViewer>
|
||||
<Grid Margin="24">
|
||||
<Grid Margin="32,24,32,32" MaxWidth="1400">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Grid.Row="0" Text="Impostazioni"
|
||||
Style="{ThemeResource TitleTextBlockStyle}"
|
||||
Margin="0,0,0,24"/>
|
||||
<!-- Header -->
|
||||
<StackPanel Grid.Row="0" Spacing="8" Margin="0,0,0,32">
|
||||
<TextBlock Text="Impostazioni"
|
||||
Style="{StaticResource PageTitleStyle}"/>
|
||||
<TextBlock Text="Configura InstaArchive secondo le tue preferenze"
|
||||
Style="{StaticResource BodyTextStyle}"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="1" Spacing="16" MaxWidth="800" HorizontalAlignment="Left">
|
||||
<StackPanel Grid.Row="1" Spacing="24">
|
||||
|
||||
<!-- Storage Settings -->
|
||||
<Border Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||
CornerRadius="8"
|
||||
Padding="20">
|
||||
<StackPanel Spacing="16">
|
||||
<TextBlock Text="Configurazione Archiviazione"
|
||||
Style="{ThemeResource SubtitleTextBlockStyle}"/>
|
||||
<Border Style="{StaticResource DarkCardStyle}">
|
||||
<StackPanel Spacing="24">
|
||||
<Grid>
|
||||
<StackPanel Spacing="8">
|
||||
<TextBlock Text="Archiviazione"
|
||||
Style="{StaticResource SectionTitleStyle}"/>
|
||||
<TextBlock Text="Gestisci dove vengono salvati i file scaricati"
|
||||
Style="{StaticResource BodyTextStyle}"/>
|
||||
</StackPanel>
|
||||
<Border Background="{StaticResource PrimaryBrush}"
|
||||
Width="48" Height="48"
|
||||
CornerRadius="12"
|
||||
HorizontalAlignment="Right">
|
||||
<FontIcon Glyph=""
|
||||
FontSize="24"
|
||||
Foreground="White"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -35,124 +52,259 @@
|
||||
|
||||
<TextBox Header="Percorso Base"
|
||||
Text="{x:Bind ViewModel.Settings.BasePath, Mode=TwoWay}"
|
||||
Style="{StaticResource DarkTextBoxStyle}"
|
||||
Grid.Column="0"
|
||||
Margin="0,0,8,0"/>
|
||||
Margin="0,0,12,0"/>
|
||||
|
||||
<Button Content="Sfoglia"
|
||||
Command="{x:Bind ViewModel.BrowsePathCommand}"
|
||||
<Button Command="{x:Bind ViewModel.BrowsePathCommand}"
|
||||
Style="{StaticResource SecondaryButtonStyle}"
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Bottom"/>
|
||||
VerticalAlignment="Bottom">
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<FontIcon Glyph="" FontSize="16"/>
|
||||
<TextBlock Text="Sfoglia" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
<ToggleSwitch Header="Abilita Sottocartelle per Data"
|
||||
IsOn="{x:Bind ViewModel.Settings.EnableDateSubfolders, Mode=TwoWay}"/>
|
||||
IsOn="{x:Bind ViewModel.Settings.EnableDateSubfolders, Mode=TwoWay}"
|
||||
OffContent="I file verranno salvati direttamente nella cartella utente"
|
||||
OnContent="I file verranno organizzati in sottocartelle per data"/>
|
||||
|
||||
<TextBox Header="Formato Cartella Data"
|
||||
PlaceholderText="yyyy-MM-dd"
|
||||
Text="{x:Bind ViewModel.Settings.DateFolderFormat, Mode=TwoWay}"/>
|
||||
Text="{x:Bind ViewModel.Settings.DateFolderFormat, Mode=TwoWay}"
|
||||
Style="{StaticResource DarkTextBoxStyle}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Metadata Settings -->
|
||||
<Border Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||
CornerRadius="8"
|
||||
Padding="20">
|
||||
<StackPanel Spacing="16">
|
||||
<TextBlock Text="Configurazione Metadati"
|
||||
Style="{ThemeResource SubtitleTextBlockStyle}"/>
|
||||
<Border Style="{StaticResource DarkCardStyle}">
|
||||
<StackPanel Spacing="24">
|
||||
<Grid>
|
||||
<StackPanel Spacing="8">
|
||||
<TextBlock Text="Metadati"
|
||||
Style="{StaticResource SectionTitleStyle}"/>
|
||||
<TextBlock Text="Aggiungi informazioni ai file scaricati"
|
||||
Style="{StaticResource BodyTextStyle}"/>
|
||||
</StackPanel>
|
||||
<Border Background="{StaticResource AccentBrush}"
|
||||
Width="48" Height="48"
|
||||
CornerRadius="12"
|
||||
HorizontalAlignment="Right">
|
||||
<FontIcon Glyph=""
|
||||
FontSize="24"
|
||||
Foreground="White"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<ToggleSwitch Header="Abilita Iniezione Metadati"
|
||||
IsOn="{x:Bind ViewModel.Settings.EnableMetadataInjection, Mode=TwoWay}"/>
|
||||
IsOn="{x:Bind ViewModel.Settings.EnableMetadataInjection, Mode=TwoWay}"
|
||||
OffContent="I metadati non verranno inseriti nei file"
|
||||
OnContent="I metadati (autore, data, descrizione) verranno inseriti nei file"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Download Settings -->
|
||||
<Border Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||
CornerRadius="8"
|
||||
Padding="20">
|
||||
<StackPanel Spacing="16">
|
||||
<TextBlock Text="Configurazione Download"
|
||||
Style="{ThemeResource SubtitleTextBlockStyle}"/>
|
||||
<Border Style="{StaticResource DarkCardStyle}">
|
||||
<StackPanel Spacing="24">
|
||||
<Grid>
|
||||
<StackPanel Spacing="8">
|
||||
<TextBlock Text="Download"
|
||||
Style="{StaticResource SectionTitleStyle}"/>
|
||||
<TextBlock Text="Configura il comportamento dei download"
|
||||
Style="{StaticResource BodyTextStyle}"/>
|
||||
</StackPanel>
|
||||
<Border Background="{StaticResource InfoBrush}"
|
||||
Width="48" Height="48"
|
||||
CornerRadius="12"
|
||||
HorizontalAlignment="Right">
|
||||
<FontIcon Glyph=""
|
||||
FontSize="24"
|
||||
Foreground="White"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<NumberBox Header="Massimo Download Concorrenti"
|
||||
Value="{x:Bind ViewModel.Settings.MaxConcurrentDownloads, Mode=TwoWay}"
|
||||
Minimum="1"
|
||||
Maximum="10"/>
|
||||
Maximum="10"
|
||||
SpinButtonPlacementMode="Compact"
|
||||
Description="Numero massimo di download simultanei"/>
|
||||
|
||||
<NumberBox Header="Intervallo Globale Storie (minuti)"
|
||||
Value="{x:Bind ViewModel.Settings.GlobalStoryCheckInterval, Mode=TwoWay}"
|
||||
Minimum="1"
|
||||
Maximum="1440"/>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<NumberBox Grid.Column="0"
|
||||
Header="Intervallo Storie (minuti)"
|
||||
Value="{x:Bind ViewModel.Settings.GlobalStoryCheckInterval, Mode=TwoWay}"
|
||||
Minimum="1"
|
||||
Maximum="1440"
|
||||
SpinButtonPlacementMode="Compact"
|
||||
Margin="0,0,12,0"/>
|
||||
|
||||
<NumberBox Header="Intervallo Globale Post (minuti)"
|
||||
Value="{x:Bind ViewModel.Settings.GlobalPostCheckInterval, Mode=TwoWay}"
|
||||
Minimum="1"
|
||||
Maximum="10080"/>
|
||||
<NumberBox Grid.Column="1"
|
||||
Header="Intervallo Post (minuti)"
|
||||
Value="{x:Bind ViewModel.Settings.GlobalPostCheckInterval, Mode=TwoWay}"
|
||||
Minimum="1"
|
||||
Maximum="10080"
|
||||
SpinButtonPlacementMode="Compact"/>
|
||||
</Grid>
|
||||
|
||||
<ToggleSwitch Header="Avvia Automaticamente Monitoraggio"
|
||||
IsOn="{x:Bind ViewModel.Settings.AutoStartMonitoring, Mode=TwoWay}"/>
|
||||
IsOn="{x:Bind ViewModel.Settings.AutoStartMonitoring, Mode=TwoWay}"
|
||||
OffContent="Richiede avvio manuale"
|
||||
OnContent="Il monitoraggio si avvia all'apertura dell'app"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Rate Limiting -->
|
||||
<Border Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||
CornerRadius="8"
|
||||
Padding="20">
|
||||
<StackPanel Spacing="16">
|
||||
<TextBlock Text="Limitazione Richieste"
|
||||
Style="{ThemeResource SubtitleTextBlockStyle}"/>
|
||||
<Border Style="{StaticResource DarkCardStyle}">
|
||||
<StackPanel Spacing="24">
|
||||
<Grid>
|
||||
<StackPanel Spacing="8">
|
||||
<TextBlock Text="Limitazione Richieste"
|
||||
Style="{StaticResource SectionTitleStyle}"/>
|
||||
<TextBlock Text="Evita blocchi da parte di Instagram"
|
||||
Style="{StaticResource BodyTextStyle}"/>
|
||||
</StackPanel>
|
||||
<Border Background="{StaticResource WarningBrush}"
|
||||
Width="48" Height="48"
|
||||
CornerRadius="12"
|
||||
HorizontalAlignment="Right">
|
||||
<FontIcon Glyph=""
|
||||
FontSize="24"
|
||||
Foreground="White"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<ToggleSwitch Header="Abilita Limitazione Richieste"
|
||||
IsOn="{x:Bind ViewModel.Settings.EnableRateLimiting, Mode=TwoWay}"/>
|
||||
IsOn="{x:Bind ViewModel.Settings.EnableRateLimiting, Mode=TwoWay}"
|
||||
OffContent="Nessuna limitazione (sconsigliato)"
|
||||
OnContent="Le richieste verranno limitate per sicurezza"/>
|
||||
|
||||
<NumberBox Header="Massimo Richieste per Ora"
|
||||
Value="{x:Bind ViewModel.Settings.RateLimitRequestsPerHour, Mode=TwoWay}"
|
||||
Minimum="10"
|
||||
Maximum="1000"/>
|
||||
Maximum="1000"
|
||||
SpinButtonPlacementMode="Compact"
|
||||
Description="Numero massimo di richieste all'API di Instagram per ora"/>
|
||||
|
||||
<NumberBox Header="Ritardo Base Backoff (secondi)"
|
||||
Value="{x:Bind ViewModel.Settings.BackoffBaseDelaySeconds, Mode=TwoWay}"
|
||||
Minimum="1"
|
||||
Maximum="300"/>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<NumberBox Grid.Column="0"
|
||||
Header="Ritardo Base (secondi)"
|
||||
Value="{x:Bind ViewModel.Settings.BackoffBaseDelaySeconds, Mode=TwoWay}"
|
||||
Minimum="1"
|
||||
Maximum="300"
|
||||
SpinButtonPlacementMode="Compact"
|
||||
Margin="0,0,12,0"/>
|
||||
|
||||
<NumberBox Header="Massimo Tentativi Backoff"
|
||||
Value="{x:Bind ViewModel.Settings.BackoffMaxAttempts, Mode=TwoWay}"
|
||||
Minimum="1"
|
||||
Maximum="10"/>
|
||||
<NumberBox Grid.Column="1"
|
||||
Header="Massimo Tentativi"
|
||||
Value="{x:Bind ViewModel.Settings.BackoffMaxAttempts, Mode=TwoWay}"
|
||||
Minimum="1"
|
||||
Maximum="10"
|
||||
SpinButtonPlacementMode="Compact"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Import/Export -->
|
||||
<Border Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||
CornerRadius="8"
|
||||
Padding="20">
|
||||
<StackPanel Spacing="16">
|
||||
<TextBlock Text="Importa / Esporta"
|
||||
Style="{ThemeResource SubtitleTextBlockStyle}"/>
|
||||
<Border Style="{StaticResource DarkCardStyle}">
|
||||
<StackPanel Spacing="24">
|
||||
<Grid>
|
||||
<StackPanel Spacing="8">
|
||||
<TextBlock Text="Importa / Esporta"
|
||||
Style="{StaticResource SectionTitleStyle}"/>
|
||||
<TextBlock Text="Backup e ripristino della configurazione"
|
||||
Style="{StaticResource BodyTextStyle}"/>
|
||||
</StackPanel>
|
||||
<Border Background="{StaticResource SuccessBrush}"
|
||||
Width="48" Height="48"
|
||||
CornerRadius="12"
|
||||
HorizontalAlignment="Right">
|
||||
<FontIcon Glyph=""
|
||||
FontSize="24"
|
||||
Foreground="White"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Spacing="12">
|
||||
<Button Content="Esporta Impostazioni"
|
||||
Command="{x:Bind ViewModel.ExportSettingsCommand}"/>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Content="Importa Impostazioni"
|
||||
Command="{x:Bind ViewModel.ImportSettingsCommand}"/>
|
||||
</StackPanel>
|
||||
<Button Grid.Row="0" Grid.Column="0"
|
||||
Command="{x:Bind ViewModel.ExportSettingsCommand}"
|
||||
Style="{StaticResource SecondaryButtonStyle}"
|
||||
HorizontalAlignment="Stretch"
|
||||
Margin="0,0,6,12">
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<FontIcon Glyph="" FontSize="16"/>
|
||||
<TextBlock Text="Esporta Impostazioni" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<Button Grid.Row="0" Grid.Column="1"
|
||||
Command="{x:Bind ViewModel.ImportSettingsCommand}"
|
||||
Style="{StaticResource SecondaryButtonStyle}"
|
||||
HorizontalAlignment="Stretch"
|
||||
Margin="6,0,0,12">
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<FontIcon Glyph="" FontSize="16"/>
|
||||
<TextBlock Text="Importa Impostazioni" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Spacing="12">
|
||||
<Button Content="Esporta Obiettivi"
|
||||
Command="{x:Bind ViewModel.ExportTargetsCommand}"/>
|
||||
<Button Grid.Row="1" Grid.Column="0"
|
||||
Command="{x:Bind ViewModel.ExportTargetsCommand}"
|
||||
Style="{StaticResource SecondaryButtonStyle}"
|
||||
HorizontalAlignment="Stretch"
|
||||
Margin="0,0,6,0">
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<FontIcon Glyph="" FontSize="16"/>
|
||||
<TextBlock Text="Esporta Obiettivi" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<Button Content="Importa Obiettivi"
|
||||
Command="{x:Bind ViewModel.ImportTargetsCommand}"/>
|
||||
</StackPanel>
|
||||
<Button Grid.Row="1" Grid.Column="1"
|
||||
Command="{x:Bind ViewModel.ImportTargetsCommand}"
|
||||
Style="{StaticResource SecondaryButtonStyle}"
|
||||
HorizontalAlignment="Stretch"
|
||||
Margin="6,0,0,0">
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<FontIcon Glyph="" FontSize="16"/>
|
||||
<TextBlock Text="Importa Obiettivi" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Save Button -->
|
||||
<Button Content="Salva Impostazioni"
|
||||
Command="{x:Bind ViewModel.SaveCommand}"
|
||||
<Button Command="{x:Bind ViewModel.SaveCommand}"
|
||||
Style="{StaticResource AccentButtonStyle}"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{ThemeResource AccentButtonStyle}"/>
|
||||
Padding="32,14">
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<FontIcon Glyph="" FontSize="18"/>
|
||||
<TextBlock Text="Salva Tutte le Impostazioni" VerticalAlignment="Center" FontSize="15"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
|
||||
@@ -6,15 +6,16 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:models="using:InstaArchive.Models"
|
||||
mc:Ignorable="d">
|
||||
mc:Ignorable="d"
|
||||
Background="{StaticResource DarkBackgroundBrush}">
|
||||
|
||||
<Grid Margin="24">
|
||||
<Grid Margin="32,24,32,32" MaxWidth="1800">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="350"/>
|
||||
<ColumnDefinition Width="420"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- User List -->
|
||||
<!-- Left Panel - User List -->
|
||||
<Grid Grid.Column="0" Margin="0,0,24,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
@@ -23,143 +24,267 @@
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Grid.Row="0" Text="Utenti Obiettivo"
|
||||
Style="{ThemeResource TitleTextBlockStyle}"
|
||||
Margin="0,0,0,24"/>
|
||||
<!-- Header -->
|
||||
<StackPanel Grid.Row="0" Spacing="8" Margin="0,0,0,32">
|
||||
<TextBlock Text="Utenti Obiettivo"
|
||||
Style="{StaticResource PageTitleStyle}"/>
|
||||
<TextBlock Text="Gestisci gli account Instagram da monitorare"
|
||||
Style="{StaticResource BodyTextStyle}"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Add User Form -->
|
||||
<Border Grid.Row="1"
|
||||
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||
CornerRadius="8"
|
||||
Padding="16"
|
||||
Margin="0,0,0,16">
|
||||
<StackPanel Spacing="12">
|
||||
<!-- Add User Card -->
|
||||
<Border Grid.Row="1" Style="{StaticResource DarkCardStyle}" Margin="0,0,0,16">
|
||||
<StackPanel Spacing="18">
|
||||
<TextBlock Text="Aggiungi Nuovo Obiettivo"
|
||||
Style="{ThemeResource SubtitleTextBlockStyle}"/>
|
||||
Style="{StaticResource CardTitleStyle}"/>
|
||||
|
||||
<TextBox Header="ID Utente Instagram"
|
||||
PlaceholderText="Es. 123456789"
|
||||
Text="{x:Bind ViewModel.NewUserId, Mode=TwoWay}"/>
|
||||
Text="{x:Bind ViewModel.NewUserId, Mode=TwoWay}"
|
||||
Style="{StaticResource DarkTextBoxStyle}"/>
|
||||
|
||||
<TextBox Header="Nome Utente"
|
||||
PlaceholderText="Es. @nomeutente"
|
||||
Text="{x:Bind ViewModel.NewUsername, Mode=TwoWay}"/>
|
||||
PlaceholderText="Es. nomeutente"
|
||||
Text="{x:Bind ViewModel.NewUsername, Mode=TwoWay}"
|
||||
Style="{StaticResource DarkTextBoxStyle}"/>
|
||||
|
||||
<Button Content="Aggiungi Utente"
|
||||
Command="{x:Bind ViewModel.AddUserCommand}"
|
||||
HorizontalAlignment="Stretch"
|
||||
Style="{ThemeResource AccentButtonStyle}"/>
|
||||
<Button Command="{x:Bind ViewModel.AddUserCommand}"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
HorizontalAlignment="Stretch">
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<FontIcon Glyph="" FontSize="16"/>
|
||||
<TextBlock Text="Aggiungi Utente" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Search Box -->
|
||||
<Border Grid.Row="2"
|
||||
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||
CornerRadius="8"
|
||||
Padding="16"
|
||||
Background="{StaticResource DarkElevatedBrush}"
|
||||
CornerRadius="12"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{StaticResource DarkBorderBrush}"
|
||||
Padding="16,14"
|
||||
Margin="0,0,0,16">
|
||||
<StackPanel Spacing="8">
|
||||
<TextBlock Text="Cerca Utente"
|
||||
Style="{ThemeResource CaptionTextBlockStyle}"
|
||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"/>
|
||||
<TextBox PlaceholderText="Cerca per ID o nome utente..."
|
||||
Text="{x:Bind ViewModel.SearchQuery, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
</StackPanel>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<FontIcon Glyph=""
|
||||
FontSize="16"
|
||||
Foreground="{StaticResource TextSecondaryBrush}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,12,0"/>
|
||||
|
||||
<TextBox Grid.Column="1"
|
||||
PlaceholderText="Cerca per ID o nome utente..."
|
||||
Text="{x:Bind ViewModel.SearchQuery, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
BorderThickness="0"
|
||||
Background="Transparent"
|
||||
Foreground="{StaticResource TextPrimaryBrush}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- Users List -->
|
||||
<ListView Grid.Row="3"
|
||||
ItemsSource="{x:Bind ViewModel.FilteredUsers, Mode=OneWay}"
|
||||
SelectedItem="{x:Bind ViewModel.SelectedUser, Mode=TwoWay}"
|
||||
SelectionMode="Single">
|
||||
SelectionMode="Single"
|
||||
Background="Transparent">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate x:DataType="models:InstagramUser">
|
||||
<Grid Padding="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<StackPanel Grid.Column="0">
|
||||
<TextBlock Text="{x:Bind CurrentUsername}"
|
||||
Style="{ThemeResource BaseTextBlockStyle}"/>
|
||||
<TextBlock Text="{x:Bind UserId}"
|
||||
Style="{ThemeResource CaptionTextBlockStyle}"
|
||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"/>
|
||||
</StackPanel>
|
||||
<Border Background="{StaticResource DarkCardBrush}"
|
||||
CornerRadius="12"
|
||||
Padding="16"
|
||||
Margin="0,0,0,10"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{StaticResource DarkBorderBrush}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Border Grid.Column="0"
|
||||
Background="{StaticResource InstagramGradient}"
|
||||
Width="52" Height="52"
|
||||
CornerRadius="26"
|
||||
Margin="0,0,16,0">
|
||||
<TextBlock Text="@"
|
||||
FontSize="22"
|
||||
FontWeight="Bold"
|
||||
Foreground="White"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
|
||||
<StackPanel Grid.Column="1" VerticalAlignment="Center" Spacing="4">
|
||||
<TextBlock Text="{x:Bind CurrentUsername}"
|
||||
FontSize="16"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{StaticResource TextPrimaryBrush}"/>
|
||||
<TextBlock Text="{x:Bind UserId}"
|
||||
Style="{StaticResource CaptionTextStyle}"/>
|
||||
</StackPanel>
|
||||
|
||||
<Button Grid.Column="1">
|
||||
<SymbolIcon Symbol="Delete"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Button Grid.Column="2"
|
||||
Style="{StaticResource IconButtonStyle}"
|
||||
VerticalAlignment="Center">
|
||||
<FontIcon Glyph=""
|
||||
FontSize="16"
|
||||
Foreground="{StaticResource ErrorBrush}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</Grid>
|
||||
|
||||
<!-- User Details -->
|
||||
<!-- Right Panel - User Details -->
|
||||
<ScrollViewer Grid.Column="1">
|
||||
<StackPanel Spacing="16" Visibility="{x:Bind ViewModel.SelectedUser, Mode=OneWay, Converter={StaticResource NullToVisibilityConverter}}">
|
||||
<TextBlock Text="Configurazione Obiettivo"
|
||||
Style="{ThemeResource TitleTextBlockStyle}"/>
|
||||
<StackPanel Spacing="24"
|
||||
Visibility="{x:Bind ViewModel.SelectedUser, Mode=OneWay, Converter={StaticResource NullToVisibilityConverter}}">
|
||||
|
||||
<!-- User Header -->
|
||||
<Border Style="{StaticResource ElevatedCardStyle}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Border Grid.Column="0"
|
||||
Background="{StaticResource InstagramGradient}"
|
||||
Width="88" Height="88"
|
||||
CornerRadius="44"
|
||||
Margin="0,0,24,0">
|
||||
<TextBlock Text="@"
|
||||
FontSize="40"
|
||||
FontWeight="Bold"
|
||||
Foreground="White"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
|
||||
<StackPanel Grid.Column="1" VerticalAlignment="Center" Spacing="6">
|
||||
<TextBlock Text="{x:Bind ViewModel.SelectedUser.CurrentUsername, Mode=OneWay}"
|
||||
FontSize="26"
|
||||
FontWeight="Bold"
|
||||
Foreground="{StaticResource TextPrimaryBrush}"/>
|
||||
<TextBlock Text="{x:Bind ViewModel.SelectedUser.UserId, Mode=OneWay}"
|
||||
Style="{StaticResource BodyTextStyle}"/>
|
||||
</StackPanel>
|
||||
|
||||
<Button Grid.Column="2"
|
||||
Command="{x:Bind ViewModel.SaveUserCommand}"
|
||||
Style="{StaticResource AccentButtonStyle}"
|
||||
VerticalAlignment="Center">
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<FontIcon Glyph="" FontSize="16"/>
|
||||
<TextBlock Text="Salva Modifiche" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<Border Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||
CornerRadius="8"
|
||||
Padding="20">
|
||||
<StackPanel Spacing="16">
|
||||
<TextBlock Text="Opzioni di Monitoraggio"
|
||||
Style="{ThemeResource SubtitleTextBlockStyle}"/>
|
||||
|
||||
<ToggleSwitch Header="Monitora Post"
|
||||
IsOn="{x:Bind ViewModel.SelectedUser.MonitorPosts, Mode=TwoWay}"/>
|
||||
<!-- Monitoring Options -->
|
||||
<Border Style="{StaticResource DarkCardStyle}">
|
||||
<StackPanel Spacing="24">
|
||||
<StackPanel Spacing="8">
|
||||
<TextBlock Text="Opzioni di Monitoraggio"
|
||||
Style="{StaticResource SectionTitleStyle}"/>
|
||||
<TextBlock Text="Seleziona quali contenuti monitorare"
|
||||
Style="{StaticResource BodyTextStyle}"/>
|
||||
</StackPanel>
|
||||
|
||||
<ToggleSwitch Header="Monitora Storie"
|
||||
IsOn="{x:Bind ViewModel.SelectedUser.MonitorStories, Mode=TwoWay}"/>
|
||||
|
||||
<ToggleSwitch Header="Monitora Reels"
|
||||
IsOn="{x:Bind ViewModel.SelectedUser.MonitorReels, Mode=TwoWay}"/>
|
||||
|
||||
<ToggleSwitch Header="Monitora Highlights"
|
||||
IsOn="{x:Bind ViewModel.SelectedUser.MonitorHighlights, Mode=TwoWay}"/>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ToggleSwitch Grid.Row="0" Grid.Column="0"
|
||||
Header="Monitora Post"
|
||||
IsOn="{x:Bind ViewModel.SelectedUser.MonitorPosts, Mode=TwoWay}"
|
||||
Margin="0,0,12,16"/>
|
||||
|
||||
<ToggleSwitch Grid.Row="0" Grid.Column="1"
|
||||
Header="Monitora Storie"
|
||||
IsOn="{x:Bind ViewModel.SelectedUser.MonitorStories, Mode=TwoWay}"
|
||||
Margin="0,0,0,16"/>
|
||||
|
||||
<ToggleSwitch Grid.Row="1" Grid.Column="0"
|
||||
Header="Monitora Reels"
|
||||
IsOn="{x:Bind ViewModel.SelectedUser.MonitorReels, Mode=TwoWay}"
|
||||
Margin="0,0,12,0"/>
|
||||
|
||||
<ToggleSwitch Grid.Row="1" Grid.Column="1"
|
||||
Header="Monitora Highlights"
|
||||
IsOn="{x:Bind ViewModel.SelectedUser.MonitorHighlights, Mode=TwoWay}"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||
CornerRadius="8"
|
||||
Padding="20">
|
||||
<StackPanel Spacing="16">
|
||||
<TextBlock Text="Intervalli di Controllo"
|
||||
Style="{ThemeResource SubtitleTextBlockStyle}"/>
|
||||
|
||||
<NumberBox Header="Intervallo Storie (minuti)"
|
||||
Value="{x:Bind ViewModel.SelectedUser.StoriesCheckInterval, Mode=TwoWay}"
|
||||
Minimum="1"
|
||||
Maximum="1440"/>
|
||||
<!-- Check Intervals -->
|
||||
<Border Style="{StaticResource DarkCardStyle}">
|
||||
<StackPanel Spacing="24">
|
||||
<StackPanel Spacing="8">
|
||||
<TextBlock Text="Intervalli di Controllo"
|
||||
Style="{StaticResource SectionTitleStyle}"/>
|
||||
<TextBlock Text="Imposta la frequenza di verifica per nuovi contenuti"
|
||||
Style="{StaticResource BodyTextStyle}"/>
|
||||
</StackPanel>
|
||||
|
||||
<NumberBox Header="Intervallo Post (minuti)"
|
||||
Value="{x:Bind ViewModel.SelectedUser.PostsCheckInterval, Mode=TwoWay}"
|
||||
Minimum="1"
|
||||
Maximum="10080"/>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<NumberBox Grid.Column="0"
|
||||
Header="Intervallo Storie (minuti)"
|
||||
Value="{x:Bind ViewModel.SelectedUser.StoriesCheckInterval, Mode=TwoWay}"
|
||||
Minimum="1"
|
||||
Maximum="1440"
|
||||
SpinButtonPlacementMode="Compact"
|
||||
Margin="0,0,12,0"/>
|
||||
|
||||
<NumberBox Grid.Column="1"
|
||||
Header="Intervallo Post (minuti)"
|
||||
Value="{x:Bind ViewModel.SelectedUser.PostsCheckInterval, Mode=TwoWay}"
|
||||
Minimum="1"
|
||||
Maximum="10080"
|
||||
SpinButtonPlacementMode="Compact"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||
CornerRadius="8"
|
||||
Padding="20">
|
||||
<StackPanel Spacing="16">
|
||||
<TextBlock Text="Configurazione Percorso"
|
||||
Style="{ThemeResource SubtitleTextBlockStyle}"/>
|
||||
|
||||
<TextBox Header="Percorso Base Personalizzato (Opzionale)"
|
||||
<!-- Custom Path -->
|
||||
<Border Style="{StaticResource DarkCardStyle}">
|
||||
<StackPanel Spacing="18">
|
||||
<StackPanel Spacing="8">
|
||||
<TextBlock Text="Percorso Personalizzato"
|
||||
Style="{StaticResource SectionTitleStyle}"/>
|
||||
<TextBlock Text="Specifica una cartella personalizzata per questo utente"
|
||||
Style="{StaticResource BodyTextStyle}"/>
|
||||
</StackPanel>
|
||||
|
||||
<TextBox Header="Percorso Base"
|
||||
PlaceholderText="Lascia vuoto per usare quello predefinito"
|
||||
Text="{x:Bind ViewModel.SelectedUser.CustomBasePath, Mode=TwoWay}"/>
|
||||
Text="{x:Bind ViewModel.SelectedUser.CustomBasePath, Mode=TwoWay}"
|
||||
Style="{StaticResource DarkTextBoxStyle}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Button Content="Salva Modifiche"
|
||||
Command="{x:Bind ViewModel.SaveUserCommand}"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{ThemeResource AccentButtonStyle}"/>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
|
||||
Reference in New Issue
Block a user