chore: rename paw -> tail

pull/13/head
moonrailgun 4 years ago
parent 92a1105eed
commit fd533d5b99

@ -1,2 +1,2 @@
# pawchat # tailchat
This is a basic chat client and easy to expand. This is a basic chat client and easy to expand.

@ -1,8 +1,8 @@
{ {
"name": "pawchat-app", "name": "tailchat-app",
"version": "1.0.0", "version": "1.0.0",
"main": "index.js", "main": "index.js",
"repository": "https://github.com/pawchat/pawchat.git", "repository": "https://github.com/msgbyte/tailchat.git",
"author": "moonrailgun <moonrailgun@gmail.com>", "author": "moonrailgun <moonrailgun@gmail.com>",
"license": "GPLv3", "license": "GPLv3",
"private": true "private": true

@ -1,5 +1,5 @@
{ {
"name": "pawchat", "name": "tailchat",
"version": "1.0.0", "version": "1.0.0",
"main": "index.js", "main": "index.js",
"workspaces": [ "workspaces": [
@ -7,7 +7,7 @@
"shared", "shared",
"app" "app"
], ],
"repository": "https://github.com/pawchat/pawchat.git", "repository": "https://github.com/msgbyte/tailchat.git",
"author": "moonrailgun <moonrailgun@gmail.com>", "author": "moonrailgun <moonrailgun@gmail.com>",
"license": "GPLv3", "license": "GPLv3",
"private": true, "private": true,

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import { CacheProvider } from '../cache/Provider'; import { CacheProvider } from '../cache/Provider';
export const PawProvider: React.FC = React.memo((props) => { export const TcProvider: React.FC = React.memo((props) => {
return <CacheProvider>{props.children}</CacheProvider>; return <CacheProvider>{props.children}</CacheProvider>;
}); });
PawProvider.displayName = 'PawProvider'; TcProvider.displayName = 'TcProvider';

@ -1,5 +1,5 @@
/** /**
* Pawchat * TailChat
*/ */
export const config = { export const config = {

@ -18,7 +18,7 @@ export type {
export { regField } from './components/FastForm/field'; export { regField } from './components/FastForm/field';
export { regFormContainer } from './components/FastForm/container'; export { regFormContainer } from './components/FastForm/container';
export type { FastFormContainerComponent } from './components/FastForm/container'; export type { FastFormContainerComponent } from './components/FastForm/container';
export { PawProvider } from './components/Provider'; export { TcProvider } from './components/Provider';
// i18n // i18n
export { t, setLanguage, useTranslation } from './i18n'; export { t, setLanguage, useTranslation } from './i18n';

@ -1,8 +1,8 @@
{ {
"name": "pawchat-shared", "name": "tailchat-shared",
"version": "1.0.0", "version": "1.0.0",
"main": "index.tsx", "main": "index.tsx",
"repository": "https://github.com/pawchat/pawchat.git", "repository": "https://github.com/msgbyte/tailchat.git",
"author": "moonrailgun <moonrailgun@gmail.com>", "author": "moonrailgun <moonrailgun@gmail.com>",
"license": "GPLv3", "license": "GPLv3",
"private": true, "private": true,

@ -1,4 +1,4 @@
import type { AppState } from 'pawchat-shared/redux/slices'; import type { AppState } from 'tailchat-shared/redux/slices';
import { useSelector, useDispatch } from 'react-redux'; import { useSelector, useDispatch } from 'react-redux';
export function useAppSelector<T>( export function useAppSelector<T>(

3265
web/package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -1,8 +1,8 @@
{ {
"name": "pawchat-web", "name": "tailchat-web",
"version": "1.0.0", "version": "1.0.0",
"main": "index.js", "main": "index.js",
"repository": "https://github.com/pawchat/pawchat.git", "repository": "https://github.com/msgbyte/tailchat.git",
"author": "moonrailgun <moonrailgun@gmail.com>", "author": "moonrailgun <moonrailgun@gmail.com>",
"license": "GPLv3", "license": "GPLv3",
"private": true, "private": true,
@ -18,7 +18,7 @@
"clsx": "^1.1.1", "clsx": "^1.1.1",
"jwt-decode": "^3.1.2", "jwt-decode": "^3.1.2",
"p-min-delay": "^4.0.0", "p-min-delay": "^4.0.0",
"pawchat-shared": "*", "tailchat-shared": "*",
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2", "react-dom": "^17.0.2",
"react-redux": "^7.2.4", "react-redux": "^7.2.4",

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import { BrowserRouter, Redirect, Route, Switch } from 'react-router-dom'; import { BrowserRouter, Redirect, Route, Switch } from 'react-router-dom';
import { PawProvider, useStorage } from 'pawchat-shared'; import { TcProvider, useStorage } from 'tailchat-shared';
import clsx from 'clsx'; import clsx from 'clsx';
import { Loadable } from './components/Loadable'; import { Loadable } from './components/Loadable';
@ -15,7 +15,7 @@ const EntryRoute = Loadable(() =>
const AppProvider: React.FC = React.memo((props) => { const AppProvider: React.FC = React.memo((props) => {
return ( return (
<BrowserRouter> <BrowserRouter>
<PawProvider>{props.children}</PawProvider> <TcProvider>{props.children}</TcProvider>
</BrowserRouter> </BrowserRouter>
); );
}); });

@ -6,7 +6,7 @@ import _isNil from 'lodash/isNil';
import _isEmpty from 'lodash/isEmpty'; import _isEmpty from 'lodash/isEmpty';
import _isNumber from 'lodash/isNumber'; import _isNumber from 'lodash/isNumber';
import type { AvatarProps as AntdAvatarProps } from 'antd/lib/avatar'; import type { AvatarProps as AntdAvatarProps } from 'antd/lib/avatar';
import { getTextColorHex } from 'pawchat-shared'; import { getTextColorHex } from 'tailchat-shared';
interface AvatarProps extends AntdAvatarProps { interface AvatarProps extends AntdAvatarProps {
name?: string; name?: string;

@ -3,7 +3,7 @@ import {
ChatMessage, ChatMessage,
formatShortTime, formatShortTime,
useCachedUserInfo, useCachedUserInfo,
} from 'pawchat-shared'; } from 'tailchat-shared';
import { Avatar } from '@/components/Avatar'; import { Avatar } from '@/components/Avatar';
import clsx from 'clsx'; import clsx from 'clsx';

@ -3,7 +3,7 @@ import {
ChatMessage, ChatMessage,
getMessageTimeDiff, getMessageTimeDiff,
shouldShowMessageTime, shouldShowMessageTime,
} from 'pawchat-shared'; } from 'tailchat-shared';
import { ChatMessageItem } from './Item'; import { ChatMessageItem } from './Item';
import { Divider } from 'antd'; import { Divider } from 'antd';

@ -1,6 +1,6 @@
import { Skeleton } from 'antd'; import { Skeleton } from 'antd';
import React from 'react'; import React from 'react';
import { useConverseMessage } from 'pawchat-shared'; import { useConverseMessage } from 'tailchat-shared';
import { AlertErrorView } from '../AlertErrorView'; import { AlertErrorView } from '../AlertErrorView';
import { ChatInputBox } from './ChatInputBox'; import { ChatInputBox } from './ChatInputBox';
import { ChatMessageList } from './ChatMessageList'; import { ChatMessageList } from './ChatMessageList';

@ -1,5 +1,5 @@
import { Icon } from '@iconify/react'; import { Icon } from '@iconify/react';
import { t } from 'pawchat-shared'; import { t } from 'tailchat-shared';
import React from 'react'; import React from 'react';
/** /**

@ -3,7 +3,7 @@ import { Avatar } from './Avatar';
import _isEmpty from 'lodash/isEmpty'; import _isEmpty from 'lodash/isEmpty';
import { Skeleton, Space } from 'antd'; import { Skeleton, Space } from 'antd';
// import { openUserProfile } from './modals/UserProfile'; // import { openUserProfile } from './modals/UserProfile';
import { useCachedUserInfo } from 'pawchat-shared'; import { useCachedUserInfo } from 'tailchat-shared';
import { useCachedOnlineStatus } from '../../../shared/cache/useCache'; import { useCachedOnlineStatus } from '../../../shared/cache/useCache';
// const UserAvatar = styled(Avatar)` // const UserAvatar = styled(Avatar)`

@ -4,7 +4,7 @@ import {
regField, regField,
FastFormContainerComponent, FastFormContainerComponent,
regFormContainer, regFormContainer,
} from 'pawchat-shared'; } from 'tailchat-shared';
import { Form, Button } from 'antd'; import { Form, Button } from 'antd';
import { FastFormText } from './types/Text'; import { FastFormText } from './types/Text';

@ -5,8 +5,8 @@ import _isNil from 'lodash/isNil';
import type { import type {
FastFormFieldComponent, FastFormFieldComponent,
FastFormFieldProps, FastFormFieldProps,
} from 'pawchat-shared'; } from 'tailchat-shared';
import { CustomField } from 'pawchat-shared'; import { CustomField } from 'tailchat-shared';
export const FastFormCustom: FastFormFieldComponent<{ export const FastFormCustom: FastFormFieldComponent<{
render: (props: FastFormFieldProps) => React.ReactNode; render: (props: FastFormFieldProps) => React.ReactNode;

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import { Input, Form } from 'antd'; import { Input, Form } from 'antd';
import type { FastFormFieldComponent } from 'pawchat-shared'; import type { FastFormFieldComponent } from 'tailchat-shared';
import { getValidateStatus } from '../utils'; import { getValidateStatus } from '../utils';
export const FastFormPassword: FastFormFieldComponent = React.memo((props) => { export const FastFormPassword: FastFormFieldComponent = React.memo((props) => {

@ -2,7 +2,7 @@ import React, { useEffect } from 'react';
import { Select, Form } from 'antd'; import { Select, Form } from 'antd';
import _get from 'lodash/get'; import _get from 'lodash/get';
import _isNil from 'lodash/isNil'; import _isNil from 'lodash/isNil';
import type { FastFormFieldComponent } from 'pawchat-shared'; import type { FastFormFieldComponent } from 'tailchat-shared';
const Option = Select.Option; const Option = Select.Option;

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import { Input, Form } from 'antd'; import { Input, Form } from 'antd';
import type { FastFormFieldComponent } from 'pawchat-shared'; import type { FastFormFieldComponent } from 'tailchat-shared';
import { getValidateStatus } from '../utils'; import { getValidateStatus } from '../utils';
export const FastFormText: FastFormFieldComponent = React.memo((props) => { export const FastFormText: FastFormFieldComponent = React.memo((props) => {

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import { Input, Form } from 'antd'; import { Input, Form } from 'antd';
import type { FastFormFieldComponent } from 'pawchat-shared'; import type { FastFormFieldComponent } from 'tailchat-shared';
import { getValidateStatus } from '../utils'; import { getValidateStatus } from '../utils';
export const FastFormTextArea: FastFormFieldComponent = React.memo((props) => { export const FastFormTextArea: FastFormFieldComponent = React.memo((props) => {

@ -1,4 +1,4 @@
import { isBrowser, useRafState } from 'pawchat-shared'; import { isBrowser, useRafState } from 'tailchat-shared';
import { useEffect } from 'react'; import { useEffect } from 'react';
// Reference: https://github.com/streamich/react-use/blob/master/src/useWindowSize.ts // Reference: https://github.com/streamich/react-use/blob/master/src/useWindowSize.ts

@ -6,7 +6,7 @@ import {
setStorage, setStorage,
setToasts, setToasts,
setTokenGetter, setTokenGetter,
} from 'pawchat-shared'; } from 'tailchat-shared';
import { getUserJWT } from './utils/jwt-helper'; import { getUserJWT } from './utils/jwt-helper';
const webStorage = buildStorage(window.localStorage); const webStorage = buildStorage(window.localStorage);

@ -1,6 +1,6 @@
import { Icon } from '@iconify/react'; import { Icon } from '@iconify/react';
import { Divider } from 'antd'; import { Divider } from 'antd';
import { loginWithEmail, t, useAsyncFn } from 'pawchat-shared'; import { loginWithEmail, t, useAsyncFn } from 'tailchat-shared';
import React, { useCallback, useState } from 'react'; import React, { useCallback, useState } from 'react';
import { Spinner } from '../../components/Spinner'; import { Spinner } from '../../components/Spinner';
import { string } from 'yup'; import { string } from 'yup';
@ -57,7 +57,7 @@ export const LoginView: React.FC = React.memo(() => {
return ( return (
<div className="w-96 text-white"> <div className="w-96 text-white">
<div className="mb-4 text-2xl"> Paw Chat</div> <div className="mb-4 text-2xl"> Tail Chat</div>
<div> <div>
<div className="mb-4"> <div className="mb-4">

@ -1,4 +1,4 @@
import { registerWithEmail, useAsyncFn } from 'pawchat-shared'; import { registerWithEmail, useAsyncFn } from 'tailchat-shared';
import React, { useCallback, useState } from 'react'; import React, { useCallback, useState } from 'react';
import { Spinner } from '../../components/Spinner'; import { Spinner } from '../../components/Spinner';
import { string } from 'yup'; import { string } from 'yup';

@ -10,7 +10,7 @@ import {
useAppSelector, useAppSelector,
useAsyncFn, useAsyncFn,
UserBaseInfo, UserBaseInfo,
} from 'pawchat-shared'; } from 'tailchat-shared';
import React, { useCallback, useState } from 'react'; import React, { useCallback, useState } from 'react';
import _isNil from 'lodash/isNil'; import _isNil from 'lodash/isNil';

@ -1,5 +1,5 @@
import React, { useCallback } from 'react'; import React, { useCallback } from 'react';
import { createDMConverse, t, useAppSelector } from 'pawchat-shared'; import { createDMConverse, t, useAppSelector } from 'tailchat-shared';
import { UserListItem } from '@/components/UserListItem'; import { UserListItem } from '@/components/UserListItem';
import { IconBtn } from '@/components/IconBtn'; import { IconBtn } from '@/components/IconBtn';
import { Tooltip } from 'antd'; import { Tooltip } from 'antd';

@ -7,7 +7,7 @@ import {
acceptFriendRequest, acceptFriendRequest,
denyFriendRequest, denyFriendRequest,
useAsyncRequest, useAsyncRequest,
} from 'pawchat-shared'; } from 'tailchat-shared';
import React from 'react'; import React from 'react';
export const RequestReceived: React.FC<{ export const RequestReceived: React.FC<{

@ -6,7 +6,7 @@ import {
FriendRequest, FriendRequest,
t, t,
useAsyncFn, useAsyncFn,
} from 'pawchat-shared'; } from 'tailchat-shared';
import React from 'react'; import React from 'react';
export const RequestSend: React.FC<{ export const RequestSend: React.FC<{

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import { PillTabPane, PillTabs } from '@/components/PillTabs'; import { PillTabPane, PillTabs } from '@/components/PillTabs';
import { AddFriend } from './AddFriend'; import { AddFriend } from './AddFriend';
import { t, useAppSelector } from 'pawchat-shared'; import { t, useAppSelector } from 'tailchat-shared';
import { RequestSend } from './RequestSend'; import { RequestSend } from './RequestSend';
import { RequestReceived } from './RequestReceived'; import { RequestReceived } from './RequestReceived';
import { FriendList } from './FriendList'; import { FriendList } from './FriendList';

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import { Icon } from '@iconify/react'; import { Icon } from '@iconify/react';
import { SidebarItem } from '../SidebarItem'; import { SidebarItem } from '../SidebarItem';
import { useDMConverseList } from 'pawchat-shared'; import { useDMConverseList } from 'tailchat-shared';
import { SidebarDMItem } from './SidebarDMItem'; import { SidebarDMItem } from './SidebarDMItem';
const SidebarSection: React.FC<{ const SidebarSection: React.FC<{

@ -2,8 +2,8 @@ import {
ChatConverseState, ChatConverseState,
useCachedUserInfo, useCachedUserInfo,
useUserId, useUserId,
} from 'pawchat-shared'; } from 'tailchat-shared';
import { isValidStr } from 'pawchat-shared/utils/string-helper'; import { isValidStr } from 'tailchat-shared/utils/string-helper';
import React, { useMemo } from 'react'; import React, { useMemo } from 'react';
import { SidebarItem } from '../SidebarItem'; import { SidebarItem } from '../SidebarItem';

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { useAppSelector } from 'pawchat-shared'; import { useAppSelector } from 'tailchat-shared';
import { Icon } from '@iconify/react'; import { Icon } from '@iconify/react';
import clsx, { ClassValue } from 'clsx'; import clsx, { ClassValue } from 'clsx';
import { Avatar } from '../../components/Avatar'; import { Avatar } from '../../components/Avatar';

@ -4,13 +4,13 @@ import {
setupRedux, setupRedux,
useAsync, useAsync,
userActions, userActions,
} from 'pawchat-shared'; } from 'tailchat-shared';
import React from 'react'; import React from 'react';
import { LoadingSpinner } from '../../components/LoadingSpinner'; import { LoadingSpinner } from '../../components/LoadingSpinner';
import { Provider as ReduxProvider } from 'react-redux'; import { Provider as ReduxProvider } from 'react-redux';
import { getGlobalUserLoginInfo } from '../../utils/user-helper'; import { getGlobalUserLoginInfo } from '../../utils/user-helper';
import _isNil from 'lodash/isNil'; import _isNil from 'lodash/isNil';
import { loginWithToken } from 'pawchat-shared/model/user'; import { loginWithToken } from 'tailchat-shared/model/user';
import { getUserJWT } from '../../utils/jwt-helper'; import { getUserJWT } from '../../utils/jwt-helper';
import { useHistory } from 'react-router'; import { useHistory } from 'react-router';
import { SidebarContextProvider } from './SidebarContext'; import { SidebarContextProvider } from './SidebarContext';

@ -1,7 +1,7 @@
import _isObject from 'lodash/isObject'; import _isObject from 'lodash/isObject';
import _isNull from 'lodash/isNull'; import _isNull from 'lodash/isNull';
import jwtDecode from 'jwt-decode'; import jwtDecode from 'jwt-decode';
import { getStorage } from 'pawchat-shared'; import { getStorage } from 'tailchat-shared';
/** /**
* jwt(json) * jwt(json)

@ -1,4 +1,4 @@
import type { UserLoginInfo } from 'pawchat-shared'; import type { UserLoginInfo } from 'tailchat-shared';
let _userLoginInfo: UserLoginInfo; let _userLoginInfo: UserLoginInfo;

@ -111,7 +111,7 @@ const config: Configuration = {
'process.env.SERVICE_URL': JSON.stringify(process.env.SERVICE_URL), 'process.env.SERVICE_URL': JSON.stringify(process.env.SERVICE_URL),
}), }),
new HtmlWebpackPlugin({ new HtmlWebpackPlugin({
title: 'PawChat', title: 'TailChat',
inject: true, inject: true,
hash: true, hash: true,
template: path.resolve(ROOT_PATH, './assets/template.html'), template: path.resolve(ROOT_PATH, './assets/template.html'),

Loading…
Cancel
Save