put the settings in the panel header
They were floating buttons over the top-right of the iframe, which was wrong twice: they sit on top of Gitea's own controls, and an overlay on an application that fills its whole panel is invisible until you already know it is there. Reported as "I have no access to settings when the iframe is loaded", which is exactly right. The header is the platform's own furniture — always present, never competing with the content underneath — and it is where photos and jellyfin put theirs. It also names where you are, so /gitea/connection reads as "Gitea — connection" rather than looking like the frame failed to load.
This commit is contained in:
+2
-19
@@ -1,8 +1,7 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { Link, useParams } from 'react-router';
|
||||
import { ExternalLink, Loader2, Plug, TriangleAlert } from 'lucide-react';
|
||||
import { useParams } from 'react-router';
|
||||
import { Loader2, TriangleAlert } from 'lucide-react';
|
||||
import { useClient } from 'hooks/useClient';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { GiteaConnection, type ConnectionState } from './GiteaConnection';
|
||||
|
||||
// Gitea's own web interface, rendered in place.
|
||||
@@ -99,22 +98,6 @@ export const GiteaFrame = () => {
|
||||
{/* The escape hatch, and it is not an admission of defeat: the whole point of proxying an app that
|
||||
already has a UI is that its own UI stays available. Anything the frame handles badly, this
|
||||
opens properly. */}
|
||||
<div className="absolute right-3 top-3 z-10 flex gap-1.5 opacity-60 transition-opacity hover:opacity-100">
|
||||
{/* A real link, not a button: it is navigation, and it should be cmd-clickable like any other. */}
|
||||
<Button size="sm" variant="outline" asChild title="Connection settings">
|
||||
<Link to="/gitea/connection">
|
||||
<Plug className="h-3.5 w-3.5" />
|
||||
</Link>
|
||||
</Button>
|
||||
<Button
|
||||
size="sm"
|
||||
variant="outline"
|
||||
onClick={() => window.open(FRAME_SRC, '_blank', 'noopener')}
|
||||
title="Open Gitea in a new tab"
|
||||
>
|
||||
<ExternalLink className="h-3.5 w-3.5" />
|
||||
</Button>
|
||||
</div>
|
||||
<iframe
|
||||
src={FRAME_SRC}
|
||||
title="Gitea"
|
||||
|
||||
Reference in New Issue
Block a user