mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-30 05:18:49 +01:00
🎨 Add Email and Phone type column to Attribute View
https://github.com/siyuan-note/siyuan/issues/8891 https://github.com/siyuan-note/siyuan/issues/8892
This commit is contained in:
parent
85ad37af0a
commit
f62804d973
3 changed files with 192 additions and 2 deletions
|
|
@ -727,7 +727,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, av.KeyTypeURL:
|
||||
case av.KeyTypeText, av.KeyTypeNumber, av.KeyTypeDate, av.KeyTypeSelect, av.KeyTypeMSelect, av.KeyTypeURL, av.KeyTypeEmail, av.KeyTypePhone:
|
||||
key := av.NewKey(operation.ID, operation.Name, keyType)
|
||||
attrView.KeyValues = append(attrView.KeyValues, &av.KeyValues{Key: key})
|
||||
|
||||
|
|
@ -757,7 +757,7 @@ func updateAttributeViewColumn(operation *Operation) (err error) {
|
|||
|
||||
colType := av.KeyType(operation.Typ)
|
||||
switch colType {
|
||||
case av.KeyTypeBlock, av.KeyTypeText, av.KeyTypeNumber, av.KeyTypeDate, av.KeyTypeSelect, av.KeyTypeMSelect, av.KeyTypeURL:
|
||||
case av.KeyTypeBlock, av.KeyTypeText, av.KeyTypeNumber, av.KeyTypeDate, av.KeyTypeSelect, av.KeyTypeMSelect, av.KeyTypeURL, av.KeyTypeEmail, av.KeyTypePhone:
|
||||
for _, keyValues := range attrView.KeyValues {
|
||||
if keyValues.Key.ID == operation.ID {
|
||||
keyValues.Key.Name = operation.Name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue