Replaced primaryTextColor with onBackground & added new ssh pwd dialog
This commit is contained in:
parent
08536b2caa
commit
76b3526aed
@ -26,7 +26,6 @@ import com.jetpackduba.gitnuro.logging.printLog
|
|||||||
import com.jetpackduba.gitnuro.preferences.AppSettings
|
import com.jetpackduba.gitnuro.preferences.AppSettings
|
||||||
import com.jetpackduba.gitnuro.theme.AppTheme
|
import com.jetpackduba.gitnuro.theme.AppTheme
|
||||||
import com.jetpackduba.gitnuro.theme.Theme
|
import com.jetpackduba.gitnuro.theme.Theme
|
||||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
|
||||||
import com.jetpackduba.gitnuro.theme.secondaryTextColor
|
import com.jetpackduba.gitnuro.theme.secondaryTextColor
|
||||||
import com.jetpackduba.gitnuro.ui.AppTab
|
import com.jetpackduba.gitnuro.ui.AppTab
|
||||||
import com.jetpackduba.gitnuro.ui.components.RepositoriesTabPanel
|
import com.jetpackduba.gitnuro.ui.components.RepositoriesTabPanel
|
||||||
@ -251,7 +250,7 @@ fun LoadingRepository(repoPath: String) {
|
|||||||
contentAlignment = Alignment.Center,
|
contentAlignment = Alignment.Center,
|
||||||
) {
|
) {
|
||||||
Column(horizontalAlignment = Alignment.CenterHorizontally) {
|
Column(horizontalAlignment = Alignment.CenterHorizontally) {
|
||||||
Text("Opening repository", fontSize = 36.sp, color = MaterialTheme.colors.primaryTextColor)
|
Text("Opening repository", fontSize = 36.sp, color = MaterialTheme.colors.onBackground)
|
||||||
Text(repoPath, fontSize = 24.sp, color = MaterialTheme.colors.secondaryTextColor)
|
Text(repoPath, fontSize = 24.sp, color = MaterialTheme.colors.secondaryTextColor)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,9 +39,9 @@ val darkBlueTheme = ColorsScheme(
|
|||||||
secondaryText = Color(0xFFCCCBCB),
|
secondaryText = Color(0xFFCCCBCB),
|
||||||
error = Color(0xFFc93838),
|
error = Color(0xFFc93838),
|
||||||
onError = Color(0xFFFFFFFF),
|
onError = Color(0xFFFFFFFF),
|
||||||
background = Color(0xFF16181F),
|
background = Color(0xFF0E1621),
|
||||||
backgroundSelected = Color(0xFF2f3640),
|
backgroundSelected = Color(0xFF2f3640),
|
||||||
surface = Color(0xFF202538),
|
surface = Color(0xFF182533),
|
||||||
secondarySurface = Color(0xFF122C46),
|
secondarySurface = Color(0xFF122C46),
|
||||||
headerBackground = Color(0xFF0a335c),
|
headerBackground = Color(0xFF0a335c),
|
||||||
borderColor = Color(0xFF989898),
|
borderColor = Color(0xFF989898),
|
||||||
|
@ -12,7 +12,7 @@ fun textFieldColors(
|
|||||||
focusedIndicatorColor: Color = MaterialTheme.colors.primaryVariant,
|
focusedIndicatorColor: Color = MaterialTheme.colors.primaryVariant,
|
||||||
focusedLabelColor: Color = MaterialTheme.colors.primaryVariant,
|
focusedLabelColor: Color = MaterialTheme.colors.primaryVariant,
|
||||||
backgroundColor: Color = MaterialTheme.colors.background,
|
backgroundColor: Color = MaterialTheme.colors.background,
|
||||||
textColor: Color = MaterialTheme.colors.primaryTextColor,
|
textColor: Color = MaterialTheme.colors.onBackground,
|
||||||
disabledTextColor: Color = MaterialTheme.colors.secondaryTextColor,
|
disabledTextColor: Color = MaterialTheme.colors.secondaryTextColor,
|
||||||
) = TextFieldDefaults.textFieldColors(
|
) = TextFieldDefaults.textFieldColors(
|
||||||
cursorColor = cursorColor,
|
cursorColor = cursorColor,
|
||||||
@ -29,7 +29,7 @@ fun outlinedTextFieldColors() = TextFieldDefaults.outlinedTextFieldColors(
|
|||||||
focusedBorderColor = MaterialTheme.colors.primaryVariant,
|
focusedBorderColor = MaterialTheme.colors.primaryVariant,
|
||||||
focusedLabelColor = MaterialTheme.colors.primaryVariant,
|
focusedLabelColor = MaterialTheme.colors.primaryVariant,
|
||||||
backgroundColor = MaterialTheme.colors.background,
|
backgroundColor = MaterialTheme.colors.background,
|
||||||
textColor = MaterialTheme.colors.primaryTextColor,
|
textColor = MaterialTheme.colors.onBackground,
|
||||||
)
|
)
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
|
@ -37,10 +37,6 @@ fun AppTheme(
|
|||||||
val Colors.backgroundSelected: Color
|
val Colors.backgroundSelected: Color
|
||||||
get() = appTheme.backgroundSelected
|
get() = appTheme.backgroundSelected
|
||||||
|
|
||||||
@get:Composable
|
|
||||||
val Colors.primaryTextColor: Color
|
|
||||||
get() = appTheme.primaryText
|
|
||||||
|
|
||||||
@get:Composable
|
@get:Composable
|
||||||
val Colors.secondaryTextColor: Color
|
val Colors.secondaryTextColor: Color
|
||||||
get() = appTheme.secondaryText
|
get() = appTheme.secondaryText
|
||||||
|
@ -29,38 +29,38 @@ fun typography() = Typography(
|
|||||||
defaultFontFamily = openSansFontFamily,
|
defaultFontFamily = openSansFontFamily,
|
||||||
h1 = TextStyle(
|
h1 = TextStyle(
|
||||||
fontSize = 32.sp,
|
fontSize = 32.sp,
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
letterSpacing = LETTER_SPACING.sp,
|
letterSpacing = LETTER_SPACING.sp,
|
||||||
),
|
),
|
||||||
h2 = TextStyle(
|
h2 = TextStyle(
|
||||||
fontSize = 24.sp,
|
fontSize = 24.sp,
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
letterSpacing = LETTER_SPACING.sp,
|
letterSpacing = LETTER_SPACING.sp,
|
||||||
),
|
),
|
||||||
h3 = TextStyle(
|
h3 = TextStyle(
|
||||||
fontSize = 20.sp,
|
fontSize = 20.sp,
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
letterSpacing = LETTER_SPACING.sp,
|
letterSpacing = LETTER_SPACING.sp,
|
||||||
),
|
),
|
||||||
h4 = TextStyle(
|
h4 = TextStyle(
|
||||||
fontSize = 17.sp,
|
fontSize = 17.sp,
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
letterSpacing = LETTER_SPACING.sp,
|
letterSpacing = LETTER_SPACING.sp,
|
||||||
),
|
),
|
||||||
body1 = TextStyle(
|
body1 = TextStyle(
|
||||||
fontSize = 15.sp,
|
fontSize = 15.sp,
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
letterSpacing = LETTER_SPACING.sp,
|
letterSpacing = LETTER_SPACING.sp,
|
||||||
),
|
),
|
||||||
body2 = TextStyle(
|
body2 = TextStyle(
|
||||||
fontSize = 13.sp,
|
fontSize = 13.sp,
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
fontWeight = FontWeight.Normal,
|
fontWeight = FontWeight.Normal,
|
||||||
letterSpacing = LETTER_SPACING.sp,
|
letterSpacing = LETTER_SPACING.sp,
|
||||||
),
|
),
|
||||||
caption = TextStyle(
|
caption = TextStyle(
|
||||||
fontSize = 11.sp,
|
fontSize = 11.sp,
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
letterSpacing = LETTER_SPACING.sp,
|
letterSpacing = LETTER_SPACING.sp,
|
||||||
)
|
)
|
||||||
)
|
)
|
@ -33,7 +33,6 @@ import com.jetpackduba.gitnuro.extensions.toStringWithSpaces
|
|||||||
import com.jetpackduba.gitnuro.keybindings.KeybindingOption
|
import com.jetpackduba.gitnuro.keybindings.KeybindingOption
|
||||||
import com.jetpackduba.gitnuro.keybindings.matchesBinding
|
import com.jetpackduba.gitnuro.keybindings.matchesBinding
|
||||||
import com.jetpackduba.gitnuro.theme.headerBackground
|
import com.jetpackduba.gitnuro.theme.headerBackground
|
||||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
|
||||||
import com.jetpackduba.gitnuro.theme.secondarySurface
|
import com.jetpackduba.gitnuro.theme.secondarySurface
|
||||||
import com.jetpackduba.gitnuro.ui.components.PrimaryButton
|
import com.jetpackduba.gitnuro.ui.components.PrimaryButton
|
||||||
import com.jetpackduba.gitnuro.ui.components.ScrollableLazyColumn
|
import com.jetpackduba.gitnuro.ui.components.ScrollableLazyColumn
|
||||||
@ -119,7 +118,7 @@ fun Blame(
|
|||||||
|
|
||||||
Text(
|
Text(
|
||||||
text = line + blameResult.resultContents.lineDelimiter,
|
text = line + blameResult.resultContents.lineDelimiter,
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
modifier = Modifier.padding(vertical = 8.dp, horizontal = 16.dp),
|
modifier = Modifier.padding(vertical = 8.dp, horizontal = 16.dp),
|
||||||
fontFamily = FontFamily.Monospace,
|
fontFamily = FontFamily.Monospace,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
@ -142,7 +141,7 @@ private fun LineNumber(line: Int, highestLineLength: Int) {
|
|||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = line.toStringWithSpaces(highestLineLength),
|
text = line.toStringWithSpaces(highestLineLength),
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
fontFamily = FontFamily.Monospace,
|
fontFamily = FontFamily.Monospace,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -193,7 +192,7 @@ fun MinimizedBlame(
|
|||||||
Image(
|
Image(
|
||||||
painter = painterResource("close.svg"),
|
painter = painterResource("close.svg"),
|
||||||
contentDescription = "Close blame",
|
contentDescription = "Close blame",
|
||||||
colorFilter = ColorFilter.tint(MaterialTheme.colors.primaryTextColor),
|
colorFilter = ColorFilter.tint(MaterialTheme.colors.onBackground),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -228,7 +227,7 @@ private fun Header(
|
|||||||
Image(
|
Image(
|
||||||
painter = painterResource("close.svg"),
|
painter = painterResource("close.svg"),
|
||||||
contentDescription = "Close blame",
|
contentDescription = "Close blame",
|
||||||
colorFilter = ColorFilter.tint(MaterialTheme.colors.primaryTextColor),
|
colorFilter = ColorFilter.tint(MaterialTheme.colors.onBackground),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -280,7 +280,7 @@ fun CommitLogChanges(
|
|||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
softWrap = false,
|
softWrap = false,
|
||||||
style = MaterialTheme.typography.body2,
|
style = MaterialTheme.typography.body2,
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,8 +19,6 @@ import androidx.compose.ui.focus.FocusRequester
|
|||||||
import androidx.compose.ui.focus.focusRequester
|
import androidx.compose.ui.focus.focusRequester
|
||||||
import androidx.compose.ui.graphics.ColorFilter
|
import androidx.compose.ui.graphics.ColorFilter
|
||||||
import androidx.compose.ui.input.key.onKeyEvent
|
import androidx.compose.ui.input.key.onKeyEvent
|
||||||
import androidx.compose.ui.input.pointer.PointerIconDefaults
|
|
||||||
import androidx.compose.ui.input.pointer.pointerHoverIcon
|
|
||||||
import androidx.compose.ui.res.painterResource
|
import androidx.compose.ui.res.painterResource
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import com.jetpackduba.gitnuro.extensions.handMouseClickable
|
import com.jetpackduba.gitnuro.extensions.handMouseClickable
|
||||||
@ -30,7 +28,6 @@ import com.jetpackduba.gitnuro.git.diff.DiffResult
|
|||||||
import com.jetpackduba.gitnuro.keybindings.KeybindingOption
|
import com.jetpackduba.gitnuro.keybindings.KeybindingOption
|
||||||
import com.jetpackduba.gitnuro.keybindings.matchesBinding
|
import com.jetpackduba.gitnuro.keybindings.matchesBinding
|
||||||
import com.jetpackduba.gitnuro.theme.headerBackground
|
import com.jetpackduba.gitnuro.theme.headerBackground
|
||||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
|
||||||
import com.jetpackduba.gitnuro.theme.secondaryTextColor
|
import com.jetpackduba.gitnuro.theme.secondaryTextColor
|
||||||
import com.jetpackduba.gitnuro.ui.components.AvatarImage
|
import com.jetpackduba.gitnuro.ui.components.AvatarImage
|
||||||
import com.jetpackduba.gitnuro.ui.components.ScrollableLazyColumn
|
import com.jetpackduba.gitnuro.ui.components.ScrollableLazyColumn
|
||||||
@ -108,7 +105,7 @@ private fun Header(
|
|||||||
Image(
|
Image(
|
||||||
painter = painterResource("close.svg"),
|
painter = painterResource("close.svg"),
|
||||||
contentDescription = "Close history",
|
contentDescription = "Close history",
|
||||||
colorFilter = ColorFilter.tint(MaterialTheme.colors.primaryTextColor),
|
colorFilter = ColorFilter.tint(MaterialTheme.colors.onBackground),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,6 @@ import androidx.compose.ui.Alignment
|
|||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
|
||||||
import com.jetpackduba.gitnuro.theme.textButtonColors
|
import com.jetpackduba.gitnuro.theme.textButtonColors
|
||||||
import com.jetpackduba.gitnuro.ui.components.AdjustableOutlinedTextField
|
import com.jetpackduba.gitnuro.ui.components.AdjustableOutlinedTextField
|
||||||
import com.jetpackduba.gitnuro.ui.components.PrimaryButton
|
import com.jetpackduba.gitnuro.ui.components.PrimaryButton
|
||||||
@ -62,7 +61,7 @@ fun RebaseStateLoaded(
|
|||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = "Rebase interactive",
|
text = "Rebase interactive",
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
modifier = Modifier.padding(start = 16.dp, top = 16.dp),
|
modifier = Modifier.padding(start = 16.dp, top = 16.dp),
|
||||||
fontSize = 20.sp,
|
fontSize = 20.sp,
|
||||||
)
|
)
|
||||||
|
@ -18,7 +18,7 @@ import androidx.compose.ui.res.painterResource
|
|||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import com.jetpackduba.gitnuro.extensions.handOnHover
|
import com.jetpackduba.gitnuro.extensions.handOnHover
|
||||||
import com.jetpackduba.gitnuro.extensions.simpleName
|
import com.jetpackduba.gitnuro.extensions.simpleName
|
||||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
|
||||||
import com.jetpackduba.gitnuro.ui.components.SideMenuPanel
|
import com.jetpackduba.gitnuro.ui.components.SideMenuPanel
|
||||||
import com.jetpackduba.gitnuro.ui.components.SideMenuSubentry
|
import com.jetpackduba.gitnuro.ui.components.SideMenuSubentry
|
||||||
import com.jetpackduba.gitnuro.ui.components.VerticalExpandable
|
import com.jetpackduba.gitnuro.ui.components.VerticalExpandable
|
||||||
@ -69,7 +69,7 @@ fun Remotes(
|
|||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize(),
|
.fillMaxSize(),
|
||||||
tint = MaterialTheme.colors.primaryTextColor,
|
tint = MaterialTheme.colors.onBackground,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -35,7 +35,6 @@ import com.jetpackduba.gitnuro.extensions.handOnHover
|
|||||||
import com.jetpackduba.gitnuro.git.DiffEntryType
|
import com.jetpackduba.gitnuro.git.DiffEntryType
|
||||||
import com.jetpackduba.gitnuro.keybindings.KeybindingOption
|
import com.jetpackduba.gitnuro.keybindings.KeybindingOption
|
||||||
import com.jetpackduba.gitnuro.keybindings.matchesBinding
|
import com.jetpackduba.gitnuro.keybindings.matchesBinding
|
||||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
|
||||||
import com.jetpackduba.gitnuro.theme.secondarySurface
|
import com.jetpackduba.gitnuro.theme.secondarySurface
|
||||||
import com.jetpackduba.gitnuro.ui.components.ScrollableColumn
|
import com.jetpackduba.gitnuro.ui.components.ScrollableColumn
|
||||||
import com.jetpackduba.gitnuro.ui.dialogs.AuthorDialog
|
import com.jetpackduba.gitnuro.ui.dialogs.AuthorDialog
|
||||||
@ -221,6 +220,7 @@ private fun BottomInfoBar(tabViewModel: TabViewModel) {
|
|||||||
Text(
|
Text(
|
||||||
text = "${userInfo.name ?: "Name not set"} <${userInfo.email ?: "Email not set"}>",
|
text = "${userInfo.name ?: "Name not set"} <${userInfo.email ?: "Email not set"}>",
|
||||||
style = MaterialTheme.typography.body2,
|
style = MaterialTheme.typography.body2,
|
||||||
|
color = MaterialTheme.colors.onBackground,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -285,7 +285,7 @@ fun SideBarButton(
|
|||||||
painter = painterResource(painterName),
|
painter = painterResource(painterName),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
modifier = Modifier,
|
modifier = Modifier,
|
||||||
tint = MaterialTheme.colors.primaryTextColor,
|
tint = MaterialTheme.colors.onBackground,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -618,7 +618,7 @@ private fun FileEntry(
|
|||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
softWrap = false,
|
softWrap = false,
|
||||||
style = MaterialTheme.typography.body2,
|
style = MaterialTheme.typography.body2,
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@ import androidx.compose.ui.graphics.Shape
|
|||||||
import androidx.compose.ui.graphics.SolidColor
|
import androidx.compose.ui.graphics.SolidColor
|
||||||
import androidx.compose.ui.graphics.takeOrElse
|
import androidx.compose.ui.graphics.takeOrElse
|
||||||
import androidx.compose.ui.text.TextStyle
|
import androidx.compose.ui.text.TextStyle
|
||||||
|
import androidx.compose.ui.text.input.VisualTransformation
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import com.jetpackduba.gitnuro.theme.outlinedTextFieldColors
|
import com.jetpackduba.gitnuro.theme.outlinedTextFieldColors
|
||||||
|
|
||||||
@ -36,10 +37,14 @@ fun AdjustableOutlinedTextField(
|
|||||||
colors: TextFieldColors = outlinedTextFieldColors(),
|
colors: TextFieldColors = outlinedTextFieldColors(),
|
||||||
maxLines: Int = Int.MAX_VALUE,
|
maxLines: Int = Int.MAX_VALUE,
|
||||||
keyboardOptions: KeyboardOptions = KeyboardOptions.Default,
|
keyboardOptions: KeyboardOptions = KeyboardOptions.Default,
|
||||||
textStyle: TextStyle = LocalTextStyle.current.copy(fontSize = MaterialTheme.typography.body1.fontSize),
|
textStyle: TextStyle = LocalTextStyle.current.copy(
|
||||||
|
fontSize = MaterialTheme.typography.body1.fontSize,
|
||||||
|
color = MaterialTheme.colors.onBackground,
|
||||||
|
),
|
||||||
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
|
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
|
||||||
shape: Shape = RoundedCornerShape(4.dp),
|
shape: Shape = RoundedCornerShape(4.dp),
|
||||||
backgroundColor: Color = MaterialTheme.colors.background
|
backgroundColor: Color = MaterialTheme.colors.background,
|
||||||
|
visualTransformation: VisualTransformation = VisualTransformation.None,
|
||||||
) {
|
) {
|
||||||
val textColor = textStyle.color.takeOrElse {
|
val textColor = textStyle.color.takeOrElse {
|
||||||
colors.textColor(enabled).value
|
colors.textColor(enabled).value
|
||||||
@ -61,6 +66,7 @@ fun AdjustableOutlinedTextField(
|
|||||||
keyboardOptions = keyboardOptions,
|
keyboardOptions = keyboardOptions,
|
||||||
cursorBrush = SolidColor(cursorColor),
|
cursorBrush = SolidColor(cursorColor),
|
||||||
singleLine = singleLine,
|
singleLine = singleLine,
|
||||||
|
visualTransformation = visualTransformation,
|
||||||
decorationBox = { innerTextField ->
|
decorationBox = { innerTextField ->
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
|
@ -7,7 +7,7 @@ import androidx.compose.material.Text
|
|||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun PrimaryButton(
|
fun PrimaryButton(
|
||||||
@ -15,7 +15,7 @@ fun PrimaryButton(
|
|||||||
text: String,
|
text: String,
|
||||||
enabled: Boolean = true,
|
enabled: Boolean = true,
|
||||||
textColor: Color = MaterialTheme.colors.onPrimary,
|
textColor: Color = MaterialTheme.colors.onPrimary,
|
||||||
disabledTextColor: Color = MaterialTheme.colors.primaryTextColor,
|
disabledTextColor: Color = MaterialTheme.colors.onBackground,
|
||||||
onClick: () -> Unit,
|
onClick: () -> Unit,
|
||||||
) {
|
) {
|
||||||
Button(
|
Button(
|
||||||
|
@ -30,7 +30,7 @@ import com.jetpackduba.gitnuro.di.AppComponent
|
|||||||
import com.jetpackduba.gitnuro.di.DaggerTabComponent
|
import com.jetpackduba.gitnuro.di.DaggerTabComponent
|
||||||
import com.jetpackduba.gitnuro.extensions.handMouseClickable
|
import com.jetpackduba.gitnuro.extensions.handMouseClickable
|
||||||
import com.jetpackduba.gitnuro.extensions.handOnHover
|
import com.jetpackduba.gitnuro.extensions.handOnHover
|
||||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
|
||||||
import com.jetpackduba.gitnuro.viewmodels.TabViewModel
|
import com.jetpackduba.gitnuro.viewmodels.TabViewModel
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
import kotlin.io.path.Path
|
import kotlin.io.path.Path
|
||||||
@ -164,6 +164,7 @@ fun Tab(title: MutableState<String>, isSelected: Boolean, onClick: () -> Unit, o
|
|||||||
.weight(1f),
|
.weight(1f),
|
||||||
overflow = TextOverflow.Visible,
|
overflow = TextOverflow.Visible,
|
||||||
style = MaterialTheme.typography.body2,
|
style = MaterialTheme.typography.body2,
|
||||||
|
color = MaterialTheme.colors.onBackground,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -177,7 +178,7 @@ fun Tab(title: MutableState<String>, isSelected: Boolean, onClick: () -> Unit, o
|
|||||||
Icon(
|
Icon(
|
||||||
Icons.Default.Close,
|
Icons.Default.Close,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = MaterialTheme.colors.primaryTextColor
|
tint = MaterialTheme.colors.onBackground
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ import androidx.compose.ui.res.painterResource
|
|||||||
import androidx.compose.ui.text.font.FontWeight
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
import androidx.compose.ui.text.style.TextOverflow
|
import androidx.compose.ui.text.style.TextOverflow
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
|
||||||
import com.jetpackduba.gitnuro.theme.secondaryTextColor
|
import com.jetpackduba.gitnuro.theme.secondaryTextColor
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
@ -42,7 +42,7 @@ fun SideMenuEntry(
|
|||||||
Icon(
|
Icon(
|
||||||
painter = painterResource(if (isExpanded) "expand_more.svg" else "chevron_right.svg"),
|
painter = painterResource(if (isExpanded) "expand_more.svg" else "chevron_right.svg"),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = MaterialTheme.colors.primaryTextColor,
|
tint = MaterialTheme.colors.onBackground,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(horizontal = 8.dp)
|
.padding(horizontal = 8.dp)
|
||||||
.size(16.dp),
|
.size(16.dp),
|
||||||
@ -52,7 +52,7 @@ fun SideMenuEntry(
|
|||||||
Icon(
|
Icon(
|
||||||
painter = icon,
|
painter = icon,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = MaterialTheme.colors.primaryTextColor,
|
tint = MaterialTheme.colors.onBackground,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.size(16.dp),
|
.size(16.dp),
|
||||||
)
|
)
|
||||||
@ -66,7 +66,7 @@ fun SideMenuEntry(
|
|||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
style = MaterialTheme.typography.body2,
|
style = MaterialTheme.typography.body2,
|
||||||
fontWeight = FontWeight.Medium,
|
fontWeight = FontWeight.Medium,
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ import androidx.compose.ui.graphics.Color
|
|||||||
import androidx.compose.ui.res.painterResource
|
import androidx.compose.ui.res.painterResource
|
||||||
import androidx.compose.ui.unit.Dp
|
import androidx.compose.ui.unit.Dp
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
|
||||||
|
|
||||||
const val ENTRY_HEIGHT = 36
|
const val ENTRY_HEIGHT = 36
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ fun SideMenuSubentry(
|
|||||||
modifier = Modifier.weight(1f, fill = true),
|
modifier = Modifier.weight(1f, fill = true),
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
style = MaterialTheme.typography.body2,
|
style = MaterialTheme.typography.body2,
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
softWrap = false,
|
softWrap = false,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import androidx.compose.runtime.remember
|
|||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import com.jetpackduba.gitnuro.extensions.handMouseClickable
|
import com.jetpackduba.gitnuro.extensions.handMouseClickable
|
||||||
import com.jetpackduba.gitnuro.extensions.openUrlInBrowser
|
import com.jetpackduba.gitnuro.extensions.openUrlInBrowser
|
||||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun TextLink(
|
fun TextLink(
|
||||||
@ -24,7 +24,7 @@ fun TextLink(
|
|||||||
val isHovered by hoverInteraction.collectIsHoveredAsState()
|
val isHovered by hoverInteraction.collectIsHoveredAsState()
|
||||||
|
|
||||||
val textColor = if (isHovered == colorsInverted) {
|
val textColor = if (isHovered == colorsInverted) {
|
||||||
MaterialTheme.colors.primaryTextColor
|
MaterialTheme.colors.onBackground
|
||||||
} else {
|
} else {
|
||||||
MaterialTheme.colors.primaryVariant
|
MaterialTheme.colors.primaryVariant
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ import androidx.compose.ui.window.Popup
|
|||||||
import androidx.compose.ui.window.PopupPositionProvider
|
import androidx.compose.ui.window.PopupPositionProvider
|
||||||
import com.jetpackduba.gitnuro.keybindings.KeybindingOption
|
import com.jetpackduba.gitnuro.keybindings.KeybindingOption
|
||||||
import com.jetpackduba.gitnuro.keybindings.matchesBinding
|
import com.jetpackduba.gitnuro.keybindings.matchesBinding
|
||||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
|
||||||
import com.jetpackduba.gitnuro.theme.secondaryTextColor
|
import com.jetpackduba.gitnuro.theme.secondaryTextColor
|
||||||
import java.awt.event.MouseEvent
|
import java.awt.event.MouseEvent
|
||||||
import kotlin.math.abs
|
import kotlin.math.abs
|
||||||
@ -126,7 +126,7 @@ fun showPopup(x: Int, y: Int, contextMenuElements: List<ContextMenuElement>, onD
|
|||||||
.background(MaterialTheme.colors.background)
|
.background(MaterialTheme.colors.background)
|
||||||
.run {
|
.run {
|
||||||
return@run if (!MaterialTheme.colors.isLight) {
|
return@run if (!MaterialTheme.colors.isLight) {
|
||||||
this.border(1.dp, MaterialTheme.colors.primaryTextColor.copy(alpha = 0.2f))
|
this.border(1.dp, MaterialTheme.colors.onBackground.copy(alpha = 0.2f))
|
||||||
} else
|
} else
|
||||||
this
|
this
|
||||||
}
|
}
|
||||||
@ -160,7 +160,7 @@ fun Separator() {
|
|||||||
.padding(horizontal = 16.dp)
|
.padding(horizontal = 16.dp)
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.height(1.dp)
|
.height(1.dp)
|
||||||
.background(MaterialTheme.colors.primaryTextColor.copy(alpha = 0.4f))
|
.background(MaterialTheme.colors.onBackground.copy(alpha = 0.4f))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ import androidx.compose.ui.res.painterResource
|
|||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
import com.jetpackduba.gitnuro.theme.outlinedTextFieldColors
|
import com.jetpackduba.gitnuro.theme.outlinedTextFieldColors
|
||||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
|
||||||
import com.jetpackduba.gitnuro.theme.textButtonColors
|
import com.jetpackduba.gitnuro.theme.textButtonColors
|
||||||
import com.jetpackduba.gitnuro.ui.components.AdjustableOutlinedTextField
|
import com.jetpackduba.gitnuro.ui.components.AdjustableOutlinedTextField
|
||||||
import com.jetpackduba.gitnuro.ui.components.PrimaryButton
|
import com.jetpackduba.gitnuro.ui.components.PrimaryButton
|
||||||
@ -43,7 +43,7 @@ fun AuthorDialog(
|
|||||||
|
|
||||||
Text(
|
Text(
|
||||||
text = "Global settings",
|
text = "Global settings",
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
fontSize = 16.sp,
|
fontSize = 16.sp,
|
||||||
modifier = Modifier.padding(vertical = 8.dp),
|
modifier = Modifier.padding(vertical = 8.dp),
|
||||||
)
|
)
|
||||||
@ -61,7 +61,7 @@ fun AuthorDialog(
|
|||||||
|
|
||||||
Text(
|
Text(
|
||||||
text = "Repository settings",
|
text = "Repository settings",
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
fontSize = 16.sp,
|
fontSize = 16.sp,
|
||||||
modifier = Modifier.padding(top = 16.dp, bottom = 8.dp),
|
modifier = Modifier.padding(top = 16.dp, bottom = 8.dp),
|
||||||
)
|
)
|
||||||
@ -88,7 +88,7 @@ fun AuthorDialog(
|
|||||||
Icon(
|
Icon(
|
||||||
painterResource("warning.svg"),
|
painterResource("warning.svg"),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = MaterialTheme.colors.primaryTextColor,
|
tint = MaterialTheme.colors.onBackground,
|
||||||
modifier = Modifier.size(16.dp)
|
modifier = Modifier.size(16.dp)
|
||||||
)
|
)
|
||||||
Text(
|
Text(
|
||||||
|
@ -19,7 +19,7 @@ import androidx.compose.ui.graphics.Shape
|
|||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import com.jetpackduba.gitnuro.git.CloneStatus
|
import com.jetpackduba.gitnuro.git.CloneStatus
|
||||||
import com.jetpackduba.gitnuro.theme.outlinedTextFieldColors
|
import com.jetpackduba.gitnuro.theme.outlinedTextFieldColors
|
||||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
|
||||||
import com.jetpackduba.gitnuro.theme.textButtonColors
|
import com.jetpackduba.gitnuro.theme.textButtonColors
|
||||||
import com.jetpackduba.gitnuro.ui.components.AdjustableOutlinedTextField
|
import com.jetpackduba.gitnuro.ui.components.AdjustableOutlinedTextField
|
||||||
import com.jetpackduba.gitnuro.ui.components.PrimaryButton
|
import com.jetpackduba.gitnuro.ui.components.PrimaryButton
|
||||||
@ -166,7 +166,7 @@ private fun CloneInput(
|
|||||||
Icon(
|
Icon(
|
||||||
Icons.Default.Search,
|
Icons.Default.Search,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = MaterialTheme.colors.primaryTextColor,
|
tint = MaterialTheme.colors.onBackground,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -248,7 +248,7 @@ private fun Cloning(cloneViewModel: CloneViewModel, cloneStatusValue: CloneStatu
|
|||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
Text(cloneStatusValue.taskName, color = MaterialTheme.colors.primaryTextColor)
|
Text(cloneStatusValue.taskName, color = MaterialTheme.colors.onBackground)
|
||||||
|
|
||||||
if (progress >= 0f)
|
if (progress >= 0f)
|
||||||
CircularProgressIndicator(
|
CircularProgressIndicator(
|
||||||
@ -295,7 +295,7 @@ private fun Cancelling() {
|
|||||||
|
|
||||||
Text(
|
Text(
|
||||||
text = "Cancelling clone operation...",
|
text = "Cancelling clone operation...",
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
modifier = Modifier.padding(vertical = 16.dp),
|
modifier = Modifier.padding(vertical = 16.dp),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -81,6 +81,7 @@ fun EditRemotesDialog(
|
|||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = "Remotes",
|
text = "Remotes",
|
||||||
|
color = MaterialTheme.colors.onBackground,
|
||||||
style = MaterialTheme.typography.h3,
|
style = MaterialTheme.typography.h3,
|
||||||
modifier = Modifier.padding(vertical = 8.dp),
|
modifier = Modifier.padding(vertical = 8.dp),
|
||||||
)
|
)
|
||||||
@ -95,7 +96,7 @@ fun EditRemotesDialog(
|
|||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.Clear,
|
imageVector = Icons.Default.Clear,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = MaterialTheme.colors.primaryTextColor,
|
tint = MaterialTheme.colors.onBackground,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -121,7 +122,7 @@ fun EditRemotesDialog(
|
|||||||
|
|
||||||
Text(
|
Text(
|
||||||
text = remote.remoteName,
|
text = remote.remoteName,
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.handMouseClickable {
|
.handMouseClickable {
|
||||||
@ -176,7 +177,7 @@ fun EditRemotesDialog(
|
|||||||
Icon(
|
Icon(
|
||||||
painter = painterResource("add.svg"),
|
painter = painterResource("add.svg"),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = MaterialTheme.colors.primaryTextColor,
|
tint = MaterialTheme.colors.onBackground,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
IconButton(
|
IconButton(
|
||||||
@ -193,7 +194,7 @@ fun EditRemotesDialog(
|
|||||||
painter = painterResource("remove.svg"),
|
painter = painterResource("remove.svg"),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = if (selectedRemote != null)
|
tint = if (selectedRemote != null)
|
||||||
MaterialTheme.colors.primaryTextColor
|
MaterialTheme.colors.onBackground
|
||||||
else
|
else
|
||||||
MaterialTheme.colors.secondaryTextColor,
|
MaterialTheme.colors.secondaryTextColor,
|
||||||
)
|
)
|
||||||
@ -211,7 +212,7 @@ fun EditRemotesDialog(
|
|||||||
if (selectedRemote.isNew) {
|
if (selectedRemote.isNew) {
|
||||||
Text(
|
Text(
|
||||||
text = "New remote name",
|
text = "New remote name",
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
modifier = Modifier.padding(top = 8.dp),
|
modifier = Modifier.padding(top = 8.dp),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -237,7 +238,7 @@ fun EditRemotesDialog(
|
|||||||
|
|
||||||
Text(
|
Text(
|
||||||
text = "Fetch URL",
|
text = "Fetch URL",
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
modifier = Modifier.padding(top = 8.dp),
|
modifier = Modifier.padding(top = 8.dp),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -257,7 +258,7 @@ fun EditRemotesDialog(
|
|||||||
|
|
||||||
Text(
|
Text(
|
||||||
text = "Push URL",
|
text = "Push URL",
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
modifier = Modifier.padding(top = 8.dp),
|
modifier = Modifier.padding(top = 8.dp),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -305,7 +306,7 @@ fun EditRemotesDialog(
|
|||||||
color = if (remoteChanged)
|
color = if (remoteChanged)
|
||||||
MaterialTheme.colors.primaryVariant
|
MaterialTheme.colors.primaryVariant
|
||||||
else
|
else
|
||||||
MaterialTheme.colors.primaryTextColor,
|
MaterialTheme.colors.onBackground,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ fun MaterialDialog(
|
|||||||
alignment: Alignment = Alignment.Center,
|
alignment: Alignment = Alignment.Center,
|
||||||
paddingHorizontal: Dp = 16.dp,
|
paddingHorizontal: Dp = 16.dp,
|
||||||
paddingVertical: Dp = 16.dp,
|
paddingVertical: Dp = 16.dp,
|
||||||
background: Color = MaterialTheme.colors.background,
|
background: Color = MaterialTheme.colors.surface,
|
||||||
onCloseRequested: () -> Unit = {},
|
onCloseRequested: () -> Unit = {},
|
||||||
content: @Composable () -> Unit
|
content: @Composable () -> Unit
|
||||||
) {
|
) {
|
||||||
|
@ -2,10 +2,7 @@ package com.jetpackduba.gitnuro.ui.dialogs
|
|||||||
|
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.material.MaterialTheme
|
import androidx.compose.material.*
|
||||||
import androidx.compose.material.OutlinedTextField
|
|
||||||
import androidx.compose.material.Text
|
|
||||||
import androidx.compose.material.TextButton
|
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
@ -13,12 +10,16 @@ import androidx.compose.ui.focus.FocusRequester
|
|||||||
import androidx.compose.ui.focus.focusProperties
|
import androidx.compose.ui.focus.focusProperties
|
||||||
import androidx.compose.ui.focus.focusRequester
|
import androidx.compose.ui.focus.focusRequester
|
||||||
import androidx.compose.ui.input.key.onPreviewKeyEvent
|
import androidx.compose.ui.input.key.onPreviewKeyEvent
|
||||||
|
import androidx.compose.ui.res.painterResource
|
||||||
import androidx.compose.ui.text.input.PasswordVisualTransformation
|
import androidx.compose.ui.text.input.PasswordVisualTransformation
|
||||||
|
import androidx.compose.ui.text.style.TextAlign
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import com.jetpackduba.gitnuro.keybindings.KeybindingOption
|
import com.jetpackduba.gitnuro.keybindings.KeybindingOption
|
||||||
import com.jetpackduba.gitnuro.keybindings.matchesBinding
|
import com.jetpackduba.gitnuro.keybindings.matchesBinding
|
||||||
import com.jetpackduba.gitnuro.theme.outlinedTextFieldColors
|
import com.jetpackduba.gitnuro.theme.outlinedTextFieldColors
|
||||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
|
||||||
|
import com.jetpackduba.gitnuro.theme.secondaryTextColor
|
||||||
|
import com.jetpackduba.gitnuro.ui.components.AdjustableOutlinedTextField
|
||||||
import com.jetpackduba.gitnuro.ui.components.PrimaryButton
|
import com.jetpackduba.gitnuro.ui.components.PrimaryButton
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
@ -32,21 +33,38 @@ fun PasswordDialog(
|
|||||||
|
|
||||||
MaterialDialog(onCloseRequested = onReject) {
|
MaterialDialog(onCloseRequested = onReject) {
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier
|
|
||||||
.background(MaterialTheme.colors.background),
|
|
||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
verticalArrangement = Arrangement.Center,
|
verticalArrangement = Arrangement.Center,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
Text(
|
Icon(
|
||||||
text = "Introduce your default SSH key's password",
|
painterResource("lock.svg"),
|
||||||
|
contentDescription = null,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(vertical = 8.dp),
|
.size(64.dp)
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
.padding(vertical = 16.dp),
|
||||||
|
tint = MaterialTheme.colors.onBackground,
|
||||||
)
|
)
|
||||||
OutlinedTextField(
|
|
||||||
|
Text(
|
||||||
|
text = "Introduce your SSH key's password",
|
||||||
|
modifier = Modifier
|
||||||
|
.padding(bottom = 8.dp),
|
||||||
|
color = MaterialTheme.colors.onBackground,
|
||||||
|
style = MaterialTheme.typography.body1,
|
||||||
|
)
|
||||||
|
|
||||||
|
Text(
|
||||||
|
text = "Your SSH key is protected with a password",
|
||||||
|
modifier = Modifier
|
||||||
|
.padding(bottom = 16.dp),
|
||||||
|
color = MaterialTheme.colors.secondaryTextColor,
|
||||||
|
style = MaterialTheme.typography.body2,
|
||||||
|
textAlign = TextAlign.Center,
|
||||||
|
)
|
||||||
|
|
||||||
|
AdjustableOutlinedTextField(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(bottom = 8.dp)
|
|
||||||
.focusRequester(passwordFieldFocusRequester)
|
.focusRequester(passwordFieldFocusRequester)
|
||||||
.focusProperties {
|
.focusProperties {
|
||||||
this.next = buttonFieldFocusRequester
|
this.next = buttonFieldFocusRequester
|
||||||
@ -61,14 +79,7 @@ fun PasswordDialog(
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
value = passwordField,
|
value = passwordField,
|
||||||
singleLine = true,
|
maxLines = 1,
|
||||||
label = {
|
|
||||||
Text(
|
|
||||||
"Password",
|
|
||||||
style = MaterialTheme.typography.body1.copy(MaterialTheme.colors.primaryVariant),
|
|
||||||
)
|
|
||||||
},
|
|
||||||
textStyle = MaterialTheme.typography.body1,
|
|
||||||
colors = outlinedTextFieldColors(),
|
colors = outlinedTextFieldColors(),
|
||||||
onValueChange = {
|
onValueChange = {
|
||||||
passwordField = it
|
passwordField = it
|
||||||
|
@ -14,7 +14,7 @@ import androidx.compose.ui.Alignment
|
|||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import com.jetpackduba.gitnuro.git.log.ResetType
|
import com.jetpackduba.gitnuro.git.log.ResetType
|
||||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
|
||||||
import com.jetpackduba.gitnuro.theme.textButtonColors
|
import com.jetpackduba.gitnuro.theme.textButtonColors
|
||||||
import com.jetpackduba.gitnuro.ui.components.PrimaryButton
|
import com.jetpackduba.gitnuro.ui.components.PrimaryButton
|
||||||
|
|
||||||
@ -109,7 +109,7 @@ fun RadioButtonText(
|
|||||||
Text(
|
Text(
|
||||||
text = text,
|
text = text,
|
||||||
modifier = Modifier.padding(horizontal = 8.dp),
|
modifier = Modifier.padding(horizontal = 8.dp),
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -18,7 +18,7 @@ import androidx.compose.ui.unit.dp
|
|||||||
import com.jetpackduba.gitnuro.keybindings.KeybindingOption
|
import com.jetpackduba.gitnuro.keybindings.KeybindingOption
|
||||||
import com.jetpackduba.gitnuro.keybindings.matchesBinding
|
import com.jetpackduba.gitnuro.keybindings.matchesBinding
|
||||||
import com.jetpackduba.gitnuro.theme.outlinedTextFieldColors
|
import com.jetpackduba.gitnuro.theme.outlinedTextFieldColors
|
||||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
|
||||||
import com.jetpackduba.gitnuro.theme.textButtonColors
|
import com.jetpackduba.gitnuro.theme.textButtonColors
|
||||||
import com.jetpackduba.gitnuro.ui.components.PrimaryButton
|
import com.jetpackduba.gitnuro.ui.components.PrimaryButton
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ fun UserPasswordDialog(
|
|||||||
text = "Introduce your remote server credentials",
|
text = "Introduce your remote server credentials",
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(vertical = 8.dp),
|
.padding(vertical = 8.dp),
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
)
|
)
|
||||||
|
|
||||||
OutlinedTextField(
|
OutlinedTextField(
|
||||||
|
@ -62,7 +62,7 @@ fun SettingsDialog(
|
|||||||
Text(
|
Text(
|
||||||
text = "Settings",
|
text = "Settings",
|
||||||
style = MaterialTheme.typography.h3,
|
style = MaterialTheme.typography.h3,
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
modifier = Modifier.padding(top = 8.dp, bottom = 16.dp)
|
modifier = Modifier.padding(top = 8.dp, bottom = 16.dp)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -247,7 +247,7 @@ fun Category(
|
|||||||
.handMouseClickable(onClick)
|
.handMouseClickable(onClick)
|
||||||
.padding(8.dp),
|
.padding(8.dp),
|
||||||
style = MaterialTheme.typography.body1,
|
style = MaterialTheme.typography.body1,
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -278,7 +278,7 @@ fun <T : DropDownOption> SettingDropDown(
|
|||||||
Text(
|
Text(
|
||||||
text = currentOption.optionName,
|
text = currentOption.optionName,
|
||||||
style = MaterialTheme.typography.body1,
|
style = MaterialTheme.typography.body1,
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
modifier = Modifier.weight(1f),
|
modifier = Modifier.weight(1f),
|
||||||
maxLines = 1
|
maxLines = 1
|
||||||
)
|
)
|
||||||
@ -286,7 +286,7 @@ fun <T : DropDownOption> SettingDropDown(
|
|||||||
Icon(
|
Icon(
|
||||||
painter = painterResource("dropdown.svg"),
|
painter = painterResource("dropdown.svg"),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = MaterialTheme.colors.primaryTextColor,
|
tint = MaterialTheme.colors.onBackground,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -328,7 +328,7 @@ fun SettingButton(
|
|||||||
OutlinedButton(onClick = onClick) {
|
OutlinedButton(onClick = onClick) {
|
||||||
Text(
|
Text(
|
||||||
text = buttonText,
|
text = buttonText,
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
style = MaterialTheme.typography.body1,
|
style = MaterialTheme.typography.body1,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -462,7 +462,7 @@ private fun FieldTitles(
|
|||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = title,
|
text = title,
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
style = MaterialTheme.typography.body1,
|
style = MaterialTheme.typography.body1,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -226,7 +226,7 @@ fun SideTitle(text: String) {
|
|||||||
Text(
|
Text(
|
||||||
text = text,
|
text = text,
|
||||||
fontSize = 20.sp,
|
fontSize = 20.sp,
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -504,7 +504,7 @@ fun HunkHeader(
|
|||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = header,
|
text = header,
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
style = MaterialTheme.typography.body1,
|
style = MaterialTheme.typography.body1,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -602,7 +602,7 @@ private fun DiffHeader(
|
|||||||
Image(
|
Image(
|
||||||
painter = painterResource("close.svg"),
|
painter = painterResource("close.svg"),
|
||||||
contentDescription = "Close diff",
|
contentDescription = "Close diff",
|
||||||
colorFilter = ColorFilter.tint(MaterialTheme.colors.primaryTextColor),
|
colorFilter = ColorFilter.tint(MaterialTheme.colors.onBackground),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -616,7 +616,7 @@ fun DiffTypeButtons(diffType: TextDiffType, onChangeDiffType: (TextDiffType) ->
|
|||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
"Unified",
|
"Unified",
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
style = MaterialTheme.typography.caption,
|
style = MaterialTheme.typography.caption,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -639,7 +639,7 @@ fun DiffTypeButtons(diffType: TextDiffType, onChangeDiffType: (TextDiffType) ->
|
|||||||
|
|
||||||
Text(
|
Text(
|
||||||
"Split",
|
"Split",
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
// modifier = Modifier.padding(horizontal = 4.dp),
|
// modifier = Modifier.padding(horizontal = 4.dp),
|
||||||
style = MaterialTheme.typography.caption,
|
style = MaterialTheme.typography.caption,
|
||||||
)
|
)
|
||||||
@ -706,7 +706,7 @@ private fun PathOnlyDiffHeader(
|
|||||||
Image(
|
Image(
|
||||||
painter = painterResource("close.svg"),
|
painter = painterResource("close.svg"),
|
||||||
contentDescription = "Close diff",
|
contentDescription = "Close diff",
|
||||||
colorFilter = ColorFilter.tint(MaterialTheme.colors.primaryTextColor),
|
colorFilter = ColorFilter.tint(MaterialTheme.colors.onBackground),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -820,7 +820,7 @@ fun LineNumber(text: String, remarked: Boolean) {
|
|||||||
.padding(start = 8.dp, end = 4.dp),
|
.padding(start = 8.dp, end = 4.dp),
|
||||||
fontFamily = FontFamily.Monospace,
|
fontFamily = FontFamily.Monospace,
|
||||||
style = MaterialTheme.typography.body2,
|
style = MaterialTheme.typography.body2,
|
||||||
color = if (remarked) MaterialTheme.colors.primaryTextColor else MaterialTheme.colors.secondaryTextColor,
|
color = if (remarked) MaterialTheme.colors.onBackground else MaterialTheme.colors.secondaryTextColor,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -409,7 +409,7 @@ fun MessagesList(
|
|||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = "The commits list has been limited to $commitsLimit. Access the settings to change it.",
|
text = "The commits list has been limited to $commitsLimit. Access the settings to change it.",
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
fontStyle = FontStyle.Italic,
|
fontStyle = FontStyle.Italic,
|
||||||
style = MaterialTheme.typography.body2,
|
style = MaterialTheme.typography.body2,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
@ -600,7 +600,7 @@ fun GraphHeader(
|
|||||||
Icons.Default.Search,
|
Icons.Default.Search,
|
||||||
modifier = Modifier.size(18.dp),
|
modifier = Modifier.size(18.dp),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = MaterialTheme.colors.primaryTextColor,
|
tint = MaterialTheme.colors.onBackground,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -639,7 +639,7 @@ fun UncommitedChangesLine(
|
|||||||
modifier = Modifier.padding(start = 16.dp),
|
modifier = Modifier.padding(start = 16.dp),
|
||||||
style = MaterialTheme.typography.body2,
|
style = MaterialTheme.typography.body2,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
color = MaterialTheme.colors.primaryTextColor,
|
color = MaterialTheme.colors.onBackground,
|
||||||
)
|
)
|
||||||
|
|
||||||
Spacer(modifier = Modifier.weight(1f))
|
Spacer(modifier = Modifier.weight(1f))
|
||||||
@ -844,7 +844,7 @@ fun CommitMessage(
|
|||||||
.padding(start = 8.dp)
|
.padding(start = 8.dp)
|
||||||
.weight(1f),
|
.weight(1f),
|
||||||
style = MaterialTheme.typography.body2,
|
style = MaterialTheme.typography.body2,
|
||||||
color = if (matchesSearchFilter == false) MaterialTheme.colors.secondaryTextColor else MaterialTheme.colors.primaryTextColor,
|
color = if (matchesSearchFilter == false) MaterialTheme.colors.secondaryTextColor else MaterialTheme.colors.onBackground,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
)
|
)
|
||||||
@ -1137,6 +1137,7 @@ fun RefChip(
|
|||||||
Text(
|
Text(
|
||||||
text = ref.simpleLogName,
|
text = ref.simpleLogName,
|
||||||
style = MaterialTheme.typography.body2,
|
style = MaterialTheme.typography.body2,
|
||||||
|
color = MaterialTheme.colors.onBackground,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
modifier = Modifier.padding(horizontal = 6.dp)
|
modifier = Modifier.padding(horizontal = 6.dp)
|
||||||
)
|
)
|
||||||
|
1
src/main/resources/lock.svg
Normal file
1
src/main/resources/lock.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g fill="none"><path d="M0 0h24v24H0V0z"/><path d="M0 0h24v24H0V0z" opacity=".87"/></g><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"/></svg>
|
After Width: | Height: | Size: 426 B |
Loading…
Reference in New Issue
Block a user