appview/pages: add handle typeahead to DID-valued labels #851

merged
opened by oppi.li targeting master from op/lxxzoovztwsr
Changed files
+15 -1
appview
pages
templates
repo
+15 -1
appview/pages/templates/repo/fragments/editLabelPanel.html
···
{{ $fieldName := $def.AtUri }}
{{ $valueType := $def.ValueType }}
{{ $value := .value }}
+
{{ if $valueType.IsDidFormat }}
{{ $value = trimPrefix (resolve .value) "@" }}
+
<actor-typeahead>
+
<input
+
autocapitalize="none"
+
autocorrect="off"
+
autocomplete="off"
+
placeholder="user.tngl.sh"
+
value="{{$value}}"
+
name="{{$fieldName}}"
+
type="text"
+
class="p-1 w-full text-sm"
+
/>
+
</actor-typeahead>
+
{{ else }}
+
<input class="p-1 w-full" type="text" name="{{$fieldName}}" value="{{$value}}">
{{ end }}
-
<input class="p-1 w-full" type="text" name="{{$fieldName}}" value="{{$value}}">
{{ end }}
{{ define "nullTypeInput" }}