design/func: fix gitea card style+button

This commit is contained in:
Aidan 2025-04-18 10:03:13 -04:00
parent b054c9dcc9
commit 888a700aaa
3 changed files with 21 additions and 23 deletions

View File

@ -131,7 +131,7 @@ export function LinkGitea({ linked }: { linked: boolean }) {
)}
/>
{loading ? (
<div className="flex gap-2">
<div className="flex flex-col sm:flex-row gap-2">
<Button className="w-full" disabled>
<Loader2 className="animate-spin" />
Linking...
@ -142,12 +142,12 @@ export function LinkGitea({ linked }: { linked: boolean }) {
</Button>
</div>
) : (
<div className="flex gap-2">
<Button type="submit" className="w-1/2 cursor-pointer">
<div className="flex flex-col sm:flex-row gap-2">
<Button type="submit" className="w-full sm:w-1/2 cursor-pointer">
<SiGitea />
Link with Gitea
</Button>
<a href="https://try.gitea.com" target="_blank" className="w-1/2">
<a href={`${process.env.NEXT_PUBLIC_GITEA_URL}/user/sign_up`} target="_blank" className="w-full sm:w-1/2">
<Button type="button" variant="outline" className="w-full cursor-pointer">
<SiGitea />
Create Account

View File

@ -17,20 +17,18 @@ interface DashboardState {
export const GitTab = ({ dashboardState }: { dashboardState: DashboardState }) => {
return (
<div>
<div className="grid gap-6 md:grid-cols-2 lg:grid-cols-3">
{(dashboardState.gitUser && dashboardState.gitUser !== "Unlinked") && (
<GiteaProfileCard dashboardState={dashboardState} />
)}
<LinkGitea linked={!!dashboardState.gitUser && dashboardState.gitUser !== "Unlinked"} />
{/*
~-~-~-~-~-~-~-~-~-~-~-~DISABLED FOR NOW~-~-~-~-~-~-~-~-~-~-~-~
<ChangeUsername gitUser={dashboardState.gitUser} />
<ChangePassword />
<ChangeEmail gitEmail={dashboardState.gitEmail || ""} />
<CreateRepo />
*/}
</div>
<div className="grid gap-6 md:grid-cols-2 lg:grid-cols-3">
{(dashboardState.gitUser && dashboardState.gitUser !== "Unlinked") && (
<GiteaProfileCard dashboardState={dashboardState} />
)}
<LinkGitea linked={!!dashboardState.gitUser && dashboardState.gitUser !== "Unlinked"} />
{/*
~-~-~-~-~-~-~-~-~-~-~-~DISABLED FOR NOW~-~-~-~-~-~-~-~-~-~-~-~
<ChangeUsername gitUser={dashboardState.gitUser} />
<ChangePassword />
<ChangeEmail gitEmail={dashboardState.gitEmail || ""} />
<CreateRepo />
*/}
</div>
)
}

View File

@ -56,11 +56,11 @@ Create a new access token in your Gitea user settings (),
and input the key you receive, as well as the URL of your instance, and the API URL.
You can find a link to the API and its endpoint URL on the footer.
| Environment Variable | Description | Example |
|----------------------|-----------------------------------------------|--------------------------------------------|
| GITEA_API_URL | Your Gitea instance API endpoint (see footer) | `http://gitea.local/api/v1` |
| GITEA_API_KEY | Access Token created in user settings | `0000000000000000000000000000000000000000` |
| GITEA_URL | Your Gitea instance URL | `http://gitea.local` |
| Environment Variable | Description | Example |
|-----------------------|-----------------------------------------------|--------------------------------------------|
| GITEA_API_URL | Your Gitea instance API endpoint (see footer) | `http://gitea.local/api/v1` |
| GITEA_API_KEY | Access Token created in user settings | `0000000000000000000000000000000000000000` |
| NEXT_PUBLIC_GITEA_URL | Your Gitea instance URL | `http://gitea.local` |
## mail-connect