diff --git a/templates/repo/settings/webhook/slack.tmpl b/templates/repo/settings/webhook/slack.tmpl
index b367aed5e..3fdea3bfd 100644
--- a/templates/repo/settings/webhook/slack.tmpl
+++ b/templates/repo/settings/webhook/slack.tmpl
@@ -13,7 +13,7 @@
+ {{template "repo/settings/webhook/forgejo" .ctxData}}
{{template "repo/settings/webhook/gitea" .ctxData}}
{{template "repo/settings/webhook/gogs" .ctxData}}
{{template "repo/settings/webhook/slack" .ctxData}}
diff --git a/tests/integration/api_nodeinfo_test.go b/tests/integration/api_nodeinfo_test.go
index 876fb5ac1..fd641d5db 100644
--- a/tests/integration/api_nodeinfo_test.go
+++ b/tests/integration/api_nodeinfo_test.go
@@ -31,7 +31,7 @@ func TestNodeinfo(t *testing.T) {
var nodeinfo api.NodeInfo
DecodeJSON(t, resp, &nodeinfo)
assert.True(t, nodeinfo.OpenRegistrations)
- assert.Equal(t, "gitea", nodeinfo.Software.Name)
+ assert.Equal(t, "forgejo", nodeinfo.Software.Name)
assert.Equal(t, 26, nodeinfo.Usage.Users.Total)
assert.Equal(t, 20, nodeinfo.Usage.LocalPosts)
assert.Equal(t, 3, nodeinfo.Usage.LocalComments)
diff --git a/tests/integration/api_twofa_test.go b/tests/integration/api_twofa_test.go
index aad806b6d..3860eedde 100644
--- a/tests/integration/api_twofa_test.go
+++ b/tests/integration/api_twofa_test.go
@@ -52,4 +52,9 @@ func TestAPITwoFactor(t *testing.T) {
AddBasicAuth(user.Name)
req.Header.Set("X-Gitea-OTP", passcode)
MakeRequest(t, req, http.StatusOK)
+
+ req = NewRequestf(t, "GET", "/api/v1/user").
+ AddBasicAuth(user.Name)
+ req.Header.Set("X-Forgejo-OTP", passcode)
+ MakeRequest(t, req, http.StatusOK)
}
diff --git a/tests/integration/links_test.go b/tests/integration/links_test.go
index a3937dd69..11e6146d0 100644
--- a/tests/integration/links_test.go
+++ b/tests/integration/links_test.go
@@ -176,6 +176,36 @@ func TestLinksLogin(t *testing.T) {
testLinksAsUser("user2", t)
}
+func TestRedirectsWebhooks(t *testing.T) {
+ defer tests.PrepareTestEnv(t)()
+
+ //
+ // A redirect means the route exists but not if it performs as intended.
+ //
+ for _, kind := range []string{"forgejo", "gitea"} {
+ redirects := []struct {
+ from string
+ to string
+ verb string
+ }{
+ {from: "/user2/repo1/settings/hooks/" + kind + "/new", to: "/user/login", verb: "GET"},
+ {from: "/user/settings/hooks/" + kind + "/new", to: "/user/login", verb: "GET"},
+ {from: "/admin/system-hooks/" + kind + "/new", to: "/user/login", verb: "GET"},
+ {from: "/admin/default-hooks/" + kind + "/new", to: "/user/login", verb: "GET"},
+ {from: "/user2/repo1/settings/hooks/" + kind + "/new", to: "/", verb: "POST"},
+ {from: "/admin/system-hooks/" + kind + "/new", to: "/", verb: "POST"},
+ {from: "/admin/default-hooks/" + kind + "/new", to: "/", verb: "POST"},
+ {from: "/user2/repo1/settings/hooks/" + kind + "/1", to: "/", verb: "POST"},
+ {from: "/admin/hooks/" + kind + "/1", to: "/", verb: "POST"},
+ }
+ for _, info := range redirects {
+ req := NewRequest(t, info.verb, info.from)
+ resp := MakeRequest(t, req, http.StatusSeeOther)
+ assert.EqualValues(t, path.Join(setting.AppSubURL, info.to), test.RedirectURL(resp), info.from)
+ }
+ }
+}
+
func TestRepoLinks(t *testing.T) {
defer tests.PrepareTestEnv(t)()
diff --git a/tests/integration/migrate_test.go b/tests/integration/migrate_test.go
index 2f44de8a4..44fc890ab 100644
--- a/tests/integration/migrate_test.go
+++ b/tests/integration/migrate_test.go
@@ -4,6 +4,7 @@
package integration
import (
+ "context"
"fmt"
"net/http"
"net/url"
@@ -20,6 +21,7 @@ import (
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/services/migrations"
+ "code.gitea.io/gitea/services/repository"
"github.com/stretchr/testify/assert"
)
@@ -51,7 +53,7 @@ func TestMigrateLocalPath(t *testing.T) {
setting.ImportLocalPaths = old
}
-func TestMigrateGiteaForm(t *testing.T) {
+func TestMigrate(t *testing.T) {
onGiteaRun(t, func(t *testing.T, u *url.URL) {
AllowLocalNetworks := setting.Migrations.AllowLocalNetworks
setting.Migrations.AllowLocalNetworks = true
@@ -71,34 +73,45 @@ func TestMigrateGiteaForm(t *testing.T) {
session := loginUser(t, ownerName)
token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository, auth_model.AccessTokenScopeReadMisc)
- // Step 0: verify the repo is available
- req := NewRequestf(t, "GET", fmt.Sprintf("/%s/%s", ownerName, repoName))
- _ = session.MakeRequest(t, req, http.StatusOK)
- // Step 1: get the Gitea migration form
- req = NewRequestf(t, "GET", "/repo/migrate/?service_type=%d", structs.GiteaService)
- resp := session.MakeRequest(t, req, http.StatusOK)
- // Step 2: load the form
- htmlDoc := NewHTMLParser(t, resp.Body)
- link, exists := htmlDoc.doc.Find(`form.ui.form[action^="/repo/migrate"]`).Attr("action")
- assert.True(t, exists, "The template has changed")
- // Step 4: submit the migration to only migrate issues
- migratedRepoName := "otherrepo"
- req = NewRequestWithValues(t, "POST", link, map[string]string{
- "_csrf": htmlDoc.GetCSRF(),
- "service": fmt.Sprintf("%d", structs.GiteaService),
- "clone_addr": fmt.Sprintf("%s%s/%s", u, ownerName, repoName),
- "auth_token": token,
- "issues": "on",
- "repo_name": migratedRepoName,
- "description": "",
- "uid": fmt.Sprintf("%d", repoOwner.ID),
- })
- resp = session.MakeRequest(t, req, http.StatusSeeOther)
- // Step 5: a redirection displays the migrated repository
- loc := resp.Header().Get("Location")
- assert.EqualValues(t, fmt.Sprintf("/%s/%s", ownerName, migratedRepoName), loc)
- // Step 6: check the repo was created
- unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{Name: migratedRepoName})
+ for _, s := range []struct {
+ svc structs.GitServiceType
+ }{
+ {svc: structs.GiteaService},
+ {svc: structs.ForgejoService},
+ } {
+ // Step 0: verify the repo is available
+ req := NewRequestf(t, "GET", fmt.Sprintf("/%s/%s", ownerName, repoName))
+ _ = session.MakeRequest(t, req, http.StatusOK)
+ // Step 1: get the Gitea migration form
+ req = NewRequestf(t, "GET", "/repo/migrate/?service_type=%d", s.svc)
+ resp := session.MakeRequest(t, req, http.StatusOK)
+ // Step 2: load the form
+ htmlDoc := NewHTMLParser(t, resp.Body)
+ link, exists := htmlDoc.doc.Find(`form.ui.form[action^="/repo/migrate"]`).Attr("action")
+ assert.True(t, exists, "The template has changed")
+ // Step 4: submit the migration to only migrate issues
+ migratedRepoName := "otherrepo"
+ req = NewRequestWithValues(t, "POST", link, map[string]string{
+ "_csrf": htmlDoc.GetCSRF(),
+ "service": fmt.Sprintf("%d", s.svc),
+ "clone_addr": fmt.Sprintf("%s%s/%s", u, ownerName, repoName),
+ "auth_token": token,
+ "issues": "on",
+ "repo_name": migratedRepoName,
+ "description": "",
+ "uid": fmt.Sprintf("%d", repoOwner.ID),
+ })
+ resp = session.MakeRequest(t, req, http.StatusSeeOther)
+ // Step 5: a redirection displays the migrated repository
+ loc := resp.Header().Get("Location")
+ assert.EqualValues(t, fmt.Sprintf("/%s/%s", ownerName, migratedRepoName), loc)
+ // Step 6: check the repo was created
+ repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{Name: migratedRepoName})
+
+ // Step 7: delete the repository, so we can test with other services
+ err := repository.DeleteRepository(context.Background(), repoOwner, repo, false)
+ assert.NoError(t, err)
+ }
})
}
diff --git a/web_src/css/home.css b/web_src/css/home.css
index 28992ef31..22f1a2dc9 100644
--- a/web_src/css/home.css
+++ b/web_src/css/home.css
@@ -21,7 +21,7 @@
}
.home .hero .svg {
- color: var(--color-green);
+ color: var(--color-primary);
height: 40px;
width: 50px;
vertical-align: bottom;
@@ -40,7 +40,7 @@
}
.home a {
- color: var(--color-green);
+ color: var(--color-primary);
}
.page-footer {
diff --git a/web_src/css/themes/theme-forgejo-auto-deuteranopia-protanopia.css b/web_src/css/themes/theme-forgejo-auto-deuteranopia-protanopia.css
new file mode 100644
index 000000000..5f97fa377
--- /dev/null
+++ b/web_src/css/themes/theme-forgejo-auto-deuteranopia-protanopia.css
@@ -0,0 +1,2 @@
+@import "theme-forgejo-light-deuteranopia-protanopia.css";
+@import "theme-forgejo-dark-deuteranopia-protanopia.css" (prefers-color-scheme: dark);
diff --git a/web_src/css/themes/theme-forgejo-auto-tritanopia.css b/web_src/css/themes/theme-forgejo-auto-tritanopia.css
new file mode 100644
index 000000000..256a7038a
--- /dev/null
+++ b/web_src/css/themes/theme-forgejo-auto-tritanopia.css
@@ -0,0 +1,2 @@
+@import "theme-forgejo-light-tritanopia.css";
+@import "theme-forgejo-dark-tritanopia.css" (prefers-color-scheme: dark);
diff --git a/web_src/css/themes/theme-forgejo-auto.css b/web_src/css/themes/theme-forgejo-auto.css
new file mode 100644
index 000000000..ebf59942e
--- /dev/null
+++ b/web_src/css/themes/theme-forgejo-auto.css
@@ -0,0 +1,2 @@
+@import "theme-forgejo-light.css";
+@import "theme-forgejo-dark.css" (prefers-color-scheme: dark);
diff --git a/web_src/css/themes/theme-forgejo-dark-deuteranopia-protanopia.css b/web_src/css/themes/theme-forgejo-dark-deuteranopia-protanopia.css
new file mode 100644
index 000000000..95601bf12
--- /dev/null
+++ b/web_src/css/themes/theme-forgejo-dark-deuteranopia-protanopia.css
@@ -0,0 +1,11 @@
+@import "./theme-forgejo-dark.css";
+
+:root {
+ --color-diff-removed-word-bg: #693F17;
+ --color-diff-removed-row-border: #693F17;
+ --color-diff-removed-row-bg: #221B17;
+ --color-diff-added-word-bg: #214D88;
+ --color-diff-added-row-border: #214D88;
+ --color-diff-added-row-bg: #13233A;
+ --color-code-bg: #0D1117;
+}
diff --git a/web_src/css/themes/theme-forgejo-dark-tritanopia.css b/web_src/css/themes/theme-forgejo-dark-tritanopia.css
new file mode 100644
index 000000000..adafbee0a
--- /dev/null
+++ b/web_src/css/themes/theme-forgejo-dark-tritanopia.css
@@ -0,0 +1,11 @@
+@import "./theme-forgejo-dark.css";
+
+:root {
+ --color-diff-removed-word-bg: #792E2E;
+ --color-diff-removed-row-border: #792E2E;
+ --color-diff-removed-row-bg: #25171C;
+ --color-diff-added-word-bg: #214D88;
+ --color-diff-added-row-border: #214D88;
+ --color-diff-added-row-bg: #13233A;
+ --color-code-bg: #0D1117;
+}
diff --git a/web_src/css/themes/theme-forgejo-dark.css b/web_src/css/themes/theme-forgejo-dark.css
new file mode 100644
index 000000000..decd3497d
--- /dev/null
+++ b/web_src/css/themes/theme-forgejo-dark.css
@@ -0,0 +1,322 @@
+@import "../chroma/dark.css";
+@import "../codemirror/dark.css";
+:root {
+ --steel-900: #10161D;
+ --steel-850: #131A21;
+ --steel-800: #171E26;
+ --steel-750: #1D262F;
+ --steel-700: #242D38;
+ --steel-650: #2B3642;
+ --steel-600: #374351;
+ --steel-550: #445161;
+ --steel-500: #515F70;
+ --steel-450: #5F6E80;
+ --steel-400: #6D7D8F;
+ --steel-350: #7C8C9F;
+ --steel-300: #8C9CAF;
+ --steel-250: #9DADC0;
+ --steel-200: #AEBED0;
+ --steel-150: #C0CFE0;
+ --steel-100: #D2E0F0;
+ --is-dark-theme: true;
+ --color-primary: #fb923c;
+ --color-primary-contrast: #000;
+ --color-primary-dark-1: #fdba74;
+ --color-primary-dark-2: #fdba74;
+ --color-primary-dark-3: #fed7aa;
+ --color-primary-dark-4: #fed7aa;
+ --color-primary-dark-5: #ffedd5;
+ --color-primary-dark-6: #ffedd5;
+ --color-primary-dark-7: #fff7ed;
+ --color-primary-light-1: #f97316;
+ --color-primary-light-2: #ea580c;
+ --color-primary-light-3: #c2410c;
+ --color-primary-light-4: #9a3412;
+ --color-primary-light-5: #9a3412;
+ --color-primary-light-6: #7c2d12;
+ --color-primary-light-7: #7c2d12;
+ --color-primary-alpha-10: #ea580c19;
+ --color-primary-alpha-20: #ea580c33;
+ --color-primary-alpha-30: #ea580c4b;
+ --color-primary-alpha-40: #ea580c66;
+ --color-primary-alpha-50: #ea580c80;
+ --color-primary-alpha-60: #ea580c99;
+ --color-primary-alpha-70: #ea580cb3;
+ --color-primary-alpha-80: #ea580ccc;
+ --color-primary-alpha-90: #ea580ce1;
+ --color-primary-hover: var(--color-primary-light-1);
+ --color-primary-active: var(--color-primary-light-2);
+ --color-secondary: var(--steel-700);
+ --color-secondary-dark-1: var(--steel-550);
+ --color-secondary-dark-2: var(--steel-500);
+ --color-secondary-dark-3: var(--steel-450);
+ --color-secondary-dark-4: var(--steel-400);
+ --color-secondary-dark-5: var(--steel-350);
+ --color-secondary-dark-6: var(--steel-300);
+ --color-secondary-dark-7: var(--steel-250);
+ --color-secondary-dark-8: var(--steel-200);
+ --color-secondary-dark-9: var(--steel-150);
+ --color-secondary-dark-10: var(--steel-100);
+ --color-secondary-dark-11: var(--steel-100);
+ --color-secondary-dark-12: var(--steel-100);
+ --color-secondary-dark-13: var(--steel-100);
+ --color-secondary-light-1: var(--steel-650);
+ --color-secondary-light-2: var(--steel-700);
+ --color-secondary-light-3: var(--steel-750);
+ --color-secondary-light-4: var(--steel-800);
+ --color-secondary-alpha-10: #2B364219;
+ --color-secondary-alpha-20: #2B364233;
+ --color-secondary-alpha-30: #2B36424b;
+ --color-secondary-alpha-40: #2B364266;
+ --color-secondary-alpha-50: #2B364280;
+ --color-secondary-alpha-60: #2B364299;
+ --color-secondary-alpha-70: #2B3642b3;
+ --color-secondary-alpha-80: #2B3642cc;
+ --color-secondary-alpha-90: #2B3642e1;
+ --color-secondary-hover: var(--color-secondary-light-1);
+ --color-secondary-active: var(--color-secondary-light-2);
+ /* colors */
+ --color-red: #b91c1c;
+ --color-orange: #ea580c;
+ --color-yellow: #ca8a04;
+ --color-olive: #91a313;
+ --color-green: #15803d;
+ --color-teal: #0d9488;
+ --color-blue: #2563eb;
+ --color-violet: #7c3aed;
+ --color-purple: #9333ea;
+ --color-pink: #db2777;
+ --color-brown: #a47252;
+ --color-grey: var(--steel-500);
+ --color-black: #111827;
+ /* light variants */
+ --color-red-light: #dc2626;
+ --color-orange-light: #f97316;
+ --color-yellow-light: #eab308;
+ --color-olive-light: #839311;
+ --color-green-light: #16a34a;
+ --color-teal-light: #14b8a6;
+ --color-blue-light: #3b82f6;
+ --color-violet-light: #8b5cf6;
+ --color-purple-light: #a855f7;
+ --color-pink-light: #ec4899;
+ --color-brown-light: #94674a;
+ --color-grey-light: var(--steel-300);
+ --color-black-light: #1f2937;
+ /* dark 1 variants produced via Sass scale-color(color, $lightness: -10%) */
+ --color-red-dark-1: #a71919;
+ --color-orange-dark-1: #d34f0b;
+ --color-yellow-dark-1: #b67c04;
+ --color-olive-dark-1: #839311;
+ --color-green-dark-1: #137337;
+ --color-teal-dark-1: #0c857a;
+ --color-blue-dark-1: #1554e0;
+ --color-violet-dark-1: #6a1feb;
+ --color-purple-dark-1: #8519e7;
+ --color-pink-dark-1: #c7216b;
+ --color-brown-dark-1: #94674a;
+ --color-black-dark-1: #0f1623;
+ /* dark 2 variants produced via Sass scale-color(color, $lightness: -20%) */
+ --color-red-dark-2: #941616;
+ --color-orange-dark-2: #bb460a;
+ --color-yellow-dark-2: #ca8a04;
+ --color-olive-dark-2: #91a313;
+ --color-green-dark-2: #15803d;
+ --color-teal-dark-2: #0a766d;
+ --color-blue-dark-2: #2563eb;
+ --color-violet-dark-2: #5c14d8;
+ --color-purple-dark-2: #7c3aed;
+ --color-pink-dark-2: #b11d5f;
+ --color-brown-dark-2: #a47252;
+ --color-black-dark-2: #111827;
+ /* other colors */
+ --color-gold: #b1983b;
+ --color-white: #ffffff;
+ --color-diff-removed-word-bg: #783030;
+ --color-diff-added-word-bg: #255C39;
+ --color-diff-removed-row-bg: #432121;
+ --color-diff-moved-row-bg: #825718;
+ --color-diff-added-row-bg: #1B3625;
+ --color-diff-removed-row-border: #783030;
+ --color-diff-moved-row-border: #A67A1D;
+ --color-diff-added-row-border: #255C39;
+ --color-diff-inactive: var(--steel-650);
+ --color-error-border: #783030;
+ --color-error-bg: #5F2525;
+ --color-error-bg-active: #783030;
+ --color-error-bg-hover: #783030;
+ --color-error-text: #fef2f2;
+ --color-success-border: #1F6E3C;
+ --color-success-bg: #1D462C;
+ --color-success-text: #f0fdf4;
+ --color-warning-border: #A67A1D;
+ --color-warning-bg: #644821;
+ --color-warning-text: #fefce8;
+ --color-info-border: #2E50B0;
+ --color-info-bg: #2A396B;
+ --color-info-text: var(--steel-100);
+ --color-red-badge: #B91C1C;
+ --color-red-badge-bg: #B91C1C22;
+ --color-red-badge-hover-bg: #B91C1C44;
+ --color-green-badge: #16a34a;
+ --color-green-badge-bg: #16a34a22;
+ --color-green-badge-hover-bg: #16a34a44;
+ --color-yellow-badge: #ca8a04;
+ --color-yellow-badge-bg: #ca8a0422;
+ --color-yellow-badge-hover-bg: #ca8a0444;
+ --color-orange-badge: #ea580c;
+ --color-orange-badge-bg: #ea580c22;
+ --color-orange-badge-hover-bg: #ea580c44;
+ --color-git: #f05133;
+ /* target-based colors */
+ --color-body: var(--steel-800);
+ --color-box-header: var(--steel-700);
+ --color-box-body: var(--steel-750);
+ --color-box-body-highlight: var(--steel-650);
+ --color-text-dark: #fff;
+ --color-text: var(--steel-100);
+ --color-text-light: var(--steel-150);
+ --color-text-light-1: var(--steel-150);
+ --color-text-light-2: var(--steel-200);
+ --color-text-light-3: var(--steel-200);
+ --color-footer: var(--steel-900);
+ --color-timeline: var(--steel-650);
+ --color-input-text: var(--steel-100);
+ --color-input-background: var(--steel-650);
+ --color-input-toggle-background: var(--steel-650);
+ --color-input-border: var(--steel-550);
+ --color-input-border-hover: var(--steel-450);
+ --color-header-wrapper: var(--steel-850);
+ --color-header-wrapper-transparent: #242D3800;
+ --color-light: #00000028;
+ --color-light-mimic-enabled: rgba(0, 0, 0, calc(40 / 255 * 222 / 255 / var(--opacity-disabled)));
+ --color-light-border: #ffffff28;
+ --color-hover: var(--steel-600);
+ --color-active: var(--steel-650);
+ --color-menu: var(--steel-700);
+ --color-card: var(--steel-700);
+ --color-markup-table-row: #ffffff06;
+ --color-markup-code-block: var(--steel-800);
+ --color-button: var(--steel-600);
+ --color-code-bg: var(--steel-750);
+ --color-code-sidebar-bg: var(--steel-600);
+ --color-shadow: #00000060;
+ --color-secondary-bg: var(--steel-700);
+ --color-text-focus: #fff;
+ --color-expand-button: #3c404d;
+ --color-placeholder-text: var(--steel-450);
+ --color-editor-line-highlight: var(--steel-700);
+ --color-project-board-bg: var(--color-secondary-light-3);
+ --color-project-board-dark-label: var(--color-text-light-3);
+ --color-caret: var(--color-text);
+ /* should ideally be --color-text-dark, see #15651 */
+ --color-reaction-bg: #ffffff12;
+ --color-reaction-active-bg: var(--color-primary-alpha-30);
+ --color-tooltip-text: #ffffff;
+ --color-tooltip-bg: #000000f0;
+ --color-nav-bg: var(--steel-900);
+ --color-nav-hover-bg: var(--steel-600);
+ --color-label-text: #fff;
+ --color-label-bg: #393939;
+ --color-label-hover-bg: #5f5f5f;
+ --color-label-active-bg: #4c4c4c;
+ --color-accent: var(--color-primary-light-1);
+ --color-small-accent: var(--color-primary-light-5);
+ --color-active-line: var(--color-primary-alpha-20);
+ --color-overlay-backdrop: #080808c0;
+ accent-color: var(--color-accent);
+ color-scheme: dark;
+}
+/* invert emojis that are hard to read otherwise */
+.emoji[aria-label="check mark"],
+.emoji[aria-label="currency exchange"],
+.emoji[aria-label="TOP arrow"],
+.emoji[aria-label="END arrow"],
+.emoji[aria-label="ON! arrow"],
+.emoji[aria-label="SOON arrow"],
+.emoji[aria-label="heavy dollar sign"],
+.emoji[aria-label="copyright"],
+.emoji[aria-label="registered"],
+.emoji[aria-label="trade mark"],
+.emoji[aria-label="multiply"],
+.emoji[aria-label="plus"],
+.emoji[aria-label="minus"],
+.emoji[aria-label="divide"],
+.emoji[aria-label="curly loop"],
+.emoji[aria-label="double curly loop"],
+.emoji[aria-label="wavy dash"],
+.emoji[aria-label="paw prints"],
+.emoji[aria-label="musical note"],
+.emoji[aria-label="musical notes"] {
+ filter: invert(100%) hue-rotate(180deg);
+}
+.following.bar.light {
+ border-bottom-color: #ffffff11 !important;
+}
+.text.green.svg {
+ color: #16a34a !important;
+}
+i.grey.icon.icon.icon.icon {
+ color: var(--steel-350) !important;
+}
+.ui.red.button,
+.ui.negative.button {
+ background-color: #7f1d1d;
+}
+.ui.red.button:hover,
+.ui.negative.button:hover {
+ background-color: #991b1b;
+}
+.ui.red.button:active,
+.ui.negative.button:active {
+ background-color: #aa1919;
+}
+.ui.secondary.vertical.menu {
+ border-radius: 0.28571429rem !important;
+ overflow: hidden;
+}
+.ui.secondary.vertical.menu > .item {
+ border-radius: 0 !important;
+}
+.ui.basic.primary.button.item {
+ background-color: var(--color-active) !important;
+ color: var(--color-text) !important;
+ box-shadow: none !important;
+}
+.ui.red.label.notification_count,
+.ui.primary.label,
+.ui.primary.labels .label {
+ background-color: var(--color-primary-light-3) !important;
+}
+.repository.view.issue .comment-list .code-comment + .code-comment {
+ margin: 1.25rem 0 !important;
+ padding-top: 1.25rem !important;
+ border-top-color: var(--steel-650) !important;
+}
+.ui.labeled.icon.buttons > .button > .icon,
+.ui.labeled.icon.button > .icon {
+ background-color: rgba(0, 0, 0, 0.05) !important;
+}
+#review-box .review-comments-counter {
+ background-color: #00000088 !important;
+ color: #fff !important;
+ margin-left: 0.5em;
+}
+.ui.tabs .ui.primary.label,
+.ui.menu .ui.primary.label {
+ background-color: rgba(192, 192, 255, 0.2) !important;
+ color: var(--color-text-dark) !important;
+}
+.ui.basic.yellow.label.pending-label {
+ background: var(--color-light) !important;
+}
+.ui.tertiary.button {
+ color: #fff9;
+}
+.ui.tertiary.button:hover {
+ color: #ccc;
+}
+::selection {
+ background: var(--steel-100) !important;
+ color: #000 !important;
+}
diff --git a/web_src/css/themes/theme-forgejo-light-deuteranopia-protanopia.css b/web_src/css/themes/theme-forgejo-light-deuteranopia-protanopia.css
new file mode 100644
index 000000000..918a143ad
--- /dev/null
+++ b/web_src/css/themes/theme-forgejo-light-deuteranopia-protanopia.css
@@ -0,0 +1,11 @@
+@import "./theme-forgejo-light.css";
+
+:root {
+ --color-diff-removed-word-bg: #FFDBB0;
+ --color-diff-removed-row-border: #FFDBB0;
+ --color-diff-removed-row-bg: #FFFAF3;
+ --color-diff-added-word-bg: #B1DBFF;
+ --color-diff-added-row-border: #B1DBFF;
+ --color-diff-added-row-bg: #EEF9FF;
+ --color-code-bg: #FFFFFF;
+}
diff --git a/web_src/css/themes/theme-forgejo-light-tritanopia.css b/web_src/css/themes/theme-forgejo-light-tritanopia.css
new file mode 100644
index 000000000..3bf7694a0
--- /dev/null
+++ b/web_src/css/themes/theme-forgejo-light-tritanopia.css
@@ -0,0 +1,11 @@
+@import "./theme-forgejo-light.css";
+
+:root {
+ --color-diff-removed-word-bg: #FFD0CE;
+ --color-diff-removed-row-border: #FFD0CE;
+ --color-diff-removed-row-bg: #FFF5F4;
+ --color-diff-added-word-bg: #B1DBFF;
+ --color-diff-added-row-border: #EEF9FF;
+ --color-diff-added-row-bg: #EEF9FF;
+ --color-code-bg: #FFFFFF;
+}
diff --git a/web_src/css/themes/theme-forgejo-light.css b/web_src/css/themes/theme-forgejo-light.css
new file mode 100644
index 000000000..495b8ce43
--- /dev/null
+++ b/web_src/css/themes/theme-forgejo-light.css
@@ -0,0 +1,293 @@
+@import "../chroma/light.css";
+@import "../codemirror/light.css";
+
+:root {
+ --steel-900: #10161D;
+ --steel-850: #131A21;
+ --steel-800: #171E26;
+ --steel-750: #1D262F;
+ --steel-700: #242D38;
+ --steel-650: #2B3642;
+ --steel-600: #374351;
+ --steel-550: #445161;
+ --steel-500: #515F70;
+ --steel-450: #5F6E80;
+ --steel-400: #6D7D8F;
+ --steel-350: #7C8C9F;
+ --steel-300: #8C9CAF;
+ --steel-250: #9DADC0;
+ --steel-200: #AEBED0;
+ --steel-150: #C0CFE0;
+ --steel-100: #D2E0F0;
+ --zinc-50: #FAFAFA;
+ --zinc-100: #F4F4F5;
+ --zinc-150: #ECECEE;
+ --zinc-200: #E4E4E7;
+ --zinc-250: #DCDCE0;
+ --zinc-300: #D4D4D8;
+ --zinc-350: #BABAC1;
+ --zinc-400: #A1A1AA;
+ --zinc-450: #898992;
+ --zinc-500: #71717A;
+ --zinc-550: #61616A;
+ --zinc-600: #52525B;
+ --zinc-650: #484850;
+ --zinc-700: #3F3F46;
+ --zinc-750: #333338;
+ --zinc-800: #27272A;
+ --zinc-850: #1F1F23;
+ --zinc-900: #18181B;
+ --color-primary: #c2410c;
+ --color-primary-contrast: #ffffff;
+ --color-primary-dark-1: #c2410c;
+ --color-primary-dark-2: #9a3412;
+ --color-primary-dark-3: #9a3412;
+ --color-primary-dark-4: #7c2d12;
+ --color-primary-dark-5: #7c2d12;
+ --color-primary-dark-6: #7c2d12;
+ --color-primary-dark-7: #7c2d12;
+ --color-primary-light-1: #ea580c;
+ --color-primary-light-2: #f97316;
+ --color-primary-light-3: #fb923c;
+ --color-primary-light-4: #fdba74;
+ --color-primary-light-5: #fed7aa;
+ --color-primary-light-6: #ffedd5;
+ --color-primary-light-7: #fff7ed;
+ --color-primary-alpha-10: #c2410c19;
+ --color-primary-alpha-20: #c2410c33;
+ --color-primary-alpha-30: #c2410c4b;
+ --color-primary-alpha-40: #c2410c66;
+ --color-primary-alpha-50: #c2410c80;
+ --color-primary-alpha-60: #c2410c99;
+ --color-primary-alpha-70: #c2410cb3;
+ --color-primary-alpha-80: #c2410ccc;
+ --color-primary-alpha-90: #c2410ce1;
+ --color-primary-hover: var(--color-primary-dark-2);
+ --color-primary-active: var(--color-primary-dark-4);
+ --color-secondary: var(--zinc-200);
+ --color-secondary-dark-1: var(--zinc-200);
+ --color-secondary-dark-2: var(--zinc-300);
+ --color-secondary-dark-3: var(--zinc-300);
+ --color-secondary-dark-4: var(--zinc-400);
+ --color-secondary-dark-5: var(--zinc-400);
+ --color-secondary-dark-6: var(--zinc-500);
+ --color-secondary-dark-7: var(--zinc-500);
+ --color-secondary-dark-8: var(--zinc-600);
+ --color-secondary-dark-9: var(--zinc-600);
+ --color-secondary-dark-10: var(--zinc-700);
+ --color-secondary-dark-11: var(--zinc-700);
+ --color-secondary-dark-12: var(--zinc-800);
+ --color-secondary-dark-13: var(--zinc-800);
+ --color-secondary-light-1: var(--zinc-200);
+ --color-secondary-light-2: var(--zinc-100);
+ --color-secondary-light-3: var(--zinc-100);
+ --color-secondary-light-4: var(--zinc-50);
+ --color-secondary-alpha-10: #d4d4d819;
+ --color-secondary-alpha-20: #d4d4d833;
+ --color-secondary-alpha-30: #d4d4d84b;
+ --color-secondary-alpha-40: #d4d4d866;
+ --color-secondary-alpha-50: #d4d4d880;
+ --color-secondary-alpha-60: #d4d4d899;
+ --color-secondary-alpha-70: #d4d4d8b3;
+ --color-secondary-alpha-80: #d4d4d8cc;
+ --color-secondary-alpha-90: #d4d4d8e1;
+ --color-secondary-hover: var(--color-secondary-dark-2);
+ --color-secondary-active: var(--color-secondary-dark-4);
+ /* colors */
+ --color-red: #dc2626;
+ --color-orange: #ea580c;
+ --color-yellow: #ca8a04;
+ --color-olive: #91a313;
+ --color-green: #15803d;
+ --color-teal: #0d9488;
+ --color-blue: #2563eb;
+ --color-violet: #7c3aed;
+ --color-purple: #9333ea;
+ --color-pink: #db2777;
+ --color-brown: #a47252;
+ --color-grey: #4b5563;
+ --color-black: #000000;
+ /* light variants */
+ --color-red-light: #ef4444;
+ --color-orange-light: #f97316;
+ --color-yellow-light: #eab308;
+ --color-olive-light: #839311;
+ --color-green-light: #16a34a;
+ --color-teal-light: #14b8a6;
+ --color-blue-light: #3b82f6;
+ --color-violet-light: #8b5cf6;
+ --color-purple-light: #a855f7;
+ --color-pink-light: #ec4899;
+ --color-brown-light: #94674a;
+ --color-grey-light: #6b7280;
+ --color-black-light: #181818;
+ /* dark 1 variants - produced via Sass scale-color(color, $lightness: -10%) */
+ --color-red-dark-1: #c82020;
+ --color-orange-dark-1: #d34f0b;
+ --color-yellow-dark-1: #b67c04;
+ --color-olive-dark-1: #839311;
+ --color-green-dark-1: #137337;
+ --color-teal-dark-1: #0c857a;
+ --color-blue-dark-1: #1554e0;
+ --color-violet-dark-1: #6a1feb;
+ --color-purple-dark-1: #8519e7;
+ --color-pink-dark-1: #c7216b;
+ --color-brown-dark-1: #94674a;
+ --color-black-dark-1: #000000;
+ /* dark 2 variants - produced via Sass scale-color(color, $lightness: -20%) */
+ --color-red-dark-2: #b21d1d;
+ --color-orange-dark-2: #bb460a;
+ --color-yellow-dark-2: #a26e03;
+ --color-olive-dark-2: #74820f;
+ --color-green-dark-2: #116631;
+ --color-teal-dark-2: #0a766d;
+ --color-blue-dark-2: #124bc7;
+ --color-violet-dark-2: #5c14d8;
+ --color-purple-dark-2: #7715cf;
+ --color-pink-dark-2: #b11d5f;
+ --color-brown-dark-2: #835b42;
+ --color-black-dark-2: #000000;
+ /* other colors */
+ --color-gold: #b1983b;
+ --color-white: #ffffff;
+ --color-diff-removed-word-bg: #fca5a5;
+ --color-diff-added-word-bg: #86efac;
+ --color-diff-removed-row-bg: #fee2e2;
+ --color-diff-moved-row-bg: #fef9c3;
+ --color-diff-added-row-bg: #dcfce7;
+ --color-diff-removed-row-border: #fca5a5;
+ --color-diff-moved-row-border: #fde047;
+ --color-diff-added-row-border: #86efac;
+ --color-diff-inactive: var(--zinc-100);
+ --color-error-border: #fecaca;
+ --color-error-bg: #fee2e2;
+ --color-error-bg-active: #fca5a5;
+ --color-error-bg-hover: #fecaca;
+ --color-error-text: #7f1d1d;
+ --color-success-border: #bbf7d0;
+ --color-success-bg: #dcfce7;
+ --color-success-text: #14532d;
+ --color-warning-border: #fde047;
+ --color-warning-bg: #fef3c7;
+ --color-warning-text: #78350f;
+ --color-info-border: #bae6fd;
+ --color-info-bg: #e0f2fe;
+ --color-info-text: #0c4a6e;
+ --color-red-badge: #B91C1C;
+ --color-red-badge-bg: #B91C1C22;
+ --color-red-badge-hover-bg: #B91C1C44;
+ --color-green-badge: #16a34a;
+ --color-green-badge-bg: #16a34a22;
+ --color-green-badge-hover-bg: #16a34a44;
+ --color-yellow-badge: #ca8a04;
+ --color-yellow-badge-bg: #ca8a0422;
+ --color-yellow-badge-hover-bg: #ca8a0444;
+ --color-orange-badge: #ea580c;
+ --color-orange-badge-bg: #ea580c22;
+ --color-orange-badge-hover-bg: #ea580c44;
+ --color-git: #f05133;
+ /* target-based colors */
+ --color-body: #fff;
+ --color-box-header: var(--zinc-100);
+ --color-box-body: var(--zinc-50);
+ --color-box-body-highlight: var(--zinc-200);
+ --color-text-dark: #000;
+ --color-text: var(--zinc-900);
+ --color-text-light: var(--zinc-700);
+ --color-text-light-1: var(--zinc-650);
+ --color-text-light-2: var(--zinc-600);
+ --color-text-light-3: var(--zinc-550);
+ --color-footer: var(--zinc-100);
+ --color-timeline: var(--zinc-200);
+ --color-input-text: var(--zinc-800);
+ --color-input-background: #fff;
+ --color-input-toggle-background: #fff;
+ --color-input-border: var(--zinc-300);
+ --color-input-border-hover: var(--zinc-400);
+ --color-header-wrapper: var(--zinc-50);
+ --color-header-wrapper-transparent: #D2E0F000;
+ --color-light: #ffffffcc;
+ --color-light-mimic-enabled: rgba(0, 0, 0, calc(6 / 255 * 222 / 255 / var(--opacity-disabled)));
+ --color-light-border: #0000001d;
+ --color-hover: #e4e4e4aa;
+ --color-active: #d4d4d8aa;
+ --color-menu: var(--zinc-100);
+ --color-card: var(--zinc-50);
+ --color-markup-table-row: #ffffff06;
+ --color-markup-code-block: var(--zinc-150);
+ --color-button: var(--zinc-150);
+ --color-code-bg: var(--zinc-50);
+ --color-code-sidebar-bg: var(--zinc-100);
+ --color-shadow: #00000060;
+ --color-secondary-bg: var(--zinc-100);
+ --color-text-focus: #fff;
+ --color-expand-button: var(--zinc-200);
+ --color-placeholder-text: var(--zinc-400);
+ --color-editor-line-highlight: var(--zinc-100);
+ --color-project-board-bg: var(--color-secondary-light-2);
+ --color-project-board-dark-label: var(--color-text-light-3);
+ --color-caret: var(--color-text);
+ /* should ideally be --color-text-dark, see #15651 */
+ --color-reaction-bg: #0000000a;
+ --color-reaction-active-bg: var(--color-primary-alpha-20);
+ --color-tooltip-text: #ffffff;
+ --color-tooltip-bg: #000000f0;
+ --color-nav-bg: var(--zinc-100);
+ --color-nav-hover-bg: var(--zinc-300);
+ --color-label-bg: #cacaca5b;
+ --color-label-hover-bg: #cacacaa0;
+ --color-label-active-bg: #cacacaff;
+ --color-accent: var(--color-primary-light-1);
+ --color-small-accent: var(--color-primary-light-5);
+ --color-active-line: var(--color-primary-light-6);
+ --color-overlay-backdrop: #080808c0;
+ accent-color: var(--color-accent);
+ color-scheme: light;
+}
+.text.green.svg {
+ color: #16a34a !important;
+}
+.ui.secondary.vertical.menu {
+ border-radius: 0.28571429rem !important;
+ overflow: hidden;
+}
+.ui.secondary.vertical.menu > .item {
+ border-radius: 0 !important;
+}
+.ui.basic.primary.button.item {
+ background-color: var(--color-active) !important;
+ color: var(--color-text) !important;
+ box-shadow: none !important;
+}
+.ui.red.label.notification_count,
+.ui.primary.labels .label {
+ background-color: var(--color-primary-dark-1) !important;
+}
+.repository.view.issue .comment-list .code-comment + .code-comment {
+ margin: 1.25rem 0 !important;
+ padding-top: 1.25rem !important;
+ border-top-color: var(--zinc-250) !important;
+}
+.ui.labeled.icon.buttons > .button > .icon,
+.ui.labeled.icon.button > .icon {
+ background-color: rgba(0, 0, 0, 0.05) !important;
+}
+#review-box .review-comments-counter {
+ background-color: #ffffffaa !important;
+ color: #000 !important;
+ margin-left: 0.5em;
+}
+.ui.tabs .ui.primary.label,
+.ui.menu .ui.primary.label {
+ background-color: rgba(0, 0, 0, 0.15) !important;
+ color: var(--color-text-dark) !important;
+}
+.ui.basic.yellow.label.pending-label {
+ background: var(--color-warning-bg) !important;
+ color: var(--color-warning-text) !important;
+ border-color: #eab308 !important;
+}
+::selection {
+ background: var(--steel-450) !important;
+ color: #fff !important;
+}
diff --git a/web_src/js/features/install.js b/web_src/js/features/install.js
index 9fda7f7d2..bb83dd1ff 100644
--- a/web_src/js/features/install.js
+++ b/web_src/js/features/install.js
@@ -15,8 +15,8 @@ export function initInstall() {
}
function initPreInstall() {
- const defaultDbUser = 'gitea';
- const defaultDbName = 'gitea';
+ const defaultDbUser = 'forgejo';
+ const defaultDbName = 'forgejo';
const defaultDbHosts = {
mysql: '127.0.0.1:3306',
diff --git a/web_src/svg/gitea-forgejo.svg b/web_src/svg/gitea-forgejo.svg
new file mode 100644
index 000000000..e00e5963c
--- /dev/null
+++ b/web_src/svg/gitea-forgejo.svg
@@ -0,0 +1,9 @@
+