|
| 1 | +angular.module('cardboard', [ |
| 2 | + 'ngRoute', |
| 3 | + 'angular-packery', |
| 4 | + 'cardboard.controllers', |
| 5 | + 'cardboard.factories', |
| 6 | + 'cardboard.directives', |
| 7 | + 'cardboard.filters' |
| 8 | +]) |
| 9 | + |
| 10 | +.config(['$routeProvider','$compileProvider', function($routeProvider, $compileProvider) { |
| 11 | + $routeProvider |
| 12 | + .when('/feed', { |
| 13 | + controller: 'FeedCtrl', |
| 14 | + templateUrl: 'app/templates/Feed.html' |
| 15 | + }) |
| 16 | + .when('/settings', { |
| 17 | + controller: 'SettingsCtrl', |
| 18 | + templateUrl: 'app/templates/Settings.html' |
| 19 | + }) |
| 20 | + // .when('/onboarding', { |
| 21 | + // controller: 'OnboardingCtrl', |
| 22 | + // templateUrl: 'app/templates/Onboarding.html' |
| 23 | + // }) |
| 24 | + .otherwise({ redirectTo: '/feed'}); |
| 25 | + |
| 26 | + // sanitize urls from chrome-extension |
| 27 | + $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|chrome-extension):/); |
| 28 | +}]) |
| 29 | + |
| 30 | + |
| 31 | +.value('DefaultSettings',{ |
| 32 | + version: { "update": 4, "settings": 4}, |
| 33 | + |
| 34 | + // imgur album: https://imgur.com/a/NAaUE |
| 35 | + backgrounds : [ |
| 36 | + { |
| 37 | + id: 0, |
| 38 | + name: "Austin", |
| 39 | + type: "Google Now", |
| 40 | + url: { |
| 41 | + dawn: "https://i.imgur.com/7ndeJog.png", |
| 42 | + day: "https://i.imgur.com/FsJ8mCW.png", |
| 43 | + dusk: "https://i.imgur.com/Mmwv5GQ.png", |
| 44 | + night: "https://i.imgur.com/brJBKA3.png" |
| 45 | + } |
| 46 | + }, |
| 47 | + { |
| 48 | + id: 1, |
| 49 | + name: "Beach", |
| 50 | + type: "Google Now", |
| 51 | + url: { |
| 52 | + dawn: "https://i.imgur.com/Q5Tn8u9.png", |
| 53 | + day: "https://i.imgur.com/dTFXUxt.png", |
| 54 | + dusk: "https://i.imgur.com/vdO9Ote.png", |
| 55 | + night: "https://i.imgur.com/YaoPX9P.png" |
| 56 | + } |
| 57 | + }, |
| 58 | + { |
| 59 | + id: 2, |
| 60 | + name: "Berlin", |
| 61 | + type: "Google Now", |
| 62 | + url: { |
| 63 | + dawn: "https://i.imgur.com/jG1OdPc.png", |
| 64 | + day: "https://i.imgur.com/lnILrRU.png", |
| 65 | + dusk: "https://i.imgur.com/ZCJVfSn.png", |
| 66 | + night: "https://i.imgur.com/5mN7Iau.png" |
| 67 | + } |
| 68 | + }, |
| 69 | + { |
| 70 | + id: 3, |
| 71 | + name: "Chicago", |
| 72 | + type: "Google Now", |
| 73 | + url: { |
| 74 | + dawn: "https://i.imgur.com/f4HUPlZ.png", |
| 75 | + day: "https://i.imgur.com/t5wzT8j.png", |
| 76 | + dusk: "https://i.imgur.com/XrJi3O1.png", |
| 77 | + night: "https://i.imgur.com/xDWHJ45.png" |
| 78 | + } |
| 79 | + }, |
| 80 | + { |
| 81 | + id: 4, |
| 82 | + name: "Default", |
| 83 | + type: "Google Now", |
| 84 | + url: { |
| 85 | + dawn: "https://i.imgur.com/kJFNQLr.png", |
| 86 | + day: "https://i.imgur.com/foVYQ6T.png", |
| 87 | + dusk: "https://i.imgur.com/dW217U5.png", |
| 88 | + night: "https://i.imgur.com/87UObPk.png" |
| 89 | + } |
| 90 | + }, |
| 91 | + { |
| 92 | + id: 5, |
| 93 | + name: "Great Plains", |
| 94 | + type: "Google Now", |
| 95 | + url: { |
| 96 | + dawn: "https://i.imgur.com/dWzcGbr.png", |
| 97 | + day: "https://i.imgur.com/huGlyp2.png", |
| 98 | + dusk: "https://i.imgur.com/XNUMKAT.png", |
| 99 | + night: "https://i.imgur.com/d7KaqQ1.png" |
| 100 | + } |
| 101 | + }, |
| 102 | + { |
| 103 | + id: 6, |
| 104 | + name: "London", |
| 105 | + type: "Google Now", |
| 106 | + url: { |
| 107 | + dawn: "https://i.imgur.com/ZD0XBoz.jpg", |
| 108 | + day: "https://i.imgur.com/C2Sg6JG.jpg", |
| 109 | + dusk: "https://i.imgur.com/Qb8PHnA.jpg", |
| 110 | + night: "https://i.imgur.com/k0idCJG.jpg" |
| 111 | + } |
| 112 | + }, |
| 113 | + { |
| 114 | + id: 7, |
| 115 | + name: "New York", |
| 116 | + type: "Google Now", |
| 117 | + url: { |
| 118 | + dawn: "https://i.imgur.com/JVK8ID7.png", |
| 119 | + day: "https://i.imgur.com/yB93g10.png", |
| 120 | + dusk: "https://i.imgur.com/z4elpiG.png", |
| 121 | + night: "https://i.imgur.com/lh0LV5L.png" |
| 122 | + } |
| 123 | + }, |
| 124 | + { |
| 125 | + id: 8, |
| 126 | + name: "Paris", |
| 127 | + type: "Google Now", |
| 128 | + url: { |
| 129 | + dawn: "https://i.imgur.com/c3wAjp2.png", |
| 130 | + day: "https://i.imgur.com/c3wAjp2.png", |
| 131 | + dusk: "https://i.imgur.com/vmfdH9T.png", |
| 132 | + night: "https://i.imgur.com/vmfdH9T.png" |
| 133 | + } |
| 134 | + }, |
| 135 | + { |
| 136 | + id: 9, |
| 137 | + name: "San Francisco", |
| 138 | + type: "Google Now", |
| 139 | + url: { |
| 140 | + dawn: "https://i.imgur.com/fqewVsW.png", |
| 141 | + day: "https://i.imgur.com/lUZp177.png", |
| 142 | + dusk: "https://i.imgur.com/XP6Omxa.png", |
| 143 | + night: "https://i.imgur.com/NATsgio.png" |
| 144 | + } |
| 145 | + }, |
| 146 | + { |
| 147 | + id: 10, |
| 148 | + name: "Seatte", |
| 149 | + type: "Google Now", |
| 150 | + url: { |
| 151 | + dawn: "https://i.imgur.com/7nsrzRK.jpg", |
| 152 | + day: "https://i.imgur.com/0E2xXb0.jpg", |
| 153 | + dusk: "https://i.imgur.com/wYytDhF.jpg", |
| 154 | + night: "https://i.imgur.com/ddI0eBh.jpg" |
| 155 | + } |
| 156 | + }, |
| 157 | + { |
| 158 | + id: 11, |
| 159 | + name: "Tahoe", |
| 160 | + type: "Google Now", |
| 161 | + url: { |
| 162 | + dawn: "https://i.imgur.com/ZSXPIkL.jpg", |
| 163 | + day: "https://i.imgur.com/xeVYGPU.jpg", |
| 164 | + dusk: "https://i.imgur.com/Buxx2Cs.jpg", |
| 165 | + night: "https://i.imgur.com/g761v2t.jpg" |
| 166 | + } |
| 167 | + } |
| 168 | + ], |
| 169 | + backgroundId : 4, |
| 170 | + trends : { |
| 171 | + url: "https://hawttrends.appspot.com/api/terms/", |
| 172 | + enabled: true |
| 173 | + }, |
| 174 | + cards : [ |
| 175 | + { |
| 176 | + name: "apps", |
| 177 | + enabled: false, |
| 178 | + template: "app/templates/cards/AppCard.html", |
| 179 | + permissions: ["management"] |
| 180 | + }, |
| 181 | + { |
| 182 | + name: "bookmarks", |
| 183 | + enabled: false, |
| 184 | + template: "app/templates/cards/BookmarkCard.html", |
| 185 | + permissions: ["bookmarks"] |
| 186 | + }, |
| 187 | + { |
| 188 | + name: "quick_settings", |
| 189 | + enabled: false, |
| 190 | + template: "app/templates/cards/QuickSettingsCard.html", |
| 191 | + permissions: ["browsingData"] |
| 192 | + }, |
| 193 | + { |
| 194 | + name: "downloads", |
| 195 | + enabled: false, |
| 196 | + template: "app/templates/cards/DownloadCard.html", |
| 197 | + permissions: ["downloads"] |
| 198 | + }, |
| 199 | + { |
| 200 | + name: "top_sites", |
| 201 | + enabled: false, |
| 202 | + template: "app/templates/cards/TopSitesCard.html", |
| 203 | + permissions: ["topSites"] |
| 204 | + }, |
| 205 | + { |
| 206 | + name: "history", |
| 207 | + enabled: false, |
| 208 | + template: "app/templates/cards/HistoryCard.html", |
| 209 | + permissions: ["history"] |
| 210 | + }, |
| 211 | + { |
| 212 | + name: "sessions", |
| 213 | + enabled: false, |
| 214 | + template: "app/templates/cards/SessionsCard.html", |
| 215 | + permissions: ["sessions", "tabs"] |
| 216 | + }, |
| 217 | + { |
| 218 | + name: "system", |
| 219 | + enabled: false, |
| 220 | + template: "app/templates/cards/SystemCard.html", |
| 221 | + permissions: ["system.cpu", "system.memory", "system.storage"] |
| 222 | + } |
| 223 | + |
| 224 | + // {name: "changelog", system: true, enabled: false, template: "app/templates/cards/ChangelogCard.html" } |
| 225 | + // {name: "appearance", system: true, enabled: true, template: "app/templates/cards/AppearanceCard.html" }, |
| 226 | + // {name: "cards", system: true, enabled: true, template: "app/templates/cards/CardsCard.html" }, |
| 227 | + // {name: "about", system: true, enabled: true, template: "app/templates/cards/AboutCard.html" } |
| 228 | + ], |
| 229 | + faviconURL: "https://www.google.com/s2/favicons?domain_url=" |
| 230 | +}); |
0 commit comments