mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-25 13:51:13 +00:00
parent
0093debc0e
commit
447c7f0d54
10 changed files with 23 additions and 10 deletions
|
@ -16,6 +16,7 @@
|
||||||
"warnOnUnsupportedTypeScriptVersion": false
|
"warnOnUnsupportedTypeScriptVersion": false
|
||||||
},
|
},
|
||||||
"rules": {
|
"rules": {
|
||||||
|
"@typescript-eslint/ban-ts-comment": 0,
|
||||||
"@typescript-eslint/no-explicit-any": 0,
|
"@typescript-eslint/no-explicit-any": 0,
|
||||||
"@typescript-eslint/explicit-module-boundary-types": 0,
|
"@typescript-eslint/explicit-module-boundary-types": 0,
|
||||||
"arrow-body-style": 0,
|
"arrow-body-style": 0,
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
"inferno-create-element": "^7.4.9",
|
"inferno-create-element": "^7.4.9",
|
||||||
"inferno-helmet": "^5.2.1",
|
"inferno-helmet": "^5.2.1",
|
||||||
"inferno-hydrate": "^7.4.9",
|
"inferno-hydrate": "^7.4.9",
|
||||||
"inferno-i18next": "github:nimbusec-oss/inferno-i18next#semver:^7.4.2",
|
"inferno-i18next-dess": "^0.0.1",
|
||||||
"inferno-router": "^7.4.9",
|
"inferno-router": "^7.4.9",
|
||||||
"inferno-server": "^7.4.9",
|
"inferno-server": "^7.4.9",
|
||||||
"isomorphic-cookie": "^1.2.4",
|
"isomorphic-cookie": "^1.2.4",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Component } from "inferno";
|
import { Component } from "inferno";
|
||||||
import { Helmet } from "inferno-helmet";
|
import { Helmet } from "inferno-helmet";
|
||||||
import { Provider } from "inferno-i18next";
|
import { Provider } from "inferno-i18next-dess";
|
||||||
import { Route, Switch } from "inferno-router";
|
import { Route, Switch } from "inferno-router";
|
||||||
import { GetSiteResponse } from "lemmy-js-client";
|
import { GetSiteResponse } from "lemmy-js-client";
|
||||||
import { i18n } from "../../i18next";
|
import { i18n } from "../../i18next";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Component } from "inferno";
|
import { Component } from "inferno";
|
||||||
import { T } from "inferno-i18next";
|
import { T } from "inferno-i18next-dess";
|
||||||
import { Link } from "inferno-router";
|
import { Link } from "inferno-router";
|
||||||
import {
|
import {
|
||||||
CommentResponse,
|
CommentResponse,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Component, linkEvent } from "inferno";
|
import { Component, linkEvent } from "inferno";
|
||||||
import { T } from "inferno-i18next";
|
import { T } from "inferno-i18next-dess";
|
||||||
import { Link } from "inferno-router";
|
import { Link } from "inferno-router";
|
||||||
import {
|
import {
|
||||||
AddAdminResponse,
|
AddAdminResponse,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Component, linkEvent } from "inferno";
|
import { Component, linkEvent } from "inferno";
|
||||||
import { T } from "inferno-i18next";
|
import { T } from "inferno-i18next-dess";
|
||||||
import {
|
import {
|
||||||
GetCaptchaResponse,
|
GetCaptchaResponse,
|
||||||
GetSiteResponse,
|
GetSiteResponse,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Component } from "inferno";
|
import { Component } from "inferno";
|
||||||
import { T } from "inferno-i18next";
|
import { T } from "inferno-i18next-dess";
|
||||||
import { Link } from "inferno-router";
|
import { Link } from "inferno-router";
|
||||||
import { PostView } from "lemmy-js-client";
|
import { PostView } from "lemmy-js-client";
|
||||||
import { i18n } from "../../i18next";
|
import { i18n } from "../../i18next";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Component, linkEvent } from "inferno";
|
import { Component, linkEvent } from "inferno";
|
||||||
import { T } from "inferno-i18next";
|
import { T } from "inferno-i18next-dess";
|
||||||
import { Prompt } from "inferno-router";
|
import { Prompt } from "inferno-router";
|
||||||
import {
|
import {
|
||||||
CreatePrivateMessage,
|
CreatePrivateMessage,
|
||||||
|
|
|
@ -1431,3 +1431,14 @@ export function initializeSite(site: GetSiteResponse) {
|
||||||
UserService.Instance.myUserInfo = site.my_user;
|
UserService.Instance.myUserInfo = site.my_user;
|
||||||
i18n.changeLanguage(getLanguage());
|
i18n.changeLanguage(getLanguage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let SHORTNUM_SI_FORMAT = new Intl.NumberFormat("en-US", {
|
||||||
|
maximumFractionDigits: 1,
|
||||||
|
//@ts-ignore
|
||||||
|
notation: "compact",
|
||||||
|
compactDisplay: "short",
|
||||||
|
});
|
||||||
|
|
||||||
|
export function numToSI(value: any) {
|
||||||
|
return SHORTNUM_SI_FORMAT.format(value);
|
||||||
|
}
|
||||||
|
|
|
@ -4045,9 +4045,10 @@ inferno-hydrate@^7.4.9:
|
||||||
dependencies:
|
dependencies:
|
||||||
inferno "7.4.9"
|
inferno "7.4.9"
|
||||||
|
|
||||||
"inferno-i18next@github:nimbusec-oss/inferno-i18next#semver:^7.4.2":
|
inferno-i18next-dess@^0.0.1:
|
||||||
version "7.4.2"
|
version "0.0.1"
|
||||||
resolved "https://codeload.github.com/nimbusec-oss/inferno-i18next/tar.gz/54b9be591ccd62c53799ad23e35f17144a62f909"
|
resolved "https://registry.yarnpkg.com/inferno-i18next-dess/-/inferno-i18next-dess-0.0.1.tgz#48ae6bb4c3a617e59ff8dc97b9ed70f2ef762206"
|
||||||
|
integrity sha512-z/6UnuWFMyBivfR3SI9AmgA0/JvXARqtG/9BQryaLPenlG7iAb4cN2TeSt0mHIgFOo01QHVWZ8dqn7jZRijp2Q==
|
||||||
dependencies:
|
dependencies:
|
||||||
html-parse-stringify2 "^2.0.1"
|
html-parse-stringify2 "^2.0.1"
|
||||||
inferno "^7.4.2"
|
inferno "^7.4.2"
|
||||||
|
|
Loading…
Reference in a new issue