├── .gitignore
├── LICENSE
├── Readme.md
├── assets
├── Icon
│ ├── Octocat.png
│ ├── Octocat.psd
│ ├── Placeholder-50x50.png
│ └── Placeholder.png
├── Stores
│ └── msstore.png
└── Uwp
│ ├── Screenshots
│ ├── Category.png
│ ├── ErrorPage.png
│ ├── Login.png
│ ├── MainPage.png
│ └── RepoPage.png
│ └── Sketch
│ ├── CategoryList.jpg
│ ├── ContextMenu.jpg
│ ├── ErrorPage.jpg
│ ├── GithubX.xd
│ ├── MainPage.jpg
│ ├── ReadME.jpg
│ └── SignIn.jpg
├── docs
├── .nojekyll
├── GithubApi
│ ├── README.md
│ ├── stars.http
│ └── user.http
├── README.md
├── Uwp
│ ├── CREDIT.md
│ └── NOTE.md
└── index.html
└── source
├── .editorconfig
├── .gitignore
├── GithubX.Android
├── Assets
│ └── AboutAssets.txt
├── GithubX.Android.csproj
├── MainActivity.cs
├── Properties
│ ├── AndroidManifest.xml
│ └── AssemblyInfo.cs
└── Resources
│ ├── AboutResources.txt
│ ├── Resource.Designer.cs
│ ├── layout
│ └── activity_main.axml
│ ├── mipmap-anydpi-v26
│ ├── ic_launcher.xml
│ └── ic_launcher_round.xml
│ ├── mipmap-hdpi
│ ├── ic_launcher.png
│ ├── ic_launcher_foreground.png
│ └── ic_launcher_round.png
│ ├── mipmap-mdpi
│ ├── ic_launcher.png
│ ├── ic_launcher_foreground.png
│ └── ic_launcher_round.png
│ ├── mipmap-xhdpi
│ ├── ic_launcher.png
│ ├── ic_launcher_foreground.png
│ └── ic_launcher_round.png
│ ├── mipmap-xxhdpi
│ ├── ic_launcher.png
│ ├── ic_launcher_foreground.png
│ └── ic_launcher_round.png
│ ├── mipmap-xxxhdpi
│ ├── ic_launcher.png
│ ├── ic_launcher_foreground.png
│ └── ic_launcher_round.png
│ └── values
│ ├── Strings.xml
│ ├── colors.xml
│ ├── ic_launcher_background.xml
│ └── styles.xml
├── GithubX.Shared
├── GithubX.Shared.csproj
├── Helpers
│ ├── CacheHandler.cs
│ ├── CollectionExtension.cs
│ ├── FontHelper.cs
│ ├── OctokitHelper.cs
│ └── Utils.cs
├── Keys.cs
├── Models
│ ├── Category.cs
│ └── GradientColor.cs
└── Services
│ ├── Github
│ ├── AuthService.cs
│ ├── GistService.cs
│ ├── GithubService.cs
│ ├── RepositoryService.cs
│ ├── SearchService.cs
│ └── UserService.cs
│ ├── Logger.cs
│ └── Pocket
│ ├── IPocketApi.cs
│ ├── PocketModels.cs
│ └── PocketService.cs
├── GithubX.UWP
├── App.xaml
├── App.xaml.cs
├── Assets
│ ├── Files
│ │ ├── HELP.md
│ │ ├── Placeholder.png
│ │ ├── d_coffee.png
│ │ ├── d_iran.png
│ │ └── devicon.ttf
│ ├── LargeTile.scale-100.png
│ ├── LargeTile.scale-125.png
│ ├── LargeTile.scale-150.png
│ ├── LargeTile.scale-200.png
│ ├── LockScreenLogo.scale-100.png
│ ├── LockScreenLogo.scale-125.png
│ ├── LockScreenLogo.scale-150.png
│ ├── LockScreenLogo.scale-200.png
│ ├── LockScreenLogo.scale-400.png
│ ├── SmallTile.scale-100.png
│ ├── SmallTile.scale-200.png
│ ├── SmallTile.scale-400.png
│ ├── SplashScreen.scale-100.png
│ ├── SplashScreen.scale-125.png
│ ├── SplashScreen.scale-150.png
│ ├── SplashScreen.scale-200.png
│ ├── SplashScreen.scale-400.png
│ ├── Square150x150Logo.scale-100.png
│ ├── Square150x150Logo.scale-125.png
│ ├── Square150x150Logo.scale-150.png
│ ├── Square150x150Logo.scale-200.png
│ ├── Square150x150Logo.scale-400.png
│ ├── Square310x310Logo.scale-100.png
│ ├── Square310x310Logo.scale-125.png
│ ├── Square310x310Logo.scale-150.png
│ ├── Square310x310Logo.scale-200.png
│ ├── Square310x310Logo.scale-400.png
│ ├── Square44x44Logo.scale-100.png
│ ├── Square44x44Logo.scale-125.png
│ ├── Square44x44Logo.scale-150.png
│ ├── Square44x44Logo.scale-200.png
│ ├── Square44x44Logo.scale-400.png
│ ├── Square44x44Logo.targetsize-16.png
│ ├── Square44x44Logo.targetsize-16_altform-unplated.png
│ ├── Square44x44Logo.targetsize-20.png
│ ├── Square44x44Logo.targetsize-20_altform-unplated.png
│ ├── Square44x44Logo.targetsize-24.png
│ ├── Square44x44Logo.targetsize-24_altform-unplated.png
│ ├── Square44x44Logo.targetsize-256.png
│ ├── Square44x44Logo.targetsize-256_altform-unplated.png
│ ├── Square44x44Logo.targetsize-30.png
│ ├── Square44x44Logo.targetsize-30_altform-unplated.png
│ ├── Square44x44Logo.targetsize-32.png
│ ├── Square44x44Logo.targetsize-32_altform-unplated.png
│ ├── Square44x44Logo.targetsize-36.png
│ ├── Square44x44Logo.targetsize-36_altform-unplated.png
│ ├── Square44x44Logo.targetsize-40.png
│ ├── Square44x44Logo.targetsize-40_altform-unplated.png
│ ├── Square44x44Logo.targetsize-48.png
│ ├── Square44x44Logo.targetsize-48_altform-unplated.png
│ ├── Square44x44Logo.targetsize-60.png
│ ├── Square44x44Logo.targetsize-60_altform-unplated.png
│ ├── Square44x44Logo.targetsize-64.png
│ ├── Square44x44Logo.targetsize-64_altform-unplated.png
│ ├── Square44x44Logo.targetsize-72.png
│ ├── Square44x44Logo.targetsize-72_altform-unplated.png
│ ├── Square44x44Logo.targetsize-80.png
│ ├── Square44x44Logo.targetsize-80_altform-unplated.png
│ ├── Square44x44Logo.targetsize-96.png
│ ├── Square44x44Logo.targetsize-96_altform-unplated.png
│ ├── Square71x71Logo.scale-100.png
│ ├── Square71x71Logo.scale-125.png
│ ├── Square71x71Logo.scale-150.png
│ ├── Square71x71Logo.scale-200.png
│ ├── Square71x71Logo.scale-400.png
│ ├── StoreLogo.backup.png
│ ├── StoreLogo.scale-100.png
│ ├── StoreLogo.scale-125.png
│ ├── StoreLogo.scale-150.png
│ ├── StoreLogo.scale-200.png
│ ├── StoreLogo.scale-400.png
│ ├── Wide310x150Logo.scale-100.png
│ ├── Wide310x150Logo.scale-125.png
│ ├── Wide310x150Logo.scale-150.png
│ ├── Wide310x150Logo.scale-200.png
│ └── Wide310x150Logo.scale-400.png
├── Converters
│ ├── ContentTypeToSymbolConverter.cs
│ ├── FalseToVisibleConverter.cs
│ ├── LanguageToColorConverter.cs
│ ├── StringConcatConverter.cs
│ └── TypeToActionStringConverter.cs
├── GithubX.UWP.csproj
├── Helpers
│ ├── AppSettings.cs
│ └── Utils.cs
├── Package.appxmanifest
├── Package.xml
├── Properties
│ ├── AssemblyInfo.cs
│ └── Default.rd.xml
├── Protocol.png
├── Theme
│ ├── ColorPalette.xaml
│ └── Theme.xaml
├── Views
│ ├── ActivitiesPage.xaml
│ ├── ActivitiesPage.xaml.cs
│ ├── CategoriesPage.xaml
│ ├── CategoriesPage.xaml.cs
│ ├── CategoryPage.xaml
│ ├── CategoryPage.xaml.cs
│ ├── Controls
│ │ ├── ActivityItem.xaml
│ │ ├── ActivityItem.xaml.cs
│ │ ├── GistItem.xaml
│ │ ├── GistItem.xaml.cs
│ │ ├── NotificationItem.xaml
│ │ ├── NotificationItem.xaml.cs
│ │ ├── RepositoryItem.xaml
│ │ ├── RepositoryItem.xaml.cs
│ │ ├── UserItem.xaml
│ │ └── UserItem.xaml.cs
│ ├── Dialogs
│ │ ├── AddCategoryDialog.xaml
│ │ ├── AddCategoryDialog.xaml.cs
│ │ ├── NotificationDialog.xaml
│ │ ├── NotificationDialog.xaml.cs
│ │ ├── SettingsDialog.xaml
│ │ └── SettingsDialog.xaml.cs
│ ├── FollowPage.xaml
│ ├── FollowPage.xaml.cs
│ ├── GistPage.xaml
│ ├── GistPage.xaml.cs
│ ├── GistsPage.xaml
│ ├── GistsPage.xaml.cs
│ ├── LoginPage.xaml
│ ├── LoginPage.xaml.cs
│ ├── MarkdownPage.xaml
│ ├── MarkdownPage.xaml.cs
│ ├── MotherPage.xaml
│ ├── MotherPage.xaml.cs
│ ├── ProfilePage.xaml
│ ├── ProfilePage.xaml.cs
│ ├── RepositoriesPage.xaml
│ ├── RepositoriesPage.xaml.cs
│ ├── RepositoryPage.xaml
│ └── RepositoryPage.xaml.cs
└── _pkginfo.txt
├── GithubX.iOS
├── AppDelegate.cs
├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon1024.png
│ │ ├── Icon120.png
│ │ ├── Icon152.png
│ │ ├── Icon167.png
│ │ ├── Icon180.png
│ │ ├── Icon20.png
│ │ ├── Icon29.png
│ │ ├── Icon40.png
│ │ ├── Icon58.png
│ │ ├── Icon60.png
│ │ ├── Icon76.png
│ │ ├── Icon80.png
│ │ └── Icon87.png
├── Entitlements.plist
├── GithubX.iOS.csproj
├── Info.plist
├── LaunchScreen.storyboard
├── Main.cs
├── Properties
│ └── AssemblyInfo.cs
└── Resources
│ └── LaunchScreen.xib
└── GithubX.sln
/.gitignore:
--------------------------------------------------------------------------------
1 | .vs/
2 | ./source/GithubX.Shared/Keys.cs
3 |
--------------------------------------------------------------------------------
/Readme.md:
--------------------------------------------------------------------------------
1 | # GithubX
2 |
3 | 
4 |
5 | Main Goal: Make Categorizing Github Repositories Easier and Enjoyable.
6 |
7 | 
8 |
9 | | | Server | WebClient | UWP | Android | iOS | Gtk#
10 | | :- | :- | :- | :- |:- | :- | :-
11 | | Plan | ❌ | ❌ | ✔ | ❌ | ❌ | ❌
12 | | ToDo List | [🔗][todo4] | [🔗][todo5] | [🔗][todo1] | [🔗][todo2] | [🔗][todo3] | [🔗][todo6]
13 | | UI Sketch | ❌ | ❌ | ✔[🔗][xduwp] | ❌ | ❌ | ❌
14 | | UI Dev | ❌ | ❌ | ✔[🔗][scrnuwp] | ❌ | ❌ | ❌
15 | | Code | ❌ | ❌ | ▶[🔗][suwp]| ❌[🔗][sand] | ❌ | ❌
16 | | Test | ❌ | ❌ | ❌| ❌ | ❌ | ❌
17 | | Docs | ❌ | ❌ | ❌| ❌ | ❌ | ❌
18 | | Build | ❌ | ❌ | ![-][uwpbuild] | ❌ | ❌ | ❌| ❌
19 | | Released | ❌ | ❌ | [![-][msstore-img]][msstore-url] | ❌ | ❌ | ❌| ❌
20 |
21 | ```emoji
22 | 🔗: link | ✔: Done | ❌: Not Started | ⏹: Stopped | ⏸: Paused | ▶: Working on it
23 | ```
24 | ## [📃See Docs Here](https://yazdipour.github.io/githubx/)
25 |
26 | ## Donate
27 |
28 | [](https://buymeacoff.ee/XrTW5YQDy)
29 |
30 | [](https://www.payping.ir/yazdipour)
31 |
32 | [scrnuwp]:assets/Uwp/Screenshots
33 | [xduwp]:assets/Uwp/Sketch
34 | [xdand]:assets/Android/
35 | [xdcli]:assets/WebClient/
36 | [xdser]:assets/Server/
37 | [xdios]:assets/iOS/
38 | [suwp]: source/GithubX.UWP/
39 | [sand]: source/GithubX.Android/
40 | [sios]: source/GithubX.iOS/
41 | [sgtk]: source/
42 | [scli]: source/
43 | [sser]: source/
44 | [todo1]: https://github.com/yazdipour/githubx/projects/1
45 | [todo2]: https://github.com/yazdipour/githubx/projects/2
46 | [todo3]: https://github.com/yazdipour/githubx/projects/3
47 | [todo4]: https://github.com/yazdipour/githubx/projects/4
48 | [todo5]: https://github.com/yazdipour/githubx/projects/5
49 | [todo6]: https://github.com/yazdipour/githubx/projects/6
50 | [msstore-url]: https://www.microsoft.com/store/apps/9P7D7PD6FBCV
51 | [msstore-img]: assets/Stores/msstore.png
52 | [uwpbuild]: https://build.appcenter.ms/v0.1/apps/dd05cbde-11b6-45db-8d2f-f65b1791e4a1/branches/master/badge
--------------------------------------------------------------------------------
/assets/Icon/Octocat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/assets/Icon/Octocat.png
--------------------------------------------------------------------------------
/assets/Icon/Octocat.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/assets/Icon/Octocat.psd
--------------------------------------------------------------------------------
/assets/Icon/Placeholder-50x50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/assets/Icon/Placeholder-50x50.png
--------------------------------------------------------------------------------
/assets/Icon/Placeholder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/assets/Icon/Placeholder.png
--------------------------------------------------------------------------------
/assets/Stores/msstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/assets/Stores/msstore.png
--------------------------------------------------------------------------------
/assets/Uwp/Screenshots/Category.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/assets/Uwp/Screenshots/Category.png
--------------------------------------------------------------------------------
/assets/Uwp/Screenshots/ErrorPage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/assets/Uwp/Screenshots/ErrorPage.png
--------------------------------------------------------------------------------
/assets/Uwp/Screenshots/Login.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/assets/Uwp/Screenshots/Login.png
--------------------------------------------------------------------------------
/assets/Uwp/Screenshots/MainPage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/assets/Uwp/Screenshots/MainPage.png
--------------------------------------------------------------------------------
/assets/Uwp/Screenshots/RepoPage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/assets/Uwp/Screenshots/RepoPage.png
--------------------------------------------------------------------------------
/assets/Uwp/Sketch/CategoryList.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/assets/Uwp/Sketch/CategoryList.jpg
--------------------------------------------------------------------------------
/assets/Uwp/Sketch/ContextMenu.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/assets/Uwp/Sketch/ContextMenu.jpg
--------------------------------------------------------------------------------
/assets/Uwp/Sketch/ErrorPage.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/assets/Uwp/Sketch/ErrorPage.jpg
--------------------------------------------------------------------------------
/assets/Uwp/Sketch/GithubX.xd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/assets/Uwp/Sketch/GithubX.xd
--------------------------------------------------------------------------------
/assets/Uwp/Sketch/MainPage.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/assets/Uwp/Sketch/MainPage.jpg
--------------------------------------------------------------------------------
/assets/Uwp/Sketch/ReadME.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/assets/Uwp/Sketch/ReadME.jpg
--------------------------------------------------------------------------------
/assets/Uwp/Sketch/SignIn.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/assets/Uwp/Sketch/SignIn.jpg
--------------------------------------------------------------------------------
/docs/.nojekyll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/docs/.nojekyll
--------------------------------------------------------------------------------
/docs/GithubApi/README.md:
--------------------------------------------------------------------------------
1 | # GithubX
2 |
3 | # Github Api
4 |
5 | ### Readme
6 |
7 | ** Attention: Sometimes dev use html tags
8 |
9 | Dir > https://api.github.com/repos/{user}/{repo}/contents/
10 |
11 | Raw > https://raw.githubusercontent.com/{user}/{repo}/master/README.md
12 |
13 | {
14 | "name": "README.md",
15 | "path": "README.md",
16 | "sha": "c8cfde2e782d4aef736203b0d374af084de2d5aa",
17 | "size": 1113,
18 | "url": "https://api.github.com/repos/yazdipour/DM17/contents/README.md?ref=master",
19 | "html_url": "https://github.com/yazdipour/DM17/blob/master/README.md",
20 | "git_url": "https://api.github.com/repos/yazdipour/DM17/git/blobs/c8cfde2e782d4aef736203b0d374af084de2d5aa",
21 | "download_url": "https://raw.githubusercontent.com/yazdipour/DM17/master/README.md",
22 | "type": "file",
23 | "_links": {
24 | "self": "https://api.github.com/repos/yazdipour/DM17/contents/README.md?ref=master",
25 | "git": "https://api.github.com/repos/yazdipour/DM17/git/blobs/c8cfde2e782d4aef736203b0d374af084de2d5aa",
26 | "html": "https://github.com/yazdipour/DM17/blob/master/README.md"
27 | }
28 | }
29 |
30 |
31 | ## StarList
32 |
33 | https://api.github.com/users/yazdipour/starred
34 |
35 |
36 | [
37 | {
38 | "id": 106279637,
39 | "name": "filepond",
40 | "full_name": "pqina/filepond",
41 | "owner": {
42 | "login": "pqina",
43 | "id": 22966117,
44 | "avatar_url": "https://avatars0.githubusercontent.com/u/22966117?v=4"},
45 | "private": false,
46 | "html_url": "https://github.com/pqina/filepond",
47 | "description": "🌊 A Flexible and Fun JavaScript File Upload Library",
48 | "fork": false,
49 | "url": "https://api.github.com/repos/pqina/filepond",
50 | "homepage": "https://pqina.nl/filepond",
51 | "stargazers_count": 1557,
52 | "watchers_count": 1557,
53 | "language": "JavaScript",
54 | "has_issues": true,
55 | "has_projects": false,
56 | "has_downloads": true,
57 | "has_wiki": false,
58 | "has_pages": false,
59 | "forks": 48,
60 | "default_branch": "master"
61 | }
62 | ]
63 |
64 | ## UserInfo
65 | https://api.github.com/users/{user}
66 |
67 | {
68 | "login": "pqina",
69 | "id": 22966117,
70 | "avatar_url": "https://avatars0.githubusercontent.com/u/22966117?v=4",
71 | "html_url": "https://github.com/pqina",
72 | "starred_url": "https://api.github.com/users/pqina/starred{/owner}{/repo}",
73 | "type": "User",
74 | "site_admin": false,
75 | "name": "pqina",
76 | "company": "pqina",
77 | "blog": "https://pqina.nl",
78 | "location": "The Netherlands",
79 | "email": null,
80 | "hireable": null,
81 | "bio": "@pqina is @rikschennink's tiny one man web outpost.",
82 | "public_repos": 17,
83 | "public_gists": 1,
84 | "followers": 25,
85 | "following": 1
86 | }
87 |
--------------------------------------------------------------------------------
/docs/GithubApi/stars.http:
--------------------------------------------------------------------------------
1 | GET https://api.github.com/users/yazdipour/starred?page=1 HTTP/1.1
2 | User-Agent: Test
--------------------------------------------------------------------------------
/docs/GithubApi/user.http:
--------------------------------------------------------------------------------
1 | GET https://api.github.com/users/yazdipour HTTP/1.1
2 | User-Agent: XGithub
--------------------------------------------------------------------------------
/docs/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/docs/README.md
--------------------------------------------------------------------------------
/docs/Uwp/CREDIT.md:
--------------------------------------------------------------------------------
1 | # Thanks to
2 |
3 | * [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/)
4 | * [HTML2Markdown](https://github.com/baynezy/Html2Markdown)
5 | * [UWPCommunityToolkit](https://github.com/Microsoft/UWPCommunityToolkit)
6 | * [PocketSharp](https://github.com/ceee/PocketSharp)
7 | * [Avakache](https://github.com/akavache/Akavache/)
8 | * [Refit](https://github.com/paulcbetts/refit)
--------------------------------------------------------------------------------
/docs/Uwp/NOTE.md:
--------------------------------------------------------------------------------
1 | ## Release Note
2 |
3 | * 1.2 : Add Refit + Add Avakache
4 | * 1.1.x : Fixes bug in CacheLoading
5 | * 1.1 : Markdown Theme Setting + Pocket Api + Drag n drop + Bug Fixes
6 | * 1.0 : UI + Github Api
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | GithubX Document
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/source/.editorconfig:
--------------------------------------------------------------------------------
1 | [*]
2 | end_of_line = crlf
3 | indent_style = tab
4 |
5 | [*.cs]
6 | csharp_style_expression_bodied_properties = true : suggestion
7 | csharp_prefer_braces = false : warning
8 | trim_trailing_whitespace = true
9 | indent_size = tab
10 | dotnet_style_explicit_tuple_names = true : suggestion
11 | dotnet_style_prefer_inferred_anonymous_type_member_names = true : suggestion
12 | csharp_space_between_method_call_name_and_opening_parenthesis = false
13 | [*.xaml]
14 | trim_trailing_whitespace = true
15 | indent_size = tab
16 |
17 | [*.xml]
18 | indent_style = space
--------------------------------------------------------------------------------
/source/.gitignore:
--------------------------------------------------------------------------------
1 | .vs/
2 | GithubX.UWP/Services/Api/ApiKeys.cs
3 |
4 | ## Ignore Visual Studio temporary files, build results, and
5 | ## files generated by popular Visual Studio add-ons.
6 |
7 | # User-specific files
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Build results
17 | [Dd]ebug/
18 | [Dd]ebugPublic/
19 | [Rr]elease/
20 | [Rr]eleases/
21 | [Gg]enerated Files/
22 | x64/
23 | x86/
24 | build/
25 | bld/
26 | [Bb]in/
27 | [Oo]bj/
28 |
29 | # Visual Studo 2015 cache/options directory
30 | .vs/
31 | BundleArtifacts/
32 |
33 | # MSTest test Results
34 | [Tt]est[Rr]esult*/
35 | [Bb]uild[Ll]og.*
36 |
37 | # NUNIT
38 | *.VisualState.xml
39 | TestResult.xml
40 |
41 | # Build Results of an ATL Project
42 | [Dd]ebugPS/
43 | [Rr]eleasePS/
44 | dlldata.c
45 |
46 | *_i.c
47 | *_p.c
48 | *_i.h
49 | *.ilk
50 | *.meta
51 | *.obj
52 | *.pch
53 | *.pdb
54 | *.pgc
55 | *.pgd
56 | *.rsp
57 | *.sbr
58 | *.tlb
59 | *.tli
60 | *.tlh
61 | *.tmp
62 | *.tmp_proj
63 | *_wpftmp.csproj
64 | *.log
65 | *.vspscc
66 | *.vssscc
67 | .builds
68 | *.pidb
69 | *.svclog
70 | *.scc
71 |
72 | # Chutzpah Test files
73 | _Chutzpah*
74 |
75 | # Visual C++ cache files
76 | ipch/
77 | *.aps
78 | *.ncb
79 | *.opensdf
80 | *.sdf
81 | *.cachefile
82 | *.VC.db
83 | *.VC.VC.opendb
84 |
85 | # Visual Studio profiler
86 | *.psess
87 | *.vsp
88 | *.vspx
89 | *.sap
90 |
91 | # Visual Studio Trace Files
92 | *.e2e
93 |
94 | # TFS 2012 Local Workspace
95 | $tf/
96 |
97 | # Guidance Automation Toolkit
98 | *.gpState
99 |
100 | # ReSharper is a .NET coding add-in
101 | _ReSharper*/
102 | *.[Rr]e[Ss]harper
103 | *.DotSettings.user
104 |
105 | # JustCode is a .NET coding addin-in
106 | .JustCode
107 |
108 | # TeamCity is a build add-in
109 | _TeamCity*
110 |
111 | # DotCover is a Code Coverage Tool
112 | *.dotCover
113 |
114 | # AxoCover is a Code Coverage Tool
115 | .axoCover/*
116 | !.axoCover/settings.json
117 |
118 | # Visual Studio code coverage results
119 | *.coverage
120 | *.coveragexml
121 |
122 | # NCrunch
123 | _NCrunch_*
124 | .*crunch*.local.xml
125 |
126 | # MightyMoose
127 | *.mm.*
128 | AutoTest.Net/
129 |
130 | # Web workbench (sass)
131 | .sass-cache/
132 |
133 | # Installshield output folder
134 | [Ee]xpress/
135 |
136 | # DocProject is a documentation generator add-in
137 | DocProject/buildhelp/
138 | DocProject/Help/*.HxT
139 | DocProject/Help/*.HxC
140 | DocProject/Help/*.hhc
141 | DocProject/Help/*.hhk
142 | DocProject/Help/*.hhp
143 | DocProject/Help/Html2
144 | DocProject/Help/html
145 |
146 | # Click-Once directory
147 | publish/
148 |
149 | # Publish Web Output
150 | *.[Pp]ublish.xml
151 | *.azurePubxml
152 | # TODO: Comment the next line if you want to checkin your web deploy settings
153 | # but database connection strings (with potential passwords) will be unencrypted
154 | *.pubxml
155 | *.publishproj
156 |
157 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
158 | # checkin your Azure Web App publish settings, but sensitive information contained
159 | # in these scripts will be unencrypted
160 | PublishScripts/
161 |
162 | # NuGet Packages
163 | *.nupkg
164 | # The packages folder can be ignored because of Package Restore
165 | **/[Pp]ackages/*
166 | # except build/, which is used as an MSBuild target.
167 | !**/[Pp]ackages/build/
168 | # Uncomment if necessary however generally it will be regenerated when needed
169 | #!**/packages/repositories.config
170 | *.nuget.props
171 | *.nuget.targets
172 |
173 | # Windows Azure Build Output
174 | csx/
175 | *.build.csdef
176 |
177 | # Microsoft Azure Emulator
178 | ecf/
179 | rcf/
180 |
181 | # Microsoft Store app package directory
182 | AppPackages/
183 | BundleArtifacts/
184 | Package.StoreAssociation.xml
185 | _pkginfo.txt
186 | *.appx
187 |
188 | # Others
189 | *.[Cc]ache
190 | ClientBin/
191 | [Ss]tyle[Cc]op.*
192 | ~$*
193 | *~
194 | *.dbmdl
195 | *.dbproj.schemaview
196 | *.pfx
197 | *.publishsettings
198 | node_modules/
199 | bower_components/
200 |
201 | # RIA/Silverlight projects
202 | Generated_Code/
203 |
204 | # Backup & report files from converting an old project file
205 | # to a newer Visual Studio version. Backup files are not needed,
206 | # because we have git ;-)
207 | _UpgradeReport_Files/
208 | Backup*/
209 | UpgradeLog*.XML
210 | UpgradeLog*.htm
211 | ServiceFabricBackup/
212 | *.rptproj.bak
213 |
214 | # SQL Server files
215 | *.mdf
216 | *.ldf
217 | *.ndf
218 |
219 | # Business Intelligence projects
220 | *.rdl.data
221 | *.bim.layout
222 | *.bim_*.settings
223 | *.rptproj.rsuser
224 |
225 | # Microsoft Fakes
226 | FakesAssemblies/
227 |
228 | # GhostDoc plugin setting file
229 | *.GhostDoc.xml
230 |
231 | # Node.js Tools for Visual Studio
232 | .ntvs_analysis.dat
233 |
234 | # Visual Studio 6 build log
235 | *.plg
236 |
237 | # Visual Studio 6 workspace options file
238 | *.opt
239 |
240 | # Files generated by samples with custom Direct2D effects
241 | *.fxlib
242 |
243 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
244 | *.vbw
245 |
246 | ### Xamarin Ignore
247 | ### https://www.gitignore.io/api/visualstudio%2Cxamarinstudio
248 | .packages
249 | *.rsuser
250 |
251 | # Benchmark Results
252 | BenchmarkDotNet.Artifacts/
253 |
254 | # .NET Core
255 | project.lock.json
256 | project.fragment.lock.json
257 | artifacts/
258 |
259 | # StyleCop
260 | StyleCopReport.xml
261 |
262 | # Visual Studio LightSwitch build output
263 | **/*.HTMLClient/GeneratedArtifacts
264 | **/*.DesktopClient/GeneratedArtifacts
265 | **/*.DesktopClient/ModelManifest.xml
266 | **/*.Server/GeneratedArtifacts
267 | **/*.Server/ModelManifest.xml
268 | _Pvt_Extensions
269 |
270 | # Paket dependency manager
271 | .paket/paket.exe
272 | paket-files/
273 |
274 | # FAKE - F# Make
275 | .fake/
276 |
277 | # JetBrains Rider
278 | .idea/
279 | *.sln.iml
280 |
281 | # CodeRush personal settings
282 | .cr/personal
283 |
284 | # Python Tools for Visual Studio (PTVS)
285 | __pycache__/
286 | *.pyc
287 |
288 | # Cake - Uncomment if you are using it
289 | # tools/**
290 | # !tools/packages.config
291 |
292 | # Tabs Studio
293 | *.tss
294 |
295 | # Telerik's JustMock configuration file
296 | *.jmconfig
297 |
298 | # BizTalk build output
299 | *.btp.cs
300 | *.btm.cs
301 | *.odx.cs
302 | *.xsd.cs
303 |
304 | # OpenCover UI analysis results
305 | OpenCover/
306 |
307 | # Azure Stream Analytics local run output
308 | ASALocalRun/
309 |
310 | # MSBuild Binary and Structured Log
311 | *.binlog
312 |
313 | # NVidia Nsight GPU debugger configuration file
314 | *.nvuser
315 |
316 | # MFractors (Xamarin productivity tool) working folder
317 | .mfractor/
318 |
319 | # Local History for Visual Studio
320 | .localhistory/
321 |
322 | ### Custom ignores
323 | gallery.xml
324 | GithubX.UWP/Services/Api/ApiKeys.cs
325 |
--------------------------------------------------------------------------------
/source/GithubX.Android/Assets/AboutAssets.txt:
--------------------------------------------------------------------------------
1 | Any raw assets you want to be deployed with your application can be placed in
2 | this directory (and child directories) and given a Build Action of "AndroidAsset".
3 |
4 | These files will be deployed with you package and will be accessible using Android's
5 | AssetManager, like this:
6 |
7 | public class ReadAsset : Activity
8 | {
9 | protected override void OnCreate (Bundle bundle)
10 | {
11 | base.OnCreate (bundle);
12 |
13 | InputStream input = Assets.Open ("my_asset.txt");
14 | }
15 | }
16 |
17 | Additionally, some Android functions will automatically load asset files:
18 |
19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
--------------------------------------------------------------------------------
/source/GithubX.Android/GithubX.Android.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 8.0.30703
7 | 2.0
8 | {0E58663D-29EB-4CDD-974F-F28CC29C8912}
9 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
10 | {122416d6-6b49-4ee2-a1e8-b825f31c79fe}
11 | Library
12 | Properties
13 | GithubX.Android
14 | GithubX.Android
15 | 512
16 | True
17 | Resources\Resource.Designer.cs
18 | Resource
19 | Off
20 | false
21 | v8.1
22 | Properties\AndroidManifest.xml
23 | Resources
24 | Assets
25 | Xamarin.Android.Net.AndroidClientHandler
26 |
27 |
28 | True
29 | portable
30 | False
31 | bin\Debug\
32 | DEBUG;TRACE
33 | prompt
34 | 4
35 | True
36 | None
37 | False
38 |
39 |
40 | True
41 | pdbonly
42 | True
43 | bin\Release\
44 | TRACE
45 | prompt
46 | 4
47 | true
48 | False
49 | SdkOnly
50 | True
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | Designer
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
105 |
--------------------------------------------------------------------------------
/source/GithubX.Android/MainActivity.cs:
--------------------------------------------------------------------------------
1 | using Android.App;
2 | using Android.OS;
3 | using Android.Support.V7.App;
4 | using Android.Runtime;
5 | using Android.Widget;
6 |
7 | namespace GithubX.Android
8 | {
9 | [Activity(Label = "@string/app_name", Theme = "@style/AppTheme", MainLauncher = true)]
10 | public class MainActivity : AppCompatActivity
11 | {
12 | protected override void OnCreate(Bundle savedInstanceState)
13 | {
14 | base.OnCreate(savedInstanceState);
15 | // Set our view from the "main" layout resource
16 | SetContentView(Resource.Layout.activity_main);
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/source/GithubX.Android/Properties/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/source/GithubX.Android/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 | using Android.App;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("GithubX.Android")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("GithubX.Android")]
14 | [assembly: AssemblyCopyright("Copyright © 2018")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 | [assembly: ComVisible(false)]
18 |
19 | // Version information for an assembly consists of the following four values:
20 | //
21 | // Major Version
22 | // Minor Version
23 | // Build Number
24 | // Revision
25 | //
26 | // You can specify all the values or you can default the Build and Revision Numbers
27 | // by using the '*' as shown below:
28 | // [assembly: AssemblyVersion("1.0.*")]
29 | [assembly: AssemblyVersion("1.0.0.0")]
30 | [assembly: AssemblyFileVersion("1.0.0.0")]
31 |
--------------------------------------------------------------------------------
/source/GithubX.Android/Resources/AboutResources.txt:
--------------------------------------------------------------------------------
1 | Images, layout descriptions, binary blobs and string dictionaries can be included
2 | in your application as resource files. Various Android APIs are designed to
3 | operate on the resource IDs instead of dealing with images, strings or binary blobs
4 | directly.
5 |
6 | For example, a sample Android app that contains a user interface layout (main.axml),
7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
8 | would keep its resources in the "Resources" directory of the application:
9 |
10 | Resources/
11 | drawable/
12 | icon.png
13 |
14 | layout/
15 | main.axml
16 |
17 | values/
18 | strings.xml
19 |
20 | In order to get the build system to recognize Android resources, set the build action to
21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but
22 | instead operate on resource IDs. When you compile an Android application that uses resources,
23 | the build system will package the resources for distribution and generate a class called "R"
24 | (this is an Android convention) that contains the tokens for each one of the resources
25 | included. For example, for the above Resources layout, this is what the R class would expose:
26 |
27 | public class R {
28 | public class drawable {
29 | public const int icon = 0x123;
30 | }
31 |
32 | public class layout {
33 | public const int main = 0x456;
34 | }
35 |
36 | public class strings {
37 | public const int first_string = 0xabc;
38 | public const int second_string = 0xbcd;
39 | }
40 | }
41 |
42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
43 | to reference the layout/main.axml file, or R.strings.first_string to reference the first
44 | string in the dictionary file values/strings.xml.
--------------------------------------------------------------------------------
/source/GithubX.Android/Resources/layout/activity_main.axml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/source/GithubX.Android/Resources/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/source/GithubX.Android/Resources/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/source/GithubX.Android/Resources/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.Android/Resources/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source/GithubX.Android/Resources/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.Android/Resources/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/source/GithubX.Android/Resources/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.Android/Resources/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source/GithubX.Android/Resources/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.Android/Resources/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source/GithubX.Android/Resources/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.Android/Resources/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/source/GithubX.Android/Resources/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.Android/Resources/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source/GithubX.Android/Resources/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.Android/Resources/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source/GithubX.Android/Resources/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.Android/Resources/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/source/GithubX.Android/Resources/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.Android/Resources/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source/GithubX.Android/Resources/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.Android/Resources/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source/GithubX.Android/Resources/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.Android/Resources/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/source/GithubX.Android/Resources/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.Android/Resources/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source/GithubX.Android/Resources/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.Android/Resources/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source/GithubX.Android/Resources/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.Android/Resources/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/source/GithubX.Android/Resources/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.Android/Resources/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source/GithubX.Android/Resources/values/Strings.xml:
--------------------------------------------------------------------------------
1 |
2 | GithubX.Android
3 | Settings
4 |
5 |
--------------------------------------------------------------------------------
/source/GithubX.Android/Resources/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #2c3e50
4 | #1B3147
5 | #3498db
6 |
7 |
--------------------------------------------------------------------------------
/source/GithubX.Android/Resources/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #2C3E50
4 |
--------------------------------------------------------------------------------
/source/GithubX.Android/Resources/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/source/GithubX.Shared/GithubX.Shared.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/source/GithubX.Shared/Helpers/CacheHandler.cs:
--------------------------------------------------------------------------------
1 | using Akavache;
2 | using System;
3 |
4 | namespace GithubX.Shared.Helpers
5 | {
6 | public static class CacheHandler
7 | {
8 | public static void InitCache()
9 | {
10 | BlobCache.ApplicationName = "GithubX";
11 | BlobCache.ForcedDateTimeKind = DateTimeKind.Utc;
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/source/GithubX.Shared/Helpers/CollectionExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Collections.ObjectModel;
4 | using System.Linq;
5 |
6 | namespace GithubX.Shared.Helpers
7 | {
8 | public static class CollectionExtension
9 | {
10 | public static int Remove(this ObservableCollection collection, Func condition)
11 | {
12 | var itemsToRemove = collection.Where(condition).ToList();
13 | foreach (var itemToRemove in itemsToRemove) collection.Remove(itemToRemove);
14 | return itemsToRemove.Count;
15 | }
16 |
17 | public static void RemoveAll(this ObservableCollection collection)
18 | => collection.ToList().All(i => collection.Remove(i));
19 |
20 | public static void AddRange(this ObservableCollection collection, T[] items)
21 | => AddRange(collection, items.ToList());
22 |
23 | public static void AddRange(this ObservableCollection collection, List items)
24 | {
25 | foreach (var item in items) collection.Add(item);
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/source/GithubX.Shared/Helpers/OctokitHelper.cs:
--------------------------------------------------------------------------------
1 | namespace GithubX.Shared.Helpers
2 | {
3 | public static class OctokitHelper
4 | {
5 | public static string LanguagesColors = ",Mercury:#ff2b2b,TypeScript:#2b7489,PureBasic:#5a6986,Objective-C++:#6866fb,Self:#0579aa,NewLisp:#87AED7,Fortran:#4d41b1,JupyterNotebook:#DA5B0B,Rebol:#358a5b,Frege:#00cafe,AspectJ:#a957b0,Shell:#89e051,WebOntologyLanguage:#9cc9dd,AppleScript:#101F1F,Eiffel:#946d57,Nix:#7e7eff,RAML:#77d9fb,Nginx:#9469E9,MTML:#b7e1f4,Racket:#22228f,Elixir:#6e4a7e,SAS:#B34936,MQL4:#62A8D6,MQL5:#4A76B8,Agda:#315665,wisp:#7582D1,SRecodeTemplate:#348a34,D:#ba595e,PowerBuilder:#8f0f8d,Kotlin:#F18E33,Opal:#f7ede0,TIProgram:#A0AA87,Crystal:#776791,Perl6:#0000fb,Batchfile:#C1F12E,Oz:#fab738,Mirah:#c7a938,Objective-J:#ff0c5a,Ragel:#9d5200,Roff:#ecdebe,FreeMarker:#0050b2,Ruby:#701516,ComponentPascal:#B0CE4E,Arc:#aa2afe,Brainfuck:#2F2530,Nit:#009917,APL:#5A8164,Hack:#878787,Go:#375eab,VisualBasic:#945db7,PHP:#4F5D95,Cirru:#ccccff,SQF:#3F3F3F,Glyph:#e4cc98,1CEnterprise:#814CCC,Java:#b07219,MAXScript:#00a6a6,Scala:#c22d40,Makefile:#427819,ColdFusion:#ed2cd6,Perl:#0298c3,Lua:#000080,Vue:#2c3e50,Verilog:#b2b7f8,Factor:#636746,Haxe:#df7900,PureData:#91de79,Forth:#341708,Red:#f50000,Hy:#7790B2,Volt:#1F1F1F,LSL:#3d9970,eC:#913960,Terra:#00004c,CoffeeScript:#244776,HTML:#e34c26,Lex:#DBCA00,APIBlueprint:#2ACCA8,Swift:#ffac45,C:#555555,AutoHotkey:#6594b9,P4:#7055b5,Isabelle:#FEFE00,Metal:#8f14e9,Clarion:#db901e,JSONiq:#40d47e,Boo:#d4bec1,AutoIt:#1C3552,Genie:#fb855d,Clojure:#db5855,EQ:#a78649,Rust:#dea584,Prolog:#74283c,SourcePawn:#5c7611,AMPL:#E6EFBB,ANTLR:#9DC3FF,Harbour:#0e60e3,Yacc:#4B6C4B,Tcl:#e4cc98,BlitzMax:#cd6400,PigLatin:#fcd7de,xBase:#403a40,LLVM:#185619,Lasso:#999999,ECL:#8a1267,VHDL:#adb2cb,Elm:#60B5CC,PropellerSpin:#7fa2a7,Rascal:#fffaa0,X10:#4B6BEF,IDL:#a3522f,ATS:#1ac620,Ada:#02f88c,Nu:#c9df40,SuperCollider:#46390b,Oxygene:#cdd0e3,ASP:#6a40fd,Assembly:#6E4C13,Gnuplot:#f0a9f0,NetLinx:#0aa0ff,C#:#178600,Turing:#cf142b,Vala:#fbe5cd,Processing:#0096D8,Arduino:#bd79d1,FLUX:#88ccff,NetLogo:#ff6375,CSS:#563d7c,EmacsLisp:#c065db,Stan:#b2011d,SaltStack:#646464,Gherkin:#5B2063,QML:#44a51c,Pike:#005390,LOLCODE:#cc9900,ooc:#b0b77e,XSLT:#EB8CEB,XC:#99DA07,J:#9EEDFF,Mask:#f97732,EmberScript:#FFF4F3,TeX:#3D6117,Nemerle:#3d3c6e,Cuda:#3A4E3A,KRL:#28431f,Vimscript:#199f4b,Ren'Py:#ff7f7f,Golo:#88562A,PostScript:#da291c,Fancy:#7b9db4,OCaml:#3be133,Shen:#120F14,Pascal:#E3F171,F#:#b845fc,Puppet:#302B6D,ActionScript:#882B0F,Fantom:#dbded5,Zephir:#118f9e,Click:#E4E6F3,Smalltalk:#596706,DM:#447265,Ioke:#078193,PogoScript:#d80074,LiveScript:#499886,JavaScript:#f1e05a,PureScript:#1D222D,ABAP:#E8274B,Matlab:#bb92ac,Slash:#007eff,R:#198CE7,Erlang:#B83998,Pan:#cc0000,LookML:#652B81,Eagle:#814C05,Scheme:#1e4aec,Squirrel:#800000,Nim:#37775b,Python:#3572A5,Max:#c4a79c,CommonLisp:#3fb68b,Dart:#00B4AB,XQuery:#5232e7,Omgrofl:#cabbff,SystemVerilog:#DAE1C2,Chapel:#8dc63f,Groovy:#e69f56,Dylan:#6c616e,E:#ccce35,Parrot:#f3ca0a,GrammaticalFramework:#79aa7a,GameMakerLanguage:#8fb200,Papyrus:#6600cc,C++:#f34b7d,NetLinx+ERB:#747faa,Clean:#3F85AF,Alloy:#64C800,Gosu:#82937f,PLSQL:#dad8d8,PAWN:#dbb284,UnrealScript:#a54c4d,StandardML:#dc566d,Objective-C:#438eff,Julia:#a270ba,nesC:#94B0C7,Haskell:#29b544,NCL:#28431f,Io:#a9188d,Rouge:#cc0088,RUNOFF:#665a4e,AGSScript:#B9D9FF,Meson:#007800,Dogescript:#cca760,PowerShell:#012456";
6 | public static string FindLanguageColor(string language)
7 | {
8 | //REF https://github.com/doda/github-language-colors/blob/master/colors.json
9 | if (language?.Length == 0) return "#ffffff";
10 | var key = "," + language + ":";
11 | var a = LanguagesColors.IndexOf(key);
12 | if (a == -1) return "#ffffff";
13 | a += key.Length;
14 | return LanguagesColors.Substring(a, 7);
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/source/GithubX.Shared/Helpers/Utils.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.ObjectModel;
3 | using System.Linq;
4 |
5 | namespace GithubX.Shared.Helpers
6 | {
7 | public static class Utils
8 | {
9 | public static int? GetUnixTimestamp(DateTime? dateTime)
10 | => dateTime == null ? null : (int?)(int)((DateTime)dateTime - new DateTime(1970, 1, 1)).TotalSeconds;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/source/GithubX.Shared/Keys.cs:
--------------------------------------------------------------------------------
1 | namespace GithubX.Shared
2 | {
3 | public static class Keys
4 | {
5 | public const string PocketToken = "PUT_TOKEN_HERE";
6 | public const string GithubClientId = "PUT_TOKEN_HERE";
7 | public const string GithubClientSecret = "PUT_TOKEN_HERE";
8 | public const string AppCenteerToken = "PUT_TOKEN_HERE";
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/source/GithubX.Shared/Models/Category.cs:
--------------------------------------------------------------------------------
1 | namespace GithubX.Shared.Models
2 | {
3 | public class Category
4 | {
5 | public int Id { get; set; } = -1;
6 | public int OrderId { get; set; }
7 | public string Color { get; set; } = "#ffffffff";
8 | public string Title { get; set; } = "new_category";
9 | public GradientColor Background { get; set; } = new GradientColor("#5B247A", "#1BCEDF");
10 | public string Icon { get; set; } = "👽";
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/source/GithubX.Shared/Models/GradientColor.cs:
--------------------------------------------------------------------------------
1 | namespace GithubX.Shared.Models
2 | {
3 | public class GradientColor
4 | {
5 | public GradientColor()
6 | {
7 |
8 | }
9 | public GradientColor(string Color1, string Color2)
10 | {
11 | this.Color1 = Color1;
12 | this.Color2 = Color2;
13 | }
14 |
15 | public string Color1 { get; set; } = "#111111";
16 | public string Color2 { get; set; } = "#111111";
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/source/GithubX.Shared/Services/Github/AuthService.cs:
--------------------------------------------------------------------------------
1 | using Octokit;
2 | using System;
3 | using System.Reactive.Linq;
4 | using System.Threading.Tasks;
5 | using Akavache;
6 |
7 | namespace GithubX.Shared.Services
8 | {
9 | public class AuthService
10 | {
11 | public Uri GetOauthUrl()
12 | {
13 | var request = new OauthLoginRequest(GithubService.ClientId)
14 | {
15 | Scopes = { "user", "repo", "gist" },
16 | RedirectUri = new Uri(GithubService.FallBackUri),
17 | };
18 | return GithubService.Client.Oauth?.GetGitHubLoginUrl(request);
19 | }
20 |
21 | public async Task GetCredentialsAsync(string response)
22 | {
23 | try
24 | {
25 | string responseData = response.Substring(response.IndexOf("code"));
26 | string[] keyValPairs = responseData.Split('=');
27 | string code = keyValPairs[1].Split('&')[0];
28 | var request = new OauthTokenRequest(GithubService.ClientId, GithubService.ClientSecret, code);
29 | var token = await GithubService.Client.Oauth.CreateAccessToken(request);
30 | return new Credentials(token.AccessToken);
31 | }
32 | catch (Exception e)
33 | {
34 | Logger.E(e);
35 | return null;
36 | }
37 | }
38 |
39 | public void SaveCredential(Credentials credentials)
40 | => BlobCache.UserAccount.InsertObject(GithubService.FallBackUri, credentials.GetToken());
41 |
42 | public async Task ReadCredential()
43 | {
44 | try
45 | {
46 | var token= await BlobCache.UserAccount.GetObject(GithubService.FallBackUri);
47 | return new Credentials(token);
48 | }
49 | catch { return null; }
50 | }
51 |
52 | public bool IsLoggedIn() => GithubService.Client.Credentials != null;
53 |
54 | public void LogOut() => BlobCache.Secure.EraseLogin();
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/source/GithubX.Shared/Services/Github/GistService.cs:
--------------------------------------------------------------------------------
1 | using Octokit;
2 | using System.Threading.Tasks;
3 |
4 | namespace GithubX.Shared.Services
5 | {
6 | public class GistService
7 | {
8 | private readonly GitHubClient client;
9 | public GistService(ref GitHubClient client) => this.client = client;
10 |
11 | public async Task CreateGist(NewGist newGist)
12 | => await client.Gist.Create(newGist);
13 |
14 | public async Task GetGist(string gistId)
15 | => await client.Gist.Get(gistId);
16 |
17 | public void UpdateGist(string gistId, (string fileId, string content)[] fileIds)
18 | {
19 | GistUpdate g = new GistUpdate();
20 | foreach (var (fileId, content) in fileIds) g.Files[fileId].Content = content;
21 | client.Gist.Edit(gistId, g);
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/source/GithubX.Shared/Services/Github/GithubService.cs:
--------------------------------------------------------------------------------
1 | using Octokit;
2 |
3 | namespace GithubX.Shared.Services
4 | {
5 | public static class GithubService
6 | {
7 | //TODO: revoke these keys and get new ones and Ignore them
8 | public const string AppName = "XGithub";
9 | public const string ClientId = Keys.GithubClientId;
10 | public const string ClientSecret = Keys.GithubClientSecret;
11 | public const string FallBackUri = "githubx://auth";
12 | public static GitHubClient Client = new GitHubClient(new ProductHeaderValue(AppName));
13 | public static AuthService Auth = new AuthService();
14 | private static RepositoryService repositoryService;
15 | private static SearchService searchService;
16 | private static GistService gistService;
17 | private static UserService userService;
18 |
19 | public static void SetClient(string token)
20 | => Client = new GitHubClient(new ProductHeaderValue(AppName)) { Credentials = new Credentials(token) };
21 |
22 | public static RepositoryService RepositoryService
23 | {
24 | get { return repositoryService ?? (repositoryService = new RepositoryService(ref Client)); }
25 | set { repositoryService = value; }
26 | }
27 |
28 | public static GistService GistService
29 | {
30 | get { return gistService ?? (gistService = new GistService(ref Client)); }
31 | set { gistService = value; }
32 | }
33 |
34 | public static SearchService SearchService
35 | {
36 | get { return searchService ?? (searchService = new SearchService(ref Client)); }
37 | set { searchService = value; }
38 | }
39 |
40 | public static UserService UserService
41 | {
42 | get { return userService ?? (userService = new UserService(ref Client)); }
43 | set { userService = value; }
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/source/GithubX.Shared/Services/Github/RepositoryService.cs:
--------------------------------------------------------------------------------
1 | using Akavache;
2 | using Octokit;
3 | using System.Collections.ObjectModel;
4 | using System.Threading.Tasks;
5 | using System.Reactive.Linq;
6 | using System;
7 | using System.Collections.Generic;
8 |
9 | namespace GithubX.Shared.Services
10 | {
11 | public class RepositoryService
12 | {
13 | private readonly GitHubClient client;
14 | public RepositoryService(ref GitHubClient _client) => client = _client;
15 |
16 | public async Task GetRepository(string ownerName, string repoName)
17 | => await client.Repository.Get(ownerName, repoName);
18 |
19 | public async Task GetRepository(long repoId)
20 | => await client.Repository.Get(repoId);
21 |
22 | #region Content
23 | public async Task> GetRepositoryContentTextByPath(Repository repo, string path, string branch)
24 | => (await client.Repository.Content.GetAllContentsByRef(repo.Id, path, branch));
25 |
26 | public async Task GetReadmeHTMLForRepository(long repoId)
27 | => await client.Repository.Content.GetReadmeHtml(repoId);
28 |
29 | public async Task GetRepositoryReadme(long repoId)
30 | => await client.Repository.Content.GetReadme(repoId);
31 |
32 | public async Task> GetRepositoryContent(long repoId)
33 | => await client.Repository.Content.GetAllContents(repoId);
34 |
35 | public async Task> GetRepositoryContent(long repoId, string path)
36 | => await client.Repository.Content.GetAllContents(repoId, path);
37 |
38 | public async Task GetMarkDownReadyAsync(string url, bool fromCache = true)
39 | {
40 | var buffer = await BlobCache.LocalMachine.DownloadUrl(url, fetchAlways: !fromCache);
41 | string md = System.Text.Encoding.UTF8.GetString(buffer, 0, buffer.Length);
42 | try
43 | {
44 | // Html2Markdown needs HtmlAgilityPack.NugetPkg
45 | //md = new Html2Markdown.Converter().Convert(md).Trim();
46 | //md = md.Replace("[`", "[").Replace("`]", "]").Replace("<<", "");
47 | if (md == null || md.Length < 2) return "> 404 🤔";
48 | return md;
49 | }
50 | catch { return md; }
51 | }
52 | public async Task GetMarkDownReadyAsync(RepositoryContent content)
53 | {
54 | var type = content.Name.Substring(content.Name.LastIndexOf(".") + 1);
55 | if (type.Equals("png", StringComparison.OrdinalIgnoreCase)
56 | || type.Equals("jpg", StringComparison.OrdinalIgnoreCase)
57 | || type.Equals("jpeg", StringComparison.OrdinalIgnoreCase)
58 | || type.Equals("bmp", StringComparison.OrdinalIgnoreCase)
59 | || type.Equals("tiff", StringComparison.OrdinalIgnoreCase))
60 | return $"";
61 | else if (type.Equals("mp4", StringComparison.OrdinalIgnoreCase)
62 | || type.Equals("mkv", StringComparison.OrdinalIgnoreCase)
63 | || type.Equals("flv", StringComparison.OrdinalIgnoreCase)
64 | || type.Equals("flv", StringComparison.OrdinalIgnoreCase)
65 | || type.Equals("mp3", StringComparison.OrdinalIgnoreCase)){
66 | return $"Can't Open {type} file.\nDownload Link → {content.DownloadUrl}";
67 | }
68 | var oldSha = "";
69 | try
70 | {
71 | oldSha = await BlobCache.LocalMachine.GetObject("_" + content.Url) ?? "";
72 | }
73 | catch { }
74 | var result = await GetMarkDownReadyAsync(content.DownloadUrl, content.Sha.Equals(oldSha));
75 | await BlobCache.LocalMachine.InsertObject("_" + content.Url, content.Sha);
76 | return type.Equals("md", StringComparison.OrdinalIgnoreCase) ? result : $"```{type} {result} ```";
77 | }
78 | #endregion
79 |
80 | #region Branch
81 | public async Task> GetAllBranches(Repository repo)
82 | => await client.Repository.Branch.GetAll(repo.Owner.Login, repo.Name);
83 | #endregion
84 |
85 | #region Fork
86 | public async Task ForkRepository(Repository repo)
87 | => await client.Repository.Forks.Create(repo.Id, new NewRepositoryFork());
88 | #endregion
89 |
90 | #region Watch
91 | public async Task IsWatched(Repository repo)
92 | => await client.Activity.Watching.CheckWatched(repo.Id);
93 |
94 | public async Task WatchRepository(Repository repo)
95 | => (await client.Activity.Watching.WatchRepo(repo.Id, new NewSubscription { Subscribed = true })).Subscribed;
96 |
97 | public async Task UnwatchRepository(Repository repo)
98 | => await client.Activity.Watching.UnwatchRepo(repo.Id);
99 | #endregion
100 |
101 | #region Star
102 | public async Task IsStarred(Repository repo)
103 | => await client.Activity.Starring.CheckStarred(repo.Owner.Login, repo.Name);
104 |
105 | public async Task StarRepository(Repository repo)
106 | => await client.Activity.Starring.StarRepo(repo.Owner.Login, repo.Name);
107 |
108 | public async Task UnstarRepository(Repository repo)
109 | => await client.Activity.Starring.RemoveStarFromRepo(repo.Owner.Login, repo.Name);
110 | #endregion
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/source/GithubX.Shared/Services/Github/SearchService.cs:
--------------------------------------------------------------------------------
1 | using Octokit;
2 | using System.Collections.ObjectModel;
3 | using System.Threading.Tasks;
4 |
5 | namespace GithubX.Shared.Services
6 | {
7 | public class SearchService
8 | {
9 | private readonly GitHubClient client;
10 | public SearchService(ref GitHubClient _client) => client = _client;
11 |
12 | public async Task SearchUsers(GitHubClient client, string query, Language? language = null)
13 | {
14 | var request = new SearchUsersRequest(query);
15 | if (language != null) request.Language = language;
16 | return await client.Search.SearchUsers(request);
17 | }
18 |
19 | public async Task SearchRepos(string query, Language? language = null)
20 | {
21 | var request = new SearchRepositoriesRequest(query);
22 | if (language != null) request.Language = language;
23 | return await client.Search.SearchRepo(request);
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/source/GithubX.Shared/Services/Github/UserService.cs:
--------------------------------------------------------------------------------
1 | using Octokit;
2 | using System.Collections.Generic;
3 | using System.Threading.Tasks;
4 |
5 | namespace GithubX.Shared.Services
6 | {
7 | public class UserService
8 | {
9 | private readonly GitHubClient client;
10 | public UserService(ref GitHubClient client) => this.client = client;
11 |
12 | public Task GetUser(string userName = null)
13 | => userName != null ? client?.User?.Get(userName) : client?.User?.Current();
14 |
15 | #region Following/er
16 | public async Task FollowUserAsync(string user)
17 | => await client.User.Followers.Follow(user);
18 |
19 | public async Task UnFollowUserAsync(string user)
20 | => await client.User.Followers.Unfollow(user);
21 |
22 | public async Task IsFollowAsync(string user)
23 | => await client.User.Followers.IsFollowingForCurrent(user);
24 |
25 | public async Task> GetAllFollowing(ApiOptions options, string user = null)
26 | => user == null
27 | ? await client.User.Followers.GetAllFollowingForCurrent(options)
28 | : await client.User.Followers.GetAllFollowing(user, options);
29 |
30 | public async Task> GetAllFollowers(ApiOptions options, string user = null)
31 | => user == null
32 | ? await client.User.Followers.GetAllForCurrent(options)
33 | : await client.User.Followers.GetAll(user, options);
34 | #endregion
35 |
36 | public async Task> GetUserGists(string user = null)
37 | => user == null
38 | ? await client.Gist.GetAll()
39 | : await client.Gist.GetAllForUser(user);
40 |
41 | public async Task> GetUserRepositories(ApiOptions options, string user = null)
42 | => user == null
43 | ? (await client.Repository.GetAllForCurrent(options))
44 | : (await client.Repository.GetAllForUser(user, options));
45 |
46 | public async Task> GetStarredRepositories(ApiOptions options, string user = null)
47 | => user == null
48 | ? (await client.Activity.Starring.GetAllForCurrent(options))
49 | : (await client.Activity.Starring.GetAllForUser(user, options));
50 |
51 | public async Task> GetUserActivity(ApiOptions options, string user)
52 | => await client.Activity.Events.GetAllUserReceived(user, options);
53 |
54 | #region Notification
55 | public async Task> GetAllNotifications(ApiOptions options)
56 | => await client.Activity.Notifications.GetAllForCurrent(new NotificationsRequest { All = true }, options);
57 |
58 | public async Task MarkAllNotificationsAsRead() => await client.Activity.Notifications.MarkAsRead();
59 |
60 | public async Task MarkNotificationAsRead(string notificationId)
61 | {
62 | if (int.TryParse(notificationId, out int id))
63 | await client.Activity.Notifications.MarkAsRead(id);
64 | }
65 | #endregion
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/source/GithubX.Shared/Services/Logger.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AppCenter;
2 | using Microsoft.AppCenter.Analytics;
3 | using Microsoft.AppCenter.Crashes;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Linq;
7 |
8 | namespace GithubX.Shared.Services
9 | {
10 | public static class Logger
11 | {
12 | public static void Init(string token)
13 | {
14 | AppCenter.Start(token ?? "", typeof(Analytics), typeof(Crashes));
15 | AppCenter.LogLevel = LogLevel.Error; // Not sure
16 | CustomProperties properties = new CustomProperties();
17 | properties.Set("color", "red").Set("now", DateTime.UtcNow);
18 | AppCenter.SetCustomProperties(properties);
19 | }
20 |
21 | public static async System.Threading.Tasks.Task didAppCrashed()
22 | {
23 | bool didAppCrash = await Crashes.HasCrashedInLastSessionAsync();
24 | if (!didAppCrash) return null;
25 | ErrorReport crashReport = await Crashes.GetLastSessionCrashReportAsync();
26 | Crashes.NotifyUserConfirmation(UserConfirmation.Send);
27 | return crashReport.ToString();
28 | }
29 |
30 | public static async System.Threading.Tasks.Task SystemGuIdAsync() =>
31 | await AppCenter.GetInstallIdAsync();
32 |
33 | public static void E(Exception e, Dictionary properties = null)
34 | {
35 | AppCenterLog.Error(properties?.Keys?.ElementAt(0) ?? "",
36 | properties?.Values?.ElementAt(0) ?? "", e);
37 | Crashes.TrackError(e, properties);
38 | }
39 |
40 | public static void T(string msg, Dictionary properties = null)
41 | => Analytics.TrackEvent(msg ?? "[NULL MSG]", properties);
42 |
43 | public static void D(string msg, string tag)
44 | => AppCenterLog.Debug(tag, msg);
45 |
46 | public static void Enable(bool enable)
47 | => AppCenter.SetEnabledAsync(enable);
48 |
49 | public static async System.Threading.Tasks.Task IsEnable()
50 | => await AppCenter.IsEnabledAsync();
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/source/GithubX.Shared/Services/Pocket/IPocketApi.cs:
--------------------------------------------------------------------------------
1 | using Refit;
2 | using System.Threading.Tasks;
3 |
4 | namespace GithubX.Shared.Services.Pocket
5 | {
6 | [Headers("User-Agent: XGithub", "X-Accept: application/json")]
7 | internal interface IPocketApi
8 | {
9 | [Post("oauth/request")]
10 | Task GetRequestToken([Query("redirect_uri")] string redirect_uri, [Query("consumer_key")]string consumer_key);
11 |
12 | [Post("oauth/authorize")]
13 | //TODO: Not sure About the QUERY
14 | Task GetUserToken([Query("code")] string request_token, [Query("consumer_key")]string consumer_key);
15 |
16 | [Post("add")]
17 | Task PostArticle([Body]AddParameters item);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/source/GithubX.Shared/Services/Pocket/PocketModels.cs:
--------------------------------------------------------------------------------
1 | namespace GithubX.Shared.Services.Pocket
2 | {
3 | internal class RequestCode
4 | {
5 | public string Code { get; set; }
6 | public string State { get; set; }
7 | }
8 |
9 | internal class AddParameters
10 | {
11 | public AddParameters(string url, string consumer_key, string access_token)
12 | {
13 | this.url = url;
14 | this.consumer_key = consumer_key;
15 | this.access_token = access_token;
16 | }
17 |
18 | public string url { get; set; }
19 | public string consumer_key { get; set; }
20 | public string access_token { get; set; }
21 | }
22 |
23 | internal class PocketUser
24 | {
25 | public string Access_token { get; set; }
26 |
27 | public string Username { get; set; }
28 |
29 | public object Account { get; set; }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/source/GithubX.Shared/Services/Pocket/PocketService.cs:
--------------------------------------------------------------------------------
1 | using System.Reactive.Linq;
2 | using Akavache;
3 | using Refit;
4 | using System;
5 | using System.Threading.Tasks;
6 |
7 | namespace GithubX.Shared.Services.Pocket
8 | {
9 | public class PocketService
10 | {
11 | private readonly IPocketApi Api = RestService.For("https://getpocket.com/v3/");
12 | private string ApiKey { get; } //consumer_key
13 | private string AccessToken { get; set; }
14 | public string FallBackUri { get; } = "githubx://pocket";
15 |
16 | public PocketService(string apiKey, string accessToken = null)
17 | {
18 | ApiKey = apiKey;
19 | if (accessToken != null) AccessToken = accessToken;
20 | }
21 |
22 | public async Task<(string requestCode, Uri uri)> GenerateAuthUri()
23 | {
24 | RequestCode requestCode = await Api.GetRequestToken(FallBackUri, ApiKey);
25 | if (requestCode == null) throw new NullReferenceException("Null request_code");
26 | const string authentificationUri = "https://getpocket.com/auth/authorize?request_token={0}&redirect_uri={1}&mobile={2}&force={3}&webauthenticationbroker={4}";
27 | return (requestCode.Code, new Uri(string.Format(authentificationUri, requestCode.Code, FallBackUri, "1", "login", "1")));
28 | }
29 |
30 | public async Task GetUserToken(string requestCode)
31 | {
32 | if (requestCode == null) throw new NullReferenceException("Call GetRequestCode() first to receive a request_code");
33 | var user = await Api.GetUserToken(requestCode, ApiKey);
34 | return AccessToken = user.Access_token;
35 | }
36 |
37 | public async Task Add(Uri uri)
38 | => await Api.PostArticle(new AddParameters(uri?.AbsoluteUri, ApiKey, AccessToken));
39 |
40 | public async void LoadFromCache() => AccessToken = await BlobCache.UserAccount.GetObject("pocket");
41 |
42 | public async void SaveInCache() => await BlobCache.UserAccount.InsertObject("pocket", AccessToken);
43 |
44 | public bool IsLoggedIn() => AccessToken.Length > 1;
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using GithubX.Shared.Services;
2 | using Windows.ApplicationModel;
3 | using Windows.ApplicationModel.Activation;
4 | using Windows.UI.Xaml;
5 | using Windows.UI.Xaml.Controls;
6 |
7 | namespace GithubX.UWP
8 | {
9 | public sealed partial class App : Application
10 | {
11 | internal static string UserLoginAccountName { get; set; }
12 | internal static string Version = $"{Package.Current.Id.Version.Major}.{Package.Current.Id.Version.Minor}.{Package.Current.Id.Version.Build}";
13 |
14 | public App()
15 | {
16 | this.InitializeComponent();
17 | this.Suspending += OnSuspending;
18 | }
19 |
20 | protected override void OnLaunched(LaunchActivatedEventArgs args)
21 | {
22 | if (!(Window.Current.Content is Frame rootFrame))
23 | {
24 | rootFrame = new Frame();
25 | Window.Current.Content = rootFrame;
26 | }
27 | if (args?.PrelaunchActivated != true)
28 | {
29 | if (rootFrame.Content == null)
30 | rootFrame.Navigate(typeof(Views.LoginPage), args?.Arguments);
31 | Window.Current.Activate();
32 | }
33 | }
34 |
35 | private void OnSuspending(object sender, SuspendingEventArgs e) =>
36 | e.SuspendingOperation.GetDeferral().Complete();
37 |
38 | protected async override void OnActivated(IActivatedEventArgs args)
39 | {
40 | switch (args.Kind)
41 | {
42 | case ActivationKind.Protocol:
43 | string response = ((ProtocolActivatedEventArgs)args)?.Uri?.ToString();
44 | if (response.Contains(GithubService.FallBackUri))
45 | GithubService.Auth.SaveCredential(await GithubService.Auth.GetCredentialsAsync(response));
46 | break;
47 | case ActivationKind.CommandLineLaunch:
48 | OnLaunched(null);
49 | break;
50 | }
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Files/HELP.md:
--------------------------------------------------------------------------------
1 |
2 | [🌟🌟🌟 Rate Github✘ in Store 🌟🌟🌟](ms-windows-store:REVIEW?PFN=3783mindprojects.GithubX_6c8ydbw054cyy)
3 |
4 | Developed + Designed by [👦Shahriar Yazdipour](https://yazdipour.github.io)
5 |
6 | [Check out my other Works ⚒](https://yazdipour.github.io/apps)
7 |
8 | [](https://buymeacoff.ee/XrTW5YQDy)
9 |
10 | [](https://www.payping.ir/yazdipour)
11 |
12 | # Help
13 |
14 | GithubX Main Goal: Make Categorizing Github Repositories Easier and Enjoyable.
15 |
16 | This app is an [Open Source](https://github.com/yazdipour/githubx) Project and I will be happy if you 🌟Star and pull request to the repo.
17 |
18 | You can also submit issues at this page: [https://github.com/yazdipour/githubx/issues](https://github.com/yazdipour/githubx/issues)
19 |
20 | ## [Unique Feature] Follow Organizations
21 |
22 | How ...
23 |
24 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Files/Placeholder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Files/Placeholder.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Files/d_coffee.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Files/d_coffee.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Files/d_iran.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Files/d_iran.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Files/devicon.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Files/devicon.ttf
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/LargeTile.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/LargeTile.scale-100.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/LargeTile.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/LargeTile.scale-125.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/LargeTile.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/LargeTile.scale-150.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/LargeTile.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/LargeTile.scale-200.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/LockScreenLogo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/LockScreenLogo.scale-100.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/LockScreenLogo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/LockScreenLogo.scale-125.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/LockScreenLogo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/LockScreenLogo.scale-150.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/LockScreenLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/LockScreenLogo.scale-200.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/LockScreenLogo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/LockScreenLogo.scale-400.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/SmallTile.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/SmallTile.scale-100.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/SmallTile.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/SmallTile.scale-200.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/SmallTile.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/SmallTile.scale-400.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/SplashScreen.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/SplashScreen.scale-100.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/SplashScreen.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/SplashScreen.scale-125.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/SplashScreen.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/SplashScreen.scale-150.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/SplashScreen.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/SplashScreen.scale-400.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square150x150Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square150x150Logo.scale-100.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square150x150Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square150x150Logo.scale-125.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square150x150Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square150x150Logo.scale-150.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square150x150Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square150x150Logo.scale-400.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square310x310Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square310x310Logo.scale-100.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square310x310Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square310x310Logo.scale-125.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square310x310Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square310x310Logo.scale-150.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square310x310Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square310x310Logo.scale-200.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square310x310Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square310x310Logo.scale-400.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.scale-100.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.scale-125.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.scale-150.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.scale-400.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-16.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-16_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-16_altform-unplated.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-20.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-20_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-20_altform-unplated.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-24.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-256.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-256_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-256_altform-unplated.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-30.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-30.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-30_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-30_altform-unplated.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-32.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-32_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-32_altform-unplated.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-36.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-36.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-36_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-36_altform-unplated.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-40.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-40_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-40_altform-unplated.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-48.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-48_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-48_altform-unplated.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-60.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-60_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-60_altform-unplated.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-64.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-64_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-64_altform-unplated.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-72.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-72_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-72_altform-unplated.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-80.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-80_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-80_altform-unplated.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-96.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-96.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-96_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square44x44Logo.targetsize-96_altform-unplated.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square71x71Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square71x71Logo.scale-100.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square71x71Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square71x71Logo.scale-125.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square71x71Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square71x71Logo.scale-150.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square71x71Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square71x71Logo.scale-200.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Square71x71Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Square71x71Logo.scale-400.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/StoreLogo.backup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/StoreLogo.backup.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/StoreLogo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/StoreLogo.scale-100.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/StoreLogo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/StoreLogo.scale-125.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/StoreLogo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/StoreLogo.scale-150.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/StoreLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/StoreLogo.scale-200.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/StoreLogo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/StoreLogo.scale-400.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Wide310x150Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Wide310x150Logo.scale-100.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Wide310x150Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Wide310x150Logo.scale-125.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Wide310x150Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Wide310x150Logo.scale-150.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Assets/Wide310x150Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Assets/Wide310x150Logo.scale-400.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Converters/ContentTypeToSymbolConverter.cs:
--------------------------------------------------------------------------------
1 | using Octokit;
2 | using System;
3 | using Windows.UI.Xaml.Controls;
4 | using Windows.UI.Xaml.Data;
5 |
6 | namespace GithubX.UWP.Converters
7 | {
8 | internal class ContentTypeToSymbolConverter : IValueConverter
9 | {
10 | public object Convert(object value, Type targetType, object parameter, string language)
11 | {
12 | if (value is ContentType type)
13 | switch (type)
14 | {
15 | case ContentType.Submodule:
16 | return Symbol.MapDrive;
17 | case ContentType.Dir:
18 | return Symbol.Folder;
19 | default:
20 | return Symbol.Page;
21 | }
22 | else if (value.ToString().Contains("Pull"))
23 | return Symbol.Shuffle;
24 | else return Symbol.Import;
25 | }
26 |
27 | public object ConvertBack(object value, Type targetType, object parameter, string language)
28 | {
29 | throw new NotImplementedException();
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Converters/FalseToVisibleConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Windows.UI.Xaml;
3 | using Windows.UI.Xaml.Data;
4 |
5 | namespace GithubX.UWP.Converters
6 | {
7 | internal class FalseToVisibleConverter : IValueConverter
8 | {
9 | public object Convert(object value, Type targetType, object parameter, string language)
10 | {
11 | return value is bool collapsed ? collapsed ? Visibility.Collapsed : Visibility.Visible : (object)null;
12 | }
13 |
14 | public object ConvertBack(object value, Type targetType, object parameter, string language)
15 | {
16 | return value is Visibility visibility ? visibility == Visibility.Collapsed : (object)null;
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Converters/LanguageToColorConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Windows.UI.Xaml.Data;
3 |
4 | namespace GithubX.UWP.Converters
5 | {
6 | internal class LanguageToColorConverter:IValueConverter
7 | {
8 | public object Convert(object value, Type targetType, object parameter, string language)
9 | => Shared.Helpers.OctokitHelper.FindLanguageColor((string)value);
10 |
11 | public object ConvertBack(object value, Type targetType, object parameter, string language)
12 | {
13 | throw new NotImplementedException();
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Converters/StringConcatConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Windows.UI.Xaml.Data;
3 |
4 | namespace GithubX.UWP.Converters
5 | {
6 | internal class StringConcatConverter : IValueConverter
7 | {
8 | public object Convert(object value, Type targetType, object parameter, string language)
9 | {
10 | try
11 | {
12 | var res = language.Equals("End")
13 | ? parameter.ToString() + value.ToString()
14 | : value.ToString() + parameter.ToString();
15 | if (targetType.Name == "Uri") return new Uri(res);
16 | return res;
17 | }
18 | catch (Exception ex)
19 | {
20 |
21 | Shared.Services.Logger.E(ex);
22 | return null;
23 | }
24 | }
25 |
26 | public object ConvertBack(object value, Type targetType, object parameter, string language)
27 | {
28 | return "";
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Converters/TypeToActionStringConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Windows.UI.Xaml.Data;
3 |
4 | namespace GithubX.UWP.Converters
5 | {
6 | internal class TypeToActionStringConverter : IValueConverter
7 | {
8 | public object Convert(object value, Type targetType, object parameter, string language)
9 | {
10 | var act = (Octokit.Activity)value;
11 | switch (act.Type)
12 | {
13 | case "WatchEvent":
14 | return "starred";
15 | case "ForkEvent":
16 | return "forked";
17 | case "CreateEvent":
18 | return "created" + (act.Payload.ToString().Contains("branch") ? " a branch" : "");
19 | case "PullRequestEvent":
20 | return "opened a PR";
21 | case "MemberEvent":
22 | return "added";
23 | case "PublicEvent":
24 | return "made public";
25 | default:
26 | return "";
27 | }
28 | }
29 |
30 | public object ConvertBack(object value, Type targetType, object parameter, string language)
31 | {
32 | throw new NotImplementedException();
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Helpers/AppSettings.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace GithubX.UWP.Helpers
8 | {
9 | class AppSettings
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Helpers/Utils.cs:
--------------------------------------------------------------------------------
1 | using Akavache;
2 | using System;
3 | using System.Reactive.Linq;
4 | using System.Threading;
5 | using System.Threading.Tasks;
6 | using Windows.Networking.BackgroundTransfer;
7 | using Windows.Networking.Connectivity;
8 | using Windows.Storage;
9 | using Windows.UI;
10 | using Windows.UI.Xaml.Media;
11 |
12 | namespace GithubX.UWP.Helpers
13 | {
14 | internal class Utils
15 | {
16 | public static bool CheckConnection => NetworkInformation.GetInternetConnectionProfile() != null;
17 |
18 | public async Task DownloadFile(string url, string name)
19 | {
20 | try
21 | {
22 | CancellationToken token;
23 | Uri source;
24 | StorageFolder folder = KnownFolders.VideosLibrary;
25 | if (string.IsNullOrWhiteSpace(url) || !Uri.TryCreate(url, UriKind.Absolute, out source))
26 | throw new Exception("Invalid URI");
27 | StorageFile destinationFile = await folder.CreateFileAsync(name, CreationCollisionOption.GenerateUniqueName);
28 | var download = new BackgroundDownloader().CreateDownload(source, destinationFile);
29 | download.Priority = BackgroundTransferPriority.High;
30 | await download.StartAsync().AsTask(token);
31 | }
32 | catch (Exception e) { throw e; }
33 | }
34 |
35 | public static SolidColorBrush HexToSolidColor(string hex)
36 | {
37 | hex = hex.Replace("#", string.Empty);
38 | if (hex.Length < 8) hex += "FF";
39 | return new SolidColorBrush(Windows.UI.Color.FromArgb(
40 | (byte)Convert.ToUInt32(hex.Substring(0, 2), 16),
41 | (byte)Convert.ToUInt32(hex.Substring(2, 2), 16),
42 | (byte)Convert.ToUInt32(hex.Substring(4, 2), 16),
43 | (byte)Convert.ToUInt32(hex.Substring(6, 2), 16)));
44 | }
45 |
46 | public static string SolidColorToHex(SolidColorBrush solidColorBrush)
47 | => string.Format("#{0:X2}{1:X2}{2:X2}", solidColorBrush.Color.R, solidColorBrush.Color.G, solidColorBrush.Color.B);
48 |
49 | public static int GetUnixTime()
50 | => (int)DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1)).TotalSeconds;
51 |
52 | public static async Task ReadFileFromAsset(string uri)
53 | => await FileIO.ReadTextAsync(await StorageFile.GetFileFromApplicationUriAsync(new Uri(uri)));
54 |
55 | public static async Task OpenUri(string uri)
56 | => await OpenUri(new Uri(uri));
57 |
58 | public static async Task OpenUri(Uri uri)
59 | => await Windows.System.Launcher.LaunchUriAsync(uri);
60 |
61 | public static void ChangeHeaderTheme(string resourceKey, string HexColor)
62 | {
63 | var cl = (AcrylicBrush)Windows.UI.Xaml.Application.Current.Resources[resourceKey];
64 | cl.TintColor = cl.FallbackColor = HexToSolidColor(HexColor).Color;
65 | }
66 |
67 | public static void ChangeHeaderTheme(string resourceKey, Color color)
68 | {
69 | var cl = (AcrylicBrush)Windows.UI.Xaml.Application.Current.Resources[resourceKey];
70 | cl.TintColor = cl.FallbackColor = color;
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | GithubX
7 | Yazdipour
8 | Assets\StoreLogo.png
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 | Protocol.png
37 | GithubX
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("GithubX.UWP")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("GithubX.UWP")]
13 | [assembly: AssemblyCopyright("Copyright © 2018")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/source/GithubX.UWP/Properties/Default.rd.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Protocol.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.UWP/Protocol.png
--------------------------------------------------------------------------------
/source/GithubX.UWP/Theme/ColorPalette.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFC312"
4 | #C4E538"
5 | #12CBC4"
6 | #FDA7DF"
7 | #ED4C67"
8 | #F79F1F"
9 | #A3CB38"
10 | #1289A7"
11 | #D980FA"
12 | #B53471"
13 | #EE5A24"
14 | #009432"
15 | #0652DD"
16 | #9980FA"
17 | #833471"
18 | #EA2027"
19 | #006266"
20 | #1B1464"
21 | #5758BB"
22 | #6F1E51"
23 |
24 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Theme/Theme.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
32 |
33 | #CC111111
34 | #FF111111
35 | #FF1D1D1D
36 | #FF333333
37 | #FF111111
38 | #FF1D1D1D
39 | #FF000000
40 | #FFFFFFFF
41 |
42 |
43 |
44 |
45 |
46 |
47 |
74 |
75 | #CCFAFAFA
76 | #FFFAFAFA
77 | #FFE6E6E6
78 | #FFCCCCCC
79 |
84 | #FFFAFAFA
85 | #FFFFFFFF
86 | #FFFFFFFF
87 | #FF000000
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/ActivitiesPage.xaml:
--------------------------------------------------------------------------------
1 |
13 |
14 |
18 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/ActivitiesPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using GithubX.Shared.Services;
2 | using System.Collections.ObjectModel;
3 | using Windows.UI.Xaml.Controls;
4 |
5 | namespace GithubX.UWP.Views
6 | {
7 | public sealed partial class ActivitiesPage : Page
8 | {
9 | private ObservableCollection activityRepositories
10 | = new ObservableCollection();
11 | private Octokit.ApiOptions options = new Octokit.ApiOptions() { PageSize = 40, PageCount = 1 };
12 |
13 | public ActivitiesPage() => InitializeComponent();
14 |
15 | private async void Page_Loaded(object sender, Windows.UI.Xaml.RoutedEventArgs e)
16 | {
17 | var user = await GithubService.UserService.GetUser();
18 | var temp = await GithubService.UserService.GetUserActivity(options, user?.Login);
19 | foreach (var item in temp) activityRepositories.Add(item);
20 | }
21 |
22 | private void GridView_ItemClick(object sender, ItemClickEventArgs e)
23 | => Frame.Navigate(typeof(RepositoryPage), (e.ClickedItem as Octokit.Activity)?.Repo);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/CategoriesPage.xaml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
17 |
23 |
24 |
25 |
26 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
48 |
57 |
65 |
66 |
67 |
68 |
69 |
70 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/CategoriesPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using GithubX.Shared.Models;
2 | using System;
3 | using System.Collections.ObjectModel;
4 | using Windows.UI.Xaml;
5 | using Windows.UI.Xaml.Controls;
6 |
7 | namespace GithubX.UWP.Views
8 | {
9 | public sealed partial class CategoriesPage : Page
10 | {
11 | private readonly ObservableCollection categories = new ObservableCollection();
12 |
13 | public CategoriesPage() => InitializeComponent();
14 |
15 | private void Add_Click(object sender, RoutedEventArgs e)
16 | => openCategoryDialog((sender as Button)?.DataContext as Category);
17 |
18 | private void GridView_ItemClick(object sender, ItemClickEventArgs e)
19 | => Frame.Navigate(typeof(CategoryPage), e?.ClickedItem as Category);
20 |
21 | private async void openCategoryDialog(Category category = null)
22 | {
23 | try
24 | {
25 | var d = new AddCategoryDialog(category);
26 | await d.ShowAsync();
27 | if ((d?.category?.Id ?? -1) != -1)
28 | categories.Add(d.category);
29 | }
30 | catch { }
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/CategoryPage.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/CategoryPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.Foundation;
7 | using Windows.Foundation.Collections;
8 | using Windows.UI.Xaml;
9 | using Windows.UI.Xaml.Controls;
10 | using Windows.UI.Xaml.Controls.Primitives;
11 | using Windows.UI.Xaml.Data;
12 | using Windows.UI.Xaml.Input;
13 | using Windows.UI.Xaml.Media;
14 | using Windows.UI.Xaml.Navigation;
15 |
16 | // The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
17 |
18 | namespace GithubX.UWP.Views
19 | {
20 | ///
21 | /// An empty page that can be used on its own or navigated to within a Frame.
22 | ///
23 | public sealed partial class CategoryPage : Page
24 | {
25 | public CategoryPage()
26 | {
27 | this.InitializeComponent();
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/Controls/ActivityItem.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
25 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/Controls/ActivityItem.xaml.cs:
--------------------------------------------------------------------------------
1 | using Windows.UI.Xaml.Controls;
2 |
3 | namespace GithubX.UWP.Views.Controls
4 | {
5 | public sealed partial class ActivityItem : UserControl
6 | {
7 | public ActivityItem() => InitializeComponent();
8 | }
9 | }
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/Controls/GistItem.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
16 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/Controls/GistItem.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.Foundation;
7 | using Windows.Foundation.Collections;
8 | using Windows.UI.Xaml;
9 | using Windows.UI.Xaml.Controls;
10 | using Windows.UI.Xaml.Controls.Primitives;
11 | using Windows.UI.Xaml.Data;
12 | using Windows.UI.Xaml.Input;
13 | using Windows.UI.Xaml.Media;
14 | using Windows.UI.Xaml.Navigation;
15 |
16 | // The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
17 |
18 | namespace GithubX.UWP.Views.Controls
19 | {
20 | public sealed partial class GistItem : UserControl
21 | {
22 | public GistItem()
23 | {
24 | this.InitializeComponent();
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/Controls/NotificationItem.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
25 |
29 |
30 |
31 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/Controls/NotificationItem.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.Foundation;
7 | using Windows.Foundation.Collections;
8 | using Windows.UI.Xaml;
9 | using Windows.UI.Xaml.Controls;
10 | using Windows.UI.Xaml.Controls.Primitives;
11 | using Windows.UI.Xaml.Data;
12 | using Windows.UI.Xaml.Input;
13 | using Windows.UI.Xaml.Media;
14 | using Windows.UI.Xaml.Navigation;
15 |
16 | // The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
17 |
18 | namespace GithubX.UWP.Views.Controls
19 | {
20 | public sealed partial class NotificationItem : UserControl
21 | {
22 | public NotificationItem()
23 | {
24 | this.InitializeComponent();
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/Controls/RepositoryItem.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
26 |
32 |
33 |
37 |
38 |
39 |
43 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/Controls/RepositoryItem.xaml.cs:
--------------------------------------------------------------------------------
1 | using Windows.UI.Xaml.Controls;
2 |
3 | namespace GithubX.UWP.Views.Controls
4 | {
5 | public sealed partial class RepositoryItem : UserControl
6 | {
7 | public RepositoryItem()
8 | {
9 | InitializeComponent();
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/Controls/UserItem.xaml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
23 |
24 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/Controls/UserItem.xaml.cs:
--------------------------------------------------------------------------------
1 | using Windows.UI.Xaml.Controls;
2 |
3 | namespace GithubX.UWP.Views.Controls
4 | {
5 | public sealed partial class UserItem : UserControl
6 | {
7 | public UserItem()
8 | {
9 | this.InitializeComponent();
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/Dialogs/AddCategoryDialog.xaml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
37 |
42 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
66 |
67 |
68 |
69 |
70 |
75 |
76 |
77 |
78 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
126 |
132 |
133 |
134 |
135 |
136 |
137 |
147 |
148 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
182 |
187 |
192 |
197 |
202 |
207 |
208 |
214 |
215 |
216 |
217 |
218 |
232 |
233 |
234 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/Dialogs/AddCategoryDialog.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.ObjectModel;
2 | using Windows.UI.Xaml.Controls;
3 | using Windows.UI.Xaml;
4 | using GithubX.Shared.Models;
5 | using static GithubX.Shared.Helpers.CollectionExtension;
6 |
7 | namespace GithubX.UWP.Views
8 | {
9 | public sealed partial class AddCategoryDialog : ContentDialog
10 | {
11 | #region Variables
12 | public Category category = new Category();
13 | private readonly Button[] emojiTabs = new Button[6];
14 | private GradientColor[] ColorsList => Shared.Helpers.FontHelper.colorGroups;
15 | private readonly ObservableCollection emojiKeyboardList = new ObservableCollection();
16 | #endregion
17 | #region ctor
18 | public AddCategoryDialog(Category cat = null)
19 | {
20 | this.InitializeComponent();
21 | if (cat == null) return;
22 | category = cat;
23 | FindName("RemoveBtn");
24 | }
25 | #endregion
26 |
27 | private void ContentDialog_Loaded(object sender, Windows.UI.Xaml.RoutedEventArgs e)
28 | {
29 | //set emoji buttons event
30 | emojiTabs[0] = (Button)FindName("DevButton");
31 | emojiTabs[1] = (Button)FindName("SmilesButton");
32 | emojiTabs[2] = (Button)FindName("BalloonButton");
33 | emojiTabs[3] = (Button)FindName("PizzaButton");
34 | emojiTabs[4] = (Button)FindName("CarButton");
35 | emojiTabs[5] = (Button)FindName("HeartButton");
36 | foreach (var button in emojiTabs)
37 | button.Click += ChangeCategoryClick;
38 | ChangeCategoryClick(emojiTabs[0], null);
39 | }
40 |
41 | private void ChangeCategoryClick(object sender, RoutedEventArgs e)
42 | {
43 | var button = (Button)sender;
44 | var tag = int.Parse(button.Tag.ToString());
45 | Grid.SetColumn(highlightBorder, tag + 1);
46 | emojiKeyboardList.RemoveAll();
47 | emojiKeyboardList.AddRange(Shared.Helpers.FontHelper.GetEmojiGroup(tag));
48 | }
49 |
50 | private void EmojiPresenter_ItemClick(object sender, ItemClickEventArgs e) => iconTextBlock.Text = e?.ClickedItem?.ToString();
51 |
52 | private void Color_ItemClick(object sender, ItemClickEventArgs e)
53 | {
54 | if (e.ClickedItem is GradientColor color)
55 | {
56 | category.Background = color;
57 | Bindings.Update();
58 | }
59 | }
60 |
61 | #region return
62 |
63 | private void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
64 | {
65 | category.Id = (category.Id == -1) ? Helpers.Utils.GetUnixTime() : category.Id;
66 | if (string.IsNullOrEmpty(category.Title)) category.Title = "new_category";
67 | }
68 |
69 | private void ContentDialog_SecondaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
70 | => category = null;
71 | #endregion
72 |
73 | private void RemoveBtn_Click(object sender, RoutedEventArgs e)
74 | {
75 |
76 | }
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/Dialogs/NotificationDialog.xaml:
--------------------------------------------------------------------------------
1 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/Dialogs/NotificationDialog.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.Foundation;
7 | using Windows.Foundation.Collections;
8 | using Windows.UI.Xaml;
9 | using Windows.UI.Xaml.Controls;
10 | using Windows.UI.Xaml.Controls.Primitives;
11 | using Windows.UI.Xaml.Data;
12 | using Windows.UI.Xaml.Input;
13 | using Windows.UI.Xaml.Media;
14 | using Windows.UI.Xaml.Navigation;
15 |
16 | // The Content Dialog item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
17 |
18 | namespace GithubX.UWP.Views.Dialogs
19 | {
20 | public sealed partial class NotificationDialog : ContentDialog
21 | {
22 | public NotificationDialog()
23 | {
24 | this.InitializeComponent();
25 | }
26 |
27 | private void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
28 | {
29 | }
30 |
31 | private void ContentDialog_SecondaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
32 | {
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/Dialogs/SettingsDialog.xaml:
--------------------------------------------------------------------------------
1 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/Dialogs/SettingsDialog.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.Foundation;
7 | using Windows.Foundation.Collections;
8 | using Windows.UI.Xaml;
9 | using Windows.UI.Xaml.Controls;
10 | using Windows.UI.Xaml.Controls.Primitives;
11 | using Windows.UI.Xaml.Data;
12 | using Windows.UI.Xaml.Input;
13 | using Windows.UI.Xaml.Media;
14 | using Windows.UI.Xaml.Navigation;
15 |
16 | // The Content Dialog item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
17 |
18 | namespace GithubX.UWP.Views.Dialogs
19 | {
20 | public sealed partial class SettingsDialog : ContentDialog
21 | {
22 | public SettingsDialog()
23 | {
24 | this.InitializeComponent();
25 | }
26 |
27 | private void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
28 | {
29 | }
30 |
31 | private void ContentDialog_SecondaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
32 | {
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/FollowPage.xaml:
--------------------------------------------------------------------------------
1 |
13 |
14 |
18 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/FollowPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using GithubX.Shared.Services;
2 | using System.Collections.ObjectModel;
3 | using Windows.UI.Xaml.Controls;
4 | using Windows.UI.Xaml.Navigation;
5 |
6 | namespace GithubX.UWP.Views
7 | {
8 | public sealed partial class FollowPage : Page
9 | {
10 | private ObservableCollection users = new ObservableCollection();
11 | private string Title = "Followers";
12 | private string previousTitle = "Followers";
13 | private Octokit.ApiOptions options = new Octokit.ApiOptions() { PageCount = 1 };
14 |
15 | public FollowPage() => InitializeComponent();
16 |
17 | protected override void OnNavigatedTo(NavigationEventArgs e)
18 | {
19 | base.OnNavigatedTo(e);
20 | Title = e.Parameter as string;
21 | }
22 |
23 | private async void Page_Loaded(object sender, Windows.UI.Xaml.RoutedEventArgs e)
24 | {
25 | if (users.Count > 0 && previousTitle == Title) return;
26 | previousTitle = Title;
27 | foreach (var t in (Title == "Followers")
28 | ? await GithubService.UserService.GetAllFollowers(options)
29 | : await GithubService.UserService.GetAllFollowing(options))
30 | users?.Add(t);
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/GistPage.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
16 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
40 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/GistPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using Windows.UI.Xaml.Controls;
2 | using Windows.UI.Xaml.Navigation;
3 | using Akavache;
4 | using System;
5 | using System.Reactive;
6 | using System.Linq;
7 | using System.Threading.Tasks;
8 | using GithubX.Shared.Services;
9 |
10 | namespace GithubX.UWP.Views
11 | {
12 | public sealed partial class GistPage : Page
13 | {
14 | private Octokit.Gist gist;
15 | public GistPage()
16 | {
17 | this.InitializeComponent();
18 | }
19 |
20 | protected override void OnNavigatedTo(NavigationEventArgs e)
21 | {
22 | base.OnNavigatedTo(e);
23 | gist = e.Parameter as Octokit.Gist;
24 | loadGistFile(gist.Files.Values.First());
25 | }
26 |
27 | private void listView_ItemClick(object sender, ItemClickEventArgs e)
28 | {
29 | var file = (e.ClickedItem as Octokit.GistFile);
30 | loadGistFile(file);
31 | }
32 |
33 | private async void loadGistFile(Octokit.GistFile file)
34 | {
35 | try
36 | {
37 | var res = await GithubService.RepositoryService.GetMarkDownReadyAsync(file?.RawUrl, true);
38 | if (file.Filename.Contains(".md"))
39 | markdown.Text = res;
40 | else
41 | markdown.Text = $"``` {res} ```";
42 | }
43 | catch { }
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/GistsPage.xaml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
17 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/GistsPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using GithubX.Shared.Services;
2 | using System.Collections.ObjectModel;
3 | using Windows.UI.Xaml.Controls;
4 | using Windows.UI.Xaml.Navigation;
5 |
6 | namespace GithubX.UWP.Views
7 | {
8 | public sealed partial class GistsPage : Page
9 | {
10 | private ObservableCollection gists = new ObservableCollection();
11 | private Octokit.User previousUser;
12 | public GistsPage() => InitializeComponent();
13 |
14 | protected async override void OnNavigatedTo(NavigationEventArgs e)
15 | {
16 | base.OnNavigatedTo(e);
17 | if (e.Parameter is Octokit.User user)
18 | {
19 | if (user == previousUser && gists.Count > 0)
20 | return;
21 | previousUser = user;
22 | }
23 | else
24 | {
25 | previousUser = null;
26 | if (gists.Count > 0) return;
27 | }
28 | var temp = await GithubService.UserService.GetUserGists(previousUser?.Login);
29 | gists.Clear();
30 | foreach (var t in temp) gists.Add(t);
31 | }
32 |
33 | private void GridView_ItemClick(object sender, ItemClickEventArgs e)
34 | => Frame.Navigate(typeof(GistPage), e?.ClickedItem as Octokit.Gist);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/LoginPage.xaml:
--------------------------------------------------------------------------------
1 |
19 |
20 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
38 |
39 |
43 |
48 |
49 |
55 |
56 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/LoginPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Windows.UI.Xaml;
3 | using Windows.UI.Xaml.Controls;
4 | using GithubX.Shared.Services;
5 | using Windows.UI.Popups;
6 |
7 | namespace GithubX.UWP.Views
8 | {
9 | public sealed partial class LoginPage : Page
10 | {
11 | public LoginPage() => InitializeComponent();
12 |
13 | private async void Page_Loading(FrameworkElement sender, object args)
14 | {
15 | Logger.Init(Shared.Keys.AppCenteerToken);
16 | loadingControl.IsEnabled = true;
17 | var cred = await GithubService.Auth.ReadCredential();
18 | loadingControl.IsEnabled = false;
19 | if (cred == null) return;
20 | GithubService.SetClient(cred.Password);
21 | if (GithubService.Auth.IsLoggedIn())
22 | Frame.Navigate(typeof(MotherPage));
23 | }
24 |
25 | private async void Login_Click(object sender, RoutedEventArgs e)
26 | {
27 | loadingControl.IsEnabled = true;
28 | loadingControl.Tag = "Waiting for Authentication...";
29 | try
30 | {
31 | var url = GithubService.Auth.GetOauthUrl();
32 | await Helpers.Utils.OpenUri(url);
33 | Octokit.Credentials cred = null;
34 | while ((cred = await GithubService.Auth.ReadCredential()) == null)
35 | await System.Threading.Tasks.Task.Delay(TimeSpan.FromSeconds(3));
36 | GithubService.SetClient(cred?.Password);
37 | Frame.Navigate(typeof(MotherPage));
38 | }
39 | catch (Exception _)
40 | {
41 | Logger.E(_);
42 | var dialog = new MessageDialog("Error! Try Again");
43 | dialog.Commands.Add(new UICommand("Close"));
44 | await dialog.ShowAsync();
45 | }
46 | finally
47 | {
48 | loadingControl.IsEnabled = false;
49 | }
50 | }
51 | }
52 | }
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/MarkdownPage.xaml:
--------------------------------------------------------------------------------
1 |
10 |
15 |
16 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/MarkdownPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Windows.UI.Xaml;
3 | using Windows.UI.Xaml.Controls;
4 |
5 | namespace GithubX.UWP.Views
6 | {
7 | public sealed partial class MarkdownPage : Page
8 | {
9 | private string tag = "";
10 | public MarkdownPage() => this.InitializeComponent();
11 |
12 | private void Page_Loaded(object sender, RoutedEventArgs e)
13 | {
14 | }
15 |
16 | protected async override void OnNavigatedTo(Windows.UI.Xaml.Navigation.NavigationEventArgs e)
17 | {
18 | base.OnNavigatedFrom(e);
19 | tag = e.Parameter as string;
20 | if (tag.Equals("Help", System.StringComparison.OrdinalIgnoreCase))
21 | {
22 | var fileContent = await Helpers.Utils.ReadFileFromAsset("ms-appx:///Assets/Files/HELP.md");
23 | markdownTextBlock.Text = $"# Github✘ v{App.Version}{fileContent}";
24 | }
25 | }
26 |
27 | private async void markdownTextBlock_LinkClicked(object sender, Microsoft.Toolkit.Uwp.UI.Controls.LinkClickedEventArgs e)
28 | {
29 | await Windows.System.Launcher.LaunchUriAsync(new Uri(e?.Link));
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/MotherPage.xaml:
--------------------------------------------------------------------------------
1 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
25 |
26 |
31 |
38 |
39 |
44 |
45 |
46 |
47 |
48 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/MotherPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using GithubX.Shared.Services;
2 | using Windows.UI.Xaml.Controls;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Linq;
6 |
7 | namespace GithubX.UWP.Views
8 | {
9 | public sealed partial class MotherPage : Page
10 | {
11 | public static Microsoft.Toolkit.Uwp.UI.Controls.InAppNotification NotifyElement { get; set; }
12 |
13 | private readonly Dictionary dFrame = new Dictionary()
14 | {
15 | { new NavigationViewItem(){Content = "Profile"}, typeof(ProfilePage)},
16 | { new NavigationViewItem(){Content = "Activities"}, typeof(ActivitiesPage)},
17 | { new NavigationViewItem(){Content = "Categories"}, typeof(CategoriesPage)},
18 | { new NavigationViewItem(){Content = "Stars"}, typeof(RepositoriesPage)},
19 | { new NavigationViewItem(){Content = "Repositories"}, typeof(RepositoriesPage)},
20 | { new NavigationViewItem(){Content = "Followers"}, typeof(FollowPage)},
21 | { new NavigationViewItem(){Content = "Following"}, typeof(FollowPage)},
22 | { new NavigationViewItem(){Content = "Gists"}, typeof(GistsPage)},
23 | { new NavigationViewItem(){Content = "Help"}, typeof(MarkdownPage)}
24 | };
25 |
26 | public MotherPage()
27 | {
28 | this.InitializeComponent();
29 | NotifyElement = Notifer;
30 | }
31 |
32 | private void Page_Loaded(object sender, Windows.UI.Xaml.RoutedEventArgs e)
33 | {
34 | foreach (var item in dFrame)
35 | navigationView.MenuItems.Add(item.Key);
36 | navigationView.SelectedItem = dFrame.First().Key;
37 | Shared.Helpers.CacheHandler.InitCache();
38 | Logger.Init(Shared.Keys.AppCenteerToken);
39 | }
40 |
41 | private async void NavigationView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
42 | {
43 | if (args.SelectedItem == null) return;
44 | if (!args.IsSettingsSelected)
45 | {
46 | var nav = (args?.SelectedItem as NavigationViewItem);
47 | iframe.Navigate(dFrame.GetValueOrDefault(nav, dFrame.First().Value), nav.Content);
48 | navigationView.IsBackEnabled = iframe.CanGoBack;
49 | }
50 | else
51 | {
52 | await new Dialogs.SettingsDialog().ShowAsync();
53 | navigationView.SelectedItem = null;
54 | }
55 | }
56 |
57 | private void navigationView_BackRequested(NavigationView sender, NavigationViewBackRequestedEventArgs args)
58 | {
59 | if (!iframe.CanGoBack) return;
60 | iframe.GoBack();
61 | navigationView.IsBackEnabled = iframe.CanGoBack;
62 | if (dFrame.ContainsValue(iframe.SourcePageType))
63 | {
64 | navigationView.SelectionChanged -= NavigationView_SelectionChanged;
65 | navigationView.SelectedItem = dFrame.FirstOrDefault(x => x.Value == iframe.SourcePageType).Key;
66 | navigationView.SelectionChanged += NavigationView_SelectionChanged;
67 | }
68 | }
69 |
70 | private void RepoSearch_QuerySubmitted(AutoSuggestBox sender, AutoSuggestBoxQuerySubmittedEventArgs args)
71 | {
72 | //TODO
73 | }
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/ProfilePage.xaml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
28 |
29 |
39 |
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 |
75 |
76 |
77 |
81 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/ProfilePage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.ObjectModel;
2 | using Windows.UI.Xaml;
3 | using Windows.UI.Xaml.Controls;
4 | using GithubX.Shared.Services;
5 | using Windows.UI.Popups;
6 | using System;
7 |
8 | namespace GithubX.UWP.Views
9 | {
10 | public sealed partial class ProfilePage : Page
11 | {
12 | private ObservableCollection _notifications = new ObservableCollection();
13 | private Octokit.User _user { get; set; }
14 |
15 | public ProfilePage() => InitializeComponent();
16 |
17 | private async void Page_Loaded(object sender, RoutedEventArgs e)
18 | {
19 | try
20 | {
21 | if (_notifications.Count > 0) return;
22 | _user = await GithubService.UserService.GetUser();
23 | Bindings.Update();
24 | var temp = await GithubService.UserService.GetAllNotifications(new Octokit.ApiOptions() { PageSize = 10, PageCount = 1 });
25 | foreach (var t in temp) if (t.Unread) _notifications.Add(t);
26 | }
27 | catch (Exception ex)
28 | {
29 | Logger.E(ex);
30 | }
31 | }
32 |
33 | private void Notification_ItemClick(object sender, ItemClickEventArgs e)
34 | {
35 | Frame.Navigate(typeof(RepositoryPage));
36 | }
37 |
38 | private async void Logout_Clicked(object sender, RoutedEventArgs e)
39 | {
40 | var dialog = new MessageDialog("Are you sure you want to Logout?");
41 | dialog.Commands.Add(new UICommand("Logout", LogoutAction));
42 | dialog.Commands.Add(new UICommand("Cancel"));
43 | await dialog.ShowAsync();
44 | }
45 |
46 | private void LogoutAction(IUICommand command)
47 | {
48 |
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/RepositoriesPage.xaml:
--------------------------------------------------------------------------------
1 |
13 |
14 |
18 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/RepositoriesPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using GithubX.Shared.Services;
2 | using System.Collections.ObjectModel;
3 | using Windows.UI.Xaml.Controls;
4 | using Windows.UI.Xaml.Navigation;
5 |
6 | namespace GithubX.UWP.Views
7 | {
8 | public sealed partial class RepositoriesPage : Page
9 | {
10 | private ObservableCollection repositories = new ObservableCollection();
11 | private string Title = "Repositories", prevTitle;
12 | private Octokit.ApiOptions options = new Octokit.ApiOptions() { PageCount = 1, PageSize = 30 };
13 |
14 | public RepositoriesPage() => InitializeComponent();
15 | protected override void OnNavigatedTo(NavigationEventArgs e)
16 | {
17 | base.OnNavigatedTo(e);
18 | Title = e.Parameter as string;
19 | if (prevTitle != Title) NavigationCacheMode = NavigationCacheMode.Disabled;
20 | else NavigationCacheMode = NavigationCacheMode.Enabled;
21 | }
22 |
23 | private void GridView_ItemClick(object sender, ItemClickEventArgs e)
24 | => Frame.Navigate(typeof(RepositoryPage), e.ClickedItem as Octokit.Repository);
25 |
26 | private async void Page_Loaded(object sender, Windows.UI.Xaml.RoutedEventArgs e)
27 | {
28 | //if (repositories.Count > 0 && prevTitle == Title) return;
29 | prevTitle = Title;
30 | repositories.Clear();
31 | var temp = Title == "Repositories"
32 | ? await GithubService.UserService.GetUserRepositories(options)
33 | : await GithubService.UserService.GetStarredRepositories(options);
34 | foreach (var t in temp) repositories.Add(t);
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/RepositoryPage.xaml:
--------------------------------------------------------------------------------
1 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
33 |
34 |
39 |
40 |
49 |
50 |
51 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
91 |
92 |
93 |
94 |
95 |
96 |
102 |
103 |
104 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
120 |
124 |
128 |
132 |
133 |
138 |
143 |
148 |
154 |
160 |
166 |
167 |
172 |
177 |
182 |
187 |
192 |
197 |
198 |
199 |
200 |
201 |
202 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/Views/RepositoryPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using GithubX.Shared.Services;
2 | using GithubX.Shared.Services.Pocket;
3 | using Octokit;
4 | using System;
5 | using System.Collections.ObjectModel;
6 | using System.Threading.Tasks;
7 | using Windows.ApplicationModel.DataTransfer;
8 | using Windows.Security.Authentication.Web;
9 | using Windows.UI.Popups;
10 | using Windows.UI.Xaml;
11 | using Windows.UI.Xaml.Controls;
12 | using Windows.UI.Xaml.Navigation;
13 |
14 | namespace GithubX.UWP.Views
15 | {
16 | public sealed partial class RepositoryPage : Windows.UI.Xaml.Controls.Page
17 | {
18 | private ObservableCollection _contents = new ObservableCollection();
19 | private Repository _repository { get; set; }
20 | private string currentBranch { get; set; } = "master";
21 |
22 | public RepositoryPage()
23 | {
24 | InitializeComponent();
25 | DataTransferManager.GetForCurrentView().DataRequested += (_, args) =>
26 | {
27 | DataRequest request = args.Request;
28 | request.Data.SetText(_repository.HtmlUrl);
29 | request.Data.Properties.Title = "Checkout this Repo, SharedBy_GithubX";
30 | };
31 | }
32 |
33 | private async void Page_Loading(FrameworkElement sender, object args)
34 | {
35 | if (_repository == null) return;
36 | var temp = await GithubService.RepositoryService.GetRepositoryContent(_repository.Id);
37 | foreach (var t in temp) _contents.Add(t);
38 | try { markDown.Text = (await GithubService.RepositoryService.GetRepositoryReadme(_repository.Id))?.Content; }
39 | catch { }
40 | }
41 |
42 | protected override void OnNavigatedTo(NavigationEventArgs e)
43 | {
44 | base.OnNavigatedTo(e);
45 | _repository = e.Parameter as Repository;
46 | }
47 |
48 | private async void Content_Click(object sender, ItemClickEventArgs e)
49 | {
50 | var content = e.ClickedItem as RepositoryContent;
51 | switch (content.Type.Value)
52 | {
53 | case ContentType.Dir:
54 | var temp = await GithubService.RepositoryService.GetRepositoryContent(_repository.Id, content.Path);
55 | if (temp.Count > 0) _contents.Clear();
56 | foreach (var t in temp) _contents.Add(t);
57 | break;
58 | case ContentType.File:
59 | try
60 | {
61 | markDown.Text = "> Loading";
62 | markDown.Text = await GithubService.RepositoryService.GetMarkDownReadyAsync(content);
63 | }
64 | catch
65 | {
66 | markDown.Text = "> Unsupported file ***OR*** Error happend while getting the file.";
67 | }
68 | break;
69 | case ContentType.Submodule:
70 | await Helpers.Utils.OpenUri(content.SubmoduleGitUrl);
71 | break;
72 | case ContentType.Symlink:
73 | await Helpers.Utils.OpenUri(content.Url);
74 | break;
75 | }
76 | }
77 |
78 | private void ToggleButton_Checked(object sender, RoutedEventArgs e)
79 | {
80 | var btn = e.OriginalSource as Control;
81 | switch (btn?.Tag?.ToString())
82 | {
83 | case "Star":
84 | break;
85 | case "Fork":
86 | break;
87 | case "Watch":
88 | break;
89 | }
90 | }
91 |
92 | private void ToggleButton_UnChecked(object sender, RoutedEventArgs e)
93 | {
94 | var btn = e.OriginalSource as Control;
95 | switch (btn?.Tag?.ToString())
96 | {
97 | case "Star":
98 | break;
99 | case "Fork":
100 | break;
101 | case "Watch":
102 | break;
103 | }
104 | }
105 |
106 | private async void AppBarButton_Click(object sender, RoutedEventArgs e)
107 | {
108 | var btn = e.OriginalSource as Control;
109 | switch (btn?.Tag?.ToString())
110 | {
111 | case "Pocket":
112 | await SaveInPocketAsync(_repository.HtmlUrl);
113 | break;
114 | case "Share":
115 | DataTransferManager.ShowShareUI();
116 | break;
117 | case "Browser":
118 | await Helpers.Utils.OpenUri(_repository.HtmlUrl);
119 | break;
120 | case "Download":
121 | //TODO: Download with app
122 | await Helpers.Utils.OpenUri($"{_repository.HtmlUrl}/archive/{currentBranch}.zip");
123 | break;
124 | case "Git":
125 | var pkg = new DataPackage();
126 | pkg.SetText(_repository.CloneUrl);
127 | Clipboard.SetContent(pkg);
128 | MotherPage.NotifyElement.Show("Copied", 2000);
129 | break;
130 | case "Category":
131 | break;
132 | case "Commits":
133 | await Helpers.Utils.OpenUri($"{_repository.HtmlUrl}/commits/{currentBranch}");
134 | break;
135 | case "Issues":
136 | await Helpers.Utils.OpenUri($"{_repository.HtmlUrl}/issues");
137 | break;
138 | }
139 | }
140 |
141 | private async Task SaveInPocketAsync(string url)
142 | {
143 | Logger.D("Pocket", "Click");
144 | if (!Helpers.Utils.CheckConnection)
145 | MotherPage.NotifyElement.Show("✖ Error! No internet", 3000);
146 | var pocket = new PocketService(Shared.Keys.PocketToken);
147 | pocket.LoadFromCache();
148 | try
149 | {
150 | if (pocket.IsLoggedIn())
151 | {
152 | await pocket.Add(new Uri(url));
153 | MotherPage.NotifyElement.Show("✔ Saved in your Pocket", 3000);
154 | }
155 | else
156 | {
157 | var dialog = new MessageDialog("✔ Login to Pocket Then try Again");
158 | dialog.Commands.Add(new UICommand("OK", async (IUICommand _) =>
159 | {
160 | var (requestCode, uri) = await pocket.GenerateAuthUri();
161 | WebAuthenticationResult auth = await WebAuthenticationBroker.AuthenticateAsync(WebAuthenticationOptions.None, uri, new Uri(pocket.FallBackUri));
162 | if (auth.ResponseStatus != WebAuthenticationStatus.Success) return;
163 | var res = auth.ResponseData;
164 | var token = await pocket.GetUserToken(requestCode);
165 | pocket.SaveInCache();
166 | MotherPage.NotifyElement.Show((token?.Length > 1) ? "✔ Logged in Pocket" : "✖ Failed to login", 3000);
167 | }));
168 | dialog.Commands.Add(new UICommand("Cancel"));
169 | await dialog.ShowAsync();
170 | }
171 | }
172 | catch { MotherPage.NotifyElement.Show("✖ Error!", 3000); }
173 | }
174 |
175 | private async void MarkdownTextBlock_LinkClicked(object sender, Microsoft.Toolkit.Uwp.UI.Controls.LinkClickedEventArgs e)
176 | {
177 | try
178 | {
179 | if (e.Link.Contains("http"))
180 | await Windows.System.Launcher.LaunchUriAsync(new Uri(e.Link));
181 | else await Windows.System.Launcher.LaunchUriAsync(new Uri($"{_repository.HtmlUrl}/tree/{currentBranch}/{e.Link}"));
182 | }
183 | catch { MotherPage.NotifyElement.Show("Error in opening:" + e.Link, 3000); }
184 | }
185 | }
186 | }
187 |
--------------------------------------------------------------------------------
/source/GithubX.UWP/_pkginfo.txt:
--------------------------------------------------------------------------------
1 | C:\Users\Master\source\repos\GithubX\GithubX.UWP\GithubX.UWP\bin\ARM\Release\Upload\GithubX.UWP_1.1.2.0\GithubX.UWP_1.1.2.0_x86_x64_arm.appxbundle
2 |
--------------------------------------------------------------------------------
/source/GithubX.iOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using Foundation;
2 | using UIKit;
3 |
4 | namespace Blank
5 | {
6 | // The UIApplicationDelegate for the application. This class is responsible for launching the
7 | // User Interface of the application, as well as listening (and optionally responding) to application events from iOS.
8 | [Register("AppDelegate")]
9 | public class AppDelegate : UIApplicationDelegate
10 | {
11 | // class-level declarations
12 |
13 | public override UIWindow Window
14 | {
15 | get;
16 | set;
17 | }
18 |
19 | public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
20 | {
21 | // create a new window instance based on the screen size
22 | Window = new UIWindow(UIScreen.MainScreen.Bounds);
23 | Window.RootViewController = new UIViewController();
24 |
25 | // make the window visible
26 | Window.MakeKeyAndVisible();
27 |
28 | return true;
29 | }
30 |
31 | public override void OnResignActivation(UIApplication application)
32 | {
33 | // Invoked when the application is about to move from active to inactive state.
34 | // This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message)
35 | // or when the user quits the application and it begins the transition to the background state.
36 | // Games should use this method to pause the game.
37 | }
38 |
39 | public override void DidEnterBackground(UIApplication application)
40 | {
41 | // Use this method to release shared resources, save user data, invalidate timers and store the application state.
42 | // If your application supports background exection this method is called instead of WillTerminate when the user quits.
43 | }
44 |
45 | public override void WillEnterForeground(UIApplication application)
46 | {
47 | // Called as part of the transiton from background to active state.
48 | // Here you can undo many of the changes made on entering the background.
49 | }
50 |
51 | public override void OnActivated(UIApplication application)
52 | {
53 | // Restart any tasks that were paused (or not yet started) while the application was inactive.
54 | // If the application was previously in the background, optionally refresh the user interface.
55 | }
56 |
57 | public override void WillTerminate(UIApplication application)
58 | {
59 | // Called when the application is about to terminate. Save data, if needed. See also DidEnterBackground.
60 | }
61 | }
62 | }
63 |
64 |
65 |
--------------------------------------------------------------------------------
/source/GithubX.iOS/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images": [
3 | {
4 | "scale": "2x",
5 | "size": "20x20",
6 | "idiom": "iphone",
7 | "filename": "Icon40.png"
8 | },
9 | {
10 | "scale": "3x",
11 | "size": "20x20",
12 | "idiom": "iphone",
13 | "filename": "Icon60.png"
14 | },
15 | {
16 | "scale": "2x",
17 | "size": "29x29",
18 | "idiom": "iphone",
19 | "filename": "Icon58.png"
20 | },
21 | {
22 | "scale": "3x",
23 | "size": "29x29",
24 | "idiom": "iphone",
25 | "filename": "Icon87.png"
26 | },
27 | {
28 | "scale": "2x",
29 | "size": "40x40",
30 | "idiom": "iphone",
31 | "filename": "Icon80.png"
32 | },
33 | {
34 | "scale": "3x",
35 | "size": "40x40",
36 | "idiom": "iphone",
37 | "filename": "Icon120.png"
38 | },
39 | {
40 | "scale": "2x",
41 | "size": "60x60",
42 | "idiom": "iphone",
43 | "filename": "Icon120.png"
44 | },
45 | {
46 | "scale": "3x",
47 | "size": "60x60",
48 | "idiom": "iphone",
49 | "filename": "Icon180.png"
50 | },
51 | {
52 | "scale": "1x",
53 | "size": "20x20",
54 | "idiom": "ipad",
55 | "filename": "Icon20.png"
56 | },
57 | {
58 | "scale": "2x",
59 | "size": "20x20",
60 | "idiom": "ipad",
61 | "filename": "Icon40.png"
62 | },
63 | {
64 | "scale": "1x",
65 | "size": "29x29",
66 | "idiom": "ipad",
67 | "filename": "Icon29.png"
68 | },
69 | {
70 | "scale": "2x",
71 | "size": "29x29",
72 | "idiom": "ipad",
73 | "filename": "Icon58.png"
74 | },
75 | {
76 | "scale": "1x",
77 | "size": "40x40",
78 | "idiom": "ipad",
79 | "filename": "Icon40.png"
80 | },
81 | {
82 | "scale": "2x",
83 | "size": "40x40",
84 | "idiom": "ipad",
85 | "filename": "Icon80.png"
86 | },
87 | {
88 | "scale": "1x",
89 | "size": "76x76",
90 | "idiom": "ipad",
91 | "filename": "Icon76.png"
92 | },
93 | {
94 | "scale": "2x",
95 | "size": "76x76",
96 | "idiom": "ipad",
97 | "filename": "Icon152.png"
98 | },
99 | {
100 | "scale": "2x",
101 | "size": "83.5x83.5",
102 | "idiom": "ipad",
103 | "filename": "Icon167.png"
104 | },
105 | {
106 | "scale": "1x",
107 | "size": "1024x1024",
108 | "idiom": "ios-marketing",
109 | "filename": "Icon1024.png"
110 | }
111 | ],
112 | "properties": {},
113 | "info": {
114 | "version": 1,
115 | "author": "xcode"
116 | }
117 | }
--------------------------------------------------------------------------------
/source/GithubX.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png
--------------------------------------------------------------------------------
/source/GithubX.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png
--------------------------------------------------------------------------------
/source/GithubX.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png
--------------------------------------------------------------------------------
/source/GithubX.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png
--------------------------------------------------------------------------------
/source/GithubX.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png
--------------------------------------------------------------------------------
/source/GithubX.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png
--------------------------------------------------------------------------------
/source/GithubX.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png
--------------------------------------------------------------------------------
/source/GithubX.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png
--------------------------------------------------------------------------------
/source/GithubX.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png
--------------------------------------------------------------------------------
/source/GithubX.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png
--------------------------------------------------------------------------------
/source/GithubX.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png
--------------------------------------------------------------------------------
/source/GithubX.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png
--------------------------------------------------------------------------------
/source/GithubX.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yazdipour/githubx/a2ac34888b8233a5d80a1fb961d1b3cd71165e6b/source/GithubX.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png
--------------------------------------------------------------------------------
/source/GithubX.iOS/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/source/GithubX.iOS/GithubX.iOS.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | iPhoneSimulator
6 | {80A96B52-6758-4BDB-B0B4-CEA4CA155C60}
7 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
8 | {440aa056-593a-4519-8708-27081dee632f}
9 | Exe
10 | Blank
11 | Resources
12 | Blank
13 | NSUrlSessionHandler
14 |
15 |
16 | true
17 | full
18 | false
19 | bin\iPhoneSimulator\Debug
20 | DEBUG
21 | prompt
22 | 4
23 | false
24 | x86_64
25 | None
26 | true
27 |
28 |
29 | none
30 | true
31 | bin\iPhoneSimulator\Release
32 | prompt
33 | 4
34 | None
35 | x86_64
36 | false
37 |
38 |
39 | true
40 | full
41 | false
42 | bin\iPhone\Debug
43 | DEBUG
44 | prompt
45 | 4
46 | false
47 | ARM64
48 | Entitlements.plist
49 | iPhone Developer
50 | true
51 |
52 |
53 | none
54 | true
55 | bin\iPhone\Release
56 | prompt
57 | 4
58 | Entitlements.plist
59 | ARM64
60 | false
61 | iPhone Developer
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 | false
80 |
81 |
82 | false
83 |
84 |
85 | false
86 |
87 |
88 | false
89 |
90 |
91 | false
92 |
93 |
94 | false
95 |
96 |
97 | false
98 |
99 |
100 | false
101 |
102 |
103 | false
104 |
105 |
106 | false
107 |
108 |
109 | false
110 |
111 |
112 | false
113 |
114 |
115 | false
116 |
117 |
118 | false
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 | {8412680b-6446-4ad2-a598-8509f4b8750e}
127 | GithubX.Shared
128 |
129 |
130 |
131 |
--------------------------------------------------------------------------------
/source/GithubX.iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDisplayName
6 | GithubX.iOS
7 | CFBundleIdentifier
8 | com.companyname.GithubX.iOS
9 | CFBundleShortVersionString
10 | 1.0
11 | CFBundleVersion
12 | 1.0
13 | LSRequiresIPhoneOS
14 |
15 | MinimumOSVersion
16 | 11.2
17 | UIDeviceFamily
18 |
19 | 1
20 | 2
21 |
22 | UILaunchStoryboardName
23 | LaunchScreen
24 | UIRequiredDeviceCapabilities
25 |
26 | armv7
27 |
28 | UISupportedInterfaceOrientations
29 |
30 | UIInterfaceOrientationPortrait
31 | UIInterfaceOrientationLandscapeLeft
32 | UIInterfaceOrientationLandscapeRight
33 |
34 | UISupportedInterfaceOrientations~ipad
35 |
36 | UIInterfaceOrientationPortrait
37 | UIInterfaceOrientationPortraitUpsideDown
38 | UIInterfaceOrientationLandscapeLeft
39 | UIInterfaceOrientationLandscapeRight
40 |
41 | XSAppIconAssets
42 | Assets.xcassets/AppIcon.appiconset
43 |
44 |
--------------------------------------------------------------------------------
/source/GithubX.iOS/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/source/GithubX.iOS/Main.cs:
--------------------------------------------------------------------------------
1 | using UIKit;
2 |
3 | namespace GithubX.iOS
4 | {
5 | public class Application
6 | {
7 | // This is the main entry point of the application.
8 | static void Main(string[] args)
9 | {
10 | // if you want to use a different Application Delegate class from "AppDelegate"
11 | // you can specify it here.
12 | UIApplication.Main(args, null, "AppDelegate");
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/source/GithubX.iOS/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("GithubX.iOS")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("GithubX.iOS")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("50c7b8c9-e664-45af-b88e-0c9b8b9c1be1")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/source/GithubX.iOS/Resources/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
21 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------