changed opacity to rgba

This commit is contained in:
Martina 2020-09-03 21:42:50 -07:00
parent 7228e2c4ff
commit c417843497
4 changed files with 22 additions and 5 deletions

View File

@ -197,7 +197,13 @@ export default class SlatePreviewBlock extends React.Component {
Public
</div>
) : (
<div css={STYLES_TAG} style={{ opacity: "25%" }}>
<div
css={STYLES_TAG}
style={{
color: "rgba(0,0,0,0.25)",
borderColor: "rgba(0,0,0,0.25)",
}}
>
Private
</div>
)

View File

@ -37,7 +37,10 @@ export class TabGroup extends React.Component {
css={STYLES_TAB}
key={tab}
style={{
opacity: this.props.value === i ? "100%" : "25%",
color:
this.props.value === i
? Constants.system.black
: "rgba(0,0,0,0.25)",
}}
onClick={() => this.props.onChange(i)}
>

View File

@ -4,7 +4,7 @@ import * as Strings from "~/common/strings";
export default async (req, res) => {
let slate = await Data.getSlateById({ id: req.body.data.id });
if (!slate) {
if (!slate || slate.error) {
return res.status(404).send({
decorator: "SLATE_NOT_FOUND",
error: true,
@ -13,7 +13,7 @@ export default async (req, res) => {
slate = Serializers.slate(slate);
let user = await Data.getUserById({ id: slate.data.ownerId });
if (!user) {
if (!user || user.error) {
return res.status(200).send({
decorator: "SLATE_OWNER_NOT_FOUND",
data: slate,

View File

@ -4,7 +4,7 @@ import * as Strings from "~/common/strings";
export default async (req, res) => {
let user = await Data.getUserById({ id: req.body.data.id });
if (!user) {
if (!user || user.error) {
return res.status(404).send({
decorator: "USER_NOT_FOUND",
error: true,
@ -16,6 +16,14 @@ export default async (req, res) => {
userId: req.body.data.id,
publicOnly: true,
});
if (slates.error) {
if (!user || user.error) {
return res.status(404).send({
decorator: "SLATES_NOT_FOUND",
error: true,
});
}
}
user.slates = [];
for (let slate of slates) {
user.slates.push(Serializers.slate(slate));