add copy icon
This commit is contained in:
parent
2ed3d5da54
commit
9d0401c0f6
3 changed files with 19 additions and 6 deletions
|
@ -101,6 +101,13 @@ fun RentedInstanceCard(
|
|||
Text("ssh")
|
||||
Spacer(modifier = Modifier.size(4.dp)) // necessary because TODO the termux icon has padding
|
||||
} 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")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,17 +13,17 @@ import androidx.compose.foundation.layout.height
|
|||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
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.FilledTonalButton
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.IconButton
|
||||
import androidx.compose.material3.LocalTextStyle
|
||||
import androidx.compose.material3.Scaffold
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import eu.m724.vastapp.R
|
||||
|
@ -114,12 +114,13 @@ fun SshNotInstalled(onCopyButtonClick: (String) -> Unit, onOpenTermuxButton: ()
|
|||
Spacer(modifier = Modifier.width(8.dp))
|
||||
IconButton(
|
||||
modifier = Modifier.size(24.dp),
|
||||
onClick = { onCopyButtonClick("pkg install dropbear") }
|
||||
onClick = { onCopyButtonClick("pkg install dropbear") },
|
||||
) {
|
||||
Icon(
|
||||
modifier = Modifier.size(24.dp),
|
||||
imageVector = Icons.Outlined.Home, // TODO copy icon here
|
||||
contentDescription = "Copy command"
|
||||
modifier = Modifier.size(20.dp),
|
||||
painter = painterResource(id = R.drawable.copy_regular),
|
||||
contentDescription = "Copy command",
|
||||
tint = LocalTextStyle.current.color
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
5
app/src/main/res/drawable/copy_regular.xml
Normal file
5
app/src/main/res/drawable/copy_regular.xml
Normal 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>
|
Loading…
Reference in a new issue