2023-06-07 18:50:30 +00:00
|
|
|
{{ template "header" .}}
|
|
|
|
{{ template "admin_header" .}}
|
|
|
|
|
|
|
|
<div class="grid gap-4 grid-cols-1 md:grid-cols-2">
|
|
|
|
<div class="p-6 bg-gray-50 dark:bg-gray-800 rounded-md border border-gray-200 dark:border-gray-700">
|
2023-09-25 16:57:47 +00:00
|
|
|
<p class="italic text-xs text-gray-400 dark:text-gray-400 mb-4">{{ .locale.Tr "admin.config-link" (join "<a target=\"_blank\" href=\"https://github.com/thomiceli/opengist/blob/master/docs/configuration/index.md#configuration\">" (toStr (.locale.Tr "admin.config-link-overriden")) "</a>") }}</p>
|
2023-06-07 18:50:30 +00:00
|
|
|
<dl class="dl-config">
|
|
|
|
<div class="relative col-span-3">
|
|
|
|
<div class="absolute inset-0 flex items-center" aria-hidden="true">
|
|
|
|
<div class="w-full border-t border-gray-300"></div>
|
|
|
|
</div>
|
|
|
|
<div class="relative flex justify-center">
|
|
|
|
<span class="bg-gray-50 dark:bg-gray-800 px-2 text-sm text-slate-700 dark:text-slate-300 font-bold">General</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<dt>Log level</dt><dd>{{ .c.LogLevel }}</dd>
|
2024-01-04 03:44:56 +00:00
|
|
|
<dt>Log output</dt><dd>{{ .c.LogOutput }}</dd>
|
2023-06-07 18:50:30 +00:00
|
|
|
<dt>External URL</dt><dd>{{ .c.ExternalUrl }}</dd>
|
|
|
|
<dt>Opengist home</dt><dd>{{ .c.OpengistHome }}</dd>
|
|
|
|
<dt>DB filename</dt><dd>{{ .c.DBFilename }}</dd>
|
2024-01-04 03:44:56 +00:00
|
|
|
<dt>Index Enabled</dt><dd>{{ .c.IndexEnabled }}</dd>
|
|
|
|
<dt>Index Dirname</dt><dd>{{ .c.IndexDirname }}</dd>
|
|
|
|
<dt>Git default branch</dt><dd>{{ .c.GitDefaultBranch }}</dd>
|
2023-06-09 13:25:41 +00:00
|
|
|
<dt>SQLite Journal Mode</dt><dd>{{ .c.SqliteJournalMode }}</dd>
|
2023-06-07 18:50:30 +00:00
|
|
|
<div class="relative col-span-3 mt-4">
|
|
|
|
<div class="absolute inset-0 flex items-center" aria-hidden="true">
|
|
|
|
<div class="w-full border-t border-gray-300"></div>
|
|
|
|
</div>
|
|
|
|
<div class="relative flex justify-center">
|
|
|
|
<span class="bg-gray-50 dark:bg-gray-800 px-2 text-sm text-slate-700 dark:text-slate-300 font-bold">HTTP</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<dt>HTTP host</dt><dd>{{ .c.HttpHost }}</dd>
|
|
|
|
<dt>HTTP port</dt><dd>{{ .c.HttpPort }}</dd>
|
|
|
|
<dt>HTTP Git enabled</dt><dd>{{ .c.HttpGit }}</dd>
|
|
|
|
<div class="relative col-span-3 mt-4">
|
|
|
|
<div class="absolute inset-0 flex items-center" aria-hidden="true">
|
|
|
|
<div class="w-full border-t border-gray-300"></div>
|
|
|
|
</div>
|
|
|
|
<div class="relative flex justify-center">
|
|
|
|
<span class="bg-gray-50 dark:bg-gray-800 px-2 text-sm text-slate-700 dark:text-slate-300 font-bold">SSH</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<dt>SSH Git enabled</dt><dd>{{ .c.SshGit }}</dd>
|
|
|
|
<dt>SSH host</dt><dd>{{ .c.SshHost }}</dd>
|
|
|
|
<dt>SSH port</dt><dd>{{ .c.SshPort }}</dd>
|
|
|
|
<dt>SSH external domain</dt><dd>{{ .c.SshExternalDomain }}</dd>
|
|
|
|
<dt>SSH Keygen</dt><dd>{{ .c.SshKeygen }}</dd>
|
|
|
|
<div class="relative col-span-3 mt-4">
|
|
|
|
<div class="absolute inset-0 flex items-center" aria-hidden="true">
|
|
|
|
<div class="w-full border-t border-gray-300"></div>
|
|
|
|
</div>
|
|
|
|
<div class="relative flex justify-center">
|
|
|
|
<span class="bg-gray-50 dark:bg-gray-800 px-2 text-sm text-slate-700 dark:text-slate-300 font-bold">OAuth</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<dt>Github Client key</dt><dd>{{ .c.GithubClientKey }}</dd>
|
|
|
|
<dt>Github Secret</dt><dd>{{ .c.GithubSecret }}</dd>
|
2024-01-04 03:44:56 +00:00
|
|
|
<dt>GitLab client Key</dt><dd>{{ .c.GitlabClientKey }}</dd>
|
|
|
|
<dt>GitLab Secret</dt><dd>{{ .c.GitlabSecret }}</dd>
|
|
|
|
<dt>GitLab URL</dt><dd>{{ .c.GitlabUrl }}</dd>
|
2024-02-19 01:20:03 +00:00
|
|
|
<dt>GitLab Name</dt><dd>{{ .c.GitlabName }}</dd>
|
2023-06-07 18:50:30 +00:00
|
|
|
<dt>Gitea client Key</dt><dd>{{ .c.GiteaClientKey }}</dd>
|
|
|
|
<dt>Gitea Secret</dt><dd>{{ .c.GiteaSecret }}</dd>
|
|
|
|
<dt>Gitea URL</dt><dd>{{ .c.GiteaUrl }}</dd>
|
2024-02-19 01:20:03 +00:00
|
|
|
<dt>Gitea Name</dt><dd>{{ .c.GiteaName }}</dd>
|
2023-09-15 21:56:14 +00:00
|
|
|
<dt>OIDC client Key</dt><dd>{{ .c.OIDCClientKey }}</dd>
|
|
|
|
<dt>OIDC Secret</dt><dd>{{ .c.OIDCSecret }}</dd>
|
|
|
|
<dt>OIDC Discovery URL</dt><dd>{{ .c.OIDCDiscoveryUrl }}</dd>
|
2023-06-07 18:50:30 +00:00
|
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<ul role="list" class="divide-y divide-slate-300 dark:divide-gray-200 px-4 py-2 sm:px-6 bg-gray-50 dark:bg-gray-800 rounded-md border border-gray-200 dark:border-gray-700">
|
|
|
|
<li class="list-none gap-x-4 py-5">
|
|
|
|
<div class="flex items-center justify-between">
|
|
|
|
<span class="flex flex-grow flex-col">
|
2023-09-22 15:26:09 +00:00
|
|
|
<span class="text-sm font-medium leading-6 text-slate-700 dark:text-slate-300">{{ .locale.Tr "admin.disable-signup" }}</span>
|
|
|
|
<span class="text-sm text-gray-400 dark:text-gray-400">{{ .locale.Tr "admin.disable-signup_help" }}</span>
|
2023-06-07 18:50:30 +00:00
|
|
|
</span>
|
|
|
|
<button type="button" id="disable-signup" data-bool="{{ .DisableSignup }}" class="toggle-button {{ if .DisableSignup }}bg-primary-600{{else}}bg-gray-300 dark:bg-gray-400{{end}} relative inline-flex h-6 w-11 ml-4 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary-600 focus:ring-offset-2" role="switch" aria-checked="false" aria-labelledby="availability-label" aria-describedby="availability-description">
|
|
|
|
<span aria-hidden="true" class="{{ if .DisableSignup }}translate-x-5{{else}}translate-x-0{{end}} pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"></span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li class="list-none gap-x-4 py-5">
|
|
|
|
<div class="flex items-center justify-between">
|
|
|
|
<span class="flex flex-grow flex-col">
|
2023-09-22 15:26:09 +00:00
|
|
|
<span class="text-sm font-medium leading-6 text-slate-700 dark:text-slate-300">{{ .locale.Tr "admin.require-login" }}</span>
|
|
|
|
<span class="text-sm text-gray-400 dark:text-gray-400">{{ .locale.Tr "admin.require-login_help" }}</span>
|
2023-06-07 18:50:30 +00:00
|
|
|
</span>
|
|
|
|
<button type="button" id="require-login" data-bool="{{ .RequireLogin }}" class="toggle-button {{ if .RequireLogin }}bg-primary-600{{else}}bg-gray-300 dark:bg-gray-400{{end}} relative inline-flex h-6 w-11 ml-4 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary-600 focus:ring-offset-2" role="switch" aria-checked="false" aria-labelledby="availability-label" aria-describedby="availability-description">
|
|
|
|
<span aria-hidden="true" class="{{ if .RequireLogin }}translate-x-5{{else}}translate-x-0{{end}} pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"></span>
|
2024-05-12 21:40:11 +00:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li class="list-none gap-x-4 py-5">
|
|
|
|
<div class="flex items-center justify-between">
|
|
|
|
<span class="flex flex-grow flex-col">
|
|
|
|
<span class="text-sm font-medium leading-6 text-slate-700 dark:text-slate-300">{{ .locale.Tr "admin.allow-gists-without-login" }}</span>
|
|
|
|
<span class="text-sm text-gray-400 dark:text-gray-400">{{ .locale.Tr "admin.allow-gists-without-login_help" }}</span>
|
|
|
|
</span>
|
|
|
|
<button type="button" id="allow-gists-without-login" data-bool="{{ .AllowGistsWithoutLogin }}" class="toggle-button {{ if .AllowGistsWithoutLogin }}bg-primary-600{{else}}bg-gray-300 dark:bg-gray-400{{end}} relative inline-flex h-6 w-11 ml-4 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary-600 focus:ring-offset-2" role="switch" aria-checked="false" aria-labelledby="availability-label" aria-describedby="availability-description">
|
|
|
|
<span aria-hidden="true" class="{{ if .AllowGistsWithoutLogin }}translate-x-5{{else}}translate-x-0{{end}} pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"></span>
|
2023-06-07 18:50:30 +00:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li class="list-none gap-x-4 py-5">
|
|
|
|
<div class="flex items-center justify-between">
|
|
|
|
<span class="flex flex-grow flex-col">
|
2023-09-22 15:26:09 +00:00
|
|
|
<span class="text-sm font-medium leading-6 text-slate-700 dark:text-slate-300">{{ .locale.Tr "admin.disable-login" }}</span>
|
|
|
|
<span class="text-sm text-gray-400 dark:text-gray-400">{{ .locale.Tr "admin.disable-login_help" }}</span>
|
2023-06-07 18:50:30 +00:00
|
|
|
</span>
|
|
|
|
<button type="button" id="disable-login-form" data-bool="{{ .DisableLoginForm }}" class="toggle-button {{ if .DisableLoginForm }}bg-primary-600{{else}}bg-gray-300 dark:bg-gray-400{{end}} relative inline-flex h-6 w-11 ml-4 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary-600 focus:ring-offset-2" role="switch" aria-checked="false" aria-labelledby="availability-label" aria-describedby="availability-description">
|
|
|
|
<span aria-hidden="true" class="{{ if .DisableLoginForm }}translate-x-5{{else}}translate-x-0{{end}} pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"></span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li class="list-none gap-x-4 py-5">
|
|
|
|
<div class="flex items-center justify-between">
|
|
|
|
<span class="flex flex-grow flex-col">
|
2023-09-22 15:26:09 +00:00
|
|
|
<span class="text-sm font-medium leading-6 text-slate-700 dark:text-slate-300">{{ .locale.Tr "admin.disable-gravatar" }}</span>
|
|
|
|
<span class="text-sm text-gray-400 dark:text-gray-400">{{ .locale.Tr "admin.disable-gravatar_help" }}</span>
|
2023-06-07 18:50:30 +00:00
|
|
|
</span>
|
|
|
|
<button type="button" id="disable-gravatar" data-bool="{{ .DisableGravatar }}" class="toggle-button {{ if .DisableGravatar }}bg-primary-600{{else}}bg-gray-300 dark:bg-gray-400{{end}} relative inline-flex h-6 w-11 ml-4 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary-600 focus:ring-offset-2" role="switch" aria-checked="false" aria-labelledby="availability-label" aria-describedby="availability-description">
|
|
|
|
<span aria-hidden="true" class="{{ if .DisableGravatar }}translate-x-5{{else}}translate-x-0{{end}} pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"></span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
{{ .csrfHtml }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{ template "admin_footer" .}}
|
|
|
|
{{ template "footer" .}}
|