🎨 Add URL type column to Attribute View https://github.com/siyuan-note/siyuan/issues/8854

This commit is contained in:
Daniel 2023-07-30 20:53:40 +08:00
parent 9d24af1ede
commit 8a842c66f0
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 73 additions and 2 deletions

View file

@ -711,7 +711,7 @@ func addAttributeViewColumn(operation *Operation) (err error) {
keyType := av.KeyType(operation.Typ)
switch keyType {
case av.KeyTypeText, av.KeyTypeNumber, av.KeyTypeDate, av.KeyTypeSelect, av.KeyTypeMSelect:
case av.KeyTypeText, av.KeyTypeNumber, av.KeyTypeDate, av.KeyTypeSelect, av.KeyTypeMSelect, av.KeyTypeURL:
key := av.NewKey(operation.ID, operation.Name, keyType)
attrView.KeyValues = append(attrView.KeyValues, &av.KeyValues{Key: key})
@ -741,7 +741,7 @@ func updateAttributeViewColumn(operation *Operation) (err error) {
colType := av.KeyType(operation.Typ)
switch colType {
case av.KeyTypeText, av.KeyTypeNumber, av.KeyTypeDate, av.KeyTypeSelect, av.KeyTypeMSelect:
case av.KeyTypeText, av.KeyTypeNumber, av.KeyTypeDate, av.KeyTypeSelect, av.KeyTypeMSelect, av.KeyTypeURL:
for _, keyValues := range attrView.KeyValues {
if keyValues.Key.ID == operation.ID {
keyValues.Key.Name = operation.Name