mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-07-25 13:11:52 +00:00
First shlink-frontend-kit iteration
This commit is contained in:
@@ -1,11 +1,8 @@
|
||||
import classNames from 'classnames';
|
||||
import { FormGroup, Input } from 'reactstrap';
|
||||
import { LabeledFormGroup, SimpleCard, ToggleSwitch, useDomId } from '../../shlink-frontend-kit/src';
|
||||
import type { Settings } from '../../shlink-web-component';
|
||||
import { FormText } from '../utils/forms/FormText';
|
||||
import { LabeledFormGroup } from '../utils/forms/LabeledFormGroup';
|
||||
import { useDomId } from '../utils/helpers/hooks';
|
||||
import { SimpleCard } from '../utils/SimpleCard';
|
||||
import { ToggleSwitch } from '../utils/ToggleSwitch';
|
||||
|
||||
type RealTimeUpdatesProps = {
|
||||
settings: Settings;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { FC, ReactNode } from 'react';
|
||||
import { Navigate, Route, Routes } from 'react-router-dom';
|
||||
import { NavPillItem, NavPills } from '../../shlink-frontend-kit/src';
|
||||
import { NoMenuLayout } from '../common/NoMenuLayout';
|
||||
import { NavPillItem, NavPills } from '../utils/NavPills';
|
||||
|
||||
const SettingsSections: FC<{ items: ReactNode[] }> = ({ items }) => (
|
||||
<>
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import type { FC, ReactNode } from 'react';
|
||||
import { DropdownItem, FormGroup } from 'reactstrap';
|
||||
import { DropdownBtn } from '../utils/DropdownBtn';
|
||||
import { DropdownBtn, LabeledFormGroup, SimpleCard, ToggleSwitch } from '../../shlink-frontend-kit/src';
|
||||
import type { Settings } from '../../shlink-web-component';
|
||||
import { FormText } from '../utils/forms/FormText';
|
||||
import { LabeledFormGroup } from '../utils/forms/LabeledFormGroup';
|
||||
import { SimpleCard } from '../utils/SimpleCard';
|
||||
import { ToggleSwitch } from '../utils/ToggleSwitch';
|
||||
import type { Settings, ShortUrlCreationSettings as ShortUrlsSettings, TagFilteringMode } from './reducers/settings';
|
||||
import type { Defined } from '../utils/types';
|
||||
|
||||
type ShortUrlsSettings = Defined<Settings['shortUrlCreation']>;
|
||||
type TagFilteringMode = Defined<ShortUrlsSettings['tagFilteringMode']>;
|
||||
|
||||
interface ShortUrlCreationProps {
|
||||
settings: Settings;
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import type { FC } from 'react';
|
||||
import { LabeledFormGroup, OrderingDropdown, SimpleCard } from '../../shlink-frontend-kit/src';
|
||||
import type { Settings } from '../../shlink-web-component';
|
||||
import { SHORT_URLS_ORDERABLE_FIELDS } from '../../shlink-web-component/short-urls/data';
|
||||
import { LabeledFormGroup } from '../utils/forms/LabeledFormGroup';
|
||||
import { OrderingDropdown } from '../utils/OrderingDropdown';
|
||||
import { SimpleCard } from '../utils/SimpleCard';
|
||||
import type { Settings, ShortUrlsListSettings as ShortUrlsSettings } from './reducers/settings';
|
||||
import type { Defined } from '../utils/types';
|
||||
import { DEFAULT_SHORT_URLS_ORDERING } from './reducers/settings';
|
||||
|
||||
type ShortUrlsSettings = Defined<Settings['shortUrlsList']>;
|
||||
|
||||
interface ShortUrlsListSettingsProps {
|
||||
settings: Settings;
|
||||
setShortUrlsListSettings: (settings: ShortUrlsSettings) => void;
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import type { FC } from 'react';
|
||||
import { LabeledFormGroup, OrderingDropdown, SimpleCard } from '../../shlink-frontend-kit/src';
|
||||
import type { Settings } from '../../shlink-web-component';
|
||||
import { TAGS_ORDERABLE_FIELDS } from '../../shlink-web-component/tags/data/TagsListChildrenProps';
|
||||
import { LabeledFormGroup } from '../utils/forms/LabeledFormGroup';
|
||||
import { OrderingDropdown } from '../utils/OrderingDropdown';
|
||||
import { SimpleCard } from '../utils/SimpleCard';
|
||||
import type { Settings, TagsSettings as TagsSettingsOptions } from './reducers/settings';
|
||||
import type { Defined } from '../utils/types';
|
||||
|
||||
type TagsSettingsOptions = Defined<Settings['tags']>;
|
||||
|
||||
interface TagsProps {
|
||||
settings: Settings;
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
import { faMoon, faSun } from '@fortawesome/free-solid-svg-icons';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import type { FC } from 'react';
|
||||
import { SimpleCard } from '../utils/SimpleCard';
|
||||
import { SimpleCard, ToggleSwitch } from '../../shlink-frontend-kit/src';
|
||||
import type { Settings } from '../../shlink-web-component';
|
||||
import type { Theme } from '../utils/theme';
|
||||
import { changeThemeInMarkup } from '../utils/theme';
|
||||
import { ToggleSwitch } from '../utils/ToggleSwitch';
|
||||
import type { Settings, UiSettings } from './reducers/settings';
|
||||
import type { Defined } from '../utils/types';
|
||||
import './UserInterfaceSettings.scss';
|
||||
|
||||
type UiSettings = Defined<Settings['ui']>;
|
||||
|
||||
interface UserInterfaceProps {
|
||||
settings: Settings;
|
||||
setUiSettings: (settings: UiSettings) => void;
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import type { FC } from 'react';
|
||||
import { FormGroup } from 'reactstrap';
|
||||
import { LabeledFormGroup, SimpleCard, ToggleSwitch } from '../../shlink-frontend-kit/src';
|
||||
import type { Settings } from '../../shlink-web-component';
|
||||
import type { DateInterval } from '../../shlink-web-component/utils/dates/helpers/dateIntervals';
|
||||
import { DateIntervalSelector } from '../utils/dates/DateIntervalSelector';
|
||||
import { FormText } from '../utils/forms/FormText';
|
||||
import { LabeledFormGroup } from '../utils/forms/LabeledFormGroup';
|
||||
import { SimpleCard } from '../utils/SimpleCard';
|
||||
import { ToggleSwitch } from '../utils/ToggleSwitch';
|
||||
|
||||
type VisitsSettingsConfig = Settings['visits'];
|
||||
|
||||
|
||||
@@ -2,8 +2,9 @@ import type { PayloadAction, PrepareAction } from '@reduxjs/toolkit';
|
||||
import { createSlice } from '@reduxjs/toolkit';
|
||||
import { mergeDeepRight } from 'ramda';
|
||||
import type { Settings } from '../../../shlink-web-component';
|
||||
import type { Defined } from '../../utils/types';
|
||||
|
||||
type ShortUrlsOrder = Exclude<Exclude<Settings['shortUrlsList'], undefined>['defaultOrdering'], undefined>;
|
||||
type ShortUrlsOrder = Defined<Defined<Settings['shortUrlsList']>['defaultOrdering']>;
|
||||
|
||||
export const DEFAULT_SHORT_URLS_ORDERING: ShortUrlsOrder = {
|
||||
field: 'dateCreated',
|
||||
|
||||
Reference in New Issue
Block a user