mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 02:56:41 +07:00
starred premoderation
This commit is contained in:
parent
d2beab0976
commit
fd7404e565
5 changed files with 8 additions and 8 deletions
|
@ -23,17 +23,16 @@ module.exports = async (req, res) => {
|
|||
};
|
||||
}
|
||||
|
||||
console.log('is starred?', starred);
|
||||
if (is_starred) {
|
||||
criteria = {
|
||||
...criteria,
|
||||
is_starred: true,
|
||||
is_public: true,
|
||||
};
|
||||
}
|
||||
|
||||
if (!author || !user || (user._id !== author)) {
|
||||
} else if (!author || !user || (user._id !== author)) {
|
||||
criteria = {
|
||||
...criteria,
|
||||
is_starred: false,
|
||||
is_public: true,
|
||||
};
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@ import {
|
|||
import { isMobile } from '$utils/window';
|
||||
import classnames from 'classnames';
|
||||
|
||||
// import { Range } from 'rc-slider';
|
||||
import * as Range from 'rc-slider/lib/Range';
|
||||
import { TABS } from '$constants/dialogs';
|
||||
import { Icon } from '$components/panels/Icon';
|
||||
|
|
|
@ -14,7 +14,6 @@ import { CLIENT } from '$config/frontend';
|
|||
import { DIALOGS } from '$constants/dialogs';
|
||||
import { IRootState } from "$redux/user/reducer";
|
||||
import { Tooltip } from "$components/panels/Tooltip";
|
||||
import { TitleDialog } from "$components/dialogs/TitleDialog";
|
||||
|
||||
interface Props extends IRootState {
|
||||
userLogout: typeof userLogout,
|
||||
|
|
|
@ -18,6 +18,6 @@ export const DIALOGS: IDialogs = ({
|
|||
|
||||
export const TABS: IMapTabs = ({
|
||||
mine: 'Мои',
|
||||
all: 'Разное',
|
||||
starred: 'Общие',
|
||||
all: 'ВСЕ',
|
||||
});
|
||||
|
|
|
@ -312,7 +312,10 @@ const setRouteStarred: ActionHandler<typeof ActionCreators.setRouteStarred> = (s
|
|||
list: (
|
||||
state.routes.list
|
||||
.map(el => el._id === _id ? { ...el, is_starred } : el)
|
||||
.filter(el => state.routes.filter.tab !== 'starred' || el.is_starred)
|
||||
.filter(el => (
|
||||
(state.routes.filter.tab === 'starred' && el.is_starred) ||
|
||||
(state.routes.filter.tab === 'all' && !el.is_starred)
|
||||
))
|
||||
)
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue