diff --git a/app/src/main/java/com/anytypeio/anytype/ui/settings/space/SpaceSettingsFragment.kt b/app/src/main/java/com/anytypeio/anytype/ui/settings/space/SpaceSettingsFragment.kt
index fbd18dca3b..7e8fbf6c07 100644
--- a/app/src/main/java/com/anytypeio/anytype/ui/settings/space/SpaceSettingsFragment.kt
+++ b/app/src/main/java/com/anytypeio/anytype/ui/settings/space/SpaceSettingsFragment.kt
@@ -103,7 +103,7 @@ class SpaceSettingsFragment : BaseBottomSheetComposeFragment() {
)
},
onDebugClicked = vm::onSpaceDebugClicked,
- onRandomGradientClicked = vm::onRandomSpaceGradientClicked,
+ onRemoveIconClicked = vm::onRemoveSpaceIconClicked,
onManageSharedSpaceClicked = vm::onManageSharedSpaceClicked,
onSharePrivateSpaceClicked = vm::onSharePrivateSpaceClicked,
onAddMoreSpacesClicked = vm::onAddMoreSpacesClicked,
diff --git a/feature-ui-settings/src/main/java/com/anytypeio/anytype/ui_settings/account/ProfileScreen.kt b/feature-ui-settings/src/main/java/com/anytypeio/anytype/ui_settings/account/ProfileScreen.kt
index a4b5e1af0d..7b7973c63c 100644
--- a/feature-ui-settings/src/main/java/com/anytypeio/anytype/ui_settings/account/ProfileScreen.kt
+++ b/feature-ui-settings/src/main/java/com/anytypeio/anytype/ui_settings/account/ProfileScreen.kt
@@ -47,7 +47,6 @@ import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.text.input.KeyboardType
import androidx.compose.ui.text.input.VisualTransformation
-import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.DpOffset
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
@@ -491,7 +490,7 @@ fun ProfileImageBlock(
},
) {
Text(
- text = stringResource(R.string.profile_settings_remove_image),
+ text = stringResource(R.string.remove_image),
style = BodyRegular,
color = colorResource(id = R.color.text_primary)
)
diff --git a/feature-ui-settings/src/main/java/com/anytypeio/anytype/ui_settings/main/MainSettingScreen.kt b/feature-ui-settings/src/main/java/com/anytypeio/anytype/ui_settings/main/MainSettingScreen.kt
index b58c0e409f..c63ae3294d 100644
--- a/feature-ui-settings/src/main/java/com/anytypeio/anytype/ui_settings/main/MainSettingScreen.kt
+++ b/feature-ui-settings/src/main/java/com/anytypeio/anytype/ui_settings/main/MainSettingScreen.kt
@@ -42,7 +42,7 @@ fun SpaceHeader(
icon: SpaceIconView?,
modifier: Modifier = Modifier,
onNameSet: (String) -> Unit,
- onRandomGradientClicked: () -> Unit,
+ onRemoveIconClicked: () -> Unit,
isEditEnabled: Boolean,
onSpaceImagePicked: (Uri) -> Unit
) {
@@ -90,18 +90,6 @@ fun SpaceHeader(
isSpaceIconMenuExpanded.value = false
}
) {
- DropdownMenuItem(
- onClick = {
- onRandomGradientClicked()
- isSpaceIconMenuExpanded.value = false
- },
- ) {
- Text(
- text = stringResource(R.string.space_settings_apply_random_gradient),
- style = BodyRegular,
- color = colorResource(id = R.color.text_primary)
- )
- }
if (ActivityResultContracts.PickVisualMedia.isPhotoPickerAvailable(context)) {
Divider(
thickness = 0.5.dp,
@@ -124,6 +112,18 @@ fun SpaceHeader(
)
}
}
+ DropdownMenuItem(
+ onClick = {
+ onRemoveIconClicked()
+ isSpaceIconMenuExpanded.value = false
+ },
+ ) {
+ Text(
+ text = stringResource(R.string.remove_image),
+ style = BodyRegular,
+ color = colorResource(id = R.color.text_primary)
+ )
+ }
}
}
}
diff --git a/feature-ui-settings/src/main/java/com/anytypeio/anytype/ui_settings/space/Settings.kt b/feature-ui-settings/src/main/java/com/anytypeio/anytype/ui_settings/space/Settings.kt
index 868783008b..06ae72ff36 100644
--- a/feature-ui-settings/src/main/java/com/anytypeio/anytype/ui_settings/space/Settings.kt
+++ b/feature-ui-settings/src/main/java/com/anytypeio/anytype/ui_settings/space/Settings.kt
@@ -65,7 +65,7 @@ fun SpaceSettingsScreen(
onNetworkIdClicked: (Id) -> Unit,
onCreatedByClicked: (Id) -> Unit,
onDebugClicked: () -> Unit,
- onRandomGradientClicked: () -> Unit,
+ onRemoveIconClicked: () -> Unit,
onSharePrivateSpaceClicked: () -> Unit,
onManageSharedSpaceClicked: () -> Unit,
onAddMoreSpacesClicked: () -> Unit,
@@ -91,7 +91,7 @@ fun SpaceSettingsScreen(
else -> null
},
onNameSet = onNameSet,
- onRandomGradientClicked = onRandomGradientClicked,
+ onRemoveIconClicked = onRemoveIconClicked,
isEditEnabled = when(state) {
is ViewState.Error -> false
ViewState.Init -> false
@@ -327,7 +327,7 @@ fun SpaceSettingsScreenPreview() {
onNetworkIdClicked = {} ,
onCreatedByClicked = {},
onDebugClicked = {},
- onRandomGradientClicked = {},
+ onRemoveIconClicked = {},
onManageSharedSpaceClicked = {},
onSharePrivateSpaceClicked = {},
onAddMoreSpacesClicked = {},
diff --git a/localization/src/main/res/values-be-rBY/strings.xml b/localization/src/main/res/values-be-rBY/strings.xml
index fc494231d4..2743a129f7 100644
--- a/localization/src/main/res/values-be-rBY/strings.xml
+++ b/localization/src/main/res/values-be-rBY/strings.xml
@@ -46,7 +46,7 @@
Apply random solid color
Загрузіць відарыс
Загрузіць відарыс
- Remove image
+ Remove image
Выдаліць прастору
Вы можаце бясплатна захоўваць да %1$s вашых файлаў на нашым зашыфраваным вузле рэзервовага капіравання. Калі вы вычарпаеце ліміт, файлы будуць захоўвацца толькі лакальна.
Каб зэканоміць месца на лакальнай прыладзе, вы можаце загрузіць усе свае файлы ў наш зашыфраваны вузел рэзервовага капіявання. Файлы будуць загружаны назад, калі вы іх адкрыеце.
diff --git a/localization/src/main/res/values-de-rDE/strings.xml b/localization/src/main/res/values-de-rDE/strings.xml
index 612511ba86..6fc63ac0ad 100644
--- a/localization/src/main/res/values-de-rDE/strings.xml
+++ b/localization/src/main/res/values-de-rDE/strings.xml
@@ -46,7 +46,7 @@
Zufällige Volltonfarbe verwenden
Bild hochladen
Bild hochladen
- Bild entfernen
+ Bild entfernen
Space löschen
Du kannst bis zu %1$s deiner Dateien auf unserem verschlüsselten und kostenlosen Backup-Knoten speichern. Wenn das Limit erreicht wurde, werden Dateien nur noch lokal gespeichert.
Um Platz auf deinem Gerät zu sparen, können alle deine Dateien auf unseren verschlüsselten Backup-Knoten ausgelagert werden. Die Dateien werden beim Öffnen dann wieder heruntergeladen.
diff --git a/localization/src/main/res/values-es-rES/strings.xml b/localization/src/main/res/values-es-rES/strings.xml
index 2f84ae4153..ceb79ca409 100644
--- a/localization/src/main/res/values-es-rES/strings.xml
+++ b/localization/src/main/res/values-es-rES/strings.xml
@@ -46,7 +46,7 @@
Aplicar color sólido aleatorio
Cargar una imagen
Cargar una imagen
- Eliminar imagen
+ Eliminar imagen
Eliminar espacio
Puedes almacenar gratuitamente hasta %1$s de archivos en nuestro nodo de respaldo cifrado. Si llegas al límite, los archivos se almacenarán solo localmente.
Para ahorrar espacio en tu dispositivo local, puedes guardar todos tus archivos en nuestro nodo de respaldo cifrado. Los archivos se cargarán de nuevo cuando los abras.
diff --git a/localization/src/main/res/values-fr-rFR/strings.xml b/localization/src/main/res/values-fr-rFR/strings.xml
index 4d1b4679d1..41523cc08e 100644
--- a/localization/src/main/res/values-fr-rFR/strings.xml
+++ b/localization/src/main/res/values-fr-rFR/strings.xml
@@ -46,7 +46,7 @@
Appliquer une couleur solide aléatoire
Upload image
Upload image
- Supprimer l’image
+ Supprimer l’image
Supprimer l\'espace
Vous pouvez stocker gratuitement jusqu\'à %1$s de vos fichiers sur notre nœud de sauvegarde chiffré. Si vous atteignez la limite, les fichiers ne seront stockés que localement.
Afin d\'économiser de l\'espace sur votre appareil, vous pouvez décharger tous vos fichiers vers notre nœud de sauvegarde chiffré. Les fichiers seront rechargés lorsque vous les ouvrirez.
diff --git a/localization/src/main/res/values-in-rID/strings.xml b/localization/src/main/res/values-in-rID/strings.xml
index d9fc8b1493..92189f4a7f 100644
--- a/localization/src/main/res/values-in-rID/strings.xml
+++ b/localization/src/main/res/values-in-rID/strings.xml
@@ -46,7 +46,7 @@
Beri warna polos acak
Upload image
Upload image
- Hapus gambar
+ Hapus gambar
Hapus ruang
Kamu bisa menyimpan berkasmu hingga %1$s di simpul cadangan terenkripsi kami secara gratis. Jika melewati batas, berkasmu hanya akan disimpan secara lokal.
Untuk menghemat penyimpanan ruang pada perangkat lokal, anda dapat melepaskan semua berkas ke simpul cadangan terenkripsi kami. Berkas - berkas akan diunduh kembali saat kamu membuka mereka.
diff --git a/localization/src/main/res/values-it-rIT/strings.xml b/localization/src/main/res/values-it-rIT/strings.xml
index 406c9a446a..dd35f06493 100644
--- a/localization/src/main/res/values-it-rIT/strings.xml
+++ b/localization/src/main/res/values-it-rIT/strings.xml
@@ -46,7 +46,7 @@
Applica colore tinta unita casuale
Upload image
Upload image
- Rimuovi immagine
+ Rimuovi immagine
Elimina spazio
Puoi archiviare gratuitamente fino a %1$s di file personali sul nostro nodo di backup crittografato. Se raggiungi il limite, i file verranno archiviati solo localmente.
Per risparmiare spazio sul tuo dispositivo locale, puoi liberare tutti i tuoi file trasferendoli al nostro nodo di backup criptato. I file verranno ricaricati quando li apri
diff --git a/localization/src/main/res/values-nl-rNL/strings.xml b/localization/src/main/res/values-nl-rNL/strings.xml
index a52d4bf14a..bb24bb64f8 100644
--- a/localization/src/main/res/values-nl-rNL/strings.xml
+++ b/localization/src/main/res/values-nl-rNL/strings.xml
@@ -46,7 +46,7 @@
Pas willekeurige effen kleur toe
Upload afbeelding
Upload afbeelding
- Remove image
+ Remove image
Verwijder ruimte
Je kunt maximaal %1$s van je bestanden gratis opslaan op onze versleutelde back-up node. Als de limiet is bereikt, zullen bestanden alleen lokaal worden opgeslagen.
Om ruimte op je lokale apparaat te besparen, kun je al je bestanden naar onze versleutelde back-upnode verplaatsen. De bestanden worden opnieuw geladen wanneer je ze opent.
diff --git a/localization/src/main/res/values-no-rNO/strings.xml b/localization/src/main/res/values-no-rNO/strings.xml
index 803fd6250c..151fbcd738 100644
--- a/localization/src/main/res/values-no-rNO/strings.xml
+++ b/localization/src/main/res/values-no-rNO/strings.xml
@@ -46,7 +46,7 @@
Apply random solid color
Last opp bilde
Last opp bilde
- Remove image
+ Remove image
Slett rom
You can store up to %1$s of your files on our encrypted backup node for free. If you reach the limit, files will be stored only locally.
For å spare plass på den lokale enheten din, kan du slette alle lokale filer og beholde dem på vår krypterte sikkerhetskopi-node. Filene vil bli lastet ned igjen når du åpner dem.
diff --git a/localization/src/main/res/values-pt-rBR/strings.xml b/localization/src/main/res/values-pt-rBR/strings.xml
index d5c53cb4f0..3fde4d64d4 100644
--- a/localization/src/main/res/values-pt-rBR/strings.xml
+++ b/localization/src/main/res/values-pt-rBR/strings.xml
@@ -46,7 +46,7 @@
Apply random solid color
Carregue uma imagem
Carregue uma imagem
- Remove image
+ Remove image
Excluir Espaço
Você pode armazenar até %1$s de seus arquivos em nosso nó de backup criptografado gratuitamente. Se você atingir o limite, os arquivos serão armazenados apenas localmente.
Para economizar espaço no seu dispositivo local, você pode descarregar todos os seus arquivos no nosso servidor de backup criptografado. Os arquivos serão carregados novamente quando forem abertos.
diff --git a/localization/src/main/res/values-ru-rRU/strings.xml b/localization/src/main/res/values-ru-rRU/strings.xml
index e434c88df8..acc27d273f 100644
--- a/localization/src/main/res/values-ru-rRU/strings.xml
+++ b/localization/src/main/res/values-ru-rRU/strings.xml
@@ -46,7 +46,7 @@
Применить случайный сплошной цвет
Загрузить изображение
Загрузить изображение
- Удалить изображение
+ Remove image
Удалить пространство
Вы можете бесплатно хранить до %1$s ваших файлов на нашем узле резервного копирования. При достижении лимита файлы будут храниться только локально.
Чтобы сохранить место на вашем локальном устройстве, вы можете выгрузить все ваши файлы в наш зашифрованный узел резервного копирования. Файлы будут загружены обратно, когда вы откроете их.
diff --git a/localization/src/main/res/values-tr-rTR/strings.xml b/localization/src/main/res/values-tr-rTR/strings.xml
index 1d0a8be928..d04d098834 100644
--- a/localization/src/main/res/values-tr-rTR/strings.xml
+++ b/localization/src/main/res/values-tr-rTR/strings.xml
@@ -46,7 +46,7 @@
Rastgele düz renk uygula
Resim yükle
Resim yükle
- Görseli kaldır
+ Görseli kaldır
Alanı sil
Dosyalarınızın %1$s kadarını şifrelenmiş yedekleme düğümümüzde ücretsiz olarak saklayabilirsiniz. Sınıra ulaşırsanız dosyalar yalnızca yerel olarak depolanacaktır.
Yerel cihazınızda yer kazanmak için tüm dosyalarınızı şifrelenmiş yedekleme düğümümüze aktarabilirsiniz. Dosyaları açtığınızda geri yüklenecektir.
diff --git a/localization/src/main/res/values-uk-rUA/strings.xml b/localization/src/main/res/values-uk-rUA/strings.xml
index d29233dde2..e237926bc0 100644
--- a/localization/src/main/res/values-uk-rUA/strings.xml
+++ b/localization/src/main/res/values-uk-rUA/strings.xml
@@ -46,7 +46,7 @@
Apply random solid color
Upload image
Upload image
- Remove image
+ Remove image
Видалити простір
You can store up to %1$s of your files on our encrypted backup node for free. If you reach the limit, files will be stored only locally.
Щоб заощадити місце на вашому локальному пристрої, ви можете вивантажити всі ваші файли на наш зашифрований вузол резервного копіювання. Файли будуть завантажені назад, коли ви їх відкриєте.
diff --git a/localization/src/main/res/values-zh-rCN/strings.xml b/localization/src/main/res/values-zh-rCN/strings.xml
index 509d4c0eab..30a3d67540 100644
--- a/localization/src/main/res/values-zh-rCN/strings.xml
+++ b/localization/src/main/res/values-zh-rCN/strings.xml
@@ -46,7 +46,7 @@
应用随机纯色
上传图像
上传图像
- Remove image
+ Remove image
删除空间
您可以在我们的节点上免费加密备份存储多达 %1$s 的文件。如果达到限制,文件将仅存储在本地。
为了节省本地设备上的空间,您可以将所有文件卸载到我们的加密备份节点。打开文件时,文件将被重新加载。
diff --git a/localization/src/main/res/values-zh-rTW/strings.xml b/localization/src/main/res/values-zh-rTW/strings.xml
index ad0e0d51c9..81ee8492a7 100644
--- a/localization/src/main/res/values-zh-rTW/strings.xml
+++ b/localization/src/main/res/values-zh-rTW/strings.xml
@@ -46,7 +46,7 @@
Apply random solid color
上傳圖片
上傳圖片
- Remove image
+ Remove image
刪除空間
您目前擁有 %1$s 的加密節點儲存空間,您可以將檔案備份到我們的節點當中。 當儲存空間容量到達上限,新的檔案只能存放在您的本地儲存區中。
為了節省本地設備上的空間,您可以將所有檔案傳輸到我們的加密備份節點。 當您打開這些檔案時,它們將被重新載入。
diff --git a/localization/src/main/res/values/strings.xml b/localization/src/main/res/values/strings.xml
index eec0d18594..de8377237c 100644
--- a/localization/src/main/res/values/strings.xml
+++ b/localization/src/main/res/values/strings.xml
@@ -62,7 +62,7 @@
Apply random solid color
Upload image
Upload image
- Remove image
+ Remove image
Delete space
You can store up to %1$s of your files on our encrypted backup node for free. If you reach the limit, files will be stored only locally.
In order to save space on your local device, you can offload all your files to our encrypted backup node. The files will be loaded back when you open them.
diff --git a/presentation/src/main/java/com/anytypeio/anytype/presentation/spaces/SpaceSettingsViewModel.kt b/presentation/src/main/java/com/anytypeio/anytype/presentation/spaces/SpaceSettingsViewModel.kt
index b0c08a7236..7b68edee05 100644
--- a/presentation/src/main/java/com/anytypeio/anytype/presentation/spaces/SpaceSettingsViewModel.kt
+++ b/presentation/src/main/java/com/anytypeio/anytype/presentation/spaces/SpaceSettingsViewModel.kt
@@ -21,7 +21,6 @@ import com.anytypeio.anytype.core_models.ext.isPossibleToUpgrade
import com.anytypeio.anytype.core_models.membership.MembershipUpgradeReason
import com.anytypeio.anytype.core_models.membership.TierId
import com.anytypeio.anytype.core_models.multiplayer.ParticipantStatus
-import com.anytypeio.anytype.core_models.multiplayer.SpaceAccessType
import com.anytypeio.anytype.core_models.multiplayer.SpaceMemberPermissions
import com.anytypeio.anytype.core_models.primitives.SpaceId
import com.anytypeio.anytype.core_utils.ui.ViewState
@@ -172,13 +171,13 @@ class SpaceSettingsViewModel(
proceedWithSpaceDebug()
}
- fun onRandomSpaceGradientClicked() {
+ fun onRemoveSpaceIconClicked() {
viewModelScope.launch {
val config = spaceConfig
if (config != null) {
setSpaceDetails.async(
SetSpaceDetails.Params(
- space = SpaceId(config.space),
+ space = params.space,
details = mapOf(
Relations.ICON_OPTION to spaceGradientProvider.randomId().toDouble(),
Relations.ICON_IMAGE to null,