added hub silo to list / create lists
This commit is contained in:
Родитель
086000d7ed
Коммит
7ef50f0ec7
|
@ -1205,11 +1205,11 @@ module TDev.Browser {
|
|||
this.hide();
|
||||
if (s == "recent") this.browser().showList("installed-scripts", item);
|
||||
else if (s == "myart") {
|
||||
if (Cloud.getUserId())
|
||||
this.browser().showList("myart", item);
|
||||
if (Cloud.getUserId()) this.browser().showList("myart", item);
|
||||
} else if (s == "art") this.browser().showList("art", item);
|
||||
else if (s == "social") this.browser().showList("groups", item);
|
||||
else if (s == "users") this.browser().showList("users", item);
|
||||
else if (s == "lists") this.browser().showList("lists", item);
|
||||
else this.browser().showList(s + "-scripts", item);
|
||||
});
|
||||
elements.push(t);
|
||||
|
@ -1305,17 +1305,24 @@ module TDev.Browser {
|
|||
addFnBtn(lf("Upload Sound"), Ticks.hubUploadSound, () => { ArtUtil.uploadSoundDialogAsync().done() }, true);
|
||||
}
|
||||
else if (s == "social") {
|
||||
addFnBtn(lf("All my groups"), Ticks.hubSeeMoreGroups, () => { this.hide(); this.browser().showList("mygroups", null) });
|
||||
elements.peek().appendChild(div("hubTileSearch", HTML.mkImg("svg:search,white")));
|
||||
addFnBtn(lf("All my groups"), Ticks.hubSeeMoreGroups,() => { this.hide(); this.browser().showList("mygroups", null) });
|
||||
elements.peek().appendChild(div("hubTileSearch", HTML.mkImg("svg:search,white")));
|
||||
|
||||
if (!this.isBeginner()) {
|
||||
elements.push(this.smallBtn(lf("Users"), () => { this.hide(); this.browser().showList("users", null) }, Ticks.hubSeeMoreUsers));
|
||||
elements.push(this.smallBtn(lf("Give feedback Contact us"), () => { Editor.showFeedbackBox() }, Ticks.hubFeedback));
|
||||
elements.push(this.smallBtn(lf("Join Group"), () => { this.joinGroup() }, Ticks.hubJoinGroup));
|
||||
elements.push(this.smallBtn(lf("Create Group"), () => { this.createGroup() }, Ticks.hubCreateGroup));
|
||||
} else {
|
||||
elements.push(this.mkFnBtn(lf("Join Group"), () => { this.joinGroup() }, Ticks.hubJoinGroup));
|
||||
}
|
||||
if (!this.isBeginner()) {
|
||||
elements.push(this.smallBtn(lf("Users"),() => { this.hide(); this.browser().showList("users", null) }, Ticks.hubSeeMoreUsers));
|
||||
elements.push(this.smallBtn(lf("Give feedback Contact us"),() => { Editor.showFeedbackBox() }, Ticks.hubFeedback));
|
||||
elements.push(this.smallBtn(lf("Join Group"),() => { this.joinGroup() }, Ticks.hubJoinGroup));
|
||||
elements.push(this.smallBtn(lf("Create Group"),() => { this.createGroup() }, Ticks.hubCreateGroup));
|
||||
} else {
|
||||
elements.push(this.mkFnBtn(lf("Join Group"),() => { this.joinGroup() }, Ticks.hubJoinGroup));
|
||||
}
|
||||
} else if (s == "lists") {
|
||||
addFnBtn(lf("See More"), Ticks.hubSeeMoreLists,
|
||||
() => { this.hide(); this.browser().showList("lists", null) });
|
||||
elements.peek().appendChild(div("hubTileSearch", HTML.mkImg("svg:search,white")));
|
||||
addFnBtn(lf("Create list"), Ticks.hubCreateList,
|
||||
() => { this.createList(); });
|
||||
elements.peek().appendChild(div("hubTileSearch", HTML.mkImg("svg:script,white")));
|
||||
} else {
|
||||
//if (items.length > 5)
|
||||
// there is almost always more; the list will filter by capabilities, so it may seem short
|
||||
|
@ -1330,11 +1337,6 @@ module TDev.Browser {
|
|||
addFnBtn(lf("New Scripts"), Ticks.hubSeeMoreNewScripts,
|
||||
() => { this.hide(); this.browser().showList("new-scripts", null) });
|
||||
elements.peek().appendChild(div("hubTileSearch", HTML.mkImg("svg:star,white")));
|
||||
if (Cloud.lite) {
|
||||
addFnBtn(lf("Create list"), Ticks.hubCreateList,
|
||||
() => { this.createList(); });
|
||||
elements.peek().appendChild(div("hubTileSearch", HTML.mkImg("svg:script,white")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2146,6 +2148,7 @@ module TDev.Browser {
|
|||
}
|
||||
if (Cloud.lite) {
|
||||
delete sects["tags"];
|
||||
sects["lists"] = lf("lists")
|
||||
}
|
||||
|
||||
if (SizeMgr.portraitMode) {
|
||||
|
@ -2272,6 +2275,12 @@ module TDev.Browser {
|
|||
else
|
||||
this.addPageTiles(s, c, []);
|
||||
}
|
||||
else if (s == "lists") {
|
||||
if (Cloud.getUserId())
|
||||
this.browser().getLocationList(Cloud.getUserId() + "/lists?count=6",(items, cont) => this.addPageTiles(s, c, items));
|
||||
else
|
||||
this.addPageTiles(s, c, []);
|
||||
}
|
||||
else
|
||||
this.browser().getLocationList(s + "-scripts", (items, cont) => this.addPageTiles(s, c, items));
|
||||
});
|
||||
|
|
|
@ -1395,7 +1395,10 @@
|
|||
tick(Ticks.browseListUsers);
|
||||
header = lf("users");
|
||||
break;
|
||||
|
||||
case "lists":
|
||||
tick(Ticks.browseListLists);
|
||||
header = lf("lists");
|
||||
break;
|
||||
default:
|
||||
if (/^bugs\//.test(path)) {
|
||||
tick(Ticks.browseListBugs);
|
||||
|
@ -5925,11 +5928,12 @@
|
|||
//nums.style.background = this.app.htmlColor();
|
||||
|
||||
var smallIcon = div("hubTileSmallIcon");
|
||||
var bigIcon = div("hubTileScreenShot");
|
||||
var bigIcon = null;
|
||||
|
||||
var ss = this.jsonScript.screenshotthumburl || ArtUtil.artUrl(this.app.iconArtId);
|
||||
if (ss && !Browser.lowMemory) {
|
||||
ss = ss.replace(/\/thumb\//, "/pub/");
|
||||
bigIcon = div("hubTileScreenShot");
|
||||
bigIcon.style.backgroundImage = HTML.cssImage(ss);
|
||||
bigIcon.style.backgroundRepeat = 'no-repeat';
|
||||
bigIcon.style.backgroundPosition = 'center';
|
||||
|
@ -9245,7 +9249,7 @@
|
|||
this.publicId = id;
|
||||
}
|
||||
|
||||
public mkBoxCore(big: boolean) {
|
||||
public mkBoxCore(big: boolean) : HTMLElement {
|
||||
var icon = div("sdIcon", HTML.mkImg("svg:script,white"));
|
||||
icon.style.background = "#1731B8";
|
||||
var nameBlock = div("sdName");
|
||||
|
@ -9269,7 +9273,7 @@
|
|||
return this.withUpdate(res,(u: JsonPubList) => {
|
||||
this.json = u;
|
||||
if (u.pictureid && !Browser.lowMemory) {
|
||||
icon.style.backgroundImage = HTML.cssImage('https://az31353.vo.msecnd.net/pub/' + u.pictureid);
|
||||
icon.style.backgroundImage = HTML.cssImage(ArtUtil.artUrl(u.pictureid));
|
||||
icon.style.backgroundRepeat = 'no-repeat';
|
||||
icon.style.backgroundPosition = 'center';
|
||||
icon.style.backgroundSize = 'contain';
|
||||
|
@ -9281,6 +9285,49 @@
|
|||
});
|
||||
}
|
||||
|
||||
public mkTile(sz: number) : HTMLElement {
|
||||
var d = div("hubTile hubTileSize" + sz);
|
||||
d.style.background = "#1731B8";
|
||||
return this.withUpdate(d, (u: JsonPubList) => {
|
||||
this.json = u;
|
||||
|
||||
var cont = [];
|
||||
var addNum = (n: number, sym: string) => { cont.push(ScriptInfo.mkNum(n, sym)) }
|
||||
addNum(this.json.positivereviews, "♥");
|
||||
if (sz > 1) {
|
||||
addNum(this.json.comments, "✉");
|
||||
}
|
||||
|
||||
var nums = div("hubTileNumbers", cont, div("hubTileNumbersOverlay"));
|
||||
//nums.style.background = this.app.htmlColor();
|
||||
|
||||
var smallIcon = div("hubTileSmallIcon");
|
||||
var bigIcon = null;
|
||||
|
||||
if (this.json.pictureid && !Browser.lowMemory) {
|
||||
bigIcon = div("hubTileScreenShot");
|
||||
bigIcon.style.backgroundImage = HTML.cssImage(ArtUtil.artUrl(this.json.pictureid));
|
||||
bigIcon.style.backgroundRepeat = 'no-repeat';
|
||||
bigIcon.style.backgroundPosition = 'center';
|
||||
bigIcon.style.backgroundSize = 'cover';
|
||||
smallIcon.setChildren([HTML.mkImg("svg:script")]);
|
||||
smallIcon.style.background = "#1731B8";
|
||||
}
|
||||
|
||||
d.setChildren([div("hubTileIcon", HTML.mkImg("svg:script,white")),
|
||||
bigIcon,
|
||||
smallIcon,
|
||||
div("hubTileTitleBar",
|
||||
div("hubTileTitle", spanDirAuto(this.json.name)),
|
||||
div("hubTileSubtitle",
|
||||
div("hubTileAuthor", spanDirAuto(this.json.username), nums)))])
|
||||
});
|
||||
}
|
||||
|
||||
public mkTabsCore(): BrowserTab[]{
|
||||
return [this];
|
||||
}
|
||||
|
||||
public initTab() {
|
||||
// TODO: display scripts
|
||||
}
|
||||
|
|
|
@ -371,6 +371,7 @@ module TDev {
|
|||
hubSeeMoreDocs,
|
||||
hubSeeMoreCloud,
|
||||
hubSeeMoreGroups,
|
||||
hubSeeMoreLists,
|
||||
hubMyScriptsShowcase,
|
||||
hubMyScriptsTemplate,
|
||||
hubNotifications,
|
||||
|
@ -440,6 +441,7 @@ module TDev {
|
|||
browseListTags,
|
||||
browseListSearch,
|
||||
browseListUsers,
|
||||
browseListLists,
|
||||
browseFollowTopic,
|
||||
|
||||
introSlideGetStarted,
|
||||
|
|
Загрузка…
Ссылка в новой задаче