mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-23 15:05:51 +00:00
fix merge conflicts
This commit is contained in:
commit
8e767f2331
|
@ -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",
|
||||||
|
|
|
@ -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";
|
||||||
|
|
|
@ -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";
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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())
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in a new issue