From 0923b87ee43c7afe083cb513c887b58515ff3413 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 7 Feb 2011 16:19:44 -0800 Subject: OMG HTML5 Offline FTW. --- MobileCydia.app/Modes/DOWNGRADE.png | Bin 1176 -> 0 bytes MobileCydia.app/Modes/INSTALL.png | Bin 2135 -> 0 bytes MobileCydia.app/Modes/NEW_INSTALL.png | 1 - MobileCydia.app/Modes/PURGE.png | Bin 2443 -> 0 bytes MobileCydia.app/Modes/REINSTALL.png | Bin 2013 -> 0 bytes MobileCydia.app/Modes/REMOVE.png | Bin 2552 -> 0 bytes MobileCydia.app/Modes/UPGRADE.png | Bin 1635 -> 0 bytes MobileCydia.app/commercial.png | Bin 7550 -> 0 bytes MobileCydia.app/console.png | Bin 2812 -> 0 bytes MobileCydia.app/email.png | Bin 22892 -> 0 bytes MobileCydia.app/expanded.png | Bin 6180 -> 0 bytes MobileCydia.app/filesystem.png | Bin 7852 -> 0 bytes MobileCydia.app/id.png | Bin 3706 -> 0 bytes MobileCydia.app/loading.html | 15 - MobileCydia.app/manage.html | 100 ------ MobileCydia.app/menes/indicator-c7ced5-4d4d70.gif | Bin 1849 -> 0 bytes MobileCydia.app/package.html | 388 ---------------------- MobileCydia.app/package.js | 290 ---------------- MobileCydia.app/packages.png | Bin 8884 -> 0 bytes MobileCydia.app/settings.png | Bin 5848 -> 0 bytes MobileCydia.app/signature.html | 16 - MobileCydia.app/sources.png | Bin 22251 -> 0 bytes MobileCydia.app/star.png | Bin 1757 -> 0 bytes MobileCydia.app/storage.html | 237 ------------- MobileCydia.app/storage.js | 88 ----- MobileCydia.app/storage.png | Bin 14343 -> 0 bytes MobileCydia.app/trusted.png | Bin 22915 -> 0 bytes MobileCydia.app/version.png | Bin 891 -> 0 bytes MobileCydia.app/warning.png | Bin 5000 -> 0 bytes MobileCydia.app/web.png | Bin 8234 -> 0 bytes MobileCydia.mm | 11 +- 31 files changed, 3 insertions(+), 1143 deletions(-) delete mode 100644 MobileCydia.app/Modes/DOWNGRADE.png delete mode 100644 MobileCydia.app/Modes/INSTALL.png delete mode 120000 MobileCydia.app/Modes/NEW_INSTALL.png delete mode 100644 MobileCydia.app/Modes/PURGE.png delete mode 100644 MobileCydia.app/Modes/REINSTALL.png delete mode 100644 MobileCydia.app/Modes/REMOVE.png delete mode 100644 MobileCydia.app/Modes/UPGRADE.png delete mode 100644 MobileCydia.app/commercial.png delete mode 100644 MobileCydia.app/console.png delete mode 100644 MobileCydia.app/email.png delete mode 100644 MobileCydia.app/expanded.png delete mode 100644 MobileCydia.app/filesystem.png delete mode 100644 MobileCydia.app/id.png delete mode 100644 MobileCydia.app/loading.html delete mode 100644 MobileCydia.app/manage.html delete mode 100644 MobileCydia.app/menes/indicator-c7ced5-4d4d70.gif delete mode 100644 MobileCydia.app/package.html delete mode 100644 MobileCydia.app/package.js delete mode 100644 MobileCydia.app/packages.png delete mode 100644 MobileCydia.app/settings.png delete mode 100644 MobileCydia.app/signature.html delete mode 100644 MobileCydia.app/sources.png delete mode 100644 MobileCydia.app/star.png delete mode 100644 MobileCydia.app/storage.html delete mode 100644 MobileCydia.app/storage.js delete mode 100644 MobileCydia.app/storage.png delete mode 100644 MobileCydia.app/trusted.png delete mode 100644 MobileCydia.app/version.png delete mode 100644 MobileCydia.app/warning.png delete mode 100644 MobileCydia.app/web.png diff --git a/MobileCydia.app/Modes/DOWNGRADE.png b/MobileCydia.app/Modes/DOWNGRADE.png deleted file mode 100644 index 41c0d70..0000000 Binary files a/MobileCydia.app/Modes/DOWNGRADE.png and /dev/null differ diff --git a/MobileCydia.app/Modes/INSTALL.png b/MobileCydia.app/Modes/INSTALL.png deleted file mode 100644 index a83f354..0000000 Binary files a/MobileCydia.app/Modes/INSTALL.png and /dev/null differ diff --git a/MobileCydia.app/Modes/NEW_INSTALL.png b/MobileCydia.app/Modes/NEW_INSTALL.png deleted file mode 120000 index 475bda6..0000000 --- a/MobileCydia.app/Modes/NEW_INSTALL.png +++ /dev/null @@ -1 +0,0 @@ -INSTALL.png \ No newline at end of file diff --git a/MobileCydia.app/Modes/PURGE.png b/MobileCydia.app/Modes/PURGE.png deleted file mode 100644 index 795fa19..0000000 Binary files a/MobileCydia.app/Modes/PURGE.png and /dev/null differ diff --git a/MobileCydia.app/Modes/REINSTALL.png b/MobileCydia.app/Modes/REINSTALL.png deleted file mode 100644 index 0b7754c..0000000 Binary files a/MobileCydia.app/Modes/REINSTALL.png and /dev/null differ diff --git a/MobileCydia.app/Modes/REMOVE.png b/MobileCydia.app/Modes/REMOVE.png deleted file mode 100644 index 1b2e691..0000000 Binary files a/MobileCydia.app/Modes/REMOVE.png and /dev/null differ diff --git a/MobileCydia.app/Modes/UPGRADE.png b/MobileCydia.app/Modes/UPGRADE.png deleted file mode 100644 index 631b7ef..0000000 Binary files a/MobileCydia.app/Modes/UPGRADE.png and /dev/null differ diff --git a/MobileCydia.app/commercial.png b/MobileCydia.app/commercial.png deleted file mode 100644 index 8599f48..0000000 Binary files a/MobileCydia.app/commercial.png and /dev/null differ diff --git a/MobileCydia.app/console.png b/MobileCydia.app/console.png deleted file mode 100644 index dba3788..0000000 Binary files a/MobileCydia.app/console.png and /dev/null differ diff --git a/MobileCydia.app/email.png b/MobileCydia.app/email.png deleted file mode 100644 index 1aa20b3..0000000 Binary files a/MobileCydia.app/email.png and /dev/null differ diff --git a/MobileCydia.app/expanded.png b/MobileCydia.app/expanded.png deleted file mode 100644 index 9efce56..0000000 Binary files a/MobileCydia.app/expanded.png and /dev/null differ diff --git a/MobileCydia.app/filesystem.png b/MobileCydia.app/filesystem.png deleted file mode 100644 index 1bb23fe..0000000 Binary files a/MobileCydia.app/filesystem.png and /dev/null differ diff --git a/MobileCydia.app/id.png b/MobileCydia.app/id.png deleted file mode 100644 index f168812..0000000 Binary files a/MobileCydia.app/id.png and /dev/null differ diff --git a/MobileCydia.app/loading.html b/MobileCydia.app/loading.html deleted file mode 100644 index 33b2637..0000000 --- a/MobileCydia.app/loading.html +++ /dev/null @@ -1,15 +0,0 @@ - - - Loading - - - - - -
- -
- Loading... -
-
- diff --git a/MobileCydia.app/manage.html b/MobileCydia.app/manage.html deleted file mode 100644 index 55e7462..0000000 --- a/MobileCydia.app/manage.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - -
- -
diff --git a/MobileCydia.app/menes/indicator-c7ced5-4d4d70.gif b/MobileCydia.app/menes/indicator-c7ced5-4d4d70.gif deleted file mode 100644 index e41bb96..0000000 Binary files a/MobileCydia.app/menes/indicator-c7ced5-4d4d70.gif and /dev/null differ diff --git a/MobileCydia.app/package.html b/MobileCydia.app/package.html deleted file mode 100644 index 985b207..0000000 --- a/MobileCydia.app/package.html +++ /dev/null @@ -1,388 +0,0 @@ - - - - - - - - - - - - - - - - - - - -
- -
- - -
-
- -
- -
- -
- - -
- - -
- - - - -
- -
- - -
- -
-
- -
-
-
- -
-
- - - - - - - - - - - -

- -
- -
- -
-
- - -
-
-
- - -
- - -
- -
-
- - -
-
-
- - -
- -
-
- - -
- -
-
- - -
- - -
- - -
- - - - - -
-
- - -
-
- - -
-
-
- -
- -
-
- -
- diff --git a/MobileCydia.app/package.js b/MobileCydia.app/package.js deleted file mode 100644 index 7dee044..0000000 --- a/MobileCydia.app/package.js +++ /dev/null @@ -1,290 +0,0 @@ -/*var package = { - "name": "MobileTerminal", - "latest": "286u-5", - "author": { - "name": "Allen Porter", - "address": "allen.porter@gmail.com" - }, - //"depiction": "http://planet-iphones.com/repository/info/chromium1.3.php", - "depiction": "http://cydia.saurik.com/terminal.html", - "longDescription": "this is a sample description", - "homepage": "http://cydia.saurik.com/terminal.html", - "installed": "286u-4", - "id": "mobileterminal", - "section": "Terminal Support", - "size": 552*1024, - "maintainer": { - "name": "Jay Freeman", - "address": "saurik@saurik.com" - }, - "source": { - "name": "Telesphoreo Tangelo", - "description": "Distribution of Unix Software for the iPhone" - } -};*/ - -function space(selector, html, max) { - var node = $(selector); - node.html(html); - var width = node.width(); - if (width > max) { - var spacing = (max - node.width()) / (html.length - 1) + "px"; - node.css("letter-spacing", spacing); - } -} - -var swap_, swap = function (on, off, time) { - setTimeout(swap_(on, off, time), time); -}; - -swap_ = function (on, off, time) { - return function () { - on.className = 'fade-out'; - off.className = 'fade-in'; - swap(off, on, time); - }; -}; - -$(function () { - if (package == null) - return; - - var id = package.id; - var idc = encodeURIComponent(id); - var name = package.name; - var icon = 'cydia://package-icon/' + idc; - - var api = 'http://cydia.saurik.com/api/'; - var capi = 'http://cache.cydia.saurik.com/api/'; - - var support = package.support; - - var regarding = function (type) { - return encodeURIComponent("Cydia/APT(" + type + "): " + name); - }; - - $("#icon").css("background-image", 'url("' + icon + '")'); - //$("#reflection").src("cydia://package-icon/" + idc); - - $("#name").html($.xml(name)); - space("#latest", $.xml(package.latest), 96); - - $.xhr(capi + 'package/' + idc, 'GET', {}, null, { - success: function (value) { - value = eval(value); - - if (typeof value.notice == "undefined") - $(".notice").addClass("deleted"); - else - $("#notice-src").src(value.notice); - - if (typeof value.rating == "undefined") - $(".rating").addClass("deleted"); - else { - $("#rating-load").addClass("deleted"); - $("#rating-href").href(value.reviews); - - var none = $("#rating-none"); - var done = $("#rating-done"); - - if (value.rating == null) { - none.css("display", "block"); - } else { - done.css("display", "block"); - - $("#rating-value").css('width', 16 * value.rating); - } - } - - if (typeof value.icon != "undefined" && value.icon != null) { - var icon = $("#icon"); - var thumb = $("#thumb"); - - icon[0].className = 'flip-180'; - thumb[0].className = 'flip-360'; - - thumb.css("background-image", 'url("' + value.icon + '")'); - - setTimeout(function () { - icon.addClass("deleted"); - thumb[0].className = 'flip-0'; - }, 2000); - } - }, - - failure: function (status) { - $(".rating").addClass("deleted"); - } - }); - - $("#settings").href("cydia://package/" + idc + "/settings"); - - var mode = package.mode; - if (mode == null) - $(".mode").addClass("deleted"); - else { - $("#mode").html(cydia.localize(mode)); - $("#mode-src").src("Modes/" + mode + ".png"); - } - - var warnings = package.warnings; - var length = warnings == null ? 0 : warnings.length; - if (length == 0) - $(".warnings").addClass("deleted"); - else { - var parent = $("#warnings"); - var child = $("#warning"); - - for (var i = 0; i != length; ++i) { - var clone = child.clone(true); - clone.addClass("inserted"); - parent.append(clone); - clone.xpath("./div/label").html($.xml(warnings[i])); - } - - child.addClass("deleted"); - } - - var applications = package.applications; - var length = applications == null ? 0 : applications.length; - - var child = $("#application"); - - /*if (length != 0) { - var parent = $("#actions"); - - for (var i = 0; i != length; ++i) { - var application = applications[i]; - var clone = child.clone(true); - parent.append(clone); - clone.href("cydia://launch/" + application[0]); - clone.xpath("label").html("Run " + $.xml(application[1])); - clone.xpath("img").src(application[2]); - } - }*/ - - child.addClass("deleted"); - - var commercial = package.hasTag('cydia::commercial'); - if (!commercial) - $(".commercial").addClass("deleted"); - - var _console = package.hasTag('purpose::console'); - if (!_console) - $(".console").addClass("deleted"); - - var author = package.author; - if (author == null) - $(".author").addClass("deleted"); - else { - space("#author", $.xml(author.name), 160); - if (author.address == null) - $("#author-icon").addClass("deleted"); - else if (support == null) - $("#author-href").href("mailto:" + author.address + "?subject=" + regarding("A")); - else - $("#author-href").href(support); - } - - /*var store = commercial; - if (!store) - $(".activation").addClass("deleted"); - else { - var activation = api + 'activation/' + idc; - $("#activation-src").src(activation); - }*/ - - var depiction = package.depiction; - if (depiction != null) { - $(".description").addClass("deleted"); - $("#depiction-src").src(depiction); - } else { - $(".depiction").addClass("deleted"); - - var description = package.longDescription; - if (description == null) - description = package.shortDescription; - - if (description == null) - $(".description").addClass("deleted"); - else { - description = $.xml(description).replace(/\n/g, "
"); - $("#description").html(description); - } - } - - var homepage = package.homepage; - if (homepage == null) - $(".homepage").addClass("deleted"); - else - $("#homepage-href").href(homepage); - - var installed = package.installed; - if (installed == null) - $(".installed").addClass("deleted"); - else { - $("#installed").html($.xml(installed)); - $("#files-href").href("cydia://package/" + idc + "/files"); - } - - space("#id", $.xml(id), 220); - - var section = package.longSection; - if (section == null) - $(".section").addClass("deleted"); - else { - $("#section-src").src("cydia://section-icon/" + encodeURIComponent(section)); - $("#section").html($.xml(section)); - } - - var size = package.size; - if (size == 0) - $(".size").addClass("deleted"); - else - $("#size").html(size / 1024 + " kB"); - - var maintainer = package.maintainer; - if (maintainer == null) - $(".maintainer").addClass("deleted"); - else { - space("#maintainer", $.xml(maintainer.name), 153); - if (maintainer.address == null) - $("#maintainer-icon").addClass("deleted"); - else if (support == null) - $("#maintainer-href").href("mailto:" + maintainer.address + "?subject=" + regarding("M")); - else - $("#maintainer-href").href(support); - } - - var sponsor = package.sponsor; - if (sponsor == null) - $(".sponsor").addClass("deleted"); - else { - space("#sponsor", $.xml(sponsor.name), 152); - $("#sponsor-href").href(sponsor.address); - } - - var source = package.source; - if (source == null) { - $(".source").addClass("deleted"); - $(".trusted").addClass("deleted"); - } else { - var host = source.host; - - $("#source-src").src("cydia://source-icon/" + encodeURIComponent(host)); - $("#source-name").html($.xml(source.name)); - - if (source.trusted) - $("#trusted").href("cydia://package/" + idc + "/signature"); - else - $(".trusted").addClass("deleted"); - - var description = source.description; - if (description == null) - $(".source-description").addClass("deleted"); - else - $("#source-description").html($.xml(description)); - } - - $("body").removeClass("invisible"); -}); diff --git a/MobileCydia.app/packages.png b/MobileCydia.app/packages.png deleted file mode 100644 index 404fe0c..0000000 Binary files a/MobileCydia.app/packages.png and /dev/null differ diff --git a/MobileCydia.app/settings.png b/MobileCydia.app/settings.png deleted file mode 100644 index 86f4e78..0000000 Binary files a/MobileCydia.app/settings.png and /dev/null differ diff --git a/MobileCydia.app/signature.html b/MobileCydia.app/signature.html deleted file mode 100644 index aa113b8..0000000 --- a/MobileCydia.app/signature.html +++ /dev/null @@ -1,16 +0,0 @@ - - - Signature - - - - - - -
-
-
- -
-
-
diff --git a/MobileCydia.app/sources.png b/MobileCydia.app/sources.png deleted file mode 100644 index e8422e4..0000000 Binary files a/MobileCydia.app/sources.png and /dev/null differ diff --git a/MobileCydia.app/star.png b/MobileCydia.app/star.png deleted file mode 100644 index f762a24..0000000 Binary files a/MobileCydia.app/star.png and /dev/null differ diff --git a/MobileCydia.app/storage.html b/MobileCydia.app/storage.html deleted file mode 100644 index 55ac5ab..0000000 --- a/MobileCydia.app/storage.html +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - - - - - - - - - - -
-
-
-
-
-
-
-
-
-
- - -
A small partition used to store iPhone OS. Cydia adds a few important programs and libraries.
- -
-
- - -
-
-
-
-
-
-
-
-
-
- - -
Most content is stored on this partition: from applications (Cydia and Apple) to multimedia.
- -
-
- -
- diff --git a/MobileCydia.app/storage.js b/MobileCydia.app/storage.js deleted file mode 100644 index ae8cb85..0000000 --- a/MobileCydia.app/storage.js +++ /dev/null @@ -1,88 +0,0 @@ -var colors = ["#9090e0", "#4d4d70", "#7d7da0", "#7da0e0", "#d0d0f0", "#7070e0"]; - -var list = function (legend, color, name, value) { - legend.append('
' + - '
' + - '
' + name + ' (' + Math.round(value * 1000) / 10 + '%)
' + - '
'); -}; - -console.log(cydia.statfs("/")); - -var cut = function (parent, color, fraction, z) { - var deg = Math.round(360 * fraction); - if (deg < 2) - deg = 2; - parent.append('
'); -}; - -var chart = function (right, left, slices) { - var total = 0; - for (var i = 0; i != slices.length; ++i) { - var slice = slices[i]; - var z = slices.length - i; - if (slice[1] > 0.5) - cut(right, slice[0], total + 0.5, z); - total += slice[1]; - cut(total > 0.5 ? left : right, slice[0], total, z); - } -}; - -var setup = function (name, root, folders) { - var size = $("#" + name + "-size"); - var statfs = cydia.statfs(root); - var kb = statfs[0] * statfs[1] / 1024; - var total = kb / 1024; - - var unit; - if (total < 1000) - unit = 'M'; - else { - total = total / 1024; - unit = 'G' - } - - size.html(Math.round(total * 10) / 10 + " " + unit); - - var legend = $("#" + name + "-legend"); - var used = 0; - - var slices = []; - - if (folders != null) - for (var i = 0; i != folders.length; ++i) { - var folder = folders[i]; - var usage = cydia.du(folder[1]); - if (usage == null) - usage = 0; - var color = colors[i + 2]; - var percent = usage / kb; - list(legend, color, folder[0], percent); - slices.push([color, percent]); - used += usage; - } - - var free = statfs[0] * statfs[2] / 1024; - var other = (kb - free - used) / kb; - - slices.push([colors[0], other]); - chart($("#" + name + "-right"), $("#" + name + "-left"), slices); - - list(legend, colors[0], folders == null ? "Used" : "Other", other); - list(legend, colors[1], "Free", statfs[2] / statfs[1]); -}; - -$(function () { - setup("system", "/", null); - - setup("private", "/private/var", [ - ["Themes", "/Library/Themes/"], - ["iTunes", "/var/mobile/Media/iTunes_Control/"], - ["App Store", "/var/mobile/Applications/"], - ["Camera", "/var/mobile/Media/DCIM/"] - ]); -}); diff --git a/MobileCydia.app/storage.png b/MobileCydia.app/storage.png deleted file mode 100644 index 3cefef0..0000000 Binary files a/MobileCydia.app/storage.png and /dev/null differ diff --git a/MobileCydia.app/trusted.png b/MobileCydia.app/trusted.png deleted file mode 100644 index de249eb..0000000 Binary files a/MobileCydia.app/trusted.png and /dev/null differ diff --git a/MobileCydia.app/version.png b/MobileCydia.app/version.png deleted file mode 100644 index fd1eec1..0000000 Binary files a/MobileCydia.app/version.png and /dev/null differ diff --git a/MobileCydia.app/warning.png b/MobileCydia.app/warning.png deleted file mode 100644 index 8d3e5df..0000000 Binary files a/MobileCydia.app/warning.png and /dev/null differ diff --git a/MobileCydia.app/web.png b/MobileCydia.app/web.png deleted file mode 100644 index a4f04e3..0000000 Binary files a/MobileCydia.app/web.png and /dev/null differ diff --git a/MobileCydia.mm b/MobileCydia.mm index b809c80..4277e57 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -5508,7 +5508,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { if ((self = [super init]) != nil) { database_ = database; buttons_ = [[NSMutableArray alloc] initWithCapacity:4]; - [self loadURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"package" ofType:@"html"]]]; + [self loadURL:[NSURL URLWithString:CydiaURL(@"ui/package/")]]; } return self; } @@ -6011,7 +6011,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { - (id) init { if ((self = [super init]) != nil) { - [self loadURL:[NSURL URLWithString:CydiaURL(@"")]]; + [self loadURL:[NSURL URLWithString:CydiaURL(@"ui/home/")]]; [[self navigationItem] setLeftBarButtonItem:[[[UIBarButtonItem alloc] initWithTitle:UCLocalize("ABOUT") @@ -6037,7 +6037,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { if ((self = [super init]) != nil) { [[self navigationItem] setTitle:UCLocalize("MANAGE")]; - [self loadURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"manage" ofType:@"html"]]]; + [self loadURL:[NSURL URLWithString:CydiaURL(@"ui/manage/")]]; [[self navigationItem] setLeftBarButtonItem:[[[UIBarButtonItem alloc] initWithTitle:UCLocalize("SETTINGS") @@ -8765,11 +8765,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { controller = [[[CYBrowserController alloc] init] autorelease]; [(CYBrowserController *)controller loadURL:[NSURL URLWithString:destination]]; } else if ([components count] == 1) { - if ([base isEqualToString:@"storage"]) { - controller = [[[CYBrowserController alloc] init] autorelease]; - [(CYBrowserController *)controller loadURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"storage" ofType:@"html"]]]; - } - if ([base isEqualToString:@"sources"]) { controller = [[[SourcesController alloc] initWithDatabase:database_] autorelease]; } -- cgit v1.2.3