File tree Expand file tree Collapse file tree 4 files changed +16
-3
lines changed
prisma/migrations/20251121183219_add_is_colorful_column_to_board Expand file tree Collapse file tree 4 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ Warnings:
3+
4+ - Added the required column `isColorful` to the `Board` table without a default value. This is not possible if the table is not empty.
5+
6+ */
7+ -- AlterTable
8+ ALTER TABLE " Board" ADD COLUMN " isColorful" BOOLEAN NOT NULL ;
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ export type BoardListItem = {
3737 name : string ;
3838 createdAt : string ;
3939 preview : number [ ] [ ] ;
40+ isColorful : boolean ;
4041} ;
4142
4243export async function fetchBoardList ( isJapanese : boolean ) : Promise < BoardListItem [ ] | undefined > {
Original file line number Diff line number Diff line change 2929 selectedBoardId = null ;
3030 }
3131
32- function getCellColor(cell : number ): string {
32+ function getCellColor(cell : number , isColorful : boolean ): string {
3333 const WHITE = 0xffffff ;
3434
3535 if (isColorful ) {
7171 {#each manager .saveState .preview as row , i (i )}
7272 <div class =" preview-row" >
7373 {#each row as cell , j (j )}
74- <div class ="preview-cell" style ="background-color: {getCellColor (cell )}" ></div >
74+ <div
75+ class =" preview-cell"
76+ style ="background-color: {getCellColor (cell , isColorful )}"
77+ ></div >
7578 {/each }
7679 </div >
7780 {/each }
129132 {#each row as cell , j (j )}
130133 <div
131134 class =" preview-cell"
132- style ="background-color: {getCellColor (cell )}"
135+ style ="background-color: {getCellColor (cell , item . isColorful )}"
133136 ></div >
134137 {/each }
135138 </div >
Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ export async function GET({ url }) {
7272 name : true ,
7373 createdAt : true ,
7474 preview : true ,
75+ isColorful : true ,
7576 } ,
7677 } ) ;
7778
You can’t perform that action at this time.
0 commit comments