Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aetherstrata committed Feb 19, 2024
1 parent 8a1e34f commit f07baa9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
18 changes: 12 additions & 6 deletions Aosta.Ava/Aosta.Ava/Pages/LocalEpisodeDetailsPage.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,22 @@
<local:AnimatedPopup Grid.Row="1"
Grid.ColumnSpan="1"
Name="NoteEditor"
VerticalAlignment="Bottom"
VerticalAlignment="Top"
HorizontalAlignment="Center"
AnimateWidth="False">
<Border Padding="10,0,10,10"
Margin="10,0"
CornerRadius="10"
Background="{DynamicResource FloatingPaneBackgroundBrush}"
Width="{Binding $parent[Grid].Bounds.Width}">
<Grid RowDefinitions="Auto,Auto,Auto"
ColumnDefinitions="*,Auto">
ColumnDefinitions="Auto,*,Auto">
<TextBlock Text="{Binding NewNoteTimeValue, Converter={converters:TimeStringConverter}}"
MinWidth="50"
VerticalAlignment="Center"
HorizontalAlignment="Left"/>
<Slider Grid.Row="0"
Grid.Column="0"
Grid.Column="1"
ToolTip.VerticalOffset="10"
ToolTip.Placement="Top"
ToolTip.Tip="{Binding NewNoteTimeValue, Converter={converters:TimeStringConverter}}"
Expand All @@ -51,7 +56,8 @@
IsVisible="{Binding Episode.Duration, Converter={converters:NullValueBoolConverter}}">
</Slider>
<Button Grid.Row="0"
Grid.Column="1"
Grid.Column="2"
Tapped="InputElement_OnTapped"
Classes="accent"
VerticalAlignment="Center"
Command="{Binding AddNote}">
Expand All @@ -60,15 +66,15 @@
</Button>
<TextBox Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="2"
Grid.ColumnSpan="3"
Watermark="{localize:Localize EpisodeDetails.Notes.TitleWatermark}"
Text="{Binding NewNoteTitle}"
MaxLines="1"
AcceptsReturn="False"
AcceptsTab="False" />
<TextBox Grid.Row="2"
Grid.Column="0"
Grid.ColumnSpan="2"
Grid.ColumnSpan="3"
Margin="0,10,0,0"
Watermark="{localize:Localize EpisodeDetails.Notes.NoteWatermark}"
Text="{Binding NewNoteText}"
Expand Down
6 changes: 6 additions & 0 deletions Aosta.Ava/Aosta.Ava/Pages/LocalEpisodeDetailsPage.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using Aosta.Ava.ViewModels;

using Avalonia.Input;
using Avalonia.Interactivity;

namespace Aosta.Ava.Pages;
Expand All @@ -26,4 +27,9 @@ protected override void OnLoaded(RoutedEventArgs e)
MarkWatchedButton.IsVisible = false;
};
}

private void InputElement_OnTapped(object? sender, TappedEventArgs e)
{
NoteEditor.Close();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ internal void DeleteNote(EpisodeNote note)

private void addNote()
{
_realm.WriteAsync(r => Episode.Notes.Add(new EpisodeNote
_realm.Write(r => Episode.Notes.Add(new EpisodeNote
{
PointInTime = TimeSpan.FromSeconds(NewNoteTimeValue),
Title = NewNoteTitle,
Expand Down

0 comments on commit f07baa9

Please sign in to comment.