mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-12-22 10:51:24 +00:00
Merge branch 'main' into remove_renovate_from_prs
This commit is contained in:
commit
17bd4c83aa
10 changed files with 1027 additions and 877 deletions
|
@ -10,7 +10,7 @@
|
|||
"build:prod": "webpack --env COMMIT_HASH=$(git rev-parse --short HEAD) --mode=production",
|
||||
"clean": "pnpm rimraf dist",
|
||||
"dev": "node generate_translations.js && pnpm build:dev --watch",
|
||||
"lint": "pnpm translations:generate && tsc --noEmit && eslint --report-unused-disable-directives && prettier --check \"src/**/*.{ts,tsx,js,mjs,css,scss}\"",
|
||||
"lint": "pnpm translations:generate && tsc --noEmit && pnpm eslint --report-unused-disable-directives && pnpm prettier --check \"src/**/*.{ts,tsx,js,mjs,css,scss}\"",
|
||||
"prebuild:dev": "pnpm clean && node generate_translations.js",
|
||||
"prebuild:prod": "pnpm clean && node generate_translations.js",
|
||||
"prepare": "husky",
|
||||
|
@ -120,10 +120,10 @@
|
|||
"lint-staged": "^15.2.5",
|
||||
"prettier": "^3.3.1",
|
||||
"prettier-plugin-import-sort": "^0.0.7",
|
||||
"prettier-plugin-organize-imports": "^3.2.4",
|
||||
"prettier-plugin-organize-imports": "^4.0.0",
|
||||
"prettier-plugin-packagejson": "^2.5.0",
|
||||
"qs": "^6.12.1",
|
||||
"rimraf": "^5.0.7",
|
||||
"rimraf": "^6.0.0",
|
||||
"sortpack": "^2.4.0",
|
||||
"style-loader": "^4.0.0",
|
||||
"terser": "^5.31.0",
|
||||
|
@ -145,7 +145,7 @@
|
|||
"sortpack"
|
||||
]
|
||||
},
|
||||
"packageManager": "pnpm@9.4.0+sha512.f549b8a52c9d2b8536762f99c0722205efc5af913e77835dbccc3b0b0b2ca9e7dc8022b78062c17291c48e88749c70ce88eb5a74f1fa8c4bf5e18bb46c8bd83a",
|
||||
"packageManager": "pnpm@9.5.0",
|
||||
"engineStrict": true,
|
||||
"importSort": {
|
||||
".js, .jsx, .ts, .tsx": {
|
||||
|
|
1874
pnpm-lock.yaml
1874
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
|
@ -762,7 +762,9 @@ export class MarkdownTextArea extends Component<
|
|||
getSelectedText(): string {
|
||||
const { selectionStart: start, selectionEnd: end } =
|
||||
document.getElementById(this.id) as any;
|
||||
return start !== end ? this.state.content?.substring(start, end) ?? "" : "";
|
||||
return start !== end
|
||||
? (this.state.content?.substring(start, end) ?? "")
|
||||
: "";
|
||||
}
|
||||
|
||||
get isDisabled() {
|
||||
|
|
|
@ -28,7 +28,7 @@ export class CommunityLink extends Component<CommunityLinkProps, any> {
|
|||
|
||||
const title = useApubName
|
||||
? community.name
|
||||
: community.title ?? community.name;
|
||||
: (community.title ?? community.name);
|
||||
|
||||
if (local) {
|
||||
link = `/c/${community.name}`;
|
||||
|
|
|
@ -176,7 +176,7 @@ function getSortTypeFromQuery(type?: string): SortType {
|
|||
UserService.Instance.myUserInfo?.local_user_view.local_user
|
||||
.default_sort_type;
|
||||
|
||||
return type ? (type as SortType) : mySortType ?? "Active";
|
||||
return type ? (type as SortType) : (mySortType ?? "Active");
|
||||
}
|
||||
|
||||
type CommunityPathProps = { name: string };
|
||||
|
|
|
@ -29,7 +29,9 @@ export class PersonListing extends Component<PersonListingProps, any> {
|
|||
let link: string;
|
||||
let serverStr: string | undefined = undefined;
|
||||
|
||||
const name = useApubName ? person.name : person.display_name ?? person.name;
|
||||
const name = useApubName
|
||||
? person.name
|
||||
: (person.display_name ?? person.name);
|
||||
|
||||
if (local) {
|
||||
link = `/u/${person.name}`;
|
||||
|
|
|
@ -144,7 +144,7 @@ function getSortTypeFromQuery(sort?: string): SortType {
|
|||
|
||||
function getViewFromProps(view?: string): PersonDetailsView {
|
||||
return view
|
||||
? PersonDetailsView[view] ?? PersonDetailsView.Overview
|
||||
? (PersonDetailsView[view] ?? PersonDetailsView.Overview)
|
||||
: PersonDetailsView.Overview;
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ export default function buildCommentsTree(
|
|||
const map = new Map<number, CommentNodeI>();
|
||||
const depthOffset = !parentComment
|
||||
? 0
|
||||
: getDepthFromComment(comments[0].comment) ?? 0;
|
||||
: (getDepthFromComment(comments[0].comment) ?? 0);
|
||||
|
||||
for (const comment_view of comments) {
|
||||
const depthI = getDepthFromComment(comment_view.comment) ?? 0;
|
||||
|
|
|
@ -5,9 +5,9 @@ export default function dataBsTheme(siteResOrTheme?: GetSiteResponse | string) {
|
|||
const theme =
|
||||
typeof siteResOrTheme === "string"
|
||||
? siteResOrTheme
|
||||
: siteResOrTheme?.my_user?.local_user_view.local_user.theme ??
|
||||
: (siteResOrTheme?.my_user?.local_user_view.local_user.theme ??
|
||||
siteResOrTheme?.site_view.local_site.default_theme ??
|
||||
"browser";
|
||||
"browser");
|
||||
|
||||
return (isDark() && theme === "browser") ||
|
||||
[
|
||||
|
|
2
src/shared/utils/env/get-internal-host.ts
vendored
2
src/shared/utils/env/get-internal-host.ts
vendored
|
@ -3,6 +3,6 @@ import { testHost } from "../../config";
|
|||
|
||||
export default function getInternalHost() {
|
||||
return !isBrowser()
|
||||
? process.env.LEMMY_UI_LEMMY_INTERNAL_HOST ?? testHost
|
||||
? (process.env.LEMMY_UI_LEMMY_INTERNAL_HOST ?? testHost)
|
||||
: testHost; // used for local dev
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue