From 6480a5262c4670c2453e7fddf25d35263109f5d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Boukorras?= Date: Tue, 2 Jun 2020 09:06:45 +0200 Subject: [PATCH] fix(Organizations): Handle error on projects fetch fix(Organizations): Handle error on projects fetch --- src/components/Settings/Settings.scss | 5 ++ .../Settings/SettingsOrganizations.svelte | 4 +- src/shared/requester.js | 46 +++++++++++-------- 3 files changed, 35 insertions(+), 20 deletions(-) diff --git a/src/components/Settings/Settings.scss b/src/components/Settings/Settings.scss index f5281a9..652cec8 100644 --- a/src/components/Settings/Settings.scss +++ b/src/components/Settings/Settings.scss @@ -248,6 +248,11 @@ top: 0; visibility: hidden; + &:disabled, + &:disabled + label { + opacity: 0.5; + } + &:before { visibility: visible; content: ''; diff --git a/src/components/Settings/SettingsOrganizations.svelte b/src/components/Settings/SettingsOrganizations.svelte index 3e3d612..4e91578 100644 --- a/src/components/Settings/SettingsOrganizations.svelte +++ b/src/components/Settings/SettingsOrganizations.svelte @@ -4,6 +4,8 @@ export let init; import { updateOrganization, isOffline } from '../../shared/store'; + const getIsDisabled = organization => $isOffline || organization.isBroken; + const getIsChecked = organization => organization.checked && !organization.isBroken; @@ -13,7 +15,7 @@