fix(plugins): preserve settings slot and privileged tier
This commit is contained in:
committed by
Linus Rath
parent
9da27df249
commit
95b5a81924
@@ -341,6 +341,7 @@ export async function POST(request: NextRequest) {
|
|||||||
author: (manifest.author as string) || 'Unknown',
|
author: (manifest.author as string) || 'Unknown',
|
||||||
description: (manifest.description as string) || '',
|
description: (manifest.description as string) || '',
|
||||||
type: (manifest.type as string) || 'hook',
|
type: (manifest.type as string) || 'hook',
|
||||||
|
...(manifest.tier === 'privileged' ? { tier: 'privileged' } : {}),
|
||||||
permissions,
|
permissions,
|
||||||
entrypoint,
|
entrypoint,
|
||||||
enabled: existingPlugin?.enabled ?? true,
|
enabled: existingPlugin?.enabled ?? true,
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import { Button } from '@/components/ui/button';
|
|||||||
import { useRouter } from '@/i18n/navigation';
|
import { useRouter } from '@/i18n/navigation';
|
||||||
import { getMaxAccounts } from '@/lib/account-utils';
|
import { getMaxAccounts } from '@/lib/account-utils';
|
||||||
import { formatFileSize, cn } from '@/lib/utils';
|
import { formatFileSize, cn } from '@/lib/utils';
|
||||||
|
import { PluginSlot } from '@/components/plugins/plugin-slot';
|
||||||
|
|
||||||
function hostnameOf(serverUrl: string): string {
|
function hostnameOf(serverUrl: string): string {
|
||||||
try { return new URL(serverUrl).hostname; } catch { return serverUrl; }
|
try { return new URL(serverUrl).hostname; } catch { return serverUrl; }
|
||||||
@@ -180,6 +181,8 @@ export function AccountSettings() {
|
|||||||
)}
|
)}
|
||||||
</SettingsSection>
|
</SettingsSection>
|
||||||
|
|
||||||
|
<PluginSlot name="settings-section" />
|
||||||
|
|
||||||
{/* Logged-in accounts list */}
|
{/* Logged-in accounts list */}
|
||||||
{accounts.length > 0 && (
|
{accounts.length > 0 && (
|
||||||
<SettingsSection title={t('accounts.title')} description={t('accounts.description')}>
|
<SettingsSection title={t('accounts.title')} description={t('accounts.description')}>
|
||||||
|
|||||||
Reference in New Issue
Block a user