mirror of
https://github.com/mattermost/focalboard.git
synced 2025-01-26 18:48:15 +02:00
Test: randomize icons
This commit is contained in:
parent
fd2f7ceb11
commit
dbcbe286e7
@ -265,6 +265,7 @@ class BoardComponent extends React.Component<Props, State> {
|
|||||||
{ id: "exportBoardArchive", name: "Export board archive" },
|
{ id: "exportBoardArchive", name: "Export board archive" },
|
||||||
{ id: "testAdd100Cards", name: "TEST: Add 100 cards" },
|
{ id: "testAdd100Cards", name: "TEST: Add 100 cards" },
|
||||||
{ id: "testAdd1000Cards", name: "TEST: Add 1,000 cards" },
|
{ id: "testAdd1000Cards", name: "TEST: Add 1,000 cards" },
|
||||||
|
{ id: "testRandomizeIcons", name: "TEST: Randomize icons" },
|
||||||
]
|
]
|
||||||
|
|
||||||
OldMenu.shared.onMenuClicked = async (id: string) => {
|
OldMenu.shared.onMenuClicked = async (id: string) => {
|
||||||
@ -281,6 +282,10 @@ class BoardComponent extends React.Component<Props, State> {
|
|||||||
this.testAddCards(1000)
|
this.testAddCards(1000)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
case "testRandomizeIcons": {
|
||||||
|
this.testRandomizeIcons()
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
OldMenu.shared.showAtElement(e.target as HTMLElement)
|
OldMenu.shared.showAtElement(e.target as HTMLElement)
|
||||||
@ -309,6 +314,14 @@ class BoardComponent extends React.Component<Props, State> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async testRandomizeIcons() {
|
||||||
|
const { boardTree } = this.props
|
||||||
|
|
||||||
|
for (const card of boardTree.cards) {
|
||||||
|
mutator.changeIcon(card, BlockIcons.shared.randomIcon(), "randomize icon")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private async propertiesClicked(e: React.MouseEvent) {
|
private async propertiesClicked(e: React.MouseEvent) {
|
||||||
const { boardTree } = this.props
|
const { boardTree } = this.props
|
||||||
const { activeView } = boardTree
|
const { activeView } = boardTree
|
||||||
|
Loading…
x
Reference in New Issue
Block a user