mirror of
https://github.com/awatertrevi/xamarin-neo4j.git
synced 2026-10-07 10:04:09 +00:00
fix
This commit is contained in:
+3
-24
@@ -114,35 +114,11 @@ namespace Xamarin.Neo4j.iOS.CustomRenderers
|
|||||||
scrollView.BottomAnchor.ConstraintEqualTo(pillContainer.BottomAnchor),
|
scrollView.BottomAnchor.ConstraintEqualTo(pillContainer.BottomAnchor),
|
||||||
});
|
});
|
||||||
|
|
||||||
// Execute button — blue pill
|
|
||||||
var executeBtn = new UIButton(UIButtonType.System);
|
|
||||||
executeBtn.TranslatesAutoresizingMaskIntoConstraints = false;
|
|
||||||
executeBtn.SetTitle("Execute", UIControlState.Normal);
|
|
||||||
executeBtn.SetTitleColor(UIColor.White, UIControlState.Normal);
|
|
||||||
executeBtn.BackgroundColor = UIColor.SystemBlue;
|
|
||||||
executeBtn.Layer.CornerRadius = pillHeight / 2f;
|
|
||||||
executeBtn.Layer.MasksToBounds = true;
|
|
||||||
executeBtn.TouchUpInside += (s, e) =>
|
|
||||||
{
|
|
||||||
if (VirtualView is QueryEditor queryEditor)
|
|
||||||
{
|
|
||||||
queryEditor.RaiseExecuteClicked();
|
|
||||||
platformView.ResignFirstResponder();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
accessoryView.AddSubview(pillContainer);
|
accessoryView.AddSubview(pillContainer);
|
||||||
accessoryView.AddSubview(executeBtn);
|
|
||||||
|
|
||||||
NSLayoutConstraint.ActivateConstraints(new[]
|
NSLayoutConstraint.ActivateConstraints(new[]
|
||||||
{
|
{
|
||||||
executeBtn.TrailingAnchor.ConstraintEqualTo(accessoryView.TrailingAnchor, -padding),
|
|
||||||
executeBtn.CenterYAnchor.ConstraintEqualTo(accessoryView.CenterYAnchor),
|
|
||||||
executeBtn.HeightAnchor.ConstraintEqualTo(pillHeight),
|
|
||||||
executeBtn.WidthAnchor.ConstraintEqualTo(executeButtonWidth),
|
|
||||||
|
|
||||||
pillContainer.LeadingAnchor.ConstraintEqualTo(accessoryView.LeadingAnchor, padding),
|
pillContainer.LeadingAnchor.ConstraintEqualTo(accessoryView.LeadingAnchor, padding),
|
||||||
pillContainer.TrailingAnchor.ConstraintEqualTo(executeBtn.LeadingAnchor, -padding),
|
|
||||||
pillContainer.CenterYAnchor.ConstraintEqualTo(accessoryView.CenterYAnchor),
|
pillContainer.CenterYAnchor.ConstraintEqualTo(accessoryView.CenterYAnchor),
|
||||||
pillContainer.HeightAnchor.ConstraintEqualTo(pillHeight),
|
pillContainer.HeightAnchor.ConstraintEqualTo(pillHeight),
|
||||||
});
|
});
|
||||||
@@ -172,6 +148,9 @@ namespace Xamarin.Neo4j.iOS.CustomRenderers
|
|||||||
{
|
{
|
||||||
var text = PreprocessText(platformView.Text ?? string.Empty);
|
var text = PreprocessText(platformView.Text ?? string.Empty);
|
||||||
var attributedText = new NSMutableAttributedString(text);
|
var attributedText = new NSMutableAttributedString(text);
|
||||||
|
attributedText.AddAttribute(UIStringAttributeKey.ForegroundColor,
|
||||||
|
UIColor.Label,
|
||||||
|
new NSRange(0, text.Length));
|
||||||
|
|
||||||
foreach (var word in wordsToHighlight)
|
foreach (var word in wordsToHighlight)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
</imageView>
|
</imageView>
|
||||||
</subviews>
|
</subviews>
|
||||||
<viewLayoutGuide key="safeArea" id="1038"/>
|
<viewLayoutGuide key="safeArea" id="1038"/>
|
||||||
<color key="backgroundColor" red="0.19136750699999999" green="0.2006954849" blue="0.2327556908" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
<color key="backgroundColor" red="0.047058823529" green="0.047058823529" blue="0.047058823529" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<constraint firstItem="198" firstAttribute="centerX" secondItem="1038" secondAttribute="centerX" id="201"/>
|
<constraint firstItem="198" firstAttribute="centerX" secondItem="1038" secondAttribute="centerX" id="201"/>
|
||||||
<constraint firstItem="1038" firstAttribute="centerY" secondItem="198" secondAttribute="centerY" id="203"/>
|
<constraint firstItem="1038" firstAttribute="centerY" secondItem="198" secondAttribute="centerY" id="203"/>
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
|
|
||||||
<Button Text="Test" BackgroundColor="Transparent" TextColor="{DynamicResource SecondaryTextColor}" BorderColor="{DynamicResource SecondaryTextColor}" BorderWidth="1" Command="{Binding Commands[Test]}" />
|
<Button Text="Test" BackgroundColor="Transparent" TextColor="{DynamicResource PrimaryTextColor}" BorderColor="{DynamicResource PrimaryTextColor}" BorderWidth="1" Command="{Binding Commands[Test]}" />
|
||||||
<Button Text="Connect" BackgroundColor="Transparent" TextColor="{DynamicResource PrimaryTextColor}" BorderColor="{DynamicResource PrimaryTextColor}" BorderWidth="1" Command="{Binding Commands[Connect]}" />
|
<Button Text="Connect" BackgroundColor="Transparent" TextColor="{DynamicResource PrimaryTextColor}" BorderColor="{DynamicResource PrimaryTextColor}" BorderWidth="1" Command="{Binding Commands[Connect]}" />
|
||||||
<Button Text="Save" BackgroundColor="{DynamicResource Accent}" TextColor="{DynamicResource QueryTextBackground}" Command="{Binding Commands[Save]}" />
|
<Button Text="Save" BackgroundColor="{DynamicResource Accent}" TextColor="{DynamicResource QueryTextBackground}" Command="{Binding Commands[Save]}" />
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
|
|||||||
@@ -7,38 +7,31 @@
|
|||||||
x:Name="connectionsPage"
|
x:Name="connectionsPage"
|
||||||
Title=" ">
|
Title=" ">
|
||||||
|
|
||||||
|
<NavigationPage.TitleView>
|
||||||
|
<StackLayout Orientation="Horizontal" Spacing="8" VerticalOptions="Center" HorizontalOptions="Start" Padding="4,0,0,0">
|
||||||
|
<Label Text="{x:Static fonts:FontAwesomeSolid.ProjectDiagram}"
|
||||||
|
FontFamily="{StaticResource FontAwesomeSolid}"
|
||||||
|
FontSize="18"
|
||||||
|
TextColor="White"
|
||||||
|
VerticalOptions="Center" />
|
||||||
|
<Label Text="PocketGraph"
|
||||||
|
FontSize="18" FontAttributes="Bold"
|
||||||
|
TextColor="White"
|
||||||
|
VerticalOptions="Center" />
|
||||||
|
</StackLayout>
|
||||||
|
</NavigationPage.TitleView>
|
||||||
|
|
||||||
<ContentPage.ToolbarItems>
|
<ContentPage.ToolbarItems>
|
||||||
<ToolbarItem Text="Settings" Order="Secondary" Command="{Binding Commands[OpenSettings]}" />
|
<ToolbarItem Text="Settings" Order="Secondary" Command="{Binding Commands[OpenSettings]}" />
|
||||||
</ContentPage.ToolbarItems>
|
</ContentPage.ToolbarItems>
|
||||||
|
|
||||||
<ContentPage.Content>
|
<ContentPage.Content>
|
||||||
<Grid RowDefinitions="Auto,*">
|
<Grid>
|
||||||
|
|
||||||
<!-- Row 0: Dashboard header -->
|
|
||||||
<StackLayout Grid.Row="0" Spacing="4" Padding="16,16,16,12" HorizontalOptions="Center">
|
|
||||||
<Label Text="{x:Static fonts:FontAwesomeSolid.ProjectDiagram}"
|
|
||||||
FontFamily="{StaticResource FontAwesomeSolid}"
|
|
||||||
FontSize="32"
|
|
||||||
TextColor="{DynamicResource PrimaryTextColor}"
|
|
||||||
HorizontalOptions="Center"
|
|
||||||
Margin="0,0,0,4" />
|
|
||||||
<Label Text="PocketGraph"
|
|
||||||
FontSize="22" FontAttributes="Bold"
|
|
||||||
TextColor="{DynamicResource PrimaryTextColor}"
|
|
||||||
HorizontalOptions="Center" />
|
|
||||||
<Label Text="{Binding ConnectionCountLabel}"
|
|
||||||
FontSize="13"
|
|
||||||
TextColor="{DynamicResource SecondaryTextColor}"
|
|
||||||
HorizontalOptions="Center" />
|
|
||||||
</StackLayout>
|
|
||||||
|
|
||||||
<!-- Row 1: Connection cards + empty state + FAB -->
|
|
||||||
<Grid Grid.Row="1">
|
|
||||||
|
|
||||||
<!-- Scrollable connection cards -->
|
<!-- Scrollable connection cards -->
|
||||||
<ScrollView IsVisible="{Binding HasItems}">
|
<ScrollView IsVisible="{Binding HasItems}">
|
||||||
<StackLayout BindableLayout.ItemsSource="{Binding ConnectionStrings}"
|
<StackLayout BindableLayout.ItemsSource="{Binding ConnectionStrings}"
|
||||||
Spacing="0" Padding="0,0,0,80">
|
Spacing="0" Padding="0,16,0,80">
|
||||||
<BindableLayout.ItemTemplate>
|
<BindableLayout.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Border Margin="16,0,16,8"
|
<Border Margin="16,0,16,8"
|
||||||
@@ -155,8 +148,6 @@
|
|||||||
VerticalOptions="End" HorizontalOptions="End"
|
VerticalOptions="End" HorizontalOptions="End"
|
||||||
Margin="0,0,16,16"
|
Margin="0,0,16,16"
|
||||||
Command="{Binding Commands[AddConnection]}" />
|
Command="{Binding Commands[AddConnection]}" />
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</ContentPage.Content>
|
</ContentPage.Content>
|
||||||
</ContentPage>
|
</ContentPage>
|
||||||
|
|||||||
@@ -178,7 +178,7 @@
|
|||||||
</Border>
|
</Border>
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
|
|
||||||
<!-- Footer — at end of scroll -->
|
<!-- Footer -->
|
||||||
<StackLayout Spacing="15" Padding="9,16,9,32">
|
<StackLayout Spacing="15" Padding="9,16,9,32">
|
||||||
<Label Text="A product of" HorizontalOptions="Center" FontAttributes="Italic" FontSize="12"
|
<Label Text="A product of" HorizontalOptions="Center" FontAttributes="Italic" FontSize="12"
|
||||||
TextColor="{DynamicResource SecondaryTextColor}" />
|
TextColor="{DynamicResource SecondaryTextColor}" />
|
||||||
|
|||||||
@@ -150,6 +150,7 @@
|
|||||||
/* JSON view */
|
/* JSON view */
|
||||||
.json-view-wrapper {
|
.json-view-wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
overflow: visible;
|
||||||
}
|
}
|
||||||
.json-view-wrapper pre {
|
.json-view-wrapper pre {
|
||||||
background: {{borderColor}};
|
background: {{borderColor}};
|
||||||
@@ -157,7 +158,7 @@
|
|||||||
font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
|
font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
padding: 12px;
|
padding: 36px 12px 12px 12px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
max-height: 40vh;
|
max-height: 40vh;
|
||||||
@@ -169,6 +170,7 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
top: 8px;
|
top: 8px;
|
||||||
right: 8px;
|
right: 8px;
|
||||||
|
z-index: 10;
|
||||||
width: 28px;
|
width: 28px;
|
||||||
height: 28px;
|
height: 28px;
|
||||||
border: none;
|
border: none;
|
||||||
|
|||||||
Reference in New Issue
Block a user