merge clickup connector changes
Merge remote-tracking branch 'origin/fix/click-up-connector' into int
This commit is contained in:
commit
f09f43666a
1 changed files with 11 additions and 23 deletions
|
|
@ -15,10 +15,6 @@ import styles from '../admin/Admin.module.css';
|
||||||
|
|
||||||
import { useLanguage } from '../../providers/language/LanguageContext';
|
import { useLanguage } from '../../providers/language/LanguageContext';
|
||||||
|
|
||||||
/** Wenn false: keine neue ClickUp-Verbindung über diese Seite (Buttons inaktiv). */
|
|
||||||
const isClickupConnectionUiEnabled = false;
|
|
||||||
|
|
||||||
|
|
||||||
export const ConnectionsPage: React.FC = () => {
|
export const ConnectionsPage: React.FC = () => {
|
||||||
const { t } = useLanguage();
|
const { t } = useLanguage();
|
||||||
|
|
||||||
|
|
@ -197,9 +193,7 @@ export const ConnectionsPage: React.FC = () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Handle create ClickUp connection (UI kann per Flag abgeschaltet sein)
|
|
||||||
const handleCreateClickup = async () => {
|
const handleCreateClickup = async () => {
|
||||||
if (!isClickupConnectionUiEnabled) return;
|
|
||||||
try {
|
try {
|
||||||
await createClickupConnectionAndAuth();
|
await createClickupConnectionAndAuth();
|
||||||
refetch();
|
refetch();
|
||||||
|
|
@ -253,9 +247,7 @@ export const ConnectionsPage: React.FC = () => {
|
||||||
<div>
|
<div>
|
||||||
<h1 className={styles.pageTitle}>{t('Verbindungen')}</h1>
|
<h1 className={styles.pageTitle}>{t('Verbindungen')}</h1>
|
||||||
<p className={styles.pageSubtitle}>
|
<p className={styles.pageSubtitle}>
|
||||||
{isClickupConnectionUiEnabled
|
{t('Persönliche Datenanbindungen verwalten (OAuth: Google, Microsoft, ClickUp)')}
|
||||||
? t('Persönliche Datenanbindungen verwalten (OAuth: Google, Microsoft, ClickUp)')
|
|
||||||
: t('Persönliche Datenanbindungen verwalten (OAuth: Google, Microsoft)')}
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.headerActions}>
|
<div className={styles.headerActions}>
|
||||||
|
|
@ -290,17 +282,15 @@ export const ConnectionsPage: React.FC = () => {
|
||||||
>
|
>
|
||||||
<FaMicrosoft /> Microsoft
|
<FaMicrosoft /> Microsoft
|
||||||
</button>
|
</button>
|
||||||
{isClickupConnectionUiEnabled && (
|
<button
|
||||||
<button
|
type="button"
|
||||||
type="button"
|
className={styles.clickupButton}
|
||||||
className={styles.clickupButton}
|
onClick={handleCreateClickup}
|
||||||
onClick={handleCreateClickup}
|
disabled={isConnecting}
|
||||||
disabled={isConnecting}
|
title={t('ClickUp-Konto verbinden (OAuth oder Personal Token nach Anmeldung)')}
|
||||||
title={t('ClickUp-Konto verbinden')}
|
>
|
||||||
>
|
<FaTasks /> ClickUp
|
||||||
<FaTasks /> ClickUp
|
</button>
|
||||||
</button>
|
|
||||||
)}
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -336,9 +326,7 @@ export const ConnectionsPage: React.FC = () => {
|
||||||
icon: <FaLink />,
|
icon: <FaLink />,
|
||||||
onClick: handleConnect,
|
onClick: handleConnect,
|
||||||
title: t('Verbinden'),
|
title: t('Verbinden'),
|
||||||
visible: (row: Connection) =>
|
visible: (row: Connection) => row.status !== 'active',
|
||||||
row.status !== 'active' &&
|
|
||||||
(isClickupConnectionUiEnabled || row.authority !== 'clickup'),
|
|
||||||
loading: () => isConnecting,
|
loading: () => isConnecting,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue