Skip to content

Commit

Permalink
use new webgen version
Browse files Browse the repository at this point in the history
  • Loading branch information
greg6775 committed Jan 21, 2024
1 parent e0a9566 commit b1ff331
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion deno.jsonc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"imports": {
"webgen/": "https://raw.githubusercontent.com/lucsoft/WebGen/e7eef9e/",
"webgen/": "https://raw.githubusercontent.com/lucsoft/WebGen/f940b00/",
// "webgen/": "../WebGen/",
"std/": "https://deno.land/[email protected]/",
"shared/": "./pages/shared/"
Expand Down
6 changes: 3 additions & 3 deletions pages/hosting/modrinth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ async function find(versions: string[], type: ServerTypes, offset = 0, limit = 2
path.searchParams.set("offset", offset.toString());

const json = await retry<SearchResponse>(async () => {
const response = await pipeline.fetch(SchedulerPriority.High, path.toString()).promise;
const response = await pipeline.fetch(SchedulerPriority.High, path.toString());
assert(response.ok);
return response.json();
});
Expand All @@ -105,7 +105,7 @@ async function getLatestDownload(versions: string[], type: ServerTypes, projecti
path.searchParams.set("game_versions", JSON.stringify(versions));

const json = await retry(async () => {
const response = await pipeline.fetch(SchedulerPriority.Low, path.toString()).promise;
const response = await pipeline.fetch(SchedulerPriority.Low, path.toString());
assert(response.ok);
return response.json();
});
Expand All @@ -118,7 +118,7 @@ async function getLatestDownload(versions: string[], type: ServerTypes, projecti
async function getSpecificDownload(versionId: string) {
const path = new URL(`${apiUrl}/version/${versionId}`);
const json = await retry(async () => {
const response = await pipeline.fetch(SchedulerPriority.High, path.toString()).promise;
const response = await pipeline.fetch(SchedulerPriority.High, path.toString());
assert(response.ok);
return response.json();
});
Expand Down
2 changes: 1 addition & 1 deletion pages/hosting/views/FileBrowser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export function FileBrowser() {
).addClass("file-item"))
.addColumn("Last Modified", (data) => data.lastModified !== undefined ? Label(new Date(data.lastModified).toLocaleString()) : Box())
.addColumn("Type", (data) => data.fileMimeType !== undefined ? Label(fileTypeName(data.fileMimeType)) : Label("Folder"))
.addColumn("Size", (data) => data.size !== undefined ? Label(format(parseInt(data.size))).addClass('text-align-right') : Box())
.addColumn("Size", (data) => data.size !== undefined ? Label(format(data.size)).addClass('text-align-right') : Box())
.addColumn("", (data) => Grid(
data.uploadingRatio !== undefined ? Progress(data.uploadingRatio).addClass("fileProgressBar") : Empty(),
data.fileMimeType && [ "text/yaml", "application/json", "text/plain" ].includes(data.fileMimeType.split(";")[ 0 ]) && data.uploadingRatio === undefined
Expand Down
2 changes: 1 addition & 1 deletion pages/hosting/views/dialogs/editFileDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export const editFileDialog = SheetDialog(sheetStack, "Edit File",
),
Grid(
Button("Cancel").onClick(() => editFileDialog.close()),
Button("Save").onClick(async () => {
Button("Save").onPromiseClick(async () => {
if (editFileDownloading.getValue())
return alert("File is still downloading");
editFileUploading.setValue(true);
Expand Down
2 changes: 1 addition & 1 deletion pages/hosting/views/uploading/droppingFileHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const droppingFileHandler = async (files: ReadableStream<FileEntry>, coun
uploadingRatio: progressTracker,
fileMimeType: `${uploadingPath.file.type};`,
lastModified: uploadingPath.file.lastModified,
size: uploadingPath.file.size.toString(),
size: uploadingPath.file.size,
name: uploadingPath.file.name,
}
});
Expand Down

0 comments on commit b1ff331

Please sign in to comment.