Format
This commit is contained in:
parent
63f2af9d8f
commit
bfd154b8f1
3 changed files with 7 additions and 8 deletions
|
@ -266,13 +266,14 @@ function ConfigImpl({
|
|||
</div>
|
||||
|
||||
<div>
|
||||
<div className={s0.label}>{t('current_backend')}
|
||||
<div className={s0.label}>
|
||||
{t('current_backend')}
|
||||
<p>{apiConfig.baseURL}</p>
|
||||
</div>
|
||||
<div className={s0.label}>Action</div>
|
||||
<Button
|
||||
start={<LogOut size={16} />}
|
||||
label={t("switch_backend")}
|
||||
label={t('switch_backend')}
|
||||
onClick={openAPIConfigModal}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
@ -12,12 +12,12 @@ import useRemainingViewPortHeight from '../hooks/useRemainingViewPortHeight';
|
|||
import { getClashAPIConfig } from '../store/app';
|
||||
import s from './Connections.module.scss';
|
||||
import ConnectionTable from './ConnectionTable';
|
||||
import { MutableConnRefCtx } from './conns/ConnCtx';
|
||||
import ContentHeader from './ContentHeader';
|
||||
import ModalCloseAllConnections from './ModalCloseAllConnections';
|
||||
import { Action, Fab, position as fabPosition } from './shared/Fab';
|
||||
import { connect } from './StateProvider';
|
||||
import SvgYacd from './SvgYacd';
|
||||
import { MutableConnRefCtx } from './conns/ConnCtx';
|
||||
|
||||
const { useEffect, useState, useRef, useCallback } = React;
|
||||
|
||||
|
@ -138,9 +138,7 @@ function Conn({ apiConfig }) {
|
|||
const openCloseAllModal = useCallback(() => setIsCloseAllModalOpen(true), []);
|
||||
const closeCloseAllModal = useCallback(() => setIsCloseAllModalOpen(false), []);
|
||||
const [isRefreshPaused, setIsRefreshPaused] = useState(false);
|
||||
const toggleIsRefreshPaused = useCallback(() => {
|
||||
setIsRefreshPaused((x) => !x);
|
||||
}, []);
|
||||
const toggleIsRefreshPaused = useCallback(() => setIsRefreshPaused((x) => !x), []);
|
||||
const closeAllConnections = useCallback(() => {
|
||||
connAPI.closeAllConnections(apiConfig);
|
||||
closeCloseAllModal();
|
||||
|
@ -172,7 +170,7 @@ function Conn({ apiConfig }) {
|
|||
prevConnsRef.current = x;
|
||||
}
|
||||
},
|
||||
[setConns, isRefreshPaused]
|
||||
[setConns, isRefreshPaused, connCtx]
|
||||
);
|
||||
useEffect(() => {
|
||||
return connAPI.fetchData(apiConfig, read);
|
||||
|
|
|
@ -27,7 +27,7 @@ export const data = {
|
|||
Connections: 'Connections',
|
||||
current_backend: 'Current Backend',
|
||||
Active: 'Active',
|
||||
switch_backend: 'Switch backend"',
|
||||
switch_backend: 'Switch backend',
|
||||
Closed: 'Closed',
|
||||
switch_theme: 'Switch theme',
|
||||
theme: 'theme',
|
||||
|
|
Loading…
Reference in a new issue