update: image removal in WorkspaceDetails.kt for compact modes
src: Updated README.md
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
@@ -21,12 +21,23 @@
|
||||
|
||||
</div>
|
||||
|
||||
|  |  |
|
||||
|:---------------------------------------:|:-----------------------------------------:|
|
||||
|  |  |
|
||||
|  |  |
|
||||
|  |  |
|
||||
| :----------------------------------------------------------------: | :----------------------------------------------------------------: |
|
||||
|  |  |
|
||||
|  |  |
|
||||
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
|
||||
## Release numbers
|
||||
|
||||
[](https://github.com/chindaronit/Flux/releases)
|
||||
[](https://github.com/chindaronit/Flux/blob/main/LICENSE)
|
||||
[](https://github.com/chindaronit/Flux/releases)
|
||||
|
||||
</div>
|
||||
|
||||
## 🎉 Features
|
||||
|
||||
- 📝 **Sleek, Minimalistic Design** with Material You (Material 3)
|
||||
@@ -44,9 +55,11 @@
|
||||
---
|
||||
|
||||
## 🌎 Translations
|
||||
|
||||
English, Hindi, French, Portugal (Brazil), Russian, German, Spanish, Dutch
|
||||
|
||||
## 🔎 Technical Details
|
||||
|
||||
- **Programming Languages**: Kotlin
|
||||
- **Build Tool**: Gradle with Kotlin DSL
|
||||
- **Android Version**: The application targets Android SDK version 36 and is compatible with devices
|
||||
@@ -55,6 +68,7 @@ English, Hindi, French, Portugal (Brazil), Russian, German, Spanish, Dutch
|
||||
- **Java Version**: JVM Target 11.
|
||||
|
||||
## 🛠️ Architecture
|
||||
|
||||
- **MVI**: Model View ViewModel
|
||||
|
||||
## 📚 Libraries and Frameworks
|
||||
@@ -85,6 +99,16 @@ In Android Studio, select `Run > Run 'app'` to start the application.
|
||||
Any form of contribution is welcome! If you find a bug or have a new feature request, please create
|
||||
an issue. If you want to contribute code directly to this project, you can create a pull request.
|
||||
|
||||
<div align="center">
|
||||
|
||||
## Thanks to all contributors
|
||||
|
||||
<a href="https://github.com/chindaronit/Flux/graphs/contributors">
|
||||
<img src="https://contrib.rocks/image?repo=chindaronit/Flux" width="200"/>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
## ⚠️ License
|
||||
|
||||
```text
|
||||
@@ -104,3 +128,8 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
```
|
||||
|
||||
<div align="center">
|
||||
<img src=".github/india.jpg" alt="India" height="30" style="border-radius:50%; vertical-align:middle;"> MADE IN INDIA
|
||||
</div>
|
||||
|
||||
@@ -4,6 +4,7 @@ import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
@@ -40,6 +41,8 @@ import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
import coil.compose.AsyncImage
|
||||
import com.flux.data.model.WorkspaceModel
|
||||
@@ -69,7 +72,9 @@ fun NoteDetailsTopBar(
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.background(
|
||||
if(!isReadView) MaterialTheme.colorScheme.primary else MaterialTheme.colorScheme.surfaceColorAtElevation(6.dp),
|
||||
if (!isReadView) MaterialTheme.colorScheme.primary else MaterialTheme.colorScheme.surfaceColorAtElevation(
|
||||
6.dp
|
||||
),
|
||||
RoundedCornerShape(bottomStart = 32.dp, topStart = 32.dp)
|
||||
)
|
||||
.clip(RoundedCornerShape(bottomStart = 32.dp, topStart = 32.dp))
|
||||
@@ -82,7 +87,9 @@ fun NoteDetailsTopBar(
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.background(
|
||||
if(isReadView) MaterialTheme.colorScheme.primary else MaterialTheme.colorScheme.surfaceColorAtElevation(6.dp),
|
||||
if (isReadView) MaterialTheme.colorScheme.primary else MaterialTheme.colorScheme.surfaceColorAtElevation(
|
||||
6.dp
|
||||
),
|
||||
RoundedCornerShape(bottomEnd = 32.dp, topEnd = 32.dp)
|
||||
)
|
||||
.clip(RoundedCornerShape(bottomEnd = 32.dp, topEnd = 32.dp))
|
||||
@@ -122,7 +129,9 @@ fun JournalDetailsTopBar(
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.background(
|
||||
if(!isReadView) MaterialTheme.colorScheme.primary else MaterialTheme.colorScheme.surfaceColorAtElevation(6.dp),
|
||||
if (!isReadView) MaterialTheme.colorScheme.primary else MaterialTheme.colorScheme.surfaceColorAtElevation(
|
||||
6.dp
|
||||
),
|
||||
RoundedCornerShape(bottomStart = 32.dp, topStart = 32.dp)
|
||||
)
|
||||
.clip(RoundedCornerShape(bottomStart = 32.dp, topStart = 32.dp))
|
||||
@@ -135,7 +144,9 @@ fun JournalDetailsTopBar(
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.background(
|
||||
if(isReadView) MaterialTheme.colorScheme.primary else MaterialTheme.colorScheme.surfaceColorAtElevation(6.dp),
|
||||
if (isReadView) MaterialTheme.colorScheme.primary else MaterialTheme.colorScheme.surfaceColorAtElevation(
|
||||
6.dp
|
||||
),
|
||||
RoundedCornerShape(bottomEnd = 32.dp, topEnd = 32.dp)
|
||||
)
|
||||
.clip(RoundedCornerShape(bottomEnd = 32.dp, topEnd = 32.dp))
|
||||
@@ -158,6 +169,7 @@ fun JournalDetailsTopBar(
|
||||
@Composable
|
||||
fun WorkspaceTopBar(
|
||||
workspace: WorkspaceModel,
|
||||
isFullView: Boolean,
|
||||
onBackPressed: () -> Unit,
|
||||
onDelete: () -> Unit,
|
||||
onTogglePinned: () -> Unit,
|
||||
@@ -167,23 +179,25 @@ fun WorkspaceTopBar(
|
||||
onEditLabel: () -> Unit,
|
||||
onRemoveCover: () -> Unit
|
||||
) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.height(if (workspace.cover.isNotBlank()) 160.dp else 80.dp)
|
||||
) {
|
||||
// Background image
|
||||
AsyncImage(
|
||||
model = workspace.cover,
|
||||
contentDescription = null,
|
||||
contentScale = ContentScale.Crop,
|
||||
modifier = Modifier.matchParentSize()
|
||||
)
|
||||
if (isFullView) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.height(if (workspace.cover.isNotBlank()) 160.dp else 80.dp)
|
||||
) {
|
||||
// Background image
|
||||
AsyncImage(
|
||||
model = workspace.cover,
|
||||
contentDescription = null,
|
||||
contentScale = ContentScale.Crop,
|
||||
modifier = Modifier.matchParentSize()
|
||||
)
|
||||
}
|
||||
|
||||
// Overlay TopAppBar
|
||||
TopAppBar(
|
||||
colors = TopAppBarDefaults.topAppBarColors(containerColor = Color.Transparent),
|
||||
title = {},
|
||||
title = { },
|
||||
navigationIcon = {
|
||||
IconButton(
|
||||
onClick = onBackPressed,
|
||||
@@ -207,8 +221,56 @@ fun WorkspaceTopBar(
|
||||
onTogglePinned = onTogglePinned,
|
||||
onToggleLock = onToggleLock
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
else {
|
||||
// Overlay TopAppBar
|
||||
TopAppBar(
|
||||
colors = TopAppBarDefaults.topAppBarColors(containerColor = Color.Transparent),
|
||||
title = {
|
||||
Column {
|
||||
Text(
|
||||
workspace.title,
|
||||
style = MaterialTheme.typography.titleLarge.copy(fontWeight = FontWeight.SemiBold),
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
modifier = Modifier.padding(end = 3.dp)
|
||||
)
|
||||
if (workspace.description.isNotBlank()) {
|
||||
Text(
|
||||
workspace.description,
|
||||
style = MaterialTheme.typography.labelMedium,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
modifier = Modifier.padding(end = 3.dp)
|
||||
)
|
||||
}
|
||||
} },
|
||||
navigationIcon = {
|
||||
IconButton(
|
||||
onClick = onBackPressed,
|
||||
colors = IconButtonDefaults.iconButtonColors(
|
||||
containerColor = MaterialTheme.colorScheme.surfaceContainerLow,
|
||||
contentColor = MaterialTheme.colorScheme.onSurface
|
||||
)
|
||||
) { Icon(Icons.AutoMirrored.Default.ArrowBack, null) }
|
||||
},
|
||||
modifier = Modifier.matchParentSize()
|
||||
actions = {
|
||||
WorkspaceMore(
|
||||
isCoverAdded = workspace.cover.isNotBlank(),
|
||||
isLocked = workspace.passKey.isNotBlank(),
|
||||
isPinned = workspace.isPinned,
|
||||
showEditLabel = workspace.selectedSpaces.contains(1),
|
||||
onDelete = onDelete,
|
||||
onEditDetails = onEditDetails,
|
||||
onEditLabel = onEditLabel,
|
||||
onRemoveCover = onRemoveCover,
|
||||
onAddCover = onAddCover,
|
||||
onTogglePinned = onTogglePinned,
|
||||
onToggleLock = onToggleLock
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -226,7 +288,9 @@ internal fun SelectedBar(
|
||||
onCloseClick: () -> Unit
|
||||
) {
|
||||
Row(
|
||||
Modifier.fillMaxWidth().padding(vertical = 8.dp),
|
||||
Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(bottom = 8.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.SpaceBetween
|
||||
) {
|
||||
|
||||
@@ -253,7 +253,7 @@ fun Themes(
|
||||
}
|
||||
}
|
||||
Text(
|
||||
stringResource(R.string.Themes),
|
||||
stringResource(R.string.color_palette),
|
||||
color = MaterialTheme.colorScheme.primary,
|
||||
fontWeight = FontWeight.Bold,
|
||||
fontSize = 20.sp
|
||||
|
||||
@@ -9,7 +9,9 @@ import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.lazy.LazyColumn
|
||||
@@ -207,6 +209,7 @@ fun WorkspaceDetails(
|
||||
topBar = {
|
||||
WorkspaceTopBar(
|
||||
workspace,
|
||||
settings.data.workspaceGridColumns==1,
|
||||
onBackPressed = { navController.popBackStack() },
|
||||
onDelete = { showDeleteWorkspaceDialog = true },
|
||||
onTogglePinned = {
|
||||
@@ -239,29 +242,32 @@ fun WorkspaceDetails(
|
||||
LazyColumn(
|
||||
Modifier
|
||||
.padding(innerPadding)
|
||||
.padding(horizontal = 12.dp, vertical = 8.dp)
|
||||
.padding(horizontal = 12.dp).padding(bottom = 8.dp)
|
||||
) {
|
||||
item {
|
||||
IconButton(onClick = { editIconSheet = true }) {
|
||||
Icon(
|
||||
icons[workspace.icon],
|
||||
null,
|
||||
modifier = Modifier.size(48.dp),
|
||||
tint = MaterialTheme.colorScheme.primary
|
||||
if(settings.data.workspaceGridColumns==1){
|
||||
item {
|
||||
IconButton(onClick = { editIconSheet = true }) {
|
||||
Icon(
|
||||
icons[workspace.icon],
|
||||
null,
|
||||
modifier = Modifier.size(48.dp),
|
||||
tint = MaterialTheme.colorScheme.primary
|
||||
)
|
||||
}
|
||||
}
|
||||
item {
|
||||
Text(
|
||||
workspace.title,
|
||||
style = MaterialTheme.typography.titleLarge.copy(fontWeight = FontWeight.SemiBold),
|
||||
color = MaterialTheme.colorScheme.primary
|
||||
)
|
||||
}
|
||||
if (workspace.description.isNotBlank()) {
|
||||
item { Text(workspace.description, style = MaterialTheme.typography.bodyLarge) }
|
||||
}
|
||||
}
|
||||
item {
|
||||
Text(
|
||||
workspace.title,
|
||||
style = MaterialTheme.typography.titleLarge.copy(fontWeight = FontWeight.SemiBold),
|
||||
color = MaterialTheme.colorScheme.primary
|
||||
)
|
||||
}
|
||||
if (workspace.description.isNotBlank()) {
|
||||
item { Text(workspace.description, style = MaterialTheme.typography.bodyLarge) }
|
||||
}
|
||||
item {
|
||||
if(settings.data.workspaceGridColumns==1) Spacer(Modifier.height(8.dp))
|
||||
if (spacesList.find { it.id == selectedSpaceId.intValue }?.title == stringResource(R.string.Notes) && selectedNotes.isNotEmpty()) {
|
||||
SelectedBar(
|
||||
true,
|
||||
@@ -286,10 +292,11 @@ fun WorkspaceDetails(
|
||||
onCloseClick = { onNotesEvents(NotesEvents.ClearSelection) }
|
||||
)
|
||||
} else {
|
||||
if(settings.data.workspaceGridColumns==1) Spacer(Modifier.height(8.dp))
|
||||
Row(
|
||||
Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(vertical = 8.dp),
|
||||
.padding(bottom=8.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.SpaceBetween
|
||||
) {
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
Reference in New Issue
Block a user