Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 67683ef3

Přidáno uživatelem Dominik Poch před asi 2 roky(ů)

Changed default tag color

Default color in tag modal changed to color of a category

Zobrazit rozdíly:

webapp/components/modals/TagModal.tsx
5 5
 * All values that the modal window can show.
6 6
 */
7 7
export interface TagModalValues {
8
    name: string;
9
    color: string;
10
    description: string;
8
    name?: string;
9
    color?: string;
10
    description?: string;
11 11
}
12 12

  
13 13
/**
......
25 25
    /**
26 26
     * Initialize default values if they were not set in props.
27 27
     */
28
    const values = props.defaultValues ?? {
29
        name: '',
30
        color: 'black',
31
        description: '',
32
    };
28
    let values: TagModalValues;
33 29

  
30
    if (props.defaultValues) {
31
        values = {
32
            name: props.defaultValues.name ?? '',
33
            color: props.defaultValues.color ?? 'black',
34
            description: props.defaultValues.description ?? '',
35
        };
36
    } else {
37
        values = {
38
            name: '',
39
            color: 'black',
40
            description: '',
41
        };
42
    }
34 43
    /**
35 44
     * The form.
36 45
     */

Také k dispozici: Unified diff