mirror of
https://github.com/wassname/talk.git
synced 2026-07-26 13:37:38 +08:00
Move SortOption to talk-plugin-viewing-options
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import translations from './translations.yml';
|
||||
import { createSortOption } from 'plugin-api/beta/client/factories';
|
||||
import { createSortOption } from 'talk-plugin-viewing-options/client/api/factories';
|
||||
import { t } from 'plugin-api/beta/client/services';
|
||||
|
||||
const SortOption = createSortOption(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import translations from './translations.yml';
|
||||
import { createSortOption } from 'plugin-api/beta/client/factories';
|
||||
import { createSortOption } from 'talk-plugin-viewing-options/client/api/factories';
|
||||
import { t } from 'plugin-api/beta/client/services';
|
||||
|
||||
const SortOption = createSortOption(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import translations from './translations.yml';
|
||||
import { createSortOption } from 'plugin-api/beta/client/factories';
|
||||
import { createSortOption } from 'talk-plugin-viewing-options/client/api/factories';
|
||||
import { t } from 'plugin-api/beta/client/services';
|
||||
|
||||
const SortOption = createSortOption(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import translations from './translations.yml';
|
||||
import { createSortOption } from 'plugin-api/beta/client/factories';
|
||||
import { createSortOption } from 'talk-plugin-viewing-options/client/api/factories';
|
||||
import { t } from 'plugin-api/beta/client/services';
|
||||
|
||||
const SortOption = createSortOption(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import translations from './translations.yml';
|
||||
import { createSortOption } from 'plugin-api/beta/client/factories';
|
||||
import { createSortOption } from 'talk-plugin-viewing-options/client/api/factories';
|
||||
import { t } from 'plugin-api/beta/client/services';
|
||||
|
||||
const SortOption = createSortOption(() => t('talk-plugin-sort-newest.label'), {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import translations from './translations.yml';
|
||||
import { createSortOption } from 'plugin-api/beta/client/factories';
|
||||
import { createSortOption } from 'talk-plugin-viewing-options/client/api/factories';
|
||||
import { t } from 'plugin-api/beta/client/services';
|
||||
|
||||
const SortOption = createSortOption(() => t('talk-plugin-sort-oldest.label'), {
|
||||
|
||||
+7
-7
@@ -2,18 +2,18 @@ import React from 'react';
|
||||
import cn from 'classnames';
|
||||
import styles from './SortOption.css';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
const pluginName = 'talk-slot-viewing-options-sort-option';
|
||||
import {PLUGIN_NAME} from '../constants';
|
||||
|
||||
export default class SortOption extends React.Component {
|
||||
render() {
|
||||
const className = cn([
|
||||
styles.label,
|
||||
`${PLUGIN_NAME}-sort-option`,
|
||||
{ [`${PLUGIN_NAME}-sort-option-active`]: this.props.active },
|
||||
]);
|
||||
return (
|
||||
<label
|
||||
className={cn([
|
||||
styles.label,
|
||||
pluginName,
|
||||
{ [`${pluginName}-active`]: this.props.active },
|
||||
])}
|
||||
className={className}
|
||||
>
|
||||
<input
|
||||
type="radio"
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import withSortOption from '../hocs/withSortOption';
|
||||
import withSortOption from 'plugin-api/beta/client/hocs/withSortOption';
|
||||
import SortOption from '../components/SortOption';
|
||||
|
||||
/**
|
||||
@@ -1,4 +1,7 @@
|
||||
const prefix = 'TALK_VIEWING_OPTIONS';
|
||||
export const PLUGIN_NAME = 'talk-plugin-viewing-options';
|
||||
|
||||
/* Contants for redux actions */
|
||||
const prefix = 'TALK_VIEWING_OPTIONS';
|
||||
export const OPEN_MENU = `${prefix}_OPEN_MENU`;
|
||||
export const CLOSE_MENU = `${prefix}_CLOSE_MENU`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user