Skip to content

Commit

Permalink
Added more Accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
aritra-tech committed Nov 9, 2024
1 parent 6f4a326 commit da00797
Show file tree
Hide file tree
Showing 16 changed files with 405 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ enum class AccountType(val text: String) {
SLACK("Slack"),
TELEGRAM("Telegram"),
DISCORD("Discord"),
SIGNAL("Signal"),
LINE("Line"),
WECHAT("WeChat"),
SKYPE("Skype"),
ZOOM("Zoom"),
STACKOVERFLOW("Stack Overflow"),
MEDIUM("Medium"),
GITHUB("GitHub"),
GITLAB("GitLab"),
MICROSOFTONEDRIVE("Microsoft OneDrive"),
DROPBOX("DropBox"),
GOOGLEDRIVE("Google Drive"),
DRIBBLE("Dribble"),
BEHANCE("Behance"),
REDDIT("Reddit"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import com.aritradas.uncrack.util.UtilsKt.getCommunitiesAccounts
import com.aritradas.uncrack.util.UtilsKt.getCrowdSourcingAccounts
import com.aritradas.uncrack.util.UtilsKt.getPortfolioAccounts
import com.aritradas.uncrack.util.UtilsKt.getSocialAccounts
import com.aritradas.uncrack.util.UtilsKt.getWorkAccounts

@OptIn(ExperimentalMaterial3Api::class)
@Composable
Expand Down Expand Up @@ -78,6 +79,31 @@ fun AccountSelectionScreen(
}
}

item {
Spacer(modifier = Modifier.height(10.dp))

Text(
text = stringResource(id = R.string.work),
style = medium20.copy(Color.Black)
)
Spacer(modifier = Modifier.height(10.dp))
}

items(getWorkAccounts().size) { index ->
val entry = getWorkAccounts().entries.elementAt(index)
val accountText = entry.key
val iconId = entry.value
val category = stringResource(id = R.string.work)

AccountCard(
icon = iconId,
text = accountText.text,
) {
addEditViewModel.resetState()
goToAddPasswordScreen(iconId, accountText.text, category)
}
}

item {
Spacer(modifier = Modifier.height(10.dp))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ fun VaultScreen(
placeholder = {
Row {
Text(
text = "Search here ",
text = "Search for ",
style = normal16.copy(OnSurfaceVariantLight),
)
TypewriterText(texts = listOf(
Expand Down
29 changes: 28 additions & 1 deletion app/src/main/java/com/aritradas/uncrack/util/UtilsKt.kt
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,16 @@ object UtilsKt {
)
}

fun getWorkAccounts(): Map<AccountType, Int> {
return mapOf(
AccountType.MICROSOFTONEDRIVE to R.drawable.microsoft_onedrive,
AccountType.DROPBOX to R.drawable.dropbox_new,
AccountType.GOOGLEDRIVE to R.drawable.google_drive,
AccountType.MEDIUM to R.drawable.medium,
AccountType.GITHUB to R.drawable.github,
AccountType.GITLAB to R.drawable.gitlab,
)
}
fun getCrowdSourcingAccounts(): Map<AccountType, Int> {
return mapOf(
AccountType.BUYMEACOFFEE to R.drawable.new_buy_me_a_coffee,
Expand All @@ -134,6 +144,11 @@ object UtilsKt {
AccountType.SLACK to R.drawable.slack,
AccountType.TELEGRAM to R.drawable.telegram,
AccountType.DISCORD to R.drawable.new_discord,
AccountType.SIGNAL to R.drawable.signal,
AccountType.LINE to R.drawable.line,
AccountType.ZOOM to R.drawable.zoom,
AccountType.SKYPE to R.drawable.skype,
AccountType.WECHAT to R.drawable.wechat
)
}

Expand All @@ -148,7 +163,8 @@ object UtilsKt {
return mapOf(
AccountType.REDDIT to R.drawable.reddit,
AccountType.MEETUP to R.drawable.meetup,
AccountType.PINTEREST to R.drawable.pinterest
AccountType.PINTEREST to R.drawable.pinterest,
AccountType.STACKOVERFLOW to R.drawable.stackoverflow
)
}

Expand All @@ -161,6 +177,17 @@ object UtilsKt {
"Snapchat" -> painterResource(id = R.drawable.snapchat)
"Twitter" -> painterResource(id = R.drawable.twitter)
"Messenger" -> painterResource(id = R.drawable.messenger)
"Microsoft OneDrive" -> painterResource(id = R.drawable.microsoft_onedrive)
"DropBox" -> painterResource(id = R.drawable.dropbox_new)
"Google Drive" -> painterResource(id = R.drawable.google_drive)
"Medium" -> painterResource(id = R.drawable.medium)
"GitHub" -> painterResource(id = R.drawable.github)
"GitLab" -> painterResource(id = R.drawable.gitlab)
"Signal" -> painterResource(id = R.drawable.signal)
"Line" -> painterResource(id = R.drawable.line)
"Zoom" -> painterResource(id = R.drawable.zoom)
"Skype" -> painterResource(id = R.drawable.skype)
"WeChat" -> painterResource(id = R.drawable.wechat)
"Buy Me a Coffee" -> painterResource(id = R.drawable.new_buy_me_a_coffee)
"Patreon" -> painterResource(id = R.drawable.patreon)
"Slack" -> painterResource(id = R.drawable.slack)
Expand Down
17 changes: 17 additions & 0 deletions app/src/main/res/drawable/dropbox_new.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="42dp"
android:height="42dp"
android:viewportWidth="42"
android:viewportHeight="42">
<group>
<clip-path
android:pathData="M0,0h42v42h-42z"/>
<path
android:pathData="M12.354,0.984L0,9.258L8.542,16.282L0,23.303L12.354,31.579L21,24.178L29.646,31.579L42,23.303L33.458,16.282L42,9.258L29.646,0.984L21,8.388L12.354,0.984ZM21,8.388L33.458,16.282L21,24.178L8.542,16.282L21,8.388Z"
android:fillColor="#007EE5"
android:fillType="evenOdd"/>
<path
android:pathData="M12.354,33.154L21.025,25.77L29.697,33.154L33.406,30.667V33.456L21.025,41.075L8.645,33.456V30.667L12.354,33.154Z"
android:fillColor="#007EE5"/>
</group>
</vector>
14 changes: 14 additions & 0 deletions app/src/main/res/drawable/github.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="42dp"
android:height="42dp"
android:viewportWidth="42"
android:viewportHeight="42">
<group>
<clip-path
android:pathData="M0,0h42v42h-42z"/>
<path
android:pathData="M0,21.533C0,31.045 6.017,39.116 14.361,41.963C15.412,42.161 15.795,41.496 15.795,40.925C15.795,40.414 15.777,39.06 15.767,37.264C9.925,38.565 8.693,34.377 8.693,34.377C7.738,31.889 6.361,31.227 6.361,31.227C4.454,29.891 6.505,29.919 6.505,29.919C8.613,30.07 9.722,32.138 9.722,32.138C11.596,35.428 14.637,34.478 15.834,33.926C16.024,32.534 16.567,31.587 17.167,31.047C12.504,30.504 7.601,28.657 7.601,20.407C7.601,18.055 8.42,16.133 9.763,14.627C9.548,14.083 8.827,11.894 9.969,8.93C9.969,8.93 11.733,8.35 15.743,11.137C17.419,10.659 19.215,10.42 21.001,10.412C22.785,10.42 24.581,10.659 26.259,11.137C30.267,8.35 32.028,8.93 32.028,8.93C33.173,11.894 32.452,14.083 32.237,14.627C33.583,16.133 34.395,18.055 34.395,20.407C34.395,28.677 29.486,30.497 24.808,31.031C25.562,31.696 26.232,33.01 26.232,35.018C26.232,37.897 26.208,40.22 26.208,40.925C26.208,41.502 26.585,42.171 27.652,41.96C35.989,39.108 42,31.043 42,21.533C42,9.64 32.597,0 20.998,0C9.403,0 0,9.64 0,21.533Z"
android:fillColor="#000000"
android:fillType="evenOdd"/>
</group>
</vector>
22 changes: 22 additions & 0 deletions app/src/main/res/drawable/gitlab.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="42dp"
android:height="42dp"
android:viewportWidth="42"
android:viewportHeight="42">
<group>
<clip-path
android:pathData="M0,0h42v42h-42z"/>
<path
android:pathData="M41.297,16.819L41.239,16.67L35.521,1.766C35.407,1.472 35.201,1.223 34.934,1.056C34.668,0.886 34.354,0.804 34.038,0.823C33.722,0.838 33.419,0.954 33.173,1.152C32.926,1.351 32.749,1.622 32.667,1.928L28.815,13.724H13.196L9.328,1.928C9.246,1.624 9.068,1.355 8.823,1.158C8.575,0.962 8.272,0.848 7.957,0.831C7.642,0.814 7.329,0.895 7.061,1.064C6.795,1.232 6.59,1.481 6.474,1.774L0.759,16.67L0.701,16.819C-0.122,18.968 -0.223,21.326 0.412,23.537C1.047,25.749 2.385,27.694 4.223,29.079L4.242,29.092L4.294,29.132L13.002,35.646L17.311,38.904L19.931,40.883C20.239,41.117 20.614,41.243 20.999,41.243C21.385,41.243 21.76,41.117 22.067,40.883L24.688,38.904L28.996,35.646L37.754,29.1L37.778,29.085C39.616,27.698 40.954,25.752 41.589,23.54C42.224,21.327 42.121,18.969 41.297,16.819Z"
android:fillColor="#E24329"/>
<path
android:pathData="M41.297,16.819L41.24,16.67C38.454,17.242 35.83,18.421 33.553,20.124L20.998,29.608L28.996,35.646L37.754,29.1L37.778,29.084C39.616,27.698 40.954,25.752 41.589,23.54C42.224,21.327 42.121,18.969 41.297,16.819Z"
android:fillColor="#FC6D26"/>
<path
android:pathData="M13.002,35.646L17.311,38.904L19.931,40.883C20.239,41.116 20.614,41.243 20.999,41.243C21.385,41.243 21.76,41.116 22.067,40.883L24.688,38.904L28.996,35.646L20.998,29.608L13.002,35.646Z"
android:fillColor="#FCA326"/>
<path
android:pathData="M8.443,20.124C6.168,18.42 3.544,17.241 0.759,16.67L0.701,16.819C-0.122,18.968 -0.223,21.326 0.412,23.537C1.047,25.749 2.385,27.694 4.223,29.079L4.242,29.092L4.294,29.132L13.002,35.646L20.998,29.608L8.443,20.124Z"
android:fillColor="#FC6D26"/>
</group>
</vector>
67 changes: 67 additions & 0 deletions app/src/main/res/drawable/google_drive.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="42dp"
android:height="42dp"
android:viewportWidth="42"
android:viewportHeight="42">
<path
android:pathData="M13.667,2.871H28.268L42,26.545H27.366L13.667,2.871Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="-6.625"
android:startY="9.59"
android:endX="15.327"
android:endY="47.223"
android:type="linear">
<item android:offset="0" android:color="#FFF6C338"/>
<item android:offset="0.523" android:color="#FFFFD351"/>
<item android:offset="1" android:color="#FFF6C338"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M42,26.545L34.683,39.194H7.284L14.618,26.545H42Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="-88.743"
android:startY="-21.093"
android:endX="-93.422"
android:endY="75.637"
android:type="linear">
<item android:offset="0" android:color="#FF286EE6"/>
<item android:offset="0.521" android:color="#FF4286FB"/>
<item android:offset="1" android:color="#FF286EE6"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M7.284,39.194L0,26.545L13.666,2.871L21,15.553L7.284,39.194Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="9.606"
android:startY="-13.046"
android:endX="-19.914"
android:endY="6.427"
android:type="linear">
<item android:offset="0" android:color="#FF069B5A"/>
<item android:offset="0.531" android:color="#FF11AA62"/>
<item android:offset="1" android:color="#FF069B5A"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M7.284,39.194L20.918,26.545H14.618L7.284,39.194Z"
android:strokeAlpha="0.1"
android:fillColor="#000000"
android:fillAlpha="0.1"/>
<path
android:pathData="M42,26.545H27.382L24.167,21L42,26.545Z"
android:strokeAlpha="0.1"
android:fillColor="#000000"
android:fillAlpha="0.1"/>
<path
android:pathData="M13.667,2.871L17.883,20.918L21,15.553L13.667,2.871Z"
android:strokeAlpha="0.1"
android:fillColor="#000000"
android:fillAlpha="0.1"/>
</vector>
22 changes: 22 additions & 0 deletions app/src/main/res/drawable/line.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="42dp"
android:height="42dp"
android:viewportWidth="42"
android:viewportHeight="42">
<group>
<clip-path
android:pathData="M0,0h42v42h-42z"/>
<path
android:pathData="M32.9,42H9.1C4.074,42 0,37.926 0,32.9V9.1C0,4.074 4.074,0 9.1,0H32.9C37.926,0 42,4.074 42,9.1V32.9C42,37.926 37.926,42 32.9,42Z"
android:fillColor="#00B900"
android:fillType="evenOdd"/>
<path
android:pathData="M36.224,19.153C36.224,12.311 29.364,6.743 20.932,6.743C12.501,6.743 5.64,12.311 5.64,19.153C5.64,25.288 11.08,30.425 18.429,31.396C18.927,31.504 19.605,31.724 19.776,32.15C19.931,32.537 19.877,33.143 19.826,33.533C19.826,33.533 19.646,34.612 19.608,34.842C19.541,35.229 19.3,36.354 20.932,35.667C22.564,34.979 29.739,30.481 32.947,26.788H32.946C35.162,24.358 36.224,21.892 36.224,19.153Z"
android:fillColor="#ffffff"
android:fillType="evenOdd"/>
<path
android:pathData="M17.825,15.847H16.752C16.588,15.847 16.454,15.98 16.454,16.144V22.807C16.454,22.971 16.588,23.104 16.752,23.104H17.825C17.989,23.104 18.122,22.971 18.122,22.807V16.144C18.122,15.98 17.989,15.847 17.825,15.847ZM24.135,15.847H25.208C25.372,15.847 25.506,15.98 25.506,16.144V22.807C25.506,22.971 25.372,23.104 25.208,23.104H24.135C24.108,23.104 24.083,23.101 24.059,23.094L24.058,23.094L24.057,23.094C24.056,23.094 24.056,23.094 24.056,23.093C24.055,23.093 24.055,23.093 24.054,23.093L24.054,23.093L24.054,23.093C24.048,23.091 24.041,23.089 24.034,23.087L24.031,23.085C24.029,23.084 24.027,23.084 24.025,23.083C24.02,23.081 24.015,23.079 24.011,23.077C24.006,23.075 24.001,23.073 23.997,23.07L23.994,23.069L23.994,23.069C23.993,23.068 23.992,23.067 23.99,23.067C23.99,23.066 23.989,23.066 23.988,23.065C23.982,23.062 23.976,23.058 23.97,23.055C23.969,23.053 23.968,23.053 23.966,23.052C23.938,23.033 23.912,23.008 23.891,22.979L20.834,18.85V22.807C20.834,22.971 20.7,23.104 20.536,23.104H19.463C19.299,23.104 19.165,22.971 19.165,22.807V16.144C19.165,15.98 19.299,15.847 19.463,15.847H20.536L20.541,15.847L20.546,15.847L20.562,15.848L20.567,15.849C20.57,15.849 20.574,15.849 20.577,15.85C20.581,15.85 20.586,15.851 20.59,15.852C20.596,15.853 20.601,15.854 20.607,15.855L20.611,15.856L20.617,15.858C20.623,15.86 20.629,15.862 20.635,15.864C20.638,15.865 20.641,15.866 20.645,15.868C20.649,15.869 20.654,15.871 20.658,15.873L20.658,15.873L20.662,15.875L20.667,15.877L20.671,15.879C20.677,15.882 20.682,15.885 20.687,15.888L20.69,15.89C20.692,15.891 20.694,15.892 20.696,15.894C20.701,15.897 20.707,15.901 20.712,15.904L20.712,15.905L20.712,15.905L20.712,15.905C20.715,15.906 20.717,15.908 20.719,15.91C20.723,15.913 20.726,15.916 20.73,15.919L20.73,15.919L20.735,15.923L20.741,15.929C20.747,15.934 20.753,15.94 20.759,15.947C20.759,15.947 20.76,15.948 20.76,15.949C20.769,15.958 20.777,15.968 20.784,15.979L23.837,20.103V16.144C23.837,15.98 23.97,15.847 24.135,15.847ZM31.428,17.217C31.428,17.382 31.295,17.515 31.131,17.515H28.217V18.641H31.131C31.295,18.641 31.428,18.775 31.428,18.939V20.012C31.428,20.176 31.295,20.309 31.131,20.309H28.217V21.436H31.131C31.295,21.436 31.428,21.569 31.428,21.734V22.806C31.428,22.971 31.295,23.104 31.131,23.104H26.846C26.765,23.104 26.693,23.072 26.64,23.021C26.638,23.02 26.637,23.018 26.635,23.017C26.634,23.016 26.632,23.014 26.632,23.013C26.58,22.959 26.548,22.887 26.548,22.807V22.806V16.144V16.144C26.548,16.064 26.58,15.992 26.631,15.939C26.632,15.937 26.634,15.936 26.635,15.934L26.637,15.933C26.638,15.932 26.638,15.931 26.639,15.931C26.693,15.879 26.765,15.847 26.846,15.847H26.846H31.131C31.295,15.847 31.428,15.98 31.428,16.144V17.217ZM12.325,21.436H15.239C15.404,21.436 15.537,21.569 15.537,21.734V22.806C15.537,22.971 15.404,23.105 15.239,23.105H10.954C10.874,23.105 10.802,23.073 10.748,23.021C10.747,23.02 10.746,23.019 10.745,23.018C10.744,23.018 10.744,23.018 10.744,23.017C10.743,23.016 10.741,23.015 10.741,23.014C10.74,23.013 10.74,23.013 10.74,23.013C10.688,22.959 10.656,22.887 10.656,22.807V22.806V16.144C10.656,15.98 10.79,15.847 10.954,15.847H12.027C12.191,15.847 12.325,15.98 12.325,16.144V21.436Z"
android:fillColor="#00B900"
android:fillType="evenOdd"/>
</group>
</vector>
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/medium.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="42dp"
android:height="42dp"
android:viewportWidth="42"
android:viewportHeight="42">
<path
android:pathData="M11.845,9.105C18.388,9.105 23.691,14.446 23.691,21.032C23.691,27.619 18.387,32.959 11.845,32.959C5.304,32.959 0,27.619 0,21.032C0,14.446 5.303,9.105 11.845,9.105ZM30.762,9.804C34.033,9.804 36.685,14.831 36.685,21.032H36.685C36.685,27.232 34.033,32.26 30.762,32.26C27.491,32.26 24.84,27.232 24.84,21.032C24.84,14.832 27.491,9.804 30.762,9.804ZM39.917,10.974C41.067,10.974 42,15.477 42,21.032C42,26.586 41.068,31.091 39.917,31.091C38.766,31.091 37.834,26.587 37.834,21.032C37.834,15.477 38.767,10.974 39.917,10.974Z"
android:fillColor="#000000"/>
</vector>
18 changes: 18 additions & 0 deletions app/src/main/res/drawable/microsoft_onedrive.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="42dp"
android:height="42dp"
android:viewportWidth="42"
android:viewportHeight="42">
<path
android:pathData="M16.016,15.019L16.016,15.017L24.833,20.299L30.087,18.088L30.087,18.089C31.155,17.627 32.306,17.389 33.469,17.391C33.662,17.391 33.854,17.399 34.044,17.412C33.413,14.949 32.079,12.723 30.206,11.003C28.333,9.284 26.001,8.145 23.493,7.726C20.985,7.307 18.409,7.626 16.079,8.643C13.748,9.66 11.764,11.333 10.366,13.457C10.411,13.456 10.455,13.453 10.5,13.453C12.448,13.45 14.359,13.993 16.016,15.019Z"
android:fillColor="#0364B8"/>
<path
android:pathData="M16.016,15.017L16.016,15.019C14.359,13.993 12.449,13.45 10.5,13.453C10.455,13.453 10.411,13.456 10.366,13.457C8.459,13.48 6.594,14.023 4.972,15.027C3.35,16.031 2.033,17.457 1.161,19.154C0.289,20.85 -0.104,22.752 0.024,24.655C0.151,26.558 0.796,28.39 1.886,29.955L9.662,26.683L13.118,25.228L20.814,21.99L24.833,20.299L16.016,15.017Z"
android:fillColor="#0078D4"/>
<path
android:pathData="M34.045,17.412C33.854,17.399 33.662,17.391 33.469,17.391C32.306,17.389 31.155,17.627 30.087,18.089L30.087,18.088L24.833,20.299L26.357,21.211L31.351,24.202L33.529,25.508L40.979,29.97C41.657,28.713 42.007,27.307 42,25.88C41.992,24.452 41.627,23.049 40.937,21.8C40.247,20.55 39.254,19.494 38.05,18.727C36.846,17.961 35.469,17.509 34.045,17.412V17.412Z"
android:fillColor="#1490DF"/>
<path
android:pathData="M33.529,25.508L31.351,24.202L26.357,21.211L24.833,20.299L20.814,21.99L13.118,25.228L9.662,26.683L1.886,29.955C2.853,31.344 4.141,32.479 5.641,33.262C7.141,34.045 8.808,34.454 10.5,34.453H33.469C35.009,34.454 36.52,34.037 37.843,33.248C39.165,32.458 40.249,31.326 40.98,29.97L33.529,25.508Z"
android:fillColor="#28A8EA"/>
</vector>
Loading

0 comments on commit da00797

Please sign in to comment.