mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-12-26 12:51:25 +00:00
fix merge conflicts
This commit is contained in:
commit
8e767f2331
6 changed files with 20 additions and 6 deletions
|
@ -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",
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import fetch from "cross-fetch";
|
||||
|
||||
export async function fetchIconPng(iconUrl: string) {
|
||||
return await fetch(iconUrl)
|
||||
.then(res => res.blob())
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue