-
-
Notifications
You must be signed in to change notification settings - Fork 151
Expand file tree
/
Copy pathMainView.ux
More file actions
84 lines (81 loc) · 2.38 KB
/
MainView.ux
File metadata and controls
84 lines (81 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<App >
<DockPanel>
<Page ux:Class="NavPage">
<EnteringAnimation>
<Move X="1" RelativeTo="ParentSize"/>
</EnteringAnimation>
<ExitingAnimation>
<Move X="-1" RelativeTo="ParentSize" Duration="0.5"/>
</ExitingAnimation>
</Page>
<JavaScript File="MainView.js" />
<StatusBarBackground Dock="Top" />
<Grid Dock="Top" ColumnCount="3" Navigation="nav" Height="50">
<Button Text="Back">
<Clicked>
<GoBack />
</Clicked>
</Button>
<Button Text="Login" Clicked="{startGithubAuth}" />
<Button Text="Get repos" Clicked="{getRepos}" />
</Grid>
<Panel>
<HierarchicalNavigation ux:Name="nav" />
<NavPage>
<ScrollView>
<StackPanel>
<Each Items="{repos}">
<Grid RowCount="2" Margin="5" Padding="10" Height="70">
<Rectangle Layer="Background" Fill="#eee">
<Stroke Brush="#aaa" Width="1" />
</Rectangle>
<Text Value="{name}" FontSize="22"/>
<Text Value="{owner}" FontSize="16" Color="#444"/>
<Clicked>
<Callback Handler="{clicked_handler}" />
<NavigateTo Target="issuesPage" NavigationContext="nav" />
</Clicked>
</Grid>
</Each>
</StackPanel>
</ScrollView>
</NavPage>
<NavPage ux:Name="issuesPage" ux:AutoBind="false">
<ScrollView>
<StackPanel>
<Each Items="{issues}">
<DockPanel Margin="5" Padding="10">
<Rectangle Layer="Background" Fill="#eee">
<Stroke Brush="#aaa" Width="1" />
</Rectangle>
<Panel Dock="Left" Width="60">
<Match Value="{state}">
<Case String="open">
<Rectangle Width="20" Height="20" Fill="#0f0"/>
</Case>
<Case String="closed">
<Rectangle Width="20" Height="20" Fill="#f00"/>
</Case>
</Match>
</Panel>
<Grid RowCount="2">
<Text Value="{title}" FontSize="22"/>
<Text Value="{author}" FontSize="16" Color="#444"/>
</Grid>
<Panel ux:Name="issueBody" Visibility="Collapsed" Dock="Bottom">
<Text Value="{body}" TextWrapping="Wrap"/>
</Panel>
<WhileTrue ux:Name="showBody">
<Change issueBody.Visibility="Visible" />
</WhileTrue>
<Clicked>
<Toggle Target="showBody" />
</Clicked>
</DockPanel>
</Each>
</StackPanel>
</ScrollView>
</NavPage>
</Panel>
</DockPanel>
</App>