Skip to content

Commit

Permalink
Put 'SMF verified' in a 'floating bubble' to make it more visible
Browse files Browse the repository at this point in the history
Changed external link to check for 'http://' at the start
Added padding around the description box, and textwrapping
Added multiline support to the description for uploading mods
Added an error message if content in missing when uploading a mod
  • Loading branch information
Lewinator56 committed Oct 30, 2020
1 parent 4099082 commit 824322d
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:StormLoader="clr-namespace:StormLoader"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
d:DesignHeight="450" d:DesignWidth="700">
<materialDesign:DialogHost Name="UploadDialogHost" CloseOnClickAway="True">
<materialDesign:Card Background="White" materialDesign:ShadowAssist.ShadowDepth="Depth2" VerticalAlignment="Top" UniformCornerRadius="10" MaxWidth="800">
<materialDesign:Card Background="White" materialDesign:ShadowAssist.ShadowDepth="Depth2" VerticalAlignment="Top" UniformCornerRadius="10" MaxWidth="700">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal" Margin="10,10,10,10">
<materialDesign:PackIcon Name="icon" Kind="Upload" VerticalAlignment="Center">
Expand All @@ -20,12 +20,12 @@
<Label Name ="titleText" Content="Upload mod" FontSize="18"/>
</StackPanel>
<Separator Margin="5"/>
<StormLoader:BrowsableFileSelect x:Name="ModImagePath" Hint="Mod Image Path" ToolTip="The path to the image for the mod" Margin="5"/>
<StormLoader:BrowsableFileSelect x:Name="ModImagePath" Hint="Mod Image (3:2 raito recommended)" ToolTip="The path to the image for the mod" Margin="5"/>
<StormLoader:BrowsableFileSelect x:Name="ModFilePath" Hint="Mod slp file path" Tooltip="The mod to upload to the server" Margin="5" fileFilter="Stromloader mod packages|*.slp"/>
<TextBox Name="Name" materialDesign:HintAssist.Hint="Name" FontSize="20" Margin="5"/>
<TextBox Name="Version" materialDesign:HintAssist.Hint="Version" FontSize="20" Margin="5"/>
<TextBox Name="ExtraDetailsLink" materialDesign:HintAssist.Hint="Full link to website (can be blank)" FontSize="20" Margin="5"/>
<TextBox Name="Description" materialDesign:HintAssist.Hint="Description" FontSize="20" Margin="5" TextWrapping="Wrap"/>
<TextBox Name="Description" materialDesign:HintAssist.Hint="Short description (200)" FontSize="20" Margin="5" TextWrapping="Wrap" MaxLength="1200" VerticalScrollBarVisibility="Auto" AcceptsReturn="True"/>

<Button Name="UploadBtn" Width="auto" Content="Upload" Foreground="White" Background="#1E88E5" BorderThickness="0" VerticalAlignment="Bottom" HorizontalAlignment="Right" materialDesign:ButtonAssist.CornerRadius="5" Margin="10" Click="UploadBtn_Click" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ private async void UploadBtn_Click(object sender, RoutedEventArgs e)



} else
{
InfoPopup ifp = new InfoPopup();
ifp.titleText.Content = "Missing content, try again";
UploadDialogHost.ShowDialog(ifp);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<Label Name="ModVersion" Content="Version: " MaxWidth="500" VerticalAlignment="Center"></Label>
<Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" Width="1" Margin="5, 0, 5, 0"/>
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Style="{DynamicResource MaterialDesignToolButton}" Name="UpdateMod" Click="UpdateMod_Click" Content="Update">
<Button Style="{DynamicResource MaterialDesignToolButton}" Name="UpdateMod" Click="UpdateMod_Click" Content="Update" IsEnabled="False" ToolTip="Feature current in development">

</Button>
<Button Style="{DynamicResource MaterialDesignToolButton}" Name="DeleteMod" Click="DeleteMod_Click" Content="Delete">
Expand Down
23 changes: 14 additions & 9 deletions StormLoader/StormLoader/repository/RepoModListItem.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,22 @@
xmlns:local="clr-namespace:StormLoader.repository"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<materialDesign:Card Height="420" HorizontalAlignment="Stretch" Width="200" Margin="5">
<materialDesign:Card Height="420" HorizontalAlignment="Stretch" Width="250" Margin="5">
<DockPanel>
<Grid DockPanel.Dock="Top">
<Grid.RowDefinitions>
<RowDefinition Height="200"/>
</Grid.RowDefinitions>
<Image Grid.Row="0" Name="ModImage" Width="200" Height="200">
<Image Grid.Row="0" Name="ModImage" Width="250" Height="200">
</Image>
<StackPanel Orientation="Horizontal" Name="VerifiedMod" Margin="5">
<materialDesign:PackIcon Kind="Verified" Foreground="Green" Margin="0 4 0 0"/>
<Label Content="SMF verified" Foreground="Green"/>
</StackPanel>
<materialDesign:Card Height="auto" Width="auto" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5" UniformCornerRadius="15">
<StackPanel Orientation="Horizontal" Name="VerifiedMod" Margin="5 0 5 0">
<materialDesign:PackIcon Kind="Verified" Foreground="Green" Margin="0 4 0 0"/>
<Label Content="SMF verified" Foreground="Green"/>

</StackPanel>
</materialDesign:Card>



</Grid>
Expand All @@ -28,10 +32,11 @@
<Separator DockPanel.Dock="Top"/>
<Label Name="Author" Content="Author: " DockPanel.Dock="Top"/>
<Label Name="Version" Content="Version: " DockPanel.Dock="Top"/>
<Label Content="Description" DockPanel.Dock="Top"/>
<TextBlock Width="200" Height="80" Name="Description" DockPanel.Dock="Top"/>
<!--<Label Content="Description" DockPanel.Dock="Top"/>-->
<TextBlock Width="auto" Height="110" Name="Description" DockPanel.Dock="Top" Margin="5" TextWrapping="Wrap" />
<!--<RichTextBox Width="auto" Height="110" Name="Description" DockPanel.Dock="Top" Margin="5" />-->



<DockPanel DockPanel.Dock="Bottom" VerticalAlignment="Bottom">
<Button Name="infoBtn" Style="{DynamicResource MaterialDesignFlatButton}" DockPanel.Dock="Left" Content="more info" HorizontalAlignment="left" VerticalAlignment="Bottom" IsEnabled="False" Click="infoBtn_Click"/>
<Button Name="getModBtn" Style="{DynamicResource MaterialDesignFlatButton}" DockPanel.Dock="Right" Content="Get" HorizontalAlignment="right" VerticalAlignment="Bottom" Click="getModBtn_Click"/>
Expand Down
9 changes: 6 additions & 3 deletions StormLoader/StormLoader/repository/RepoModListItem.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@ public RepoModListItem(string name, string author, string version, string descri

public void enableInfoButton(string link)
{
infoBtn.IsEnabled = true;
infoPath = link;
infoBtn.ToolTip = link;
if (link.StartsWith("http://")) {
infoBtn.IsEnabled = true;
infoPath = link;
infoBtn.ToolTip = link;
}


}

Expand Down

0 comments on commit 824322d

Please sign in to comment.