mirror of
https://github.com/bitwarden/mobile.git
synced 2024-11-21 11:25:56 +01:00
Adjusted some spacing on about and settings
This commit is contained in:
parent
9e314233d5
commit
7060ee838c
@ -35,7 +35,7 @@ namespace Bit.App.Pages
|
||||
{
|
||||
Children = { logo, versionLabel },
|
||||
Spacing = 20,
|
||||
Padding = new Thickness(0, 40)
|
||||
Padding = new Thickness(0, 40, 0, 0)
|
||||
};
|
||||
|
||||
var creditsCell = new ExtendedTextCell
|
||||
@ -49,7 +49,6 @@ namespace Bit.App.Pages
|
||||
{
|
||||
VerticalOptions = LayoutOptions.Start,
|
||||
EnableScrolling = false,
|
||||
NoHeader = true,
|
||||
Intent = TableIntent.Settings,
|
||||
HasUnevenRows = true,
|
||||
Root = new TableRoot
|
||||
|
@ -123,13 +123,18 @@ namespace Bit.App.Pages
|
||||
};
|
||||
helpCell.Tapped += HelpCell_Tapped;
|
||||
|
||||
var rateCell = new ExtendedTextCell
|
||||
{
|
||||
Text = "Rate the App",
|
||||
ShowDisclousure = true
|
||||
};
|
||||
var rateCell = new LongDetailViewCell("Rate the App", null);
|
||||
rateCell.Tapped += RateCell_Tapped;
|
||||
|
||||
if(Device.OS == TargetPlatform.iOS)
|
||||
{
|
||||
rateCell.Detail.Text = "App Store ratings are reset with every new version of bitwarden. Please consider helping us out with a good review!";
|
||||
}
|
||||
else
|
||||
{
|
||||
rateCell.Detail.Text = "Please consider helping us out with a good review!";
|
||||
}
|
||||
|
||||
Table = new CustomTable
|
||||
{
|
||||
Root = new TableRoot
|
||||
@ -165,36 +170,8 @@ namespace Bit.App.Pages
|
||||
}
|
||||
};
|
||||
|
||||
var rateLabel = new Label
|
||||
{
|
||||
LineBreakMode = LineBreakMode.WordWrap,
|
||||
FontSize = Device.GetNamedSize(NamedSize.Small, typeof(Label)),
|
||||
Style = (Style)Application.Current.Resources["text-muted"],
|
||||
Margin = new Thickness(15, 0, 15, 25)
|
||||
};
|
||||
|
||||
if(Device.OS == TargetPlatform.iOS)
|
||||
{
|
||||
rateLabel.Text = "App Store ratings are reset with every new version of bitwarden. Please consider helping us out with a good review!";
|
||||
}
|
||||
else
|
||||
{
|
||||
rateLabel.Text = "Please consider helping us out with a good review!";
|
||||
}
|
||||
|
||||
var stackLayout = new StackLayout
|
||||
{
|
||||
Children = { Table, rateLabel },
|
||||
Spacing = 0
|
||||
};
|
||||
|
||||
stackLayout.LayoutChanged += (sender, args) =>
|
||||
{
|
||||
rateLabel.WidthRequest = stackLayout.Bounds.Width - rateLabel.Bounds.Left * 2;
|
||||
};
|
||||
|
||||
Title = AppResources.Settings;
|
||||
Content = new ScrollView { Content = stackLayout };
|
||||
Content = Table;
|
||||
}
|
||||
|
||||
private async void TwoStepCell_Tapped(object sender, EventArgs e)
|
||||
@ -406,8 +383,6 @@ namespace Bit.App.Pages
|
||||
{
|
||||
public CustomTable()
|
||||
{
|
||||
VerticalOptions = LayoutOptions.Start;
|
||||
EnableScrolling = false;
|
||||
Intent = TableIntent.Settings;
|
||||
HasUnevenRows = true;
|
||||
|
||||
@ -418,5 +393,41 @@ namespace Bit.App.Pages
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class LongDetailViewCell : ExtendedViewCell
|
||||
{
|
||||
public LongDetailViewCell(string labelText, string detailText)
|
||||
{
|
||||
Label = new Label
|
||||
{
|
||||
VerticalOptions = LayoutOptions.CenterAndExpand,
|
||||
LineBreakMode = LineBreakMode.TailTruncation,
|
||||
Text = labelText
|
||||
};
|
||||
|
||||
Detail = new Label
|
||||
{
|
||||
FontSize = Device.GetNamedSize(NamedSize.Small, typeof(Label)),
|
||||
LineBreakMode = LineBreakMode.WordWrap,
|
||||
VerticalOptions = LayoutOptions.End,
|
||||
Style = (Style)Application.Current.Resources["text-muted"],
|
||||
Text = detailText
|
||||
};
|
||||
|
||||
var labelDetailStackLayout = new StackLayout
|
||||
{
|
||||
HorizontalOptions = LayoutOptions.StartAndExpand,
|
||||
VerticalOptions = LayoutOptions.FillAndExpand,
|
||||
Children = { Label, Detail },
|
||||
Padding = new Thickness(15)
|
||||
};
|
||||
|
||||
ShowDisclousure = true;
|
||||
View = labelDetailStackLayout;
|
||||
}
|
||||
|
||||
public Label Label { get; set; }
|
||||
public Label Detail { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user