mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-22 12:21:13 +00:00
update imports
This commit is contained in:
parent
b4ac5b9f56
commit
69a123b6d8
21 changed files with 53 additions and 58 deletions
|
@ -17,10 +17,10 @@ import {
|
||||||
toast,
|
toast,
|
||||||
updateUnreadCountsInterval,
|
updateUnreadCountsInterval,
|
||||||
} from "../../utils";
|
} from "../../utils";
|
||||||
import { isBrowser } from "../../utils/browser/is-browser";
|
import isBrowser from "../../utils/browser/is-browser";
|
||||||
import { poll } from "../../utils/helpers/poll";
|
import poll from "../../utils/helpers/poll";
|
||||||
import { amAdmin } from "../../utils/roles/am-admin";
|
import amAdmin from "../../utils/roles/am-admin";
|
||||||
import { canCreateCommunity } from "../../utils/roles/can-create-community";
|
import canCreateCommunity from "../../utils/roles/can-create-community";
|
||||||
import { Icon } from "../common/icon";
|
import { Icon } from "../common/icon";
|
||||||
import { PictrsImage } from "../common/pictrs-image";
|
import { PictrsImage } from "../common/pictrs-image";
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ import {
|
||||||
setupTribute,
|
setupTribute,
|
||||||
toast,
|
toast,
|
||||||
} from "../../utils";
|
} from "../../utils";
|
||||||
import { isBrowser } from "../../utils/browser/is-browser";
|
import isBrowser from "../../utils/browser/is-browser";
|
||||||
import { EmojiPicker } from "./emoji-picker";
|
import { EmojiPicker } from "./emoji-picker";
|
||||||
import { Icon, Spinner } from "./icon";
|
import { Icon, Spinner } from "./icon";
|
||||||
import { LanguageSelect } from "./language-select";
|
import { LanguageSelect } from "./language-select";
|
||||||
|
|
|
@ -20,8 +20,8 @@ import {
|
||||||
setIsoData,
|
setIsoData,
|
||||||
showLocal,
|
showLocal,
|
||||||
} from "../../utils";
|
} from "../../utils";
|
||||||
import { getQueryParams } from "../../utils/helpers/get-query-params";
|
import getQueryParams from "../../utils/helpers/get-query-params";
|
||||||
import { getQueryString } from "../../utils/helpers/get-query-string";
|
import getQueryString from "../../utils/helpers/get-query-string";
|
||||||
import type { QueryParams } from "../../utils/types/query-params";
|
import type { QueryParams } from "../../utils/types/query-params";
|
||||||
import { HtmlTags } from "../common/html-tags";
|
import { HtmlTags } from "../common/html-tags";
|
||||||
import { Spinner } from "../common/icon";
|
import { Spinner } from "../common/icon";
|
||||||
|
|
|
@ -86,8 +86,8 @@ import {
|
||||||
updateCommunityBlock,
|
updateCommunityBlock,
|
||||||
updatePersonBlock,
|
updatePersonBlock,
|
||||||
} from "../../utils";
|
} from "../../utils";
|
||||||
import { getQueryParams } from "../../utils/helpers/get-query-params";
|
import getQueryParams from "../../utils/helpers/get-query-params";
|
||||||
import { getQueryString } from "../../utils/helpers/get-query-string";
|
import getQueryString from "../../utils/helpers/get-query-string";
|
||||||
import type { QueryParams } from "../../utils/types/query-params";
|
import type { QueryParams } from "../../utils/types/query-params";
|
||||||
import { CommentNodes } from "../comment/comment-nodes";
|
import { CommentNodes } from "../comment/comment-nodes";
|
||||||
import { BannerIconHeader } from "../common/banner-icon-header";
|
import { BannerIconHeader } from "../common/banner-icon-header";
|
||||||
|
|
|
@ -16,15 +16,10 @@ import {
|
||||||
} from "lemmy-js-client";
|
} from "lemmy-js-client";
|
||||||
import { i18n } from "../../i18next";
|
import { i18n } from "../../i18next";
|
||||||
import { UserService } from "../../services";
|
import { UserService } from "../../services";
|
||||||
import {
|
import { getUnixTime, hostname, mdToHtml, myAuthRequired } from "../../utils";
|
||||||
getUnixTime,
|
import amAdmin from "../../utils/roles/am-admin";
|
||||||
hostname,
|
import amMod from "../../utils/roles/am-mod";
|
||||||
mdToHtml,
|
import amTopMod from "../../utils/roles/am-top-mod";
|
||||||
myAuthRequired,
|
|
||||||
} from "../../utils";
|
|
||||||
import { amAdmin } from "../../utils/roles/am-admin";
|
|
||||||
import { amMod } from "../../utils/roles/am-mod";
|
|
||||||
import { amTopMod } from "../../utils/roles/am-top-mod";
|
|
||||||
import { Badges } from "../common/badges";
|
import { Badges } from "../common/badges";
|
||||||
import { BannerIconHeader } from "../common/banner-icon-header";
|
import { BannerIconHeader } from "../common/banner-icon-header";
|
||||||
import { Icon, PurgeWarning, Spinner } from "../common/icon";
|
import { Icon, PurgeWarning, Spinner } from "../common/icon";
|
||||||
|
|
|
@ -82,9 +82,9 @@ import {
|
||||||
trendingFetchLimit,
|
trendingFetchLimit,
|
||||||
updatePersonBlock,
|
updatePersonBlock,
|
||||||
} from "../../utils";
|
} from "../../utils";
|
||||||
import { getQueryParams } from "../../utils/helpers/get-query-params";
|
import getQueryParams from "../../utils/helpers/get-query-params";
|
||||||
import { getQueryString } from "../../utils/helpers/get-query-string";
|
import getQueryString from "../../utils/helpers/get-query-string";
|
||||||
import { canCreateCommunity } from "../../utils/roles/can-create-community";
|
import canCreateCommunity from "../../utils/roles/can-create-community";
|
||||||
import type { QueryParams } from "../../utils/types/query-params";
|
import type { QueryParams } from "../../utils/types/query-params";
|
||||||
import { CommentNodes } from "../comment/comment-nodes";
|
import { CommentNodes } from "../comment/comment-nodes";
|
||||||
import { DataTypeSelect } from "../common/data-type-select";
|
import { DataTypeSelect } from "../common/data-type-select";
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { i18n } from "../../i18next";
|
||||||
import { UserService } from "../../services";
|
import { UserService } from "../../services";
|
||||||
import { HttpService, RequestState } from "../../services/HttpService";
|
import { HttpService, RequestState } from "../../services/HttpService";
|
||||||
import { myAuth, setIsoData, toast, validEmail } from "../../utils";
|
import { myAuth, setIsoData, toast, validEmail } from "../../utils";
|
||||||
import { isBrowser } from "../../utils/browser/is-browser";
|
import isBrowser from "../../utils/browser/is-browser";
|
||||||
import { HtmlTags } from "../common/html-tags";
|
import { HtmlTags } from "../common/html-tags";
|
||||||
import { Spinner } from "../common/icon";
|
import { Spinner } from "../common/icon";
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ import {
|
||||||
toast,
|
toast,
|
||||||
validEmail,
|
validEmail,
|
||||||
} from "../../utils";
|
} from "../../utils";
|
||||||
import { isBrowser } from "../../utils/browser/is-browser";
|
import isBrowser from "../../utils/browser/is-browser";
|
||||||
import { HtmlTags } from "../common/html-tags";
|
import { HtmlTags } from "../common/html-tags";
|
||||||
import { Icon, Spinner } from "../common/icon";
|
import { Icon, Spinner } from "../common/icon";
|
||||||
import { MarkdownTextArea } from "../common/markdown-textarea";
|
import { MarkdownTextArea } from "../common/markdown-textarea";
|
||||||
|
|
|
@ -44,11 +44,11 @@ import {
|
||||||
personToChoice,
|
personToChoice,
|
||||||
setIsoData,
|
setIsoData,
|
||||||
} from "../utils";
|
} from "../utils";
|
||||||
import { debounce } from "../utils/helpers/debounce";
|
import debounce from "../utils/helpers/debounce";
|
||||||
import { getQueryParams } from "../utils/helpers/get-query-params";
|
import getQueryParams from "../utils/helpers/get-query-params";
|
||||||
import { getQueryString } from "../utils/helpers/get-query-string";
|
import getQueryString from "../utils/helpers/get-query-string";
|
||||||
import { amAdmin } from "../utils/roles/am-admin";
|
import amAdmin from "../utils/roles/am-admin";
|
||||||
import { amMod } from "../utils/roles/am-mod";
|
import amMod from "../utils/roles/am-mod";
|
||||||
import type { QueryParams } from "../utils/types/query-params";
|
import type { QueryParams } from "../utils/types/query-params";
|
||||||
import { HtmlTags } from "./common/html-tags";
|
import { HtmlTags } from "./common/html-tags";
|
||||||
import { Icon, Spinner } from "./common/icon";
|
import { Icon, Spinner } from "./common/icon";
|
||||||
|
|
|
@ -76,11 +76,11 @@ import {
|
||||||
toast,
|
toast,
|
||||||
updatePersonBlock,
|
updatePersonBlock,
|
||||||
} from "../../utils";
|
} from "../../utils";
|
||||||
import { getQueryParams } from "../../utils/helpers/get-query-params";
|
import getQueryParams from "../../utils/helpers/get-query-params";
|
||||||
import { getQueryString } from "../../utils/helpers/get-query-string";
|
import getQueryString from "../../utils/helpers/get-query-string";
|
||||||
import { canMod } from "../../utils/roles/can-mod";
|
import canMod from "../../utils/roles/can-mod";
|
||||||
import { isAdmin } from "../../utils/roles/is-admin";
|
import isAdmin from "../../utils/roles/is-admin";
|
||||||
import { isBanned } from "../../utils/roles/is-banned";
|
import isBanned from "../../utils/roles/is-banned";
|
||||||
import type { QueryParams } from "../../utils/types/query-params";
|
import type { QueryParams } from "../../utils/types/query-params";
|
||||||
import { BannerIconHeader } from "../common/banner-icon-header";
|
import { BannerIconHeader } from "../common/banner-icon-header";
|
||||||
import { HtmlTags } from "../common/html-tags";
|
import { HtmlTags } from "../common/html-tags";
|
||||||
|
|
|
@ -31,7 +31,7 @@ import {
|
||||||
myAuthRequired,
|
myAuthRequired,
|
||||||
setIsoData,
|
setIsoData,
|
||||||
} from "../../utils";
|
} from "../../utils";
|
||||||
import { amAdmin } from "../../utils/roles/am-admin";
|
import amAdmin from "../../utils/roles/am-admin";
|
||||||
import { CommentReport } from "../comment/comment-report";
|
import { CommentReport } from "../comment/comment-report";
|
||||||
import { HtmlTags } from "../common/html-tags";
|
import { HtmlTags } from "../common/html-tags";
|
||||||
import { Spinner } from "../common/icon";
|
import { Spinner } from "../common/icon";
|
||||||
|
|
|
@ -35,7 +35,7 @@ import {
|
||||||
updateCommunityBlock,
|
updateCommunityBlock,
|
||||||
updatePersonBlock,
|
updatePersonBlock,
|
||||||
} from "../../utils";
|
} from "../../utils";
|
||||||
import { debounce } from "../../utils/helpers/debounce";
|
import debounce from "../../utils/helpers/debounce";
|
||||||
import { HtmlTags } from "../common/html-tags";
|
import { HtmlTags } from "../common/html-tags";
|
||||||
import { Icon, Spinner } from "../common/icon";
|
import { Icon, Spinner } from "../common/icon";
|
||||||
import { ImageUploadForm } from "../common/image-upload-form";
|
import { ImageUploadForm } from "../common/image-upload-form";
|
||||||
|
|
|
@ -24,7 +24,7 @@ import {
|
||||||
myAuth,
|
myAuth,
|
||||||
setIsoData,
|
setIsoData,
|
||||||
} from "../../utils";
|
} from "../../utils";
|
||||||
import { getQueryParams } from "../../utils/helpers/get-query-params";
|
import getQueryParams from "../../utils/helpers/get-query-params";
|
||||||
import type { QueryParams } from "../../utils/types/query-params";
|
import type { QueryParams } from "../../utils/types/query-params";
|
||||||
import { HtmlTags } from "../common/html-tags";
|
import { HtmlTags } from "../common/html-tags";
|
||||||
import { Spinner } from "../common/icon";
|
import { Spinner } from "../common/icon";
|
||||||
|
|
|
@ -32,7 +32,7 @@ import {
|
||||||
validURL,
|
validURL,
|
||||||
webArchiveUrl,
|
webArchiveUrl,
|
||||||
} from "../../utils";
|
} from "../../utils";
|
||||||
import { debounce } from "../../utils/helpers/debounce";
|
import debounce from "../../utils/helpers/debounce";
|
||||||
import { Icon, Spinner } from "../common/icon";
|
import { Icon, Spinner } from "../common/icon";
|
||||||
import { LanguageSelect } from "../common/language-select";
|
import { LanguageSelect } from "../common/language-select";
|
||||||
import { MarkdownTextArea } from "../common/markdown-textarea";
|
import { MarkdownTextArea } from "../common/markdown-textarea";
|
||||||
|
|
|
@ -42,16 +42,16 @@ import {
|
||||||
setupTippy,
|
setupTippy,
|
||||||
showScores,
|
showScores,
|
||||||
} from "../../utils";
|
} from "../../utils";
|
||||||
import { canShare } from "../../utils/browser/can-share";
|
import canShare from "../../utils/browser/can-share";
|
||||||
import { share } from "../../utils/browser/share";
|
import share from "../../utils/browser/share";
|
||||||
import { amAdmin } from "../../utils/roles/am-admin";
|
import amAdmin from "../../utils/roles/am-admin";
|
||||||
import { amCommunityCreator } from "../../utils/roles/am-community-creator";
|
import amCommunityCreator from "../../utils/roles/am-community-creator";
|
||||||
import { amMod } from "../../utils/roles/am-mod";
|
import amMod from "../../utils/roles/am-mod";
|
||||||
import { canAdmin } from "../../utils/roles/can-admin";
|
import canAdmin from "../../utils/roles/can-admin";
|
||||||
import { canMod } from "../../utils/roles/can-mod";
|
import canMod from "../../utils/roles/can-mod";
|
||||||
import { isAdmin } from "../../utils/roles/is-admin";
|
import isAdmin from "../../utils/roles/is-admin";
|
||||||
import { isBanned } from "../../utils/roles/is-banned";
|
import isBanned from "../../utils/roles/is-banned";
|
||||||
import { isMod } from "../../utils/roles/is-mod";
|
import isMod from "../../utils/roles/is-mod";
|
||||||
import { Icon, PurgeWarning, Spinner } from "../common/icon";
|
import { Icon, PurgeWarning, Spinner } from "../common/icon";
|
||||||
import { MomentTime } from "../common/moment-time";
|
import { MomentTime } from "../common/moment-time";
|
||||||
import { PictrsImage } from "../common/pictrs-image";
|
import { PictrsImage } from "../common/pictrs-image";
|
||||||
|
|
|
@ -83,8 +83,8 @@ import {
|
||||||
updateCommunityBlock,
|
updateCommunityBlock,
|
||||||
updatePersonBlock,
|
updatePersonBlock,
|
||||||
} from "../../utils";
|
} from "../../utils";
|
||||||
import { isBrowser } from "../../utils/browser/is-browser";
|
import isBrowser from "../../utils/browser/is-browser";
|
||||||
import { debounce } from "../../utils/helpers/debounce";
|
import debounce from "../../utils/helpers/debounce";
|
||||||
import { CommentForm } from "../comment/comment-form";
|
import { CommentForm } from "../comment/comment-form";
|
||||||
import { CommentNodes } from "../comment/comment-nodes";
|
import { CommentNodes } from "../comment/comment-nodes";
|
||||||
import { HtmlTags } from "../common/html-tags";
|
import { HtmlTags } from "../common/html-tags";
|
||||||
|
|
|
@ -46,9 +46,9 @@ import {
|
||||||
setIsoData,
|
setIsoData,
|
||||||
showLocal,
|
showLocal,
|
||||||
} from "../utils";
|
} from "../utils";
|
||||||
import { debounce } from "../utils/helpers/debounce";
|
import debounce from "../utils/helpers/debounce";
|
||||||
import { getQueryParams } from "../utils/helpers/get-query-params";
|
import getQueryParams from "../utils/helpers/get-query-params";
|
||||||
import { getQueryString } from "../utils/helpers/get-query-string";
|
import getQueryString from "../utils/helpers/get-query-string";
|
||||||
import type { QueryParams } from "../utils/types/query-params";
|
import type { QueryParams } from "../utils/types/query-params";
|
||||||
import { CommentNodes } from "./comment/comment-nodes";
|
import { CommentNodes } from "./comment/comment-nodes";
|
||||||
import { HtmlTags } from "./common/html-tags";
|
import { HtmlTags } from "./common/html-tags";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { isBrowser } from "./utils/browser/is-browser";
|
import isBrowser from "./utils/browser/is-browser";
|
||||||
|
|
||||||
const testHost = "0.0.0.0:8536";
|
const testHost = "0.0.0.0:8536";
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ import { sv } from "./translations/sv";
|
||||||
import { vi } from "./translations/vi";
|
import { vi } from "./translations/vi";
|
||||||
import { zh } from "./translations/zh";
|
import { zh } from "./translations/zh";
|
||||||
import { zh_Hant } from "./translations/zh_Hant";
|
import { zh_Hant } from "./translations/zh_Hant";
|
||||||
import { isBrowser } from "./utils/browser/is-browser";
|
import isBrowser from "./utils/browser/is-browser";
|
||||||
|
|
||||||
export const languages = [
|
export const languages = [
|
||||||
{ resource: ar, code: "ar", name: "العربية" },
|
{ resource: ar, code: "ar", name: "العربية" },
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { LoginResponse, MyUserInfo } from "lemmy-js-client";
|
||||||
import { isHttps } from "../env";
|
import { isHttps } from "../env";
|
||||||
import { i18n } from "../i18next";
|
import { i18n } from "../i18next";
|
||||||
import { isAuthPath, toast } from "../utils";
|
import { isAuthPath, toast } from "../utils";
|
||||||
import { isBrowser } from "../utils/browser/is-browser";
|
import isBrowser from "../utils/browser/is-browser";
|
||||||
|
|
||||||
interface Claims {
|
interface Claims {
|
||||||
sub: number;
|
sub: number;
|
||||||
|
|
|
@ -49,10 +49,10 @@ import {
|
||||||
VoteType,
|
VoteType,
|
||||||
} from "./interfaces";
|
} from "./interfaces";
|
||||||
import { HttpService, UserService } from "./services";
|
import { HttpService, UserService } from "./services";
|
||||||
import { isBrowser } from "./utils/browser/is-browser";
|
|
||||||
import { debounce } from "./utils/helpers/debounce";
|
|
||||||
import { groupBy } from "./utils/helpers/group-by";
|
|
||||||
import { RequestState } from "./services/HttpService";
|
import { RequestState } from "./services/HttpService";
|
||||||
|
import isBrowser from "./utils/browser/is-browser";
|
||||||
|
import debounce from "./utils/helpers/debounce";
|
||||||
|
import { groupBy } from "./utils/helpers/group-by";
|
||||||
|
|
||||||
let Tribute: any;
|
let Tribute: any;
|
||||||
if (isBrowser()) {
|
if (isBrowser()) {
|
||||||
|
|
Loading…
Reference in a new issue