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", "name": "lemmy-ui",
"version": "0.18.0-rc.5", "version": "0.18.0-rc.6",
"description": "An isomorphic UI for lemmy", "description": "An isomorphic UI for lemmy",
"repository": "https://github.com/LemmyNet/lemmy-ui", "repository": "https://github.com/LemmyNet/lemmy-ui",
"license": "AGPL-3.0", "license": "AGPL-3.0",

View file

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

View file

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

View file

@ -4,15 +4,20 @@ import { readdir } from "fs/promises";
const extraThemesFolder = const extraThemesFolder =
process.env["LEMMY_UI_EXTRA_THEMES_FOLDER"] || "./extra_themes"; 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)) { if (existsSync(extraThemesFolder)) {
const dirThemes = await readdir(extraThemesFolder); const dirThemes = await readdir(extraThemesFolder);
const cssThemes = dirThemes const cssThemes = dirThemes
.filter(d => d.endsWith(".css")) .filter(d => d.endsWith(".css"))
.map(d => d.replace(".css", "")); .map(d => d.replace(".css", ""));
themes.push(...cssThemes); return themes.concat(cssThemes);
} }
return themes; return themes;
} }

View file

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

View file

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