back interdiff of round #2 and #1

appview: allows a default knot to be configured #858

open
opened by willdot.net targeting master from willdot.net/tangled-core: master

This follows on from the work carried out in #836

I've added a select box in the Knots settings page which pulls in the users knots and also adds in knot1.tangled.sh. When the user selects one of these options, it will save to their profile in the database. NOTE: I haven't yet implemented adding that to the AT record because I'm not sure on how the lexicon setup works yet!

Then when users go to create a new repo / fork, if there is a value in their profile for the default knot, then that will pre select the knot to use for the new repo / fork.

ERROR
appview/db/db.go

Failed to calculate interdiff for this file.

ERROR
appview/db/profile.go

Failed to calculate interdiff for this file.

ERROR
appview/knots/knots.go

Failed to calculate interdiff for this file.

ERROR
appview/models/profile.go

Failed to calculate interdiff for this file.

ERROR
appview/pages/pages.go

Failed to calculate interdiff for this file.

ERROR
appview/pages/templates/knots/index.html

Failed to calculate interdiff for this file.

ERROR
appview/pages/templates/repo/fork.html

Failed to calculate interdiff for this file.

ERROR
appview/pages/templates/repo/new.html

Failed to calculate interdiff for this file.

ERROR
appview/repo/repo.go

Failed to calculate interdiff for this file.

ERROR
appview/state/profile.go

Failed to calculate interdiff for this file.

ERROR
appview/state/router.go

Failed to calculate interdiff for this file.

ERROR
appview/state/state.go

Failed to calculate interdiff for this file.

NEW
appview/pages/templates/repo/index.html
···
<div class="px-4 py-2 border-b border-gray-200 dark:border-gray-600 flex items-center gap-4 flex-wrap">
{{ range $value := .Languages }}
<div
-
class="flex items-center gap-2 text-xs align-items-center justify-center"
+
class="flex flex-grow items-center gap-2 text-xs align-items-center justify-center"
>
{{ template "repo/fragments/colorBall" (dict "color" (langColor $value.Name)) }}
<div>{{ or $value.Name "Other" }}
NEW
appview/pages/templates/user/followers.html
···
"FollowersCount" .FollowersCount
"FollowingCount" .FollowingCount) }}
{{ else }}
-
<div class="text-base text-gray-500 flex items-center justify-center italic p-12 border border-gray-200 dark:border-gray-700 rounded">
-
<span>This user does not have any followers yet.</span>
-
</div>
+
<p class="px-6 dark:text-white">This user does not have any followers yet.</p>
{{ end }}
</div>
{{ end }}
NEW
appview/pages/templates/user/following.html
···
"FollowersCount" .FollowersCount
"FollowingCount" .FollowingCount) }}
{{ else }}
-
<div class="text-base text-gray-500 flex items-center justify-center italic p-12 border border-gray-200 dark:border-gray-700 rounded">
-
<span>This user does not follow anyone yet.</span>
-
</div>
+
<p class="px-6 dark:text-white">This user does not follow anyone yet.</p>
{{ end }}
</div>
{{ end }}
NEW
appview/pages/templates/user/overview.html
···
<p class="text-sm font-bold px-2 pb-4 dark:text-white">ACTIVITY</p>
<div class="flex flex-col gap-4 relative">
{{ if .ProfileTimeline.IsEmpty }}
-
<div class="text-base text-gray-500 flex items-center justify-center italic p-12 border border-gray-200 dark:border-gray-700 rounded">
-
<span class="flex items-center gap-2">
-
This user does not have any activity yet.
-
</span>
-
</div>
+
<p class="dark:text-white">This user does not have any activity yet.</p>
{{ end }}
{{ with .ProfileTimeline }}
···
{{ template "user/fragments/repoCard" (list $ . false) }}
</div>
{{ else }}
-
<div class="text-base text-gray-500 flex items-center justify-center italic p-12 border border-gray-200 dark:border-gray-700 rounded">
-
<span class="flex items-center gap-2">
-
This user does not have any pinned repos.
-
</span>
-
</div>
+
<p class="dark:text-white">This user does not have any pinned repos.</p>
{{ end }}
</div>
</div>
NEW
appview/pages/templates/user/repos.html
···
{{ template "user/fragments/repoCard" (list $ . false) }}
</div>
{{ else }}
-
<div class="text-base text-gray-500 flex items-center justify-center italic p-12 border border-gray-200 dark:border-gray-700 rounded">
-
<span>This user does not have any repos yet.</span>
-
</div>
+
<p class="px-6 dark:text-white">This user does not have any repos yet.</p>
{{ end }}
</div>
{{ end }}
NEW
appview/pages/templates/user/starred.html
···
{{ template "user/fragments/repoCard" (list $ . true) }}
</div>
{{ else }}
-
<div class="text-base text-gray-500 flex items-center justify-center italic p-12 border border-gray-200 dark:border-gray-700 rounded">
-
<span>This user does not have any starred repos yet.</span>
-
</div>
+
<p class="px-6 dark:text-white">This user does not have any starred repos yet.</p>
{{ end }}
</div>
{{ end }}
NEW
appview/pages/templates/user/strings.html
···
{{ template "singleString" (list $ .) }}
</div>
{{ else }}
-
<div class="text-base text-gray-500 flex items-center justify-center italic p-12 border border-gray-200 dark:border-gray-700 rounded">
-
<span>This user does not have any strings yet.</span>
-
</div>
+
<p class="px-6 dark:text-white">This user does not have any strings yet.</p>
{{ end }}
</div>
{{ end }}