[Room List] Show offline indicator when the device is offline (#239)
* Implement the network status indicator. * Add `networkmonitor` feature.
This commit is contained in:
parent
200763e15a
commit
d391275420
33 changed files with 511 additions and 21 deletions
|
|
@ -70,5 +70,10 @@ val Vermilion = Color(0xFFFF5B55)
|
|||
|
||||
val LinkColor = Color(0xFF0086E6)
|
||||
|
||||
// Compound colors
|
||||
|
||||
val TextColorCriticalLight = Color(0xFFD51928)
|
||||
val TextColorCriticalDark = Color(0xfffd3e3c)
|
||||
|
||||
val Gray_400_Light = Color(0xFFE1E6EC)
|
||||
val Gray_400_Dark = Color(0xFF26282D)
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ import io.element.android.libraries.designsystem.Black_950
|
|||
import io.element.android.libraries.designsystem.DarkGrey
|
||||
import io.element.android.libraries.designsystem.Gray_300
|
||||
import io.element.android.libraries.designsystem.Gray_400
|
||||
import io.element.android.libraries.designsystem.Gray_400_Dark
|
||||
import io.element.android.libraries.designsystem.Gray_450
|
||||
import io.element.android.libraries.designsystem.SystemGrey5Dark
|
||||
import io.element.android.libraries.designsystem.SystemGrey6Dark
|
||||
|
|
@ -38,6 +39,7 @@ fun elementColorsDark() = ElementColors(
|
|||
messageHighlightedBackground = Azure,
|
||||
quaternary = Gray_400,
|
||||
quinary = Gray_450,
|
||||
gray400 = Gray_400_Dark,
|
||||
textActionCritical = TextColorCriticalDark,
|
||||
isLight = false,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ import io.element.android.libraries.designsystem.Gray_100
|
|||
import io.element.android.libraries.designsystem.Gray_150
|
||||
import io.element.android.libraries.designsystem.Gray_200
|
||||
import io.element.android.libraries.designsystem.Gray_25
|
||||
import io.element.android.libraries.designsystem.Gray_400_Light
|
||||
import io.element.android.libraries.designsystem.Gray_50
|
||||
import io.element.android.libraries.designsystem.SystemGrey5Light
|
||||
import io.element.android.libraries.designsystem.SystemGrey6Light
|
||||
|
|
@ -38,6 +39,7 @@ fun elementColorsLight() = ElementColors(
|
|||
messageHighlightedBackground = Azure,
|
||||
quaternary = Gray_100,
|
||||
quinary = Gray_50,
|
||||
gray400 = Gray_400_Light,
|
||||
textActionCritical = TextColorCriticalLight,
|
||||
isLight = true,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ class ElementColors(
|
|||
messageHighlightedBackground: Color,
|
||||
quaternary: Color,
|
||||
quinary: Color,
|
||||
gray400: Color,
|
||||
textActionCritical: Color,
|
||||
isLight: Boolean
|
||||
) {
|
||||
|
|
@ -45,6 +46,9 @@ class ElementColors(
|
|||
var quinary by mutableStateOf(quinary)
|
||||
private set
|
||||
|
||||
var gray400 by mutableStateOf(gray400)
|
||||
private set
|
||||
|
||||
var textActionCritical by mutableStateOf(textActionCritical)
|
||||
private set
|
||||
|
||||
|
|
@ -57,6 +61,7 @@ class ElementColors(
|
|||
messageHighlightedBackground: Color = this.messageHighlightedBackground,
|
||||
quaternary: Color = this.quaternary,
|
||||
quinary: Color = this.quinary,
|
||||
gray400: Color = this.gray400,
|
||||
textActionCritical: Color = this.textActionCritical,
|
||||
isLight: Boolean = this.isLight,
|
||||
) = ElementColors(
|
||||
|
|
@ -65,6 +70,7 @@ class ElementColors(
|
|||
messageHighlightedBackground = messageHighlightedBackground,
|
||||
quaternary = quaternary,
|
||||
quinary = quinary,
|
||||
gray400 = gray400,
|
||||
textActionCritical = textActionCritical,
|
||||
isLight = isLight,
|
||||
)
|
||||
|
|
@ -75,6 +81,7 @@ class ElementColors(
|
|||
messageHighlightedBackground = other.messageHighlightedBackground
|
||||
quaternary = other.quaternary
|
||||
quinary = other.quinary
|
||||
gray400 = other.gray400
|
||||
textActionCritical = other.textActionCritical
|
||||
isLight = other.isLight
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue