Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions composeApp/src/androidMain/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@
<category android:name="android.intent.category.DEFAULT" />

<data android:mimeType="text/plain" />
<data android:mimeType="image/*" />
<data android:mimeType="application/pdf" />
</intent-filter>
<!--
<data android:mimeType="image/*" />
<data android:mimeType="application/pdf" />
-->
</intent-filter>

<!-- Deep Links -->
<!-- Deep Links -->
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package io.middlepoint.morestuff.shared.ui.components

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
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.BottomSheetDefaults
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.ModalBottomSheet
Expand Down Expand Up @@ -86,15 +84,9 @@ fun CreateScopeBottomSheet(
modifier = Modifier
.fillMaxWidth()
.padding(8.dp),
verticalAlignment = Alignment.CenterVertically
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.End
) {
Spacer(modifier = Modifier.weight(1f))
Box(
modifier = Modifier.weight(1f),
contentAlignment = Alignment.Center
) {
BottomSheetDefaults.DragHandle()
}
TextButton(
onClick = {
if (scopeTitle.isNotBlank()) {
Expand All @@ -110,7 +102,7 @@ fun CreateScopeBottomSheet(
}
) {
Column(
modifier = Modifier.fillMaxWidth(),
modifier = Modifier.fillMaxWidth().height(150.dp),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Center
) {
Expand All @@ -134,7 +126,8 @@ fun CreateScopeBottomSheet(

Row(
modifier = Modifier
.fillMaxWidth(),
.fillMaxWidth()
.padding(top = 8.dp),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.End
) {
Expand All @@ -146,7 +139,7 @@ fun CreateScopeBottomSheet(
fontSize = 18.sp,
textAlign = TextAlign.End
),
modifier = Modifier.padding(end = 16.dp)
modifier = Modifier.padding(end = 16.dp, bottom = 16.dp)
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fun UserTextInput(
backgroundColor: Color = MaterialTheme.colorScheme.background,
focusRequester: FocusRequester = remember { FocusRequester() },
startWithFocus: Boolean = false,
isAIEnabled: Boolean = false,
//isAIEnabled: Boolean = false,
inputHint: String = stringResource(Res.string.task_chat_input_hint)
) {
val a11ylabel = stringResource(Res.string.textfield_desc)
Expand All @@ -84,7 +84,7 @@ fun UserTextInput(
label = "neonOffset"
)

val aiEnabledTransition = updateTransition(
/* val aiEnabledTransition = updateTransition(
targetState = isAIEnabled,
label = "aiEnabledTransition"
)
Expand All @@ -97,7 +97,7 @@ fun UserTextInput(
val borderAlpha by aiEnabledTransition.animateFloat(
label = "borderAlpha",
transitionSpec = { tween(300) }
) { enabled -> if (enabled) 1f else 0f }
) { enabled -> if (enabled) 1f else 0f }*/


LaunchedEffect(Unit) {
Expand All @@ -106,7 +106,7 @@ fun UserTextInput(
}
}

val animatedBorder = if (borderAlpha > 0f) {
/* val animatedBorder = if (borderAlpha > 0f) {
val animatedNeonGradient = Brush.linearGradient(
colors = listOf(
Color(0xFFBDC6FF).copy(alpha = borderAlpha),
Expand All @@ -117,7 +117,7 @@ fun UserTextInput(
end = Offset(animatedOffset + 200f, 100f)
)
BorderStroke(borderWidth, animatedNeonGradient)
} else null
} else null*/

Surface(
modifier = modifier
Expand All @@ -126,7 +126,7 @@ fun UserTextInput(
.animateContentSize(),
shape = RoundedCornerShape(42),
color = backgroundColor,
border = animatedBorder,
// border = animatedBorder,
) {
Row(
modifier = Modifier
Expand Down Expand Up @@ -167,19 +167,19 @@ fun UserTextInput(
decorationBox = { innerTextField ->
Box(
contentAlignment = Alignment.CenterStart,
modifier = Modifier.padding(bottom = 6.dp, top = 6.dp)
modifier = Modifier.padding(bottom = 6.dp, top = 6.dp, start = 6.dp )
) {
if (value.text.isEmpty()) {
Crossfade(targetState = isAIEnabled, animationSpec = tween(350)) { aiEnabled ->
// Crossfade(targetState = isAIEnabled, animationSpec = tween(350)) { aiEnabled ->
Text(
text = if (!aiEnabled) inputHint else stringResource(Res.string.chat_whit_ai),
text = /*if (!aiEnabled)*/ inputHint/* else stringResource(Res.string.chat_whit_ai)*/,
modifier = Modifier.align(Alignment.CenterStart),
style = LocalTextStyle.current.copy(
color = LocalContentColor.current.copy(alpha = 0.6f),
fontSize = 18.sp
)
)
}
// }
}
innerTextField()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ private fun TaskChatContent(
onUpdateMessage = { content ->
onEvent(TaskChatEvent.UpdateMessageContent(content))
},
isAIEnabled = isAIEnabled,
//isAIEnabled = isAIEnabled,
onToggleAI = { onEvent(TaskChatEvent.ActivateAI) },
modifier = Modifier
.fillMaxWidth()
Expand Down Expand Up @@ -503,7 +503,7 @@ private fun TaskChatInput(
editingContent: String = "",
onCancelEdit: () -> Unit = {},
onUpdateMessage: (String) -> Unit = {},
isAIEnabled: Boolean = false,
//isAIEnabled: Boolean = false,
onToggleAI: () -> Unit = {}
) {
val isTextEmpty = remember { mutableStateOf(editingContent.isEmpty()) }
Expand Down Expand Up @@ -550,7 +550,7 @@ private fun TaskChatInput(
CompositionLocalProvider(LocalBoxWeight provides weight) {
UserTextInput(
value = userInputValue,
isAIEnabled = isAIEnabled,
//isAIEnabled = isAIEnabled,
onValueChange = {
userInputValue = it
isTextEmpty.value = it.text.isBlank()
Expand All @@ -561,7 +561,7 @@ private fun TaskChatInput(
},
backgroundColor = MaterialTheme.colorScheme.surfaceVariant,
modifier = Modifier.focusRequester(focusRequester),
leadingContent = {
/* leadingContent = {
IconButton(
onClick = onToggleAI,
) {
Expand All @@ -582,15 +582,26 @@ private fun TaskChatInput(
)
}
}
},
},*/
actionsContent = {
Row(
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.End,
modifier = Modifier.fillMaxWidth()
) {
Box(modifier = Modifier.weight(1f), contentAlignment = Alignment.CenterEnd) {
this@Row.AnimatedVisibility(
SendIcon(onClick = {
if (editingMessageId != null) {
onUpdateMessage(userInputValue.text)
onCancelEdit()
} else {
sendTaskMessage(userInputValue.text)
userInputValue = TextFieldValue("")
isTextEmpty.value = true
showSendIcon.value = false
}
})
/*this@Row.AnimatedVisibility(
visible = isTextEmpty.value && editingMessageId == null,
enter = fadeIn() + scaleIn(),
exit = fadeOut() + scaleOut()
Expand All @@ -603,9 +614,9 @@ private fun TaskChatInput(
contentDescription = stringResource(Res.string.cd_select_images)
)
}
}
}*/

this@Row.AnimatedVisibility(
/* this@Row.AnimatedVisibility(
visible = !isTextEmpty.value || editingMessageId != null,
enter = fadeIn() + scaleIn(),
exit = fadeOut() + scaleOut()
Expand All @@ -621,7 +632,7 @@ private fun TaskChatInput(
showSendIcon.value = false
}
})
}
}*/
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,10 @@ fun SettingsContent(
LanguageSettings(onClick = openAppSettings )
}

ApiKeySettings(
/* ApiKeySettings(
apiKey = model.apiKey,
onApiKeyChange = setApiKey
)
)*/


if (model.devSettings) {
Expand Down
7 changes: 5 additions & 2 deletions iosApp/MoreStuffShare/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@
<dict>
<key>NSExtensionActivationRule</key>
<dict>
<!--
<key>NSExtensionActivationSupportsFileWithMaxCount</key>
<integer>1</integer>
<key>NSExtensionActivationSupportsText</key>
<true/>
<key>NSExtensionActivationSupportsImageWithMaxCount</key>
<integer>1</integer>
-->
<key>NSExtensionActivationSupportsText</key>
<true/>

<key>NSExtensionActivationSupportsWebURLWithMaxCount</key>
<integer>1</integer>
<key>NSExtensionActivationSupportsWebPageWithMaxCount</key>
Expand Down
Loading