mirror of
https://github.com/imgfloat/server.git
synced 2026-02-05 03:39:26 +00:00
Add additional marketplace options on launch
This commit is contained in:
@@ -643,6 +643,7 @@ public class ChannelDirectoryService {
|
||||
}
|
||||
|
||||
script.setAttachments(loadScriptAttachments(asset.getBroadcaster(), asset.getId(), null));
|
||||
scriptAssetRepository.save(script);
|
||||
AssetView view = AssetView.fromScript(asset.getBroadcaster(), asset, script);
|
||||
messagingTemplate.convertAndSend(topicFor(targetBroadcaster), AssetEvent.created(targetBroadcaster, view));
|
||||
return Optional.of(view);
|
||||
|
||||
@@ -196,9 +196,9 @@ public class MarketplaceScriptSeedLoader {
|
||||
if (rootPath != null && !rootPath.isBlank()) {
|
||||
return Path.of(rootPath);
|
||||
}
|
||||
Path devPath = Path.of("dev", "marketplace-scripts");
|
||||
if (Files.isDirectory(devPath)) {
|
||||
return devPath;
|
||||
Path docsPath = Path.of("doc", "marketplace-scripts");
|
||||
if (Files.isDirectory(docsPath)) {
|
||||
return docsPath;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -236,7 +236,8 @@
|
||||
|
||||
.modal .modal-inner .marketplace-list {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
||||
grid-template-columns: repeat(auto-fit, 240px);
|
||||
grid-auto-rows: 240px;
|
||||
gap: 16px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
@@ -250,7 +251,8 @@
|
||||
border: 1px solid rgba(148, 163, 184, 0.3);
|
||||
border-radius: 10px;
|
||||
background-color: rgba(15, 23, 42, 0.6);
|
||||
min-height: 240px;
|
||||
width: 240px;
|
||||
height: 240px;
|
||||
}
|
||||
|
||||
.modal .modal-inner .marketplace-logo {
|
||||
@@ -273,11 +275,31 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.modal .modal-inner .marketplace-content strong {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.modal .modal-inner .marketplace-content p {
|
||||
margin: 0;
|
||||
color: rgba(226, 232, 240, 0.8);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
|
||||
.modal .modal-inner .marketplace-content small {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.modal .modal-inner .marketplace-actions {
|
||||
|
||||
@@ -1482,6 +1482,14 @@ export function createAdminConsole({
|
||||
|
||||
function createPreviewElement(asset) {
|
||||
if (isCodeAsset(asset)) {
|
||||
if (asset.logoUrl) {
|
||||
const img = document.createElement("img");
|
||||
img.className = "asset-preview";
|
||||
img.src = asset.logoUrl;
|
||||
img.alt = asset.name || "Script logo";
|
||||
img.loading = "lazy";
|
||||
return img;
|
||||
}
|
||||
const icon = document.createElement("div");
|
||||
icon.className = "asset-preview code-icon";
|
||||
icon.innerHTML = '<i class="fa-solid fa-code" aria-hidden="true"></i>';
|
||||
|
||||
Reference in New Issue
Block a user