fix merge conflicts

This commit is contained in:
Alec Armbruster 2023-06-22 09:04:25 -04:00
commit 8e767f2331
No known key found for this signature in database
GPG Key ID: 52BC7C84E960FD1B
6 changed files with 20 additions and 6 deletions

View File

@ -1,6 +1,6 @@
{
"name": "lemmy-ui",
"version": "0.18.0-rc.5",
"version": "0.18.0-rc.6",
"description": "An isomorphic UI for lemmy",
"repository": "https://github.com/LemmyNet/lemmy-ui",
"license": "AGPL-3.0",

View File

@ -1,6 +1,7 @@
import { initializeSite, isAuthPath } from "@utils/app";
import { getHttpBaseInternal } from "@utils/env";
import { ErrorPageData } from "@utils/types";
import fetch from "cross-fetch";
import type { Request, Response } from "express";
import { StaticRouter, matchPath } from "inferno-router";
import { renderToString } from "inferno-server";

View File

@ -1,4 +1,5 @@
import { getHttpBaseExternal, getHttpBaseInternal } from "@utils/env";
import fetch from "cross-fetch";
import type { Request, Response } from "express";
import { LemmyHttp } from "lemmy-js-client";
import { wrapClient } from "../../shared/services/HttpService";

View File

@ -4,15 +4,20 @@ import { readdir } from "fs/promises";
const extraThemesFolder =
process.env["LEMMY_UI_EXTRA_THEMES_FOLDER"] || "./extra_themes";
const themes = ["darkly", "darkly-red", "litely", "litely-red"];
const themes: ReadonlyArray<string> = [
"darkly",
"darkly-red",
"litely",
"litely-red",
];
export async function buildThemeList(): Promise<string[]> {
export async function buildThemeList(): Promise<ReadonlyArray<string>> {
if (existsSync(extraThemesFolder)) {
const dirThemes = await readdir(extraThemesFolder);
const cssThemes = dirThemes
.filter(d => d.endsWith(".css"))
.map(d => d.replace(".css", ""));
themes.push(...cssThemes);
return themes.concat(cssThemes);
}
return themes;
}

View File

@ -1,3 +1,5 @@
import fetch from "cross-fetch";
export async function fetchIconPng(iconUrl: string) {
return await fetch(iconUrl)
.then(res => res.blob())

View File

@ -1,7 +1,12 @@
import { myAuthRequired, newVote, showScores } from "@utils/app";
import { canShare, share } from "@utils/browser";
import { getExternalHost, getHttpBase } from "@utils/env";
import { futureDaysToUnixTime, hostname, numToSI } from "@utils/helpers";
import {
capitalizeFirstLetter,
futureDaysToUnixTime,
hostname,
numToSI,
} from "@utils/helpers";
import { isImage, isVideo } from "@utils/media";
import {
amAdmin,
@ -981,7 +986,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
classes={classNames("me-1", { "text-danger": locked })}
inline
/>
{label}
{capitalizeFirstLetter(label)}
</>
)}
</button>