add copy icon

This commit is contained in:
Minecon724 2024-08-02 17:05:48 +02:00
parent 2ed3d5da54
commit 9d0401c0f6
Signed by: Minecon724
GPG key ID: 3CCC4D267742C8E8
3 changed files with 19 additions and 6 deletions

View file

@ -101,6 +101,13 @@ fun RentedInstanceCard(
Text("ssh") Text("ssh")
Spacer(modifier = Modifier.size(4.dp)) // necessary because TODO the termux icon has padding Spacer(modifier = Modifier.size(4.dp)) // necessary because TODO the termux icon has padding
} else { } else {
Spacer(modifier = Modifier.size(1.dp)) // TODO make this not needed?
Icon(
modifier = Modifier.size(12.dp),
painter = painterResource(id = R.drawable.copy_regular), // TODO copy icon here
contentDescription = "Copy command"
)
Spacer(modifier = Modifier.size(6.dp))
Text("ssh") Text("ssh")
} }
} }

View file

@ -13,17 +13,17 @@ 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.layout.width import androidx.compose.foundation.layout.width
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.Home
import androidx.compose.material3.Card import androidx.compose.material3.Card
import androidx.compose.material3.FilledTonalButton import androidx.compose.material3.FilledTonalButton
import androidx.compose.material3.Icon import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton import androidx.compose.material3.IconButton
import androidx.compose.material3.LocalTextStyle
import androidx.compose.material3.Scaffold import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import eu.m724.vastapp.R import eu.m724.vastapp.R
@ -114,12 +114,13 @@ fun SshNotInstalled(onCopyButtonClick: (String) -> Unit, onOpenTermuxButton: ()
Spacer(modifier = Modifier.width(8.dp)) Spacer(modifier = Modifier.width(8.dp))
IconButton( IconButton(
modifier = Modifier.size(24.dp), modifier = Modifier.size(24.dp),
onClick = { onCopyButtonClick("pkg install dropbear") } onClick = { onCopyButtonClick("pkg install dropbear") },
) { ) {
Icon( Icon(
modifier = Modifier.size(24.dp), modifier = Modifier.size(20.dp),
imageVector = Icons.Outlined.Home, // TODO copy icon here painter = painterResource(id = R.drawable.copy_regular),
contentDescription = "Copy command" contentDescription = "Copy command",
tint = LocalTextStyle.current.color
) )
} }
} }

View file

@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="200dp" android:viewportHeight="512" android:viewportWidth="448" android:width="175dp">
<path android:fillColor="#FF000000" android:pathData="M384,336l-192,0c-8.8,0 -16,-7.2 -16,-16l0,-256c0,-8.8 7.2,-16 16,-16l140.1,0L400,115.9 400,320c0,8.8 -7.2,16 -16,16zM192,384l192,0c35.3,0 64,-28.7 64,-64l0,-204.1c0,-12.7 -5.1,-24.9 -14.1,-33.9L366.1,14.1c-9,-9 -21.2,-14.1 -33.9,-14.1L192,0c-35.3,0 -64,28.7 -64,64l0,256c0,35.3 28.7,64 64,64zM64,128c-35.3,0 -64,28.7 -64,64L0,448c0,35.3 28.7,64 64,64l192,0c35.3,0 64,-28.7 64,-64l0,-32 -48,0 0,32c0,8.8 -7.2,16 -16,16L64,464c-8.8,0 -16,-7.2 -16,-16l0,-256c0,-8.8 7.2,-16 16,-16l32,0 0,-48 -32,0z"/>
</vector>