mirror of
https://github.com/mattermost/focalboard.git
synced 2025-01-02 14:47:55 +02:00
Merge branch 'main' into root-portal
This commit is contained in:
commit
9ac8f63185
@ -8,13 +8,13 @@ import (
|
||||
|
||||
// Configuration is the app configuration stored in a json file
|
||||
type Configuration struct {
|
||||
ServerRoot string `json:"serverRoot"`
|
||||
Port int `json:"port"`
|
||||
DBType string `json:"dbtype"`
|
||||
DBConfigString string `json:"dbconfig"`
|
||||
UseSSL bool `json:"useSSL"`
|
||||
WebPath string `json:"webpath"`
|
||||
FilesPath string `json:"filespath"`
|
||||
ServerRoot string `json:"serverRoot" mapstructure:"serverRoot"`
|
||||
Port int `json:"port" mapstructure:"port"`
|
||||
DBType string `json:"dbtype" mapstructure:"dbtype"`
|
||||
DBConfigString string `json:"dbconfig" mapstructure:"dbconfig"`
|
||||
UseSSL bool `json:"useSSL" mapstructure:"useSSL"`
|
||||
WebPath string `json:"webpath" mapstructure:"webpath"`
|
||||
FilesPath string `json:"filespath" mapstructure:"filespath"`
|
||||
}
|
||||
|
||||
func readConfigFile() (*Configuration, error) {
|
||||
|
@ -279,6 +279,8 @@ class BoardComponent extends React.Component<Props, State> {
|
||||
|
||||
Menu.shared.options = [
|
||||
{ id: "exportBoardArchive", name: "Export board archive" },
|
||||
{ id: "testAdd100Cards", name: "TEST: Add 100 cards" },
|
||||
{ id: "testAdd1000Cards", name: "TEST: Add 1,000 cards" },
|
||||
]
|
||||
|
||||
Menu.shared.onMenuClicked = async (id: string) => {
|
||||
@ -287,11 +289,37 @@ class BoardComponent extends React.Component<Props, State> {
|
||||
Archiver.exportBoardTree(boardTree)
|
||||
break
|
||||
}
|
||||
case "testAdd100Cards": {
|
||||
this.testAddCards(100)
|
||||
}
|
||||
case "testAdd1000Cards": {
|
||||
this.testAddCards(1000)
|
||||
}
|
||||
}
|
||||
}
|
||||
Menu.shared.showAtElement(e.target as HTMLElement)
|
||||
}
|
||||
|
||||
private async testAddCards(count: number) {
|
||||
const { mutator, boardTree } = this.props
|
||||
const { board, activeView } = boardTree
|
||||
|
||||
let optionIndex = 0
|
||||
|
||||
for (let i = 0; i < count; i++) {
|
||||
const properties = CardFilter.propertiesThatMeetFilterGroup(activeView.filter, board.cardProperties)
|
||||
const card = new Block({ type: "card", parentId: boardTree.board.id, properties })
|
||||
if (boardTree.groupByProperty && boardTree.groupByProperty.options.length > 0) {
|
||||
// Cycle through options
|
||||
const option = boardTree.groupByProperty.options[optionIndex]
|
||||
optionIndex = (optionIndex + 1) % boardTree.groupByProperty.options.length
|
||||
card.properties[boardTree.groupByProperty.id] = option.value
|
||||
card.title = `Test Card ${i + 1}`
|
||||
}
|
||||
await mutator.insertBlock(card, "test add card")
|
||||
}
|
||||
}
|
||||
|
||||
private async propertiesClicked(e: React.MouseEvent) {
|
||||
const { mutator, boardTree } = this.props
|
||||
const { activeView } = boardTree
|
||||
|
@ -199,7 +199,7 @@ class OctoUtils {
|
||||
return {
|
||||
id: o.id,
|
||||
name: o.name,
|
||||
icon: (sortOption.propertyId === o.id) ? sortOption.reversed ? "sortUp" : "sortDown" : undefined
|
||||
icon: (sortOption?.propertyId === o.id) ? sortOption.reversed ? "sortUp" : "sortDown" : undefined
|
||||
}
|
||||
})
|
||||
Menu.shared.onMenuClicked = async (propertyId: string) => {
|
||||
|
Loading…
Reference in New Issue
Block a user