@nebularstreams/statify 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.DS_Store +0 -0
- package/dist/website.simple/webfonts/fa-brands-400.woff2 +0 -0
- package/dist/website.simple/webfonts/fa-solid-900.eot +0 -0
- package/dist/website.simple/webfonts/fa-solid-900.svg +4649 -0
- package/dist/website.simple/webfonts/fa-solid-900.ttf +0 -0
- package/dist/website.simple/webfonts/fa-solid-900.woff +0 -0
- package/dist/website.simple/webfonts/fa-solid-900.woff2 +0 -0
- package/dist/website.simple/website.css +32 -0
- package/dist/website.simple/website.min.js +6 -0
- package/dist/website.software/webfonts/fa-brands-400.woff2 +0 -0
- package/dist/website.software/webfonts/fa-solid-900.eot +0 -0
- package/dist/website.software/webfonts/fa-solid-900.svg +4649 -0
- package/dist/website.software/webfonts/fa-solid-900.ttf +0 -0
- package/dist/website.software/webfonts/fa-solid-900.woff +0 -0
- package/dist/website.software/webfonts/fa-solid-900.woff2 +0 -0
- package/dist/website.software/website.css +32 -0
- package/dist/website.software/website.min.js +6 -0
- package/dist/website.worlds/webfonts/fa-brands-400.woff2 +0 -0
- package/dist/website.worlds/webfonts/fa-solid-900.eot +0 -0
- package/dist/website.worlds/webfonts/fa-solid-900.svg +4649 -0
- package/dist/website.worlds/webfonts/fa-solid-900.ttf +0 -0
- package/dist/website.worlds/webfonts/fa-solid-900.woff +0 -0
- package/dist/website.worlds/webfonts/fa-solid-900.woff2 +0 -0
- package/dist/website.worlds/website.css +32 -0
- package/dist/website.worlds/website.min.js +6 -0
- package/package.json +49 -0
- package/readme.md +105 -0
- package/src/publisher-lib.js +179 -0
- package/src/publisher-list.js +91 -0
- package/src/publisher.js +38 -0
- package/src/util/cdn/nobj.cdn.js +88 -0
- package/src/util/htmlroute.js +39 -0
- package/src/util/markdown/lib.showdown.icon.js +62 -0
- package/src/util/markdown/lib.showdown.yt.js +54 -0
- package/src/util/markdown/markdown.js +144 -0
- package/src/util/navibar/util.navibar.js +63 -0
- package/src/util/sha.js +20 -0
- package/src/util/tokenizer.js +234 -0
- package/src/util/widgets/NoticeWidget.js +30 -0
- package/src/util/widgets/app.widgets.js +70 -0
- package/src/util/widgets/util.definewidget.js +14 -0
- package/src/widgets/Cookies.js +55 -0
- package/src/widgets/Frameset-simple.js +114 -0
- package/src/widgets/Frameset.js +124 -0
- package/src/widgets/Page.js +356 -0
- package/src/widgets/RightSide.js +93 -0
- package/src/widgets/Snippets.js +75 -0
- package/src/widgets/Tail.js +11 -0
- package/src/widgets/Widgets.js +10 -0
- package/src/widgets.client/Client.js +22 -0
- package/src/widgets.features/FeatureList.js +364 -0
- package/src/widgets.features/Youtube.js +23 -0
- package/src/widgets.features/bootcol.js +29 -0
- package/src/widgets.features/css/feature.css +112 -0
- package/src/widgets.features/css/tail.css +4 -0
- package/src/widgets.howto/Faq.js +201 -0
- package/src/widgets.howto/HowTo.js +419 -0
- package/src/widgets.howto/Tiles.js +51 -0
- package/src/widgets.howto/script-contractable.js +31 -0
- package/src/widgets.markdown/Document.js +84 -0
- package/src/widgets.market/MarketItem.js +278 -0
- package/src/widgets.market/MarketItem.orig.js +268 -0
- package/src/widgets.market/MarketItem.strips.js +276 -0
- package/src/widgets.market/StoryLicenseWIdget.js +45 -0
- package/src/widgets.market/app.utils.js +238 -0
- package/src.website/css/app/animations.css +27 -0
- package/src.website/css/app/ismobile.css +7 -0
- package/src.website/css/app/style.css +51 -0
- package/src.website/css/app/style.fullheight.css +9 -0
- package/src.website/css/app/style.mdblocks.css +59 -0
- package/src.website/css/app/style.putosafari.css +3 -0
- package/src.website/css/bootstrap/bootstrap-tiny-core.css +47 -0
- package/src.website/css/bootstrap/bootstrap-tiny-media-columns.css +1276 -0
- package/src.website/css/bootstrap/bootstrap-tiny-media-custom.css +59 -0
- package/src.website/css/bootstrap/bootstrap-tiny-media-display.css +279 -0
- package/src.website/css/bootstrap/bootstrap-tiny-media-flex.css +881 -0
- package/src.website/css/bootstrap/bootstrap-tiny-media-fonts.css +39 -0
- package/src.website/css/bootstrap/bootstrap-tiny-media-paddings.css +1348 -0
- package/src.website/css/css-core/core.ext.css +65 -0
- package/src.website/css/css-core/frontpage.css +28 -0
- package/src.website/css/css-core/root.css +34 -0
- package/src.website/css/css-core/root.fullheight.css +12 -0
- package/src.website/css/css-core/ui.dialog.round.css +14 -0
- package/src.website/css/css-core/ui.navibar.css +28 -0
- package/src.website/css/css-core/ui.notifications.css +12 -0
- package/src.website/css/css-featurelist/feature.css +196 -0
- package/src.website/css/css-featurelist/tail.css +4 -0
- package/src.website/css/css-screens/doc.css +22 -0
- package/src.website/css/css-screens/screens-meta.css +3 -0
- package/src.website/css/css-unsplash/unsplash.css +32 -0
- package/src.website/css/css-videos/youtube.css +28 -0
- package/src.website/css/css-wiki/wiki.css +206 -0
- package/src.website/css/css-wiki/wiki.sidepane.css +16 -0
- package/src.website/css/fontawesome/fa-brands.css +18 -0
- package/src.website/css/fontawesome/fa-solid.css +16 -0
- package/src.website/css/fontawesome/fa.css +4359 -0
- package/src.website/css/skin/mierda.css +15 -0
- package/src.website/css/skin/skin.dark.css +85 -0
- package/src.website/css/skin/skin.light.css +27 -0
- package/src.website/css/skin/vars.font.css +8 -0
- package/src.website/css/skin/vars.sizes.css +4 -0
- package/src.website/package-lock.json +2160 -0
- package/src.website/package.json +28 -0
- package/src.website/public/webfonts/fa-brands-400.woff2 +0 -0
- package/src.website/public/webfonts/fa-solid-900.eot +0 -0
- package/src.website/public/webfonts/fa-solid-900.svg +4649 -0
- package/src.website/public/webfonts/fa-solid-900.ttf +0 -0
- package/src.website/public/webfonts/fa-solid-900.woff +0 -0
- package/src.website/public/webfonts/fa-solid-900.woff2 +0 -0
- package/src.website/rollup.simple.mjs +36 -0
- package/src.website/rollup.software.mjs +36 -0
- package/src.website/rollup.terser.mjs +24 -0
- package/src.website/rollup.worlds.mjs +36 -0
- package/src.website/src/app/app.style.mjs +36 -0
- package/src.website/src/app/index.mjs +118 -0
- package/src.website/src/config.js +8 -0
- package/src.website/src/core/cdnmodel.mjs +7 -0
- package/src.website/src/core/clientruntime.mjs +41 -0
- package/src.website/src/core.cookies/analytics.mjs +96 -0
- package/src.website/src/core.cookies/cookiemanager.mjs +128 -0
- package/src.website/src/core.cookies/css/cookies.css +80 -0
- package/src.website/src/core.cookies/css/nocookies.css +48 -0
- package/src.website/src/core.extra/css/contractable.css +12 -0
- package/src.website/src/core.extra/css/faq.css +42 -0
- package/src.website/src/core.extra/css/howto.css +81 -0
- package/src.website/src/core.extra/extra.document.mjs +83 -0
- package/src.website/src/core.extra/extra.faq.mjs +30 -0
- package/src.website/src/core.extra/extra.mjs +62 -0
- package/src.website/src/main.simple.mjs +4 -0
- package/src.website/src/main.software.mjs +10 -0
- package/src.website/src/main.worlds.mjs +9 -0
- package/src.website/src/support/ismobile.mjs +4 -0
- package/src.website/src/support/nonce.mjs +4 -0
- package/src.website/src/support/persistsettings.mjs +41 -0
- package/src.website/src/support/qrcode.mjs +1269 -0
- package/src.website/src/support/timeutils.mjs +237 -0
- package/src.website/src/widgets/index.mjs +22 -0
- package/src.website/src.widgets/widgets.market/index.mjs +11 -0
- package/src.website/src.widgets/widgets.market/widgets/market/DiscoverWidget.mjs +401 -0
- package/src.website/src.widgets/widgets.market/widgets/market/EmptyNew.mjs +28 -0
- package/src.website/src.widgets/widgets.market/widgets/market/MarketDetail.mjs +78 -0
- package/src.website/src.widgets/widgets.market/widgets/market/MarketItem.mjs +349 -0
- package/src.website/src.widgets/widgets.market/widgets/market/MarketWidget.mjs +437 -0
- package/src.website/src.widgets/widgets.market/widgets/market/StoryLicenseWidget.mjs +34 -0
- package/src.website/src.widgets/widgets.market/widgets/market/css/market.css +394 -0
- package/src.website/src.widgets/widgets.market/widgets/market/css/notice.css +6 -0
- package/src.website/src.widgets/widgets.market/widgets/navibar/NaviBarWidget.mjs +58 -0
- package/src.website/src.widgets/widgets.market/widgets/navibar/css/titlebar.css +68 -0
- package/src.website/src.widgets/widgets.market/widgets/navibar/css/ui.navibar.css +28 -0
- package/src.website/src.widgets/widgets.software/index.mjs +9 -0
- package/src.website/src.widgets/widgets.software/widgets/BootStrapColumnWidget.mjs +17 -0
- package/src.website/src.widgets/widgets.software/widgets/DownloadWidget.mjs +210 -0
- package/src.website/src.widgets/widgets.software/widgets/LicenseWidget.js +103 -0
- package/src.website/src.widgets/widgets.software/widgets/css/download/download.css +110 -0
- package/src.website/src.widgets/widgets.software/widgets/css/license/beta.css +28 -0
- package/src.website/src.widgets/widgets.software/widgets/css/license/button.css +30 -0
- package/src.website/src.widgets/widgets.software/widgets/css/license/front.css +46 -0
- package/src.website/src.widgets/widgets.software/widgets/css/license/licenses.css +13 -0
- package/src.website/src.widgets/widgets.software/widgets/css/license/overstate.css +15 -0
- package/src.website/src.widgets/widgets.software/widgets/css/license/story.css +8 -0
- package/src.website/src.widgets/widgets.software/widgets/css/license/toolbar.css +9 -0
- package/src.website/src.widgets/widgets.software/widgets/support/version.mjs +88 -0
- package/src.website/src.widgets/widgets.worlds/index.mjs +11 -0
- package/src.website/src.widgets/widgets.worlds/widgets/LocalBrowser.mjs +386 -0
- package/src.website/src.widgets/widgets.worlds/widgets/LocalLauncher.code.mjs +247 -0
- package/src.website/src.widgets/widgets.worlds/widgets/LocalLauncher.mjs +239 -0
- package/src.website/src.widgets/widgets.worlds/widgets/css/input.css +32 -0
- package/src.website/src.widgets/widgets.worlds/widgets/css/localprojects.css +188 -0
- package/templates/documentation/assets/docs.css +7 -0
- package/templates/documentation/assets/images/right.webp +0 -0
- package/templates/documentation/images.json +12 -0
- package/templates/documentation/metadata.json +120 -0
- package/templates/documentation/pages/cookies.md +25 -0
- package/templates/documentation/pages/index.md +13 -0
- package/templates/documentation/pages/privacy.md +50 -0
- package/templates/documentation/pages/tos.md +49 -0
- package/templates/landing/assets/res/carousel/image-1.webp +0 -0
- package/templates/landing/assets/res/carousel/image-2.webp +0 -0
- package/templates/landing/assets/res/carousel/image-3.webp +0 -0
- package/templates/landing/assets/res/custom.css +122 -0
- package/templates/landing/assets/res/logos/favicon.ico +0 -0
- package/templates/landing/assets/res/logos/favicon.png +0 -0
- package/templates/landing/assets/res/logos/logo.medallion.png +0 -0
- package/templates/landing/assets/res/logos/logo.white.png +0 -0
- package/templates/landing/assets/res/proj/banda-tech-client.webp +0 -0
- package/templates/landing/assets/res/proj/banda-tech-server.webp +0 -0
- package/templates/landing/assets/res/proj/proj-common-ground.webp +0 -0
- package/templates/landing/assets/res/proj/proj-fieldnote.webp +0 -0
- package/templates/landing/assets/res/proj/proj-tribes.webp +0 -0
- package/templates/landing/images.json +932 -0
- package/templates/landing/metadata.json +115 -0
- package/templates/landing/pages/index.json +268 -0
- package/tool/cli.js +183 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import m from "mithril";
|
|
2
|
+
import {defineWidget, Empty, Icon} from "@nebularstreams/libmui";
|
|
3
|
+
import {TemplateInstall} from "./MarketItem.mjs";
|
|
4
|
+
import NaviBarWidget from "../navibar/NaviBarWidget.mjs";
|
|
5
|
+
|
|
6
|
+
import {stag} from "../../../../src/core.cookies/analytics.mjs";
|
|
7
|
+
import CdnModel from "../../../../src/core/cdnmodel.mjs";
|
|
8
|
+
|
|
9
|
+
const
|
|
10
|
+
{channel} = CdnModel,
|
|
11
|
+
{entityPath} = channel,
|
|
12
|
+
|
|
13
|
+
DEFAULT_TYPE = "template";
|
|
14
|
+
|
|
15
|
+
function getItemTitle(item) {
|
|
16
|
+
const a = item.id.split("-");
|
|
17
|
+
if (a.length === 1) return a;
|
|
18
|
+
a.shift();
|
|
19
|
+
return a.join(" ");
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
const MarketDetailsWidget = defineWidget(
|
|
24
|
+
({attrs, state}) => m(".market.flexcol.ohidden.fullheight", [
|
|
25
|
+
m(NaviBarWidget, {
|
|
26
|
+
class: "bg-window-hi unitheight titlebar",
|
|
27
|
+
state: attrs.state
|
|
28
|
+
}, [
|
|
29
|
+
m(m.route.Link, {href: attrs.type === "template" ? "market" : "addons"}, "Market"),
|
|
30
|
+
...state.item
|
|
31
|
+
? [
|
|
32
|
+
m(Icon, {icon: "caret-right"}),
|
|
33
|
+
m(".currpage", getItemTitle(state.item))
|
|
34
|
+
] : []
|
|
35
|
+
]),
|
|
36
|
+
state.empty || state.loading
|
|
37
|
+
? m(Empty, {
|
|
38
|
+
icon: state.loading ? "sync.fa-spin" : attrs.icon,
|
|
39
|
+
size: 2,
|
|
40
|
+
message: attrs.message
|
|
41
|
+
})
|
|
42
|
+
: m(TemplateInstall, {
|
|
43
|
+
item: state.item,
|
|
44
|
+
onCancel: () => {
|
|
45
|
+
m.route.set("/market");
|
|
46
|
+
}
|
|
47
|
+
})
|
|
48
|
+
]),
|
|
49
|
+
({attrs, state}) => {
|
|
50
|
+
|
|
51
|
+
const
|
|
52
|
+
url = entityPath(attrs.id_channel, attrs.type || DEFAULT_TYPE, attrs.id);
|
|
53
|
+
|
|
54
|
+
state.loading = true;
|
|
55
|
+
m.request({url})
|
|
56
|
+
.then((data) => {
|
|
57
|
+
state.item = data;
|
|
58
|
+
state.loading = false;
|
|
59
|
+
m.redraw();
|
|
60
|
+
stag("Market-Details", {
|
|
61
|
+
event: "select_item",
|
|
62
|
+
props: {
|
|
63
|
+
item_id: attrs.id,
|
|
64
|
+
item_type: attrs.type || DEFAULT_TYPE,
|
|
65
|
+
item_channel: attrs.id_channel
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
})
|
|
69
|
+
.catch((e) => {
|
|
70
|
+
state.item = null;
|
|
71
|
+
state.error = e;
|
|
72
|
+
state.loading = false;
|
|
73
|
+
m.redraw();
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
export default MarketDetailsWidget;
|
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
import m from "mithril";
|
|
2
|
+
import {defineWidget, ButtonNew, Icon} from "@nebularstreams/libmui";
|
|
3
|
+
import StoryLicenseWidget from "./StoryLicenseWidget.mjs";
|
|
4
|
+
|
|
5
|
+
import isMobile from "../../../../src/support/ismobile.mjs";
|
|
6
|
+
import TimeUtils from "../../../../src/support/timeutils.mjs";
|
|
7
|
+
import CdnModel from "../../../../src/core/cdnmodel.mjs"
|
|
8
|
+
import {stag} from "../../../../src/core.cookies/analytics.mjs";
|
|
9
|
+
import {hasThirdParty} from "../../../../src/core.cookies/cookiemanager.mjs";
|
|
10
|
+
|
|
11
|
+
const
|
|
12
|
+
ObjectAssign = Object.assign,
|
|
13
|
+
{ channel } = CdnModel,
|
|
14
|
+
{ entityPath, path } = channel,
|
|
15
|
+
|
|
16
|
+
DOWNLOADED = {};
|
|
17
|
+
|
|
18
|
+
function getYouTubeImage(ref) {
|
|
19
|
+
return `https://i3.ytimg.com/vi/${ref}/hqdefault.jpg`;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const
|
|
23
|
+
|
|
24
|
+
YouTubeVideo = defineWidget(
|
|
25
|
+
({ attrs }) => m(
|
|
26
|
+
".ytwrapper.absolute",
|
|
27
|
+
{ class: "ytvideo w-100 h-100" + (attrs.class || "") },
|
|
28
|
+
m("iframe", {
|
|
29
|
+
class: "absolute w-100 h-100",
|
|
30
|
+
src: `https://www.youtube.com/embed/${attrs.ytref}?rel=0&modestbranding=1`,
|
|
31
|
+
allow: "encrypted-media; picture-in-picture",
|
|
32
|
+
allowfullscreen: true
|
|
33
|
+
})
|
|
34
|
+
)
|
|
35
|
+
),
|
|
36
|
+
|
|
37
|
+
Attributions = defineWidget(
|
|
38
|
+
({ attrs }) => {
|
|
39
|
+
|
|
40
|
+
const
|
|
41
|
+
{ attributions } = attrs,
|
|
42
|
+
sources = {};
|
|
43
|
+
|
|
44
|
+
attributions.reduce((all, item) => {
|
|
45
|
+
sources[item.source] = true;
|
|
46
|
+
return all;
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
return [
|
|
50
|
+
m(
|
|
51
|
+
".flexcol.attribution.pad-3.pad-v.bg-accent-hi",
|
|
52
|
+
m("h2", "Content Attribution"),
|
|
53
|
+
m("div", "Template references or includes resources from " + (Object.keys(sources)
|
|
54
|
+
.join(", ")))
|
|
55
|
+
),
|
|
56
|
+
m(StoryLicenseWidget, { attributions })
|
|
57
|
+
];
|
|
58
|
+
}
|
|
59
|
+
),
|
|
60
|
+
|
|
61
|
+
Strip = defineWidget(
|
|
62
|
+
({ attrs }) => {
|
|
63
|
+
const
|
|
64
|
+
{
|
|
65
|
+
item, scenes, max, state, label, itemType = "Scene"
|
|
66
|
+
} = attrs,
|
|
67
|
+
{ id_channel, type, id } = item;
|
|
68
|
+
|
|
69
|
+
return m(
|
|
70
|
+
"ul.scenesel.flexrow",
|
|
71
|
+
{
|
|
72
|
+
class: max > 5 ? "wrap" : "",
|
|
73
|
+
"aria-label": label || "List of Items"
|
|
74
|
+
},
|
|
75
|
+
scenes.map(
|
|
76
|
+
({ title, image }, index) => (
|
|
77
|
+
index < max
|
|
78
|
+
? m(
|
|
79
|
+
"li.thumbnail.flexcol",
|
|
80
|
+
{
|
|
81
|
+
title: title || (itemType + " " + index),
|
|
82
|
+
class: state.image === image ? "current" : "",
|
|
83
|
+
"data-type": itemType,
|
|
84
|
+
"data-title": title
|
|
85
|
+
? title.split("-")
|
|
86
|
+
.join(" ")
|
|
87
|
+
: (itemType + " " + index)
|
|
88
|
+
},
|
|
89
|
+
m("img", {
|
|
90
|
+
class: "errorimage",
|
|
91
|
+
onerror: (e) => {
|
|
92
|
+
e.target.parentNode.style.display = "none";
|
|
93
|
+
},
|
|
94
|
+
onclick: () => {
|
|
95
|
+
if (state.image === image) {
|
|
96
|
+
delete state.image;
|
|
97
|
+
} else {
|
|
98
|
+
state.image = image;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
m.redraw();
|
|
102
|
+
},
|
|
103
|
+
src: entityPath(id_channel, type, id, image, attrs.shortPath),
|
|
104
|
+
alt: itemType + " " + title
|
|
105
|
+
})
|
|
106
|
+
)
|
|
107
|
+
: m(".d-none", { role: "presentation" }))
|
|
108
|
+
)
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
),
|
|
112
|
+
|
|
113
|
+
TemplateItem = defineWidget(
|
|
114
|
+
({ attrs, state }) => {
|
|
115
|
+
|
|
116
|
+
const
|
|
117
|
+
ICONS = {
|
|
118
|
+
template: "star",
|
|
119
|
+
accessory: "fan",
|
|
120
|
+
tatoo: "mask",
|
|
121
|
+
"3d": "cube",
|
|
122
|
+
facekit: "theater-masks",
|
|
123
|
+
room: "border-none"
|
|
124
|
+
},
|
|
125
|
+
{ item, scenes, templates, maximized, innerClass = "bg-window-hi", titleClass = "", noTitleIcon, noTitleChannel } = attrs,
|
|
126
|
+
{ ext, id_channel, type, id, creationTime, meta } = item,
|
|
127
|
+
{ title = id, description = "legacy story", ytref, image } = (meta || {}),
|
|
128
|
+
{ icon = ICONS[type] } = ext,
|
|
129
|
+
imageEntity = ytref
|
|
130
|
+
? getYouTubeImage(ytref)
|
|
131
|
+
: image || entityPath(id_channel, type, id, state.image || (attrs.shortPath ? "meta/logo.jpg" : "logo.jpg"), attrs.shortPath);
|
|
132
|
+
|
|
133
|
+
return m(
|
|
134
|
+
"li.templateitem.flexcol.pointer.grows.ohidden",
|
|
135
|
+
{
|
|
136
|
+
class: attrs.class,
|
|
137
|
+
"aria-label": title
|
|
138
|
+
},
|
|
139
|
+
m(
|
|
140
|
+
".inner.flexcol.pointer.relative.ohidden",
|
|
141
|
+
{ onclick: attrs.onclick, class: innerClass },
|
|
142
|
+
[
|
|
143
|
+
...state.error
|
|
144
|
+
? []
|
|
145
|
+
: [
|
|
146
|
+
m(
|
|
147
|
+
".image.divimage.relative.img169.coverimage",
|
|
148
|
+
{
|
|
149
|
+
class: attrs.imageClass || "asp169",
|
|
150
|
+
...(!maximized || state.image || !ytref || !hasThirdParty()) && {
|
|
151
|
+
style: {
|
|
152
|
+
backgroundImage: "url(" + imageEntity + ")"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
onerror: () => {
|
|
156
|
+
state.error = true;
|
|
157
|
+
m.redraw();
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
[
|
|
161
|
+
...(ytref && maximized && !state.image && hasThirdParty())
|
|
162
|
+
? [
|
|
163
|
+
m(YouTubeVideo, { ytref })
|
|
164
|
+
] : [],
|
|
165
|
+
|
|
166
|
+
...(attrs.showattrib && state.images)
|
|
167
|
+
? [
|
|
168
|
+
m(ButtonNew, {
|
|
169
|
+
icon: "caret-left",
|
|
170
|
+
onClick: () => {
|
|
171
|
+
state.index--;
|
|
172
|
+
if (state.index === -1) state.index = state.images.length - 1;
|
|
173
|
+
state.image = state.images[state.index];
|
|
174
|
+
m.redraw();
|
|
175
|
+
},
|
|
176
|
+
class: "h-100 absolute to-left unitwidth"
|
|
177
|
+
}),
|
|
178
|
+
m(ButtonNew, {
|
|
179
|
+
icon: "caret-right",
|
|
180
|
+
onClick: () => {
|
|
181
|
+
state.index++;
|
|
182
|
+
if (state.index === state.images.length) state.index = 0;
|
|
183
|
+
state.image = state.images[state.index];
|
|
184
|
+
m.redraw();
|
|
185
|
+
},
|
|
186
|
+
class: "h-100 absolute to-right unitwidth"
|
|
187
|
+
})
|
|
188
|
+
]
|
|
189
|
+
: []
|
|
190
|
+
]
|
|
191
|
+
)
|
|
192
|
+
|
|
193
|
+
],
|
|
194
|
+
|
|
195
|
+
m(".flexrow.pad-2.titlestrip", {
|
|
196
|
+
class: titleClass
|
|
197
|
+
}, [
|
|
198
|
+
...noTitleIcon ? [] : [
|
|
199
|
+
m(Icon, {
|
|
200
|
+
icon,
|
|
201
|
+
size: 2,
|
|
202
|
+
iconClass: "unitsize"
|
|
203
|
+
})
|
|
204
|
+
],
|
|
205
|
+
m(".flexcol.grows.flex-place-center.ohidden", [
|
|
206
|
+
m(".title", title),
|
|
207
|
+
m("h6", `By ${id_channel}${creationTime ? ` (${TimeUtils.getTimeInterval(creationTime)})` : ""}`)
|
|
208
|
+
]),
|
|
209
|
+
...noTitleChannel ? [] : [
|
|
210
|
+
m(".unitsize.image.avatar.noshrink", {
|
|
211
|
+
style: { backgroundImage: "url(" + path(id_channel, "logo.jpg") + ")" },
|
|
212
|
+
title: id_channel
|
|
213
|
+
})
|
|
214
|
+
]
|
|
215
|
+
]),
|
|
216
|
+
|
|
217
|
+
...maximized && description
|
|
218
|
+
? [
|
|
219
|
+
m(".descriptionstrip", description)
|
|
220
|
+
] : [],
|
|
221
|
+
|
|
222
|
+
...scenes && ext.scenes && ext.scenes.length
|
|
223
|
+
? [
|
|
224
|
+
m(Strip, { itemType: "Scene", item, scenes: ext.scenes, max: scenes, state, label: "List of Scenes", shortPath: attrs.shortPath })
|
|
225
|
+
]
|
|
226
|
+
: [],
|
|
227
|
+
...templates && ext.templates && ext.templates.length
|
|
228
|
+
? [
|
|
229
|
+
m(Strip, { itemType: "Scene Template", item, scenes: ext.templates, max: templates, state, label: "List of Templates", shortPath: attrs.shortPath })
|
|
230
|
+
]
|
|
231
|
+
: []
|
|
232
|
+
]
|
|
233
|
+
)
|
|
234
|
+
);
|
|
235
|
+
},
|
|
236
|
+
({ attrs, state }) => {
|
|
237
|
+
const { templates = [] } = attrs.item.ext;
|
|
238
|
+
ObjectAssign(state, {
|
|
239
|
+
ytref: attrs.item.ytref || null,
|
|
240
|
+
images: templates.map((t) => t.image),
|
|
241
|
+
has: templates.length,
|
|
242
|
+
index: 0
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
if (state.images.length === 1) {
|
|
246
|
+
delete state.images;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
),
|
|
250
|
+
|
|
251
|
+
TemplateInstall = defineWidget(
|
|
252
|
+
({ attrs, state }) => {
|
|
253
|
+
|
|
254
|
+
const
|
|
255
|
+
{ item } = attrs,
|
|
256
|
+
{ ext } = item;
|
|
257
|
+
|
|
258
|
+
return m(
|
|
259
|
+
".flexcol.flex-lg-grows.h-100.fadein.flex-lg-row.scrolly.bg-accent-light",
|
|
260
|
+
{
|
|
261
|
+
class: attrs.detailsClass
|
|
262
|
+
}, [
|
|
263
|
+
|
|
264
|
+
m(
|
|
265
|
+
".flexcol.maxcontainer.ohidden.col-12.col-lg-8.col-xl-6",
|
|
266
|
+
m(TemplateItem, {
|
|
267
|
+
...state.templates ? { templates: 10000 } : { scenes: 10000 },
|
|
268
|
+
item,
|
|
269
|
+
class: "pad-2 w-100 max",
|
|
270
|
+
imageClass: "grows",
|
|
271
|
+
showattrib: false,
|
|
272
|
+
maximized: true,
|
|
273
|
+
innerClass: attrs.innerClass,
|
|
274
|
+
titleClass: attrs.titleClass,
|
|
275
|
+
noTitleIcon: attrs.noTitleIcon,
|
|
276
|
+
noTitleChannel: attrs.noTitleChannel,
|
|
277
|
+
shortPath: attrs.shortPath
|
|
278
|
+
/*
|
|
279
|
+
onView: (what) => {
|
|
280
|
+
if (what === "templates" && !state.templates) {
|
|
281
|
+
state.templates = true;
|
|
282
|
+
m.redraw();
|
|
283
|
+
} else if (what === "scenes" && state.templates) {
|
|
284
|
+
state.templates = false;
|
|
285
|
+
m.redraw();
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
*/
|
|
289
|
+
})
|
|
290
|
+
),
|
|
291
|
+
|
|
292
|
+
m(".flexcol.pad-2.col-lg-4.col-xl-6", [
|
|
293
|
+
...isMobile
|
|
294
|
+
? [
|
|
295
|
+
m(".nodownload", "You can download this template by visiting the market from Obscene Studio")
|
|
296
|
+
]
|
|
297
|
+
: attrs.isOnline
|
|
298
|
+
? [
|
|
299
|
+
m(".isonline", attrs.isOnline)
|
|
300
|
+
]
|
|
301
|
+
: [
|
|
302
|
+
...DOWNLOADED[ext.url]
|
|
303
|
+
? [
|
|
304
|
+
m(".already", "Already downloaded")
|
|
305
|
+
]
|
|
306
|
+
: [
|
|
307
|
+
m(".flexrow.w-100.buttoncontainer", [
|
|
308
|
+
m(ButtonNew, {
|
|
309
|
+
link: ext.url,
|
|
310
|
+
target: "_blank",
|
|
311
|
+
download: ext.url.substring(ext.url.lastIndexOf("/") + 1),
|
|
312
|
+
icon: "download",
|
|
313
|
+
text: "Download Bundle",
|
|
314
|
+
class: "button-accent grows unitheight",
|
|
315
|
+
onClick: () => stag("Bundle Download", {
|
|
316
|
+
event: "file_download",
|
|
317
|
+
props: {
|
|
318
|
+
item_id: item.id,
|
|
319
|
+
item_type: "bundle",
|
|
320
|
+
item_idchannel: item.id_channel
|
|
321
|
+
}
|
|
322
|
+
})
|
|
323
|
+
})
|
|
324
|
+
])
|
|
325
|
+
],
|
|
326
|
+
|
|
327
|
+
m("h2", "How to install?"),
|
|
328
|
+
m("ol", [
|
|
329
|
+
m("li.pad-2.pad-v", "Download the Bundle to your computer"),
|
|
330
|
+
m("li.pad-2.pad-v", "Drag and drop the file into the running Obscene Studio Application"),
|
|
331
|
+
m("li.pad-2.pad-v", "It should be available when creating a new storyboard")
|
|
332
|
+
]),
|
|
333
|
+
|
|
334
|
+
m(
|
|
335
|
+
"a",
|
|
336
|
+
{ class: "pad-2 pad-v", target: "manual", href: "/doc/manual/app-storyboard-create.html#installing-a-new-template" },
|
|
337
|
+
"Check out Obscene Studio Manual for further instructions"
|
|
338
|
+
)
|
|
339
|
+
],
|
|
340
|
+
...(ext.attributions && ext.attributions.length)
|
|
341
|
+
? [
|
|
342
|
+
m(Attributions, { attributions: ext.attributions })
|
|
343
|
+
] : []
|
|
344
|
+
])
|
|
345
|
+
]);
|
|
346
|
+
}
|
|
347
|
+
);
|
|
348
|
+
|
|
349
|
+
export {TemplateInstall, TemplateItem};
|