All checks were successful
Build and Release / Create Release (push) Successful in 0s
Build and Release / Unit Tests (push) Successful in 3m10s
Build and Release / Integration Tests (PostgreSQL) (push) Successful in 5m13s
Build and Release / Lint (push) Successful in 5m25s
Build and Release / Build Binaries (amd64, linux, linux-latest) (push) Successful in 3m13s
Build and Release / Build Binaries (amd64, windows, windows-latest) (push) Successful in 8h5m42s
Build and Release / Build Binaries (amd64, darwin, macos) (push) Successful in 7m30s
Build and Release / Build Binaries (arm64, darwin, macos) (push) Successful in 7m55s
Build and Release / Build Binary (linux/arm64) (push) Successful in 7m36s
Implement complete subscription monetization system for repositories with Stripe and PayPal integration. Includes: - Database models and migrations for monetization settings, subscription products, and user subscriptions - Payment provider abstraction layer with Stripe and PayPal implementations - Admin UI for configuring payment providers and viewing subscriptions - Repository settings UI for managing subscription products and tiers - Subscription checkout flow and webhook handlers for payment events - Access control to gate repository code behind active subscriptions
74 lines
2.1 KiB
Handlebars
74 lines
2.1 KiB
Handlebars
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin monetize clients")}}
|
|
<div class="admin-setting-content">
|
|
<h4 class="ui top attached header">
|
|
{{ctx.Locale.Tr "admin.monetize.clients"}}
|
|
</h4>
|
|
<div class="ui attached segment">
|
|
{{if .Subscriptions}}
|
|
<table class="ui very basic striped table">
|
|
<thead>
|
|
<tr>
|
|
<th>{{ctx.Locale.Tr "admin.monetize.client_user"}}</th>
|
|
<th>{{ctx.Locale.Tr "admin.monetize.client_repo"}}</th>
|
|
<th>{{ctx.Locale.Tr "admin.monetize.client_product"}}</th>
|
|
<th>{{ctx.Locale.Tr "admin.monetize.client_status"}}</th>
|
|
<th>{{ctx.Locale.Tr "admin.monetize.client_since"}}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range .Subscriptions}}
|
|
<tr>
|
|
<td>
|
|
{{if .User}}
|
|
<a href="{{.User.HomeLink}}">{{.User.Name}}</a>
|
|
{{else}}
|
|
<span class="text grey">User #{{.UserID}}</span>
|
|
{{end}}
|
|
</td>
|
|
<td>
|
|
{{if .Repo}}
|
|
<a href="{{.Repo.Link}}">{{.Repo.FullName}}</a>
|
|
{{else}}
|
|
<span class="text grey">Repo #{{.RepoID}}</span>
|
|
{{end}}
|
|
</td>
|
|
<td>
|
|
{{if .Product}}
|
|
{{.Product.Name}}
|
|
{{else}}
|
|
<span class="text grey">—</span>
|
|
{{end}}
|
|
</td>
|
|
<td>
|
|
{{if .IsLifetime}}
|
|
<span class="ui small label green">Lifetime</span>
|
|
{{else if eq .Status 0}}
|
|
<span class="ui small label green">Active</span>
|
|
{{else if eq .Status 1}}
|
|
<span class="ui small label grey">Cancelled</span>
|
|
{{else if eq .Status 2}}
|
|
<span class="ui small label red">Expired</span>
|
|
{{else if eq .Status 3}}
|
|
<span class="ui small label orange">Past Due</span>
|
|
{{end}}
|
|
</td>
|
|
<td>{{DateUtils.TimeSince .CreatedUnix}}</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
{{template "base/paginate" .}}
|
|
{{else}}
|
|
<div class="ui placeholder segment">
|
|
<div class="ui icon header">
|
|
{{svg "octicon-people" 48}}
|
|
<div class="content">
|
|
{{ctx.Locale.Tr "admin.monetize.no_clients"}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
{{template "admin/layout_footer" .}}
|