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>
|
||||||
|
|
||||||
|  |  |
|
|  |  |
|
||||||
|:---------------------------------------:|:-----------------------------------------:|
|
| :----------------------------------------------------------------: | :----------------------------------------------------------------: |
|
||||||
|  |  |
|
|  |  |
|
||||||
|  |  |
|
|  |  |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
<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
|
## 🎉 Features
|
||||||
|
|
||||||
- 📝 **Sleek, Minimalistic Design** with Material You (Material 3)
|
- 📝 **Sleek, Minimalistic Design** with Material You (Material 3)
|
||||||
@@ -44,9 +55,11 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
## 🌎 Translations
|
## 🌎 Translations
|
||||||
|
|
||||||
English, Hindi, French, Portugal (Brazil), Russian, German, Spanish, Dutch
|
English, Hindi, French, Portugal (Brazil), Russian, German, Spanish, Dutch
|
||||||
|
|
||||||
## 🔎 Technical Details
|
## 🔎 Technical Details
|
||||||
|
|
||||||
- **Programming Languages**: Kotlin
|
- **Programming Languages**: Kotlin
|
||||||
- **Build Tool**: Gradle with Kotlin DSL
|
- **Build Tool**: Gradle with Kotlin DSL
|
||||||
- **Android Version**: The application targets Android SDK version 36 and is compatible with devices
|
- **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.
|
- **Java Version**: JVM Target 11.
|
||||||
|
|
||||||
## 🛠️ Architecture
|
## 🛠️ Architecture
|
||||||
|
|
||||||
- **MVI**: Model View ViewModel
|
- **MVI**: Model View ViewModel
|
||||||
|
|
||||||
## 📚 Libraries and Frameworks
|
## 📚 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
|
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.
|
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
|
## ⚠️ License
|
||||||
|
|
||||||
```text
|
```text
|
||||||
@@ -104,3 +128,8 @@ GNU General Public License for more details.
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
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.clickable
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.Spacer
|
import androidx.compose.foundation.layout.Spacer
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
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.draw.clip
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.layout.ContentScale
|
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 androidx.compose.ui.unit.dp
|
||||||
import coil.compose.AsyncImage
|
import coil.compose.AsyncImage
|
||||||
import com.flux.data.model.WorkspaceModel
|
import com.flux.data.model.WorkspaceModel
|
||||||
@@ -69,7 +72,9 @@ fun NoteDetailsTopBar(
|
|||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.background(
|
.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)
|
RoundedCornerShape(bottomStart = 32.dp, topStart = 32.dp)
|
||||||
)
|
)
|
||||||
.clip(RoundedCornerShape(bottomStart = 32.dp, topStart = 32.dp))
|
.clip(RoundedCornerShape(bottomStart = 32.dp, topStart = 32.dp))
|
||||||
@@ -82,7 +87,9 @@ fun NoteDetailsTopBar(
|
|||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.background(
|
.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)
|
RoundedCornerShape(bottomEnd = 32.dp, topEnd = 32.dp)
|
||||||
)
|
)
|
||||||
.clip(RoundedCornerShape(bottomEnd = 32.dp, topEnd = 32.dp))
|
.clip(RoundedCornerShape(bottomEnd = 32.dp, topEnd = 32.dp))
|
||||||
@@ -122,7 +129,9 @@ fun JournalDetailsTopBar(
|
|||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.background(
|
.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)
|
RoundedCornerShape(bottomStart = 32.dp, topStart = 32.dp)
|
||||||
)
|
)
|
||||||
.clip(RoundedCornerShape(bottomStart = 32.dp, topStart = 32.dp))
|
.clip(RoundedCornerShape(bottomStart = 32.dp, topStart = 32.dp))
|
||||||
@@ -135,7 +144,9 @@ fun JournalDetailsTopBar(
|
|||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.background(
|
.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)
|
RoundedCornerShape(bottomEnd = 32.dp, topEnd = 32.dp)
|
||||||
)
|
)
|
||||||
.clip(RoundedCornerShape(bottomEnd = 32.dp, topEnd = 32.dp))
|
.clip(RoundedCornerShape(bottomEnd = 32.dp, topEnd = 32.dp))
|
||||||
@@ -158,6 +169,7 @@ fun JournalDetailsTopBar(
|
|||||||
@Composable
|
@Composable
|
||||||
fun WorkspaceTopBar(
|
fun WorkspaceTopBar(
|
||||||
workspace: WorkspaceModel,
|
workspace: WorkspaceModel,
|
||||||
|
isFullView: Boolean,
|
||||||
onBackPressed: () -> Unit,
|
onBackPressed: () -> Unit,
|
||||||
onDelete: () -> Unit,
|
onDelete: () -> Unit,
|
||||||
onTogglePinned: () -> Unit,
|
onTogglePinned: () -> Unit,
|
||||||
@@ -167,23 +179,25 @@ fun WorkspaceTopBar(
|
|||||||
onEditLabel: () -> Unit,
|
onEditLabel: () -> Unit,
|
||||||
onRemoveCover: () -> Unit
|
onRemoveCover: () -> Unit
|
||||||
) {
|
) {
|
||||||
Box(
|
if (isFullView) {
|
||||||
modifier = Modifier
|
Box(
|
||||||
.fillMaxWidth()
|
modifier = Modifier
|
||||||
.height(if (workspace.cover.isNotBlank()) 160.dp else 80.dp)
|
.fillMaxWidth()
|
||||||
) {
|
.height(if (workspace.cover.isNotBlank()) 160.dp else 80.dp)
|
||||||
// Background image
|
) {
|
||||||
AsyncImage(
|
// Background image
|
||||||
model = workspace.cover,
|
AsyncImage(
|
||||||
contentDescription = null,
|
model = workspace.cover,
|
||||||
contentScale = ContentScale.Crop,
|
contentDescription = null,
|
||||||
modifier = Modifier.matchParentSize()
|
contentScale = ContentScale.Crop,
|
||||||
)
|
modifier = Modifier.matchParentSize()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// Overlay TopAppBar
|
// Overlay TopAppBar
|
||||||
TopAppBar(
|
TopAppBar(
|
||||||
colors = TopAppBarDefaults.topAppBarColors(containerColor = Color.Transparent),
|
colors = TopAppBarDefaults.topAppBarColors(containerColor = Color.Transparent),
|
||||||
title = {},
|
title = { },
|
||||||
navigationIcon = {
|
navigationIcon = {
|
||||||
IconButton(
|
IconButton(
|
||||||
onClick = onBackPressed,
|
onClick = onBackPressed,
|
||||||
@@ -207,8 +221,56 @@ fun WorkspaceTopBar(
|
|||||||
onTogglePinned = onTogglePinned,
|
onTogglePinned = onTogglePinned,
|
||||||
onToggleLock = onToggleLock
|
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
|
onCloseClick: () -> Unit
|
||||||
) {
|
) {
|
||||||
Row(
|
Row(
|
||||||
Modifier.fillMaxWidth().padding(vertical = 8.dp),
|
Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.padding(bottom = 8.dp),
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
horizontalArrangement = Arrangement.SpaceBetween
|
horizontalArrangement = Arrangement.SpaceBetween
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -253,7 +253,7 @@ fun Themes(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
stringResource(R.string.Themes),
|
stringResource(R.string.color_palette),
|
||||||
color = MaterialTheme.colorScheme.primary,
|
color = MaterialTheme.colorScheme.primary,
|
||||||
fontWeight = FontWeight.Bold,
|
fontWeight = FontWeight.Bold,
|
||||||
fontSize = 20.sp
|
fontSize = 20.sp
|
||||||
|
|||||||
@@ -9,7 +9,9 @@ import androidx.activity.result.contract.ActivityResultContracts
|
|||||||
import androidx.annotation.RequiresApi
|
import androidx.annotation.RequiresApi
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
|
import androidx.compose.foundation.layout.Spacer
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
@@ -207,6 +209,7 @@ fun WorkspaceDetails(
|
|||||||
topBar = {
|
topBar = {
|
||||||
WorkspaceTopBar(
|
WorkspaceTopBar(
|
||||||
workspace,
|
workspace,
|
||||||
|
settings.data.workspaceGridColumns==1,
|
||||||
onBackPressed = { navController.popBackStack() },
|
onBackPressed = { navController.popBackStack() },
|
||||||
onDelete = { showDeleteWorkspaceDialog = true },
|
onDelete = { showDeleteWorkspaceDialog = true },
|
||||||
onTogglePinned = {
|
onTogglePinned = {
|
||||||
@@ -239,29 +242,32 @@ fun WorkspaceDetails(
|
|||||||
LazyColumn(
|
LazyColumn(
|
||||||
Modifier
|
Modifier
|
||||||
.padding(innerPadding)
|
.padding(innerPadding)
|
||||||
.padding(horizontal = 12.dp, vertical = 8.dp)
|
.padding(horizontal = 12.dp).padding(bottom = 8.dp)
|
||||||
) {
|
) {
|
||||||
item {
|
if(settings.data.workspaceGridColumns==1){
|
||||||
IconButton(onClick = { editIconSheet = true }) {
|
item {
|
||||||
Icon(
|
IconButton(onClick = { editIconSheet = true }) {
|
||||||
icons[workspace.icon],
|
Icon(
|
||||||
null,
|
icons[workspace.icon],
|
||||||
modifier = Modifier.size(48.dp),
|
null,
|
||||||
tint = MaterialTheme.colorScheme.primary
|
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 {
|
item {
|
||||||
Text(
|
if(settings.data.workspaceGridColumns==1) Spacer(Modifier.height(8.dp))
|
||||||
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 (spacesList.find { it.id == selectedSpaceId.intValue }?.title == stringResource(R.string.Notes) && selectedNotes.isNotEmpty()) {
|
if (spacesList.find { it.id == selectedSpaceId.intValue }?.title == stringResource(R.string.Notes) && selectedNotes.isNotEmpty()) {
|
||||||
SelectedBar(
|
SelectedBar(
|
||||||
true,
|
true,
|
||||||
@@ -286,10 +292,11 @@ fun WorkspaceDetails(
|
|||||||
onCloseClick = { onNotesEvents(NotesEvents.ClearSelection) }
|
onCloseClick = { onNotesEvents(NotesEvents.ClearSelection) }
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
if(settings.data.workspaceGridColumns==1) Spacer(Modifier.height(8.dp))
|
||||||
Row(
|
Row(
|
||||||
Modifier
|
Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(vertical = 8.dp),
|
.padding(bottom=8.dp),
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
horizontalArrangement = Arrangement.SpaceBetween
|
horizontalArrangement = Arrangement.SpaceBetween
|
||||||
) {
|
) {
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
Reference in New Issue
Block a user