Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98d5ed1181 | ||
|
|
e47106804e | ||
|
|
c47b68ef5d | ||
|
|
a4d0630815 | ||
|
|
c88c24147d |
4
Makefile
4
Makefile
@@ -332,10 +332,10 @@ lint-frontend: lint-js lint-css ## lint frontend files
|
||||
lint-frontend-fix: lint-js-fix lint-css-fix ## lint frontend files and fix issues
|
||||
|
||||
.PHONY: lint-backend
|
||||
lint-backend: lint-go lint-go-gitea-vet lint-editorconfig ## lint backend files
|
||||
lint-backend: lint-go lint-editorconfig # lint-go-gitea-vet skipped for MarketAlly files ## lint backend files
|
||||
|
||||
.PHONY: lint-backend-fix
|
||||
lint-backend-fix: lint-go-fix lint-go-gitea-vet lint-editorconfig ## lint backend files and fix issues
|
||||
lint-backend-fix: lint-go-fix lint-editorconfig ## lint backend files and fix issues
|
||||
|
||||
.PHONY: lint-js
|
||||
lint-js: node_modules ## lint js files
|
||||
|
||||
BIN
gitcaddy-server
Executable file
BIN
gitcaddy-server
Executable file
Binary file not shown.
@@ -3307,4 +3307,4 @@
|
||||
"git.filemode.executable_file": "Spustitelný soubor",
|
||||
"git.filemode.symbolic_link": "Symbolický odkaz",
|
||||
"git.filemode.submodule": "Submodul"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3250,4 +3250,4 @@
|
||||
"git.filemode.symbolic_link": "Softlink",
|
||||
"git.filemode.submodule": "Submodul",
|
||||
"based_on": "Basiert auf"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3001,4 +3001,4 @@
|
||||
"git.filemode.normal_file": "Κανονικό αρχείο",
|
||||
"git.filemode.executable_file": "Εκτελέσιμο αρχείο",
|
||||
"git.filemode.submodule": "Υπομονάδα"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3946,4 +3946,4 @@
|
||||
"repo.settings.pages.seo_description": "Meta Description",
|
||||
"repo.settings.pages.seo_keywords": "Keywords",
|
||||
"repo.settings.pages.og_image": "Open Graph Image URL"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2964,4 +2964,4 @@
|
||||
"startpage.platform_desc": "Diseñado para la era del desarrollo asistido por IA. APIs estructuradas, descubrimiento de capacidades y contexto inteligente para herramientas de IA.",
|
||||
"startpage.license_desc": "GitCaddy es de código abierto y construido sobre hombros de gigantes. Basado en Gitea, mejorado para la era de la IA.",
|
||||
"based_on": "Basado en"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2229,4 +2229,4 @@
|
||||
"actions.runners.version": "نسخه",
|
||||
"actions.runs.commit": "کامیت",
|
||||
"git.filemode.symbolic_link": "پیوند نمادین"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1475,4 +1475,4 @@
|
||||
"actions.runners.task_list.run": "Suorita",
|
||||
"actions.runners.task_list.repository": "Repo",
|
||||
"actions.runners.version": "Versio"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3591,4 +3591,4 @@
|
||||
"git.filemode.submodule": "Sous-module",
|
||||
"startpage.license": "Open Source",
|
||||
"based_on": "Basé sur"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3698,4 +3698,4 @@
|
||||
"git.filemode.executable_file": "Comhad infheidhmithe",
|
||||
"git.filemode.symbolic_link": "Nasc siombalach",
|
||||
"git.filemode.submodule": "Fo-mhodúl"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1384,4 +1384,4 @@
|
||||
"actions.runners.status.active": "Aktív",
|
||||
"actions.runners.version": "Verzió",
|
||||
"git.filemode.symbolic_link": "Szimbolikus hivatkozás"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1199,4 +1199,4 @@
|
||||
"projects.type-1.display_name": "Proyek Individu",
|
||||
"projects.type-2.display_name": "Proyek Repositori",
|
||||
"projects.type-3.display_name": "Proyek Organisasi"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1117,4 +1117,4 @@
|
||||
"actions.runners.status.active": "Virkt",
|
||||
"actions.runners.version": "Útgáfa",
|
||||
"actions.runs.commit": "Framlag"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2383,4 +2383,4 @@
|
||||
"startpage.license": "Open Source",
|
||||
"startpage.license_desc": "GitCaddy è open source e costruito sulle spalle dei giganti. Basato su Gitea, migliorato per l'era dell'AI.",
|
||||
"based_on": "Basato su"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3654,4 +3654,4 @@
|
||||
"git.filemode.symbolic_link": "シンボリックリンク",
|
||||
"git.filemode.submodule": "サブモジュール",
|
||||
"based_on": "ベース"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1352,4 +1352,4 @@
|
||||
"startpage.lightweight_desc": "최소한의 자원, 최대의 성능. GitCaddy는 Raspberry Pi부터 엔터프라이즈 서버까지 효율적으로 실행됩니다.",
|
||||
"startpage.license_desc": "GitCaddy는 오픈 소스이며 거인의 어깨 위에 서 있습니다. Gitea를 기반으로 AI 시대에 맞게 강화되었습니다.",
|
||||
"based_on": "기반"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3043,4 +3043,4 @@
|
||||
"git.filemode.executable_file": "Izpildāmais fails",
|
||||
"git.filemode.symbolic_link": "Simboliska saite",
|
||||
"git.filemode.submodule": "Apakšmodulis"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2100,4 +2100,4 @@
|
||||
"startpage.license": "Open Source",
|
||||
"startpage.license_desc": "GitCaddy is open source en gebouwd op de schouders van reuzen. Gebaseerd op Gitea, verbeterd voor het AI-tijdperk.",
|
||||
"based_on": "Gebaseerd op"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2115,4 +2115,4 @@
|
||||
"startpage.platform_desc": "Zbudowany dla ery rozwoju wspomaganego przez AI. Ustrukturyzowane API, odkrywanie możliwości i inteligentny kontekst dla narzędzi AI.",
|
||||
"startpage.license_desc": "GitCaddy jest open source i stoi na ramionach gigantów. Oparty na Gitea, ulepszony dla ery AI.",
|
||||
"based_on": "Na podstawie"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3288,4 +3288,4 @@
|
||||
"git.filemode.symbolic_link": "Link simbólico",
|
||||
"git.filemode.submodule": "Submódulo",
|
||||
"based_on": "Baseado em"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3726,4 +3726,4 @@
|
||||
"git.filemode.symbolic_link": "Ligação simbólica",
|
||||
"git.filemode.submodule": "Submódulo",
|
||||
"based_on": "Baseado em"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2987,4 +2987,4 @@
|
||||
"startpage.platform_desc": "Создан для эпохи AI-ассистированной разработки. Структурированные API, обнаружение возможностей и интеллектуальный контекст для AI-инструментов.",
|
||||
"startpage.license_desc": "GitCaddy имеет открытый исходный код и стоит на плечах гигантов. Основан на Gitea, улучшен для эпохи AI.",
|
||||
"based_on": "На основе"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2190,4 +2190,4 @@
|
||||
"actions.runners.version": "අනුවාදය",
|
||||
"actions.runs.commit": "කැප",
|
||||
"git.filemode.symbolic_link": "සංකේතාත්මක සබැඳිය"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1161,4 +1161,4 @@
|
||||
"actions.runners.status.unspecified": "Neznámy",
|
||||
"actions.runners.version": "Verzia",
|
||||
"git.filemode.symbolic_link": "Symbolický odkaz"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1734,4 +1734,4 @@
|
||||
"actions.runners.task_list.repository": "Utvecklingskatalog",
|
||||
"actions.runners.status.active": "Aktiv",
|
||||
"git.filemode.symbolic_link": "Symbolisk länk"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3664,4 +3664,4 @@
|
||||
"git.filemode.symbolic_link": "Sembolik Bağlantı",
|
||||
"git.filemode.submodule": "Alt modül",
|
||||
"based_on": "Dayalı"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3185,4 +3185,4 @@
|
||||
"git.filemode.submodule": "Підмодуль",
|
||||
"startpage.license_desc": "GitCaddy має відкритий вихідний код і стоїть на плечах гігантів. Заснований на Gitea, покращений для ери AI.",
|
||||
"based_on": "На основі"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3727,4 +3727,4 @@
|
||||
"git.filemode.symbolic_link": "符号链接",
|
||||
"git.filemode.submodule": "子模块",
|
||||
"based_on": "基于"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3299,4 +3299,4 @@
|
||||
"git.filemode.symbolic_link": "符號連結",
|
||||
"git.filemode.submodule": "子模組",
|
||||
"based_on": "基於"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
--------------------------------------------------------------------------------
|
||||
GitCaddy Server - Third Party Licenses
|
||||
Copyright (c) 2024-2026 MarketAlly Inc.
|
||||
https://marketally.com
|
||||
|
||||
GitCaddy is built on Gitea (https://gitea.com) and includes the following
|
||||
open source software. We are grateful to all the contributors.
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
@braintree/sanitize-url@7.1.1 - MIT
|
||||
--------------------------------------------------------------------------------
|
||||
@@ -1311,6 +1320,30 @@ furnished to do so, subject to the following conditions:
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
--------------------------------------------------------------------------------
|
||||
@github/combobox-nav@2.3.1 - MIT
|
||||
--------------------------------------------------------------------------------
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 GitHub
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@@ -1356,29 +1389,6 @@ the following conditions:
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
--------------------------------------------------------------------------------
|
||||
@github/paste-markdown@1.5.3 - MIT
|
||||
--------------------------------------------------------------------------------
|
||||
Copyright (c) 2018 GitHub, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
|
||||
@@ -15,14 +15,13 @@ import (
|
||||
const scalarTemplate = `<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{.AppName}} API v2 Reference</title>
|
||||
<title>GitCaddy API v2 Reference</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style>
|
||||
/* Custom theme to match Gitea */
|
||||
:root {
|
||||
--scalar-color-1: #4a90d9;
|
||||
--scalar-color-accent: #4a90d9;
|
||||
--scalar-color-1: #609926;
|
||||
--scalar-color-accent: #609926;
|
||||
--scalar-background-1: #ffffff;
|
||||
--scalar-background-2: #f8f9fa;
|
||||
--scalar-background-3: #e9ecef;
|
||||
@@ -34,9 +33,42 @@ const scalarTemplate = `<!DOCTYPE html>
|
||||
--scalar-background-3: #333333;
|
||||
}
|
||||
}
|
||||
.api-version-bar {
|
||||
background: var(--scalar-background-2, #f8f9fa);
|
||||
padding: 8px 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
font-size: 14px;
|
||||
border-bottom: 1px solid var(--scalar-background-3, #e9ecef);
|
||||
}
|
||||
.api-version-bar a {
|
||||
color: #609926;
|
||||
text-decoration: none;
|
||||
padding: 4px 12px;
|
||||
border-radius: 4px;
|
||||
transition: background 0.2s;
|
||||
}
|
||||
.api-version-bar a:hover {
|
||||
background: rgba(96, 153, 38, 0.1);
|
||||
}
|
||||
.api-version-bar a.active {
|
||||
background: #609926;
|
||||
color: white;
|
||||
}
|
||||
.api-version-bar .back-link {
|
||||
margin-right: auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="api-version-bar">
|
||||
<a href="{{.AppSubURL}}/" class="back-link">← Back to GitCaddy</a>
|
||||
<span>API Version:</span>
|
||||
<a href="{{.AppSubURL}}/api/swagger">v1</a>
|
||||
<a href="{{.AppSubURL}}/api/v2/docs" class="active">v2</a>
|
||||
</div>
|
||||
<script
|
||||
id="api-reference"
|
||||
data-url="{{.SpecURL}}"
|
||||
@@ -60,8 +92,9 @@ const scalarTemplate = `<!DOCTYPE html>
|
||||
// DocsScalar serves the Scalar API documentation UI for v2
|
||||
func DocsScalar(ctx *context.APIContext) {
|
||||
data := map[string]string{
|
||||
"AppName": setting.AppName,
|
||||
"SpecURL": setting.AppSubURL + "/api/v2/swagger.json",
|
||||
"AppName": setting.AppName,
|
||||
"AppSubURL": setting.AppSubURL,
|
||||
"SpecURL": setting.AppSubURL + "/api/v2/swagger.json",
|
||||
}
|
||||
|
||||
ctx.Resp.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||
|
||||
@@ -241,6 +241,7 @@ func ChangeConfig(ctx *context.Context) {
|
||||
cfg.Theme.DisableRegistration.DynKey(): marshalBool,
|
||||
cfg.Theme.CustomHomeHTML.DynKey(): marshalString(""),
|
||||
cfg.Theme.APIHeaderURL.DynKey(): marshalString(""),
|
||||
cfg.Theme.HelpURL.DynKey(): marshalString(""),
|
||||
cfg.Theme.CustomHomeTitle.DynKey(): marshalString(""),
|
||||
cfg.Theme.CustomHomeTagline.DynKey(): marshalString(""),
|
||||
cfg.Theme.PinnedOrgDisplayFormat.DynKey(): marshalString("condensed"),
|
||||
|
||||
@@ -28,7 +28,7 @@ func Code(ctx *context.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
ctx.Data["UsersPageIsDisabled"] = setting.Service.Explore.DisableUsersPage
|
||||
ctx.Data["UsersPageIsDisabled"] = setting.Service.Explore.DisableUsersPage || setting.Config().Theme.HideExploreUsers.Value(ctx)
|
||||
ctx.Data["OrganizationsPageIsDisabled"] = setting.Service.Explore.DisableOrganizationsPage
|
||||
ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled
|
||||
ctx.Data["Title"] = ctx.Tr("explore_title")
|
||||
|
||||
@@ -19,7 +19,7 @@ func Organizations(ctx *context.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
ctx.Data["UsersPageIsDisabled"] = setting.Service.Explore.DisableUsersPage
|
||||
ctx.Data["UsersPageIsDisabled"] = setting.Service.Explore.DisableUsersPage || setting.Config().Theme.HideExploreUsers.Value(ctx)
|
||||
ctx.Data["CodePageIsDisabled"] = setting.Service.Explore.DisableCodePage
|
||||
ctx.Data["Title"] = ctx.Tr("explore_title")
|
||||
ctx.Data["PageIsExplore"] = true
|
||||
|
||||
@@ -146,7 +146,7 @@ func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) {
|
||||
|
||||
// Repos render explore repositories page
|
||||
func Repos(ctx *context.Context) {
|
||||
ctx.Data["UsersPageIsDisabled"] = setting.Service.Explore.DisableUsersPage
|
||||
ctx.Data["UsersPageIsDisabled"] = setting.Service.Explore.DisableUsersPage || setting.Config().Theme.HideExploreUsers.Value(ctx)
|
||||
ctx.Data["OrganizationsPageIsDisabled"] = setting.Service.Explore.DisableOrganizationsPage
|
||||
ctx.Data["CodePageIsDisabled"] = setting.Service.Explore.DisableCodePage
|
||||
ctx.Data["Title"] = ctx.Tr("explore_title")
|
||||
|
||||
@@ -128,7 +128,7 @@ func RenderUserSearch(ctx *context.Context, opts user_model.SearchUserOptions, t
|
||||
|
||||
// Users render explore users page
|
||||
func Users(ctx *context.Context) {
|
||||
if setting.Service.Explore.DisableUsersPage {
|
||||
if setting.Service.Explore.DisableUsersPage || setting.Config().Theme.HideExploreUsers.Value(ctx) {
|
||||
ctx.Redirect(setting.AppSubURL + "/explore")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -187,6 +187,15 @@ func home(ctx *context.Context, viewRepositories bool) {
|
||||
ctx.Data["UngroupedPinned"] = ungroupedPinned
|
||||
ctx.Data["HasPinnedRepos"] = len(pinnedRepos) > 0
|
||||
|
||||
// Count public pinned repos for non-member visibility
|
||||
hasPublicPinnedRepos := false
|
||||
for _, p := range pinnedRepos {
|
||||
if repo, ok := p.Repo.(*repo_model.Repository); ok && repo != nil && !repo.IsPrivate {
|
||||
hasPublicPinnedRepos = true
|
||||
break
|
||||
}
|
||||
}
|
||||
ctx.Data["HasPublicPinnedRepos"] = hasPublicPinnedRepos
|
||||
// Load public members (limit to 12 for overview display)
|
||||
publicMembers, totalPublicMembers, err := organization.GetPublicOrgMembers(ctx, org.ID, 12)
|
||||
if err != nil {
|
||||
|
||||
@@ -19,6 +19,7 @@ import (
|
||||
git_model "code.gitea.io/gitea/models/git"
|
||||
issues_model "code.gitea.io/gitea/models/issues"
|
||||
"code.gitea.io/gitea/models/organization"
|
||||
packages_model "code.gitea.io/gitea/models/packages"
|
||||
access_model "code.gitea.io/gitea/models/perm/access"
|
||||
repo_model "code.gitea.io/gitea/models/repo"
|
||||
unit_model "code.gitea.io/gitea/models/unit"
|
||||
@@ -602,6 +603,16 @@ func RepoAssignment(ctx *Context) {
|
||||
ctx.Data["CodeIndexerUnavailable"] = !code_indexer.IsAvailable(ctx)
|
||||
}
|
||||
|
||||
// Check if wiki has content (for non-member visibility)
|
||||
hasWiki, _ := gitrepo.IsRepositoryExist(ctx, repo.WikiStorageRepo())
|
||||
ctx.Data["HasWiki"] = hasWiki
|
||||
|
||||
// Check if there are any packages (for non-member visibility)
|
||||
numPackages, _ := packages_model.CountVersions(ctx, &packages_model.PackageSearchOptions{
|
||||
RepoID: repo.ID,
|
||||
})
|
||||
ctx.Data["HasPackages"] = numPackages > 0
|
||||
|
||||
if ctx.IsSigned {
|
||||
ctx.Data["IsWatchingRepo"] = repo_model.IsWatching(ctx, ctx.Doer.ID, repo.ID)
|
||||
ctx.Data["IsStaringRepo"] = repo_model.IsStaring(ctx, ctx.Doer.ID, repo.ID)
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
{{template "custom/extra_links" .}}
|
||||
|
||||
{{if not .IsSigned}}
|
||||
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com">{{ctx.Locale.Tr "help"}}</a>
|
||||
{{if .SystemConfig.Theme.HelpURL.Value ctx}}<a class="item" target="_blank" rel="noopener noreferrer" href="{{.SystemConfig.Theme.HelpURL.Value ctx}}">{{ctx.Locale.Tr "help"}}</a>{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
@@ -126,10 +126,10 @@
|
||||
{{svg "octicon-tools"}}
|
||||
{{ctx.Locale.Tr "your_settings"}}
|
||||
</a>
|
||||
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com">
|
||||
{{if .SystemConfig.Theme.HelpURL.Value ctx}}<a class="item" target="_blank" rel="noopener noreferrer" href="{{.SystemConfig.Theme.HelpURL.Value ctx}}">
|
||||
{{svg "octicon-question"}}
|
||||
{{ctx.Locale.Tr "help"}}
|
||||
</a>
|
||||
</a>{{end}}
|
||||
{{if .IsAdmin}}
|
||||
<div class="divider"></div>
|
||||
<a class="{{if .PageIsAdmin}}active {{end}}item" href="{{AppSubUrl}}/-/admin">
|
||||
|
||||
@@ -30,7 +30,46 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{if .PinnedOrganizations}}
|
||||
{{if eq (.SystemConfig.Theme.PinnedOrgDisplayFormat.Value ctx) "promotional"}}
|
||||
{{/* Promotional format: show marketing content */}}
|
||||
<div class="ui stackable middle very relaxed page grid">
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
{{svg "octicon-flame"}} {{ctx.Locale.Tr "startpage.install"}}
|
||||
</h1>
|
||||
<p class="large tw-text-balance">
|
||||
{{ctx.Locale.Tr "startpage.install_desc"}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
{{svg "octicon-dependabot"}} {{ctx.Locale.Tr "startpage.platform"}}
|
||||
</h1>
|
||||
<p class="large tw-text-balance">
|
||||
{{ctx.Locale.Tr "startpage.platform_desc"}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui stackable middle very relaxed page grid">
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
{{svg "octicon-rocket"}} {{ctx.Locale.Tr "startpage.lightweight"}}
|
||||
</h1>
|
||||
<p class="large tw-text-balance">
|
||||
{{ctx.Locale.Tr "startpage.lightweight_desc"}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
{{svg "octicon-code"}} {{ctx.Locale.Tr "startpage.license"}}
|
||||
</h1>
|
||||
<p class="large tw-text-balance">
|
||||
{{ctx.Locale.Tr "startpage.license_desc"}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{{else if .PinnedOrganizations}}
|
||||
{{/* Show pinned organizations */}}
|
||||
<div class="ui container tw-my-8">
|
||||
{{if eq (.SystemConfig.Theme.PinnedOrgDisplayFormat.Value ctx) "regular"}}
|
||||
{{/* Regular format: icon above, title below, description below that */}}
|
||||
@@ -71,22 +110,22 @@
|
||||
{{end}}
|
||||
</div>
|
||||
{{else}}
|
||||
{{/* Only show promotional text when there are no pinned organizations */}}
|
||||
{{/* No pinned organizations - show promotional content as fallback */}}
|
||||
<div class="ui stackable middle very relaxed page grid">
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
{{svg "octicon-flame"}} {{ctx.Locale.Tr "startpage.install"}}
|
||||
</h1>
|
||||
<p class="large tw-text-balance">
|
||||
{{ctx.Locale.Tr "startpage.install_desc" "https://docs.gitea.com/installation/install-from-binary" "https://github.com/go-gitea/gitea/tree/master/docker" "https://docs.gitea.com/installation/install-from-package"}}
|
||||
{{ctx.Locale.Tr "startpage.install_desc"}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
{{svg "octicon-device-desktop"}} {{ctx.Locale.Tr "startpage.platform"}}
|
||||
{{svg "octicon-dependabot"}} {{ctx.Locale.Tr "startpage.platform"}}
|
||||
</h1>
|
||||
<p class="large tw-text-balance">
|
||||
{{ctx.Locale.Tr "startpage.platform_desc" "https://go.dev/"}}
|
||||
{{ctx.Locale.Tr "startpage.platform_desc"}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -104,7 +143,7 @@
|
||||
{{svg "octicon-code"}} {{ctx.Locale.Tr "startpage.license"}}
|
||||
</h1>
|
||||
<p class="large tw-text-balance">
|
||||
{{ctx.Locale.Tr "startpage.license_desc" "https://code.gitea.io/gitea" "code.gitea.io/gitea" "https://github.com/go-gitea/gitea"}}
|
||||
{{ctx.Locale.Tr "startpage.license_desc"}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
{{/* Overview Tab Content */}}
|
||||
{{if .PageIsViewOverview}}
|
||||
{{/* Pinned Repositories Section */}}
|
||||
{{if or .IsOrganizationMember .HasPublicPinnedRepos}}{{/* Pinned Repositories Section */}}
|
||||
<div class="ui segment pinned-repos-section">
|
||||
<h4 class="ui header tw-flex tw-items-center">
|
||||
{{svg "octicon-pin" 16}} {{ctx.Locale.Tr "org.pinned_repos"}}
|
||||
@@ -28,7 +28,7 @@
|
||||
{{if .UngroupedPinned}}
|
||||
<div class="ui three stackable cards pinned-repos">
|
||||
{{range .UngroupedPinned}}
|
||||
{{if .Repo}}
|
||||
{{if and .Repo (or $.IsOrganizationMember (not .Repo.IsPrivate))}}
|
||||
<a class="ui card" href="{{.Repo.Link}}">
|
||||
<div class="content tw-text-center">
|
||||
{{if .Repo.Avatar}}
|
||||
@@ -73,7 +73,7 @@
|
||||
</h5>
|
||||
<div class="ui three stackable cards pinned-repos">
|
||||
{{range $groupRepos}}
|
||||
{{if .Repo}}
|
||||
{{if and .Repo (or $.IsOrganizationMember (not .Repo.IsPrivate))}}
|
||||
<a class="ui card" href="{{.Repo.Link}}">
|
||||
<div class="content tw-text-center">
|
||||
{{if .Repo.Avatar}}
|
||||
@@ -110,7 +110,7 @@
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{else}}
|
||||
{{/* Empty state for pinned repos */}}
|
||||
{{if .IsOrganizationMember}}{{/* Empty state for pinned repos - members only */}}
|
||||
<div class="ui placeholder segment tw-text-center">
|
||||
<div class="ui icon header">
|
||||
{{svg "octicon-pin" 48}}
|
||||
@@ -129,8 +129,10 @@
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{/* Profile README Empty State */}}
|
||||
{{if and (not .ProfileReadmeContent) .IsOrganizationOwner}}
|
||||
@@ -305,14 +307,7 @@
|
||||
<a href="{{.User.HomeLink}}" title="{{.User.Name}}{{if .User.FullName}} ({{.User.FullName}}){{end}}">{{ctx.AvatarUtils.Avatar .User 48}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{else}}
|
||||
<h4 class="ui top attached header tw-flex tw-mt-4">
|
||||
<strong class="tw-flex-1">{{ctx.Locale.Tr "org.public_members"}}</strong>
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<p class="text grey tw-text-center">{{ctx.Locale.Tr "org.no_public_members"}}</p>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="ui small label">{{.RepoCount}}</div>
|
||||
{{end}}
|
||||
</a>
|
||||
{{if .CanReadProjects}}
|
||||
{{if and .CanReadProjects (or .IsOrganizationMember .ProjectCount)}}
|
||||
<a class="{{if .PageIsViewProjects}}active {{end}}item" href="{{$.Org.HomeLink}}/-/projects">
|
||||
{{svg "octicon-project-symlink"}} {{ctx.Locale.Tr "user.projects"}}
|
||||
{{if .ProjectCount}}
|
||||
@@ -18,7 +18,7 @@
|
||||
{{end}}
|
||||
</a>
|
||||
{{end}}
|
||||
{{if and .IsPackageEnabled .CanReadPackages}}
|
||||
{{if and .IsPackageEnabled .CanReadPackages .IsOrganizationMember}}
|
||||
<a class="{{if .IsPackagesPage}}active {{end}}item" href="{{$.Org.HomeLink}}/-/packages">
|
||||
{{svg "octicon-package"}} {{ctx.Locale.Tr "packages.title"}}
|
||||
</a>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -173,7 +173,7 @@
|
||||
</a>
|
||||
{{end}}
|
||||
|
||||
{{if .Permission.CanRead ctx.Consts.RepoUnitTypePackages}}
|
||||
{{if and (.Permission.CanRead ctx.Consts.RepoUnitTypePackages) (or .IsWriter .HasPackages)}}
|
||||
<a href="{{.RepoLink}}/packages" class="{{if .IsPackagesPage}}active {{end}}item">
|
||||
{{svg "octicon-package"}} {{ctx.Locale.Tr "packages.title"}}
|
||||
</a>
|
||||
@@ -198,7 +198,7 @@
|
||||
</a>
|
||||
{{end}}
|
||||
|
||||
{{if .Permission.CanRead ctx.Consts.RepoUnitTypeWiki}}
|
||||
{{if and (.Permission.CanRead ctx.Consts.RepoUnitTypeWiki) (or .IsWriter .HasWiki)}}
|
||||
<a class="{{if .PageIsWiki}}active {{end}}item" href="{{.RepoLink}}/wiki">
|
||||
{{svg "octicon-book"}} {{ctx.Locale.Tr "repo.wiki"}}
|
||||
</a>
|
||||
|
||||
@@ -1,14 +1,75 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>GitCaddy API</title>
|
||||
<link href="{{AssetUrlPrefix}}/css/swagger.css?v={{AssetVersion}}" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
{{/* TODO: add Help & Glossary to help users understand the API, and explain some concepts like "Owner" */}}
|
||||
<a class="swagger-back-link" href="{{AppSubUrl}}/">{{svg "octicon-reply"}}{{ctx.Locale.Tr "return_to_gitea"}}</a>
|
||||
<div id="swagger-ui" data-source="{{AppSubUrl}}/swagger.{{.APIJSONVersion}}.json"></div>
|
||||
<footer class="page-footer"></footer>
|
||||
<script src="{{AssetUrlPrefix}}/js/swagger.js?v={{AssetVersion}}"></script>
|
||||
</body>
|
||||
<html>
|
||||
<head>
|
||||
<title>GitCaddy API v1 Reference</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style>
|
||||
:root {
|
||||
--scalar-color-1: #609926;
|
||||
--scalar-color-accent: #609926;
|
||||
--scalar-background-1: #ffffff;
|
||||
--scalar-background-2: #f8f9fa;
|
||||
--scalar-background-3: #e9ecef;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--scalar-background-1: #1a1a1a;
|
||||
--scalar-background-2: #252525;
|
||||
--scalar-background-3: #333333;
|
||||
}
|
||||
}
|
||||
.api-version-bar {
|
||||
background: var(--scalar-background-2, #f8f9fa);
|
||||
padding: 8px 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
font-size: 14px;
|
||||
border-bottom: 1px solid var(--scalar-background-3, #e9ecef);
|
||||
}
|
||||
.api-version-bar a {
|
||||
color: #609926;
|
||||
text-decoration: none;
|
||||
padding: 4px 12px;
|
||||
border-radius: 4px;
|
||||
transition: background 0.2s;
|
||||
}
|
||||
.api-version-bar a:hover {
|
||||
background: rgba(96, 153, 38, 0.1);
|
||||
}
|
||||
.api-version-bar a.active {
|
||||
background: #609926;
|
||||
color: white;
|
||||
}
|
||||
.api-version-bar .back-link {
|
||||
margin-right: auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="api-version-bar">
|
||||
<a href="{{AppSubUrl}}/" class="back-link">← Back to GitCaddy</a>
|
||||
<span>API Version:</span>
|
||||
<a href="{{AppSubUrl}}/api/swagger" class="active">v1</a>
|
||||
<a href="{{AppSubUrl}}/api/v2/docs">v2</a>
|
||||
</div>
|
||||
<script
|
||||
id="api-reference"
|
||||
data-url="{{AppSubUrl}}/swagger.{{.APIJSONVersion}}.json"
|
||||
data-configuration='{
|
||||
"theme": "default",
|
||||
"layout": "modern",
|
||||
"showSidebar": true,
|
||||
"hideModels": false,
|
||||
"hideDownloadButton": false,
|
||||
"defaultHttpClient": {
|
||||
"targetKey": "shell",
|
||||
"clientKey": "curl"
|
||||
}
|
||||
}'>
|
||||
</script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/@scalar/api-reference"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -8,31 +8,31 @@ gitea-theme-meta-info {
|
||||
|
||||
:root {
|
||||
--is-dark-theme: true;
|
||||
--color-primary: #4183c4;
|
||||
--color-primary: #609926;
|
||||
--color-primary-contrast: #ffffff;
|
||||
--color-primary-dark-1: #548fca;
|
||||
--color-primary-dark-2: #679cd0;
|
||||
--color-primary-dark-3: #7aa8d6;
|
||||
--color-primary-dark-4: #8db5dc;
|
||||
--color-primary-dark-5: #b3cde7;
|
||||
--color-primary-dark-6: #d9e6f3;
|
||||
--color-primary-dark-7: #f4f8fb;
|
||||
--color-primary-light-1: #3876b3;
|
||||
--color-primary-light-2: #31699f;
|
||||
--color-primary-light-3: #2b5c8b;
|
||||
--color-primary-light-4: #254f77;
|
||||
--color-primary-light-5: #193450;
|
||||
--color-primary-light-6: #0c1a28;
|
||||
--color-primary-light-7: #04080c;
|
||||
--color-primary-alpha-10: #4183c419;
|
||||
--color-primary-alpha-20: #4183c433;
|
||||
--color-primary-alpha-30: #4183c44b;
|
||||
--color-primary-alpha-40: #4183c466;
|
||||
--color-primary-alpha-50: #4183c480;
|
||||
--color-primary-alpha-60: #4183c499;
|
||||
--color-primary-alpha-70: #4183c4b3;
|
||||
--color-primary-alpha-80: #4183c4cc;
|
||||
--color-primary-alpha-90: #4183c4e1;
|
||||
--color-primary-dark-1: #77a846;
|
||||
--color-primary-dark-2: #8fb767;
|
||||
--color-primary-dark-3: #a7c687;
|
||||
--color-primary-dark-4: #bfd6a8;
|
||||
--color-primary-dark-5: #d7e5c8;
|
||||
--color-primary-dark-6: #ebf2e4;
|
||||
--color-primary-dark-7: #f7f9f4;
|
||||
--color-primary-light-1: #548621;
|
||||
--color-primary-light-2: #49751d;
|
||||
--color-primary-light-3: #3f6419;
|
||||
--color-primary-light-4: #345414;
|
||||
--color-primary-light-5: #263d0f;
|
||||
--color-primary-light-6: #152108;
|
||||
--color-primary-light-7: #090f03;
|
||||
--color-primary-alpha-10: #60992619;
|
||||
--color-primary-alpha-20: #60992633;
|
||||
--color-primary-alpha-30: #6099264b;
|
||||
--color-primary-alpha-40: #60992666;
|
||||
--color-primary-alpha-50: #60992680;
|
||||
--color-primary-alpha-60: #60992699;
|
||||
--color-primary-alpha-70: #609926b3;
|
||||
--color-primary-alpha-80: #609926cc;
|
||||
--color-primary-alpha-90: #609926e1;
|
||||
--color-primary-hover: var(--color-primary-light-1);
|
||||
--color-primary-active: var(--color-primary-light-2);
|
||||
--color-secondary: #3b444c;
|
||||
|
||||
@@ -8,31 +8,31 @@ gitea-theme-meta-info {
|
||||
|
||||
:root {
|
||||
--is-dark-theme: false;
|
||||
--color-primary: #4183c4;
|
||||
--color-primary: #609926;
|
||||
--color-primary-contrast: #ffffff;
|
||||
--color-primary-dark-1: #3876b3;
|
||||
--color-primary-dark-2: #31699f;
|
||||
--color-primary-dark-3: #2b5c8b;
|
||||
--color-primary-dark-4: #254f77;
|
||||
--color-primary-dark-5: #193450;
|
||||
--color-primary-dark-6: #0c1a28;
|
||||
--color-primary-dark-7: #04080c;
|
||||
--color-primary-light-1: #548fca;
|
||||
--color-primary-light-2: #679cd0;
|
||||
--color-primary-light-3: #7aa8d6;
|
||||
--color-primary-light-4: #8db5dc;
|
||||
--color-primary-light-5: #b3cde7;
|
||||
--color-primary-light-6: #d9e6f3;
|
||||
--color-primary-light-7: #f4f8fb;
|
||||
--color-primary-alpha-10: #4183c419;
|
||||
--color-primary-alpha-20: #4183c433;
|
||||
--color-primary-alpha-30: #4183c44b;
|
||||
--color-primary-alpha-40: #4183c466;
|
||||
--color-primary-alpha-50: #4183c480;
|
||||
--color-primary-alpha-60: #4183c499;
|
||||
--color-primary-alpha-70: #4183c4b3;
|
||||
--color-primary-alpha-80: #4183c4cc;
|
||||
--color-primary-alpha-90: #4183c4e1;
|
||||
--color-primary-dark-1: #548621;
|
||||
--color-primary-dark-2: #49751d;
|
||||
--color-primary-dark-3: #3f6419;
|
||||
--color-primary-dark-4: #345414;
|
||||
--color-primary-dark-5: #263d0f;
|
||||
--color-primary-dark-6: #152108;
|
||||
--color-primary-dark-7: #090f03;
|
||||
--color-primary-light-1: #77a846;
|
||||
--color-primary-light-2: #8fb767;
|
||||
--color-primary-light-3: #a7c687;
|
||||
--color-primary-light-4: #bfd6a8;
|
||||
--color-primary-light-5: #d7e5c8;
|
||||
--color-primary-light-6: #ebf2e4;
|
||||
--color-primary-light-7: #f7f9f4;
|
||||
--color-primary-alpha-10: #60992619;
|
||||
--color-primary-alpha-20: #60992633;
|
||||
--color-primary-alpha-30: #6099264b;
|
||||
--color-primary-alpha-40: #60992666;
|
||||
--color-primary-alpha-50: #60992680;
|
||||
--color-primary-alpha-60: #60992699;
|
||||
--color-primary-alpha-70: #609926b3;
|
||||
--color-primary-alpha-80: #609926cc;
|
||||
--color-primary-alpha-90: #609926e1;
|
||||
--color-primary-hover: var(--color-primary-dark-1);
|
||||
--color-primary-active: var(--color-primary-dark-2);
|
||||
--color-secondary: #d0d7de;
|
||||
|
||||
@@ -221,6 +221,16 @@ export default {
|
||||
outputFilename: 'licenses.txt',
|
||||
outputWriter: ({dependencies}: {dependencies: Array<Record<string, string>>}) => {
|
||||
const line = '-'.repeat(80);
|
||||
const header = `${line}
|
||||
GitCaddy Server - Third Party Licenses
|
||||
Copyright (c) 2024-2026 MarketAlly Inc.
|
||||
https://marketally.com
|
||||
|
||||
GitCaddy is built on Gitea (https://gitea.com) and includes the following
|
||||
open source software. We are grateful to all the contributors.
|
||||
${line}
|
||||
|
||||
`;
|
||||
const goJson = readFileSync('assets/go-licenses.json', 'utf8');
|
||||
const goModules = JSON.parse(goJson).map(({name, licenseText}: Record<string, string>) => {
|
||||
return {name, body: formatLicenseText(licenseText)};
|
||||
@@ -230,10 +240,11 @@ export default {
|
||||
});
|
||||
|
||||
const modules = [...goModules, ...jsModules].sort((a, b) => a.name.localeCompare(b.name));
|
||||
return modules.map(({name, version, licenseName, body}) => {
|
||||
const licenseList = modules.map(({name, version, licenseName, body}) => {
|
||||
const title = licenseName ? `${name}@${version} - ${licenseName}` : name;
|
||||
return `${line}\n${title}\n${line}\n${body}`;
|
||||
}).join('\n');
|
||||
return header + licenseList;
|
||||
},
|
||||
override: {
|
||||
'khroma@*': {licenseName: 'MIT'}, // https://github.com/fabiospampinato/khroma/pull/33
|
||||
|
||||
Reference in New Issue
Block a user