Remove usage of tiley (#4406)

* First pass

* Mooarrr

* lint

* snapshots
This commit is contained in:
Tom Moor
2022-11-08 17:12:22 -08:00
committed by GitHub
parent 920b58c006
commit 587f062677
38 changed files with 169 additions and 177 deletions

View File

@@ -1,5 +1,6 @@
import { computed, observable } from "mobx";
import { TeamPreference, TeamPreferences } from "@shared/types";
import { stringToColor } from "@shared/utils/color";
import BaseModel from "./BaseModel";
import Field from "./decorators/Field";
@@ -69,6 +70,16 @@ class Team extends BaseModel {
return "SSO";
}
@computed
get color(): string {
return stringToColor(this.id);
}
@computed
get initial(): string {
return this.name ? this.name[0] : "?";
}
/**
* Returns whether this team is using a separate editing mode behind an "Edit"
* button rather than seamless always-editing.