mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 00:38:49 +01:00
🎨 Improve cloud sync API count display
This commit is contained in:
parent
52ca5e94a1
commit
33470c29ca
3 changed files with 11 additions and 3 deletions
|
|
@ -47,6 +47,7 @@ func renderAttributeView(c *gin.Context) {
|
|||
view := map[string]interface{}{
|
||||
"id": v.ID,
|
||||
"name": v.Name,
|
||||
"type": v.Type,
|
||||
}
|
||||
|
||||
views = append(views, view)
|
||||
|
|
@ -54,8 +55,10 @@ func renderAttributeView(c *gin.Context) {
|
|||
|
||||
ret.Data = map[string]interface{}{
|
||||
"name": attrView.Name,
|
||||
"id": attrView.ID,
|
||||
"viewType": view.GetType(),
|
||||
"viewID": view.GetID(),
|
||||
"views": views,
|
||||
"viewType": view.Type(),
|
||||
"view": view,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,7 +67,8 @@ type Viewable interface {
|
|||
Sortable
|
||||
Calculable
|
||||
|
||||
Type() ViewType
|
||||
GetType() ViewType
|
||||
GetID() string
|
||||
}
|
||||
|
||||
func NewAttributeView(id string) *AttributeView {
|
||||
|
|
|
|||
|
|
@ -33,10 +33,14 @@ type Table struct {
|
|||
Sorts []*ViewSort `json:"sorts"` // 排序规则
|
||||
}
|
||||
|
||||
func (table *Table) Type() ViewType {
|
||||
func (table *Table) GetType() ViewType {
|
||||
return ViewTypeTable
|
||||
}
|
||||
|
||||
func (table *Table) GetID() string {
|
||||
return table.ID
|
||||
}
|
||||
|
||||
func (table *Table) SortRows() {
|
||||
if 1 > len(table.Sorts) {
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue