-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from jkj8790/feature/improve-visual
Feature/improve visual
- Loading branch information
Showing
17 changed files
with
601 additions
and
399 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/main/kotlin/com/jerryjeon/logjerry/logview/MarkInfo.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.jerryjeon.logjerry.logview | ||
|
||
sealed class MarkInfo { | ||
class Marked( | ||
val markedLog: RefinedLog, | ||
) : MarkInfo() | ||
|
||
class StatBetweenMarks( | ||
val logCount: Int, | ||
val duration: String?, // ex) 1h 2m 3s, and null if it's not able to calculate | ||
) : MarkInfo() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
src/main/kotlin/com/jerryjeon/logjerry/ui/AppliedTextFilter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package com.jerryjeon.logjerry.ui | ||
|
||
import androidx.compose.foundation.border | ||
import androidx.compose.foundation.clickable | ||
import androidx.compose.foundation.layout.* | ||
import androidx.compose.foundation.shape.RoundedCornerShape | ||
import androidx.compose.material.ButtonDefaults | ||
import androidx.compose.material.Divider | ||
import androidx.compose.material.Icon | ||
import androidx.compose.material.Text | ||
import androidx.compose.material.icons.Icons | ||
import androidx.compose.material.icons.filled.Close | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.unit.dp | ||
import com.jerryjeon.logjerry.filter.TextFilter | ||
|
||
@Composable | ||
fun AppliedTextFilter(textFilter: TextFilter, removeFilter: (TextFilter) -> Unit) { | ||
Box( | ||
Modifier | ||
.padding(horizontal = 4.dp, vertical = 8.dp) | ||
.border(1.dp, Color.LightGray, RoundedCornerShape(8.dp)) | ||
) { | ||
Row(modifier = Modifier.height(30.dp)) { | ||
Spacer(Modifier.width(8.dp)) | ||
Text( | ||
textFilter.columnType.text, | ||
modifier = Modifier.align(Alignment.CenterVertically), | ||
) | ||
Spacer(Modifier.width(8.dp)) | ||
Divider(Modifier.width(1.dp).fillMaxHeight()) | ||
Spacer(Modifier.width(8.dp)) | ||
Text(textFilter.text, modifier = Modifier.align(Alignment.CenterVertically)) | ||
Spacer(Modifier.width(8.dp)) | ||
Box( | ||
Modifier | ||
.clickable { removeFilter(textFilter) } | ||
.align(Alignment.CenterVertically) | ||
.fillMaxHeight() | ||
.aspectRatio(1f) | ||
) { | ||
Icon( | ||
Icons.Default.Close, | ||
contentDescription = "Remove a filter", | ||
modifier = Modifier.size(ButtonDefaults.IconSize).align(Alignment.Center) | ||
) | ||
} | ||
} | ||
} | ||
} |
58 changes: 0 additions & 58 deletions
58
src/main/kotlin/com/jerryjeon/logjerry/ui/DetectionView.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.