back interdiff of round #1 and #0

appview/repo: make pipelines page actually reflect if no spindle is selected, allow removing a spindle from a repo #439

merged
opened by winter.bsky.social targeting master from winter.bsky.social/core: push-pxstrpokmqmn
files
appview
db
pages
templates
repo
settings
repo
REVERTED
appview/db/repos.go
···
var description, spindle sql.NullString
row := e.QueryRow(`
+
select did, name, knot, created, at_uri, description, spindle
-
select did, name, knot, created, at_uri, description, spindle
from repos
where did = ? and name = ?
`,
···
return err
}
+
func UpdateSpindle(e Execer, repoAt, spindle string) error {
-
func UpdateSpindle(e Execer, repoAt string, spindle *string) error {
_, err := e.Exec(
`update repos set spindle = ? where at_uri = ?`, spindle, repoAt)
return err
REVERTED
appview/pages/templates/repo/settings/pipelines.html
···
name="spindle"
required
class="p-1 max-w-64 border border-gray-200 bg-white dark:bg-gray-800 dark:text-white dark:border-gray-700">
+
<option value="" disabled>
-
{{/* For some reason, we can't use an empty string in a <select> in all scenarios unless it is preceded by a disabled select?? No idea, could just be a Firefox thing? */}}
-
<option value="[[none]]" class="py-1" {{ if not $.CurrentSpindle }}selected{{ end }}>
-
{{ if not $.CurrentSpindle }}
Choose a spindle
-
{{ else }}
-
Disable pipelines
-
{{ end }}
</option>
{{ range $.Spindles }}
<option value="{{ . }}" class="py-1" {{ if eq . $.CurrentSpindle }}selected{{ end }}>
ERROR
appview/repo/repo.go

Failed to calculate interdiff for this file.