Make purple the default primary color

This commit is contained in:
Brandon Presley 2022-11-01 19:22:34 +13:00
parent 949b435853
commit e9c2ee743e
2 changed files with 13 additions and 4 deletions

View File

@ -1,6 +1,6 @@
export const lightColors = [
{hex: '#FA8072', name: 'Salmon'},
{hex: '#B3E5FC', name: 'Cyan'},
{hex: '#FA8072', name: 'Salmon'},
{hex: '#FFC0CB', name: 'Pink'},
{hex: '#E9DCC9', name: 'Linen'},
]

View File

@ -1,10 +1,19 @@
import {MigrationInterface, QueryRunner} from 'typeorm'
import {MigrationInterface, QueryRunner, TableColumn} from 'typeorm'
import {darkColors} from '../colors'
export class addColor1667186320954 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner
.query(`ALTER TABLE settings ADD COLUMN color TEXT NULL`)
.catch(() => null)
.addColumn(
'settings',
new TableColumn({
name: 'color',
type: 'text',
isNullable: false,
default: `'${darkColors[0].hex}'`,
}),
)
.catch(console.error)
}
public async down(queryRunner: QueryRunner): Promise<void> {