├── .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 | ![GithubX](assets/Icon/Octocat.png) 4 | 5 | Main Goal: Make Categorizing Github Repositories Easier and Enjoyable. 6 | 7 | ![screen shot uwp](assets/Uwp/Screenshots/MainPage.png) 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 | [![Donate](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://buymeacoff.ee/XrTW5YQDy) 29 | 30 | [![Donate RIAL.IR](https://img.shields.io/badge/donate-IRAN-blue.svg)](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 $"![]({content.DownloadUrl})"; 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 | [![Donate](ms-appx:///Assets/Files/d_coffee.png)](https://buymeacoff.ee/XrTW5YQDy) 9 | 10 | [![Donate from Iran](ms-appx:///Assets/Files/d_iran.png)](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 | 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 |