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 ? ( {loading ? (
<div className="flex gap-2"> <div className="flex flex-col sm:flex-row gap-2">
<Button className="w-full" disabled> <Button className="w-full" disabled>
<Loader2 className="animate-spin" /> <Loader2 className="animate-spin" />
Linking... Linking...
@ -142,12 +142,12 @@ export function LinkGitea({ linked }: { linked: boolean }) {
</Button> </Button>
</div> </div>
) : ( ) : (
<div className="flex gap-2"> <div className="flex flex-col sm:flex-row gap-2">
<Button type="submit" className="w-1/2 cursor-pointer"> <Button type="submit" className="w-full sm:w-1/2 cursor-pointer">
<SiGitea /> <SiGitea />
Link with Gitea Link with Gitea
</Button> </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"> <Button type="button" variant="outline" className="w-full cursor-pointer">
<SiGitea /> <SiGitea />
Create Account Create Account

View File

@ -17,20 +17,18 @@ interface DashboardState {
export const GitTab = ({ dashboardState }: { dashboardState: DashboardState }) => { export const GitTab = ({ dashboardState }: { dashboardState: DashboardState }) => {
return ( return (
<div> <div className="grid gap-6 md:grid-cols-2 lg:grid-cols-3">
<div className="grid gap-6 md:grid-cols-2 lg:grid-cols-3"> {(dashboardState.gitUser && dashboardState.gitUser !== "Unlinked") && (
{(dashboardState.gitUser && dashboardState.gitUser !== "Unlinked") && ( <GiteaProfileCard dashboardState={dashboardState} />
<GiteaProfileCard dashboardState={dashboardState} /> )}
)} <LinkGitea linked={!!dashboardState.gitUser && dashboardState.gitUser !== "Unlinked"} />
<LinkGitea linked={!!dashboardState.gitUser && dashboardState.gitUser !== "Unlinked"} /> {/*
{/* ~-~-~-~-~-~-~-~-~-~-~-~DISABLED FOR NOW~-~-~-~-~-~-~-~-~-~-~-~
~-~-~-~-~-~-~-~-~-~-~-~DISABLED FOR NOW~-~-~-~-~-~-~-~-~-~-~-~ <ChangeUsername gitUser={dashboardState.gitUser} />
<ChangeUsername gitUser={dashboardState.gitUser} /> <ChangePassword />
<ChangePassword /> <ChangeEmail gitEmail={dashboardState.gitEmail || ""} />
<ChangeEmail gitEmail={dashboardState.gitEmail || ""} /> <CreateRepo />
<CreateRepo /> */}
*/}
</div>
</div> </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. 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. You can find a link to the API and its endpoint URL on the footer.
| Environment Variable | Description | Example | | Environment Variable | Description | Example |
|----------------------|-----------------------------------------------|--------------------------------------------| |-----------------------|-----------------------------------------------|--------------------------------------------|
| GITEA_API_URL | Your Gitea instance API endpoint (see footer) | `http://gitea.local/api/v1` | | 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_API_KEY | Access Token created in user settings | `0000000000000000000000000000000000000000` |
| GITEA_URL | Your Gitea instance URL | `http://gitea.local` | | NEXT_PUBLIC_GITEA_URL | Your Gitea instance URL | `http://gitea.local` |
## mail-connect ## mail-connect