mirror of
https://github.com/wassname/talk.git
synced 2026-09-13 13:10:43 +08:00
[next] Admin Configure (#2076)
* feat: Add RadioButton and CheckBox * feat: configure facebook and google auth * feat: configure sso, localAuth and displayName + some tests * test: add integration tests for configure auth * test: more integration tests * feat: add oidc support * test: add oidc integration test * feat: generate sso key initially * fix: import fetchQuery from correct package * fix: admin url * fix: set timezone to utc when testing * refactor: improve route config * fix: remove obsolete line * fix: clientMutationId increment * fix: oidc only create when enabled * fix: copy * test: update snapshots * feat: fixed graphql logging extension * Update src/locales/en-US/admin.ftl Co-Authored-By: cvle <vinh@wikiwi.io> * Apply suggestions from code review Co-Authored-By: cvle <vinh@wikiwi.io> * test: update snapshots * fix: change Local Auth to Email Authentication * fix: copy updates
This commit is contained in:
@@ -5,7 +5,7 @@ import HTMLContent from "talk-stream/components/HTMLContent";
|
||||
import Timestamp from "talk-stream/components/Timestamp";
|
||||
import { Flex, HorizontalGutter } from "talk-ui/components";
|
||||
|
||||
import * as styles from "./Comment.css";
|
||||
import styles from "./Comment.css";
|
||||
import EditedMarker from "./EditedMarker";
|
||||
import InReplyTo from "./InReplyTo";
|
||||
import TopBarLeft from "./TopBarLeft";
|
||||
|
||||
@@ -5,7 +5,7 @@ import { PropTypesOf } from "talk-framework/types";
|
||||
|
||||
import Indent from "../Indent";
|
||||
import Comment from "./Comment";
|
||||
import * as styles from "./IndentedComment.css";
|
||||
import styles from "./IndentedComment.css";
|
||||
|
||||
export interface IndentedCommentProps extends PropTypesOf<typeof Comment> {
|
||||
indentLevel?: number;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { StatelessComponent } from "react";
|
||||
|
||||
import { MatchMedia, Typography } from "talk-ui/components";
|
||||
|
||||
import * as styles from "./Username.css";
|
||||
import styles from "./Username.css";
|
||||
|
||||
export interface UsernameProps {
|
||||
children: string;
|
||||
|
||||
@@ -8,7 +8,7 @@ import { Button, Flex, HorizontalGutter } from "talk-ui/components";
|
||||
import CommentContainer from "../containers/CommentContainer";
|
||||
import LocalReplyListContainer from "../containers/LocalReplyListContainer";
|
||||
import { RootParent } from "./Comment";
|
||||
import * as styles from "./ConversationThread.css";
|
||||
import styles from "./ConversationThread.css";
|
||||
import Counter from "./Counter";
|
||||
import { Circle, Line } from "./Timeline";
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import cn from "classnames";
|
||||
import React, { StatelessComponent } from "react";
|
||||
|
||||
import * as styles from "./Counter.css";
|
||||
import styles from "./Counter.css";
|
||||
|
||||
interface Props {
|
||||
className?: string;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import cn from "classnames";
|
||||
import React, { StatelessComponent } from "react";
|
||||
|
||||
import * as styles from "./Indent.css";
|
||||
import styles from "./Indent.css";
|
||||
|
||||
export interface IndentProps {
|
||||
className?: string;
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
Popover,
|
||||
} from "talk-ui/components";
|
||||
|
||||
import * as styles from "./PermalinkButton.css";
|
||||
import styles from "./PermalinkButton.css";
|
||||
import PermalinkPopover from "./PermalinkPopover";
|
||||
|
||||
interface PermalinkProps {
|
||||
@@ -42,10 +42,7 @@ class Permalink extends React.Component<PermalinkProps> {
|
||||
this.toggleVisibilityOncePerFrame(toggleVisibility)
|
||||
}
|
||||
>
|
||||
<PermalinkPopover
|
||||
permalinkURL={url}
|
||||
toggleVisibility={toggleVisibility}
|
||||
/>
|
||||
<PermalinkPopover permalinkURL={url} />
|
||||
</ClickOutside>
|
||||
)}
|
||||
>
|
||||
|
||||
+4
-40
@@ -1,41 +1,17 @@
|
||||
import { Localized } from "fluent-react/compat";
|
||||
import React from "react";
|
||||
import CopyToClipboard from "react-copy-to-clipboard";
|
||||
|
||||
import { Button, Flex, TextField } from "talk-ui/components";
|
||||
import { CopyButton } from "talk-framework/components";
|
||||
import { Flex, TextField } from "talk-ui/components";
|
||||
|
||||
import * as styles from "./PermalinkPopover.css";
|
||||
import styles from "./PermalinkPopover.css";
|
||||
|
||||
interface InnerProps {
|
||||
permalinkURL: string;
|
||||
toggleVisibility: () => void;
|
||||
}
|
||||
|
||||
interface State {
|
||||
copied: boolean;
|
||||
}
|
||||
|
||||
class PermalinkPopover extends React.Component<InnerProps> {
|
||||
public state: State = {
|
||||
copied: false,
|
||||
};
|
||||
|
||||
private onCopy = async () => {
|
||||
await this.toggleCopied();
|
||||
setTimeout(() => {
|
||||
this.toggleCopied();
|
||||
}, 800);
|
||||
};
|
||||
|
||||
private toggleCopied = () => {
|
||||
this.setState((state: State) => ({
|
||||
copied: !state.copied,
|
||||
}));
|
||||
};
|
||||
|
||||
public render() {
|
||||
const { permalinkURL } = this.props;
|
||||
const { copied } = this.state;
|
||||
return (
|
||||
<Flex itemGutter="half" className={styles.root}>
|
||||
<TextField
|
||||
@@ -43,19 +19,7 @@ class PermalinkPopover extends React.Component<InnerProps> {
|
||||
className={styles.textField}
|
||||
readOnly
|
||||
/>
|
||||
<CopyToClipboard text={permalinkURL} onCopy={this.onCopy}>
|
||||
<Button color="primary" variant="filled" size="small">
|
||||
{copied ? (
|
||||
<Localized id="comments-permalinkPopover-copied">
|
||||
<span>Copied!</span>
|
||||
</Localized>
|
||||
) : (
|
||||
<Localized id="comments-permalinkPopover-copy">
|
||||
<span>Copy</span>
|
||||
</Localized>
|
||||
)}
|
||||
</Button>
|
||||
</CopyToClipboard>
|
||||
<CopyButton text={permalinkURL} />
|
||||
</Flex>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import { Button, Flex, HorizontalGutter, Typography } from "talk-ui/components";
|
||||
import UserBoxContainer from "../../../containers/UserBoxContainer";
|
||||
import ConversationThreadContainer from "../containers/ConversationThreadContainer";
|
||||
import ReplyListContainer from "../containers/ReplyListContainer";
|
||||
import * as styles from "./PermalinkView.css";
|
||||
import styles from "./PermalinkView.css";
|
||||
|
||||
export interface PermalinkViewProps {
|
||||
me: PropTypesOf<typeof ConversationThreadContainer>["me"] &
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
Typography,
|
||||
} from "talk-ui/components";
|
||||
|
||||
import * as styles from "./PostCommentForm.css";
|
||||
import styles from "./PostCommentForm.css";
|
||||
import PoweredBy from "./PoweredBy";
|
||||
import RTE from "./RTE";
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Localized } from "fluent-react/compat";
|
||||
import React, { StatelessComponent } from "react";
|
||||
import { Button, HorizontalGutter } from "talk-ui/components";
|
||||
import * as styles from "./PostCommentFormFake.css";
|
||||
import styles from "./PostCommentFormFake.css";
|
||||
import RTE from "./RTE";
|
||||
|
||||
const PostCommentFormFake: StatelessComponent = props => (
|
||||
|
||||
@@ -5,7 +5,7 @@ import React, { Ref, StatelessComponent } from "react";
|
||||
import { Icon } from "talk-ui/components";
|
||||
|
||||
import { PropTypesOf } from "talk-ui/types";
|
||||
import * as styles from "./RTE.css";
|
||||
import styles from "./RTE.css";
|
||||
|
||||
// Use a special Localized version that forwards
|
||||
// ref and passes the api prop to the children.
|
||||
|
||||
@@ -10,7 +10,7 @@ import CommentContainer from "../containers/CommentContainer";
|
||||
import PostCommentFormContainer from "../containers/PostCommentFormContainer";
|
||||
import ReplyListContainer from "../containers/ReplyListContainer";
|
||||
import PostCommentFormFake from "./PostCommentFormFake";
|
||||
import * as styles from "./Stream.css";
|
||||
import styles from "./Stream.css";
|
||||
|
||||
export interface StreamProps {
|
||||
story: {
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
Typography,
|
||||
} from "talk-ui/components";
|
||||
import HTMLContent from "../../../components/HTMLContent";
|
||||
import * as styles from "./HistoryComment.css";
|
||||
import styles from "./HistoryComment.css";
|
||||
|
||||
export interface HistoryCommentProps {
|
||||
body: string | null;
|
||||
|
||||
Reference in New Issue
Block a user