2022-03-30 14:12:47 +05:30
|
|
|
{{if eq .PackageDescriptor.Package.Type "nuget"}}
|
2022-06-28 02:28:46 +05:30
|
|
|
<h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4>
|
2022-03-30 14:12:47 +05:30
|
|
|
<div class="ui attached segment">
|
|
|
|
<div class="ui form">
|
|
|
|
<div class="field">
|
2022-06-28 02:28:46 +05:30
|
|
|
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.nuget.registry"}}</label>
|
2023-04-07 03:05:32 +05:30
|
|
|
<div class="markup"><pre class="code-block"><code>dotnet nuget add source --name {{.PackageDescriptor.Owner.Name}} --username your_username --password your_token <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/nuget/index.json"></gitea-origin-url></code></pre></div>
|
2022-03-30 14:12:47 +05:30
|
|
|
</div>
|
|
|
|
<div class="field">
|
2022-06-28 02:28:46 +05:30
|
|
|
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.nuget.install"}}</label>
|
2023-04-07 03:05:32 +05:30
|
|
|
<div class="markup"><pre class="code-block"><code>dotnet add package --source {{.PackageDescriptor.Owner.Name}} --version {{.PackageDescriptor.Version.Version}} {{.PackageDescriptor.Package.Name}}</code></pre></div>
|
2022-03-30 14:12:47 +05:30
|
|
|
</div>
|
|
|
|
<div class="field">
|
2023-05-01 12:47:27 +05:30
|
|
|
<label>{{.locale.Tr "packages.nuget.documentation" "https://docs.gitea.io/en-us/usage/packages/nuget/" | Safe}}</label>
|
2022-03-30 14:12:47 +05:30
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.ReleaseNotes}}
|
2022-06-28 02:28:46 +05:30
|
|
|
<h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4>
|
2022-03-30 14:12:47 +05:30
|
|
|
<div class="ui attached segment">
|
|
|
|
{{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{end}}
|
|
|
|
{{if .PackageDescriptor.Metadata.ReleaseNotes}}{{Str2html .PackageDescriptor.Metadata.ReleaseNotes}}{{end}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{if .PackageDescriptor.Metadata.Dependencies}}
|
2022-06-28 02:28:46 +05:30
|
|
|
<h4 class="ui top attached header">{{.locale.Tr "packages.dependencies"}}</h4>
|
2022-03-30 14:12:47 +05:30
|
|
|
<div class="ui attached segment">
|
|
|
|
<table class="ui single line very basic table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2022-06-28 02:28:46 +05:30
|
|
|
<th class="ten wide">{{.locale.Tr "packages.dependency.id"}}</th>
|
|
|
|
<th class="three wide">{{.locale.Tr "packages.dependency.version"}}</th>
|
|
|
|
<th class="three wide">{{.locale.Tr "packages.nuget.dependency.framework"}}</th>
|
2022-03-30 14:12:47 +05:30
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{range $framework, $dependencies := .PackageDescriptor.Metadata.Dependencies}}
|
|
|
|
{{range $dependencies}}
|
|
|
|
<tr>
|
|
|
|
<td>{{.ID}}</td>
|
|
|
|
<td>{{.Version}}</td>
|
|
|
|
<td>{{$framework}}</td>
|
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|