mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 18:10:12 +01:00
🎨 Database gallery view https://github.com/siyuan-note/siyuan/issues/10414
This commit is contained in:
parent
8fff4b742e
commit
72898063d8
2 changed files with 10 additions and 0 deletions
|
|
@ -44,6 +44,14 @@ import (
|
||||||
"github.com/xrash/smetrics"
|
"github.com/xrash/smetrics"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func (tx *Transaction) doSetAttrViewBlockView(operation *Operation) (ret *TxErr) {
|
||||||
|
err := SetDatabaseBlockView(operation.BlockID, operation.ID, operation.AvID)
|
||||||
|
if err != nil {
|
||||||
|
return &TxErr{code: TxErrWriteAttributeView, id: operation.AvID, msg: err.Error()}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
func (tx *Transaction) doChangeAttrViewLayout(operation *Operation) (ret *TxErr) {
|
func (tx *Transaction) doChangeAttrViewLayout(operation *Operation) (ret *TxErr) {
|
||||||
err := changeAttrViewLayout(operation)
|
err := changeAttrViewLayout(operation)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
|
|
@ -290,6 +290,8 @@ func performTx(tx *Transaction) (ret *TxErr) {
|
||||||
ret = tx.doSetAttrViewWrapField(op)
|
ret = tx.doSetAttrViewWrapField(op)
|
||||||
case "changeAttrViewLayout":
|
case "changeAttrViewLayout":
|
||||||
ret = tx.doChangeAttrViewLayout(op)
|
ret = tx.doChangeAttrViewLayout(op)
|
||||||
|
case "setAttrViewBlockView":
|
||||||
|
ret = tx.doSetAttrViewBlockView(op)
|
||||||
}
|
}
|
||||||
|
|
||||||
if nil != ret {
|
if nil != ret {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue