mirror of https://github.com/MISP/misp-bump
parent
a1c3a37a32
commit
5494cf3d45
|
@ -43,6 +43,29 @@ public class HomeActivity extends AppCompatActivity {
|
|||
Intent detailActivity = new Intent(HomeActivity.this, SyncInfoDetailActivity.class);
|
||||
detailActivity.putExtra(SyncInfoDetailActivity.EXTRA_SYNC_INFO_UUID, syncInformationList.get(index).getUuid());
|
||||
startActivity(detailActivity);
|
||||
|
||||
// SyncInformation syncInfo = preferenceManager.getSyncInformation(syncInformationList.get(index).getUuid());
|
||||
//
|
||||
// View dialogContent = getLayoutInflater().inflate(R.layout.dialog_credentials, null);
|
||||
//
|
||||
// MaterialPreferenceText url = dialogContent.findViewById(R.id.url);
|
||||
// url.setSubtitle(syncInfo.getRemote().getServer().getUrl());
|
||||
//
|
||||
// MaterialPreferenceText email = dialogContent.findViewById(R.id.email);
|
||||
// email.setSubtitle(syncInfo.getLocal().getSyncUser().getEmail());
|
||||
//
|
||||
// MaterialPasswordView authkey = dialogContent.findViewById(R.id.authkey);
|
||||
// authkey.setPassword(syncInfo.getLocal().getSyncUser().getAuthkey());
|
||||
//
|
||||
// MaterialPasswordView password = dialogContent.findViewById(R.id.password);
|
||||
// password.setPassword(syncInfo.getLocal().getSyncUser().getPassword());
|
||||
//
|
||||
// new MaterialAlertDialogBuilder(HomeActivity.this)
|
||||
// .setTitle("Credentials")
|
||||
// .setMessage("These credentials are valid for the sync user on your partners MISP instance")
|
||||
// .setView(dialogContent)
|
||||
// .setPositiveButton(android.R.string.ok, null)
|
||||
// .show();
|
||||
};
|
||||
|
||||
@Override
|
||||
|
|
|
@ -12,6 +12,7 @@ import androidx.appcompat.app.ActionBar;
|
|||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -66,12 +67,22 @@ public class SyncInfoDetailActivity extends AppCompatActivity {
|
|||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
||||
// preferenceManager.removeUploadInformation(syncUUID);
|
||||
if (item.getItemId() == android.R.id.home) {
|
||||
onBackPressed();
|
||||
return true;
|
||||
} else return item.getItemId() == R.id.menu_delete_sync;
|
||||
} else if (item.getItemId() == R.id.menu_delete_sync) {
|
||||
new MaterialAlertDialogBuilder(SyncInfoDetailActivity.this)
|
||||
.setTitle("Delete Sync Locally")
|
||||
.setMessage("This will not remove the information from your MISP instance.")
|
||||
.setPositiveButton("Remove", (dialog, which) -> {
|
||||
preferenceManager.removeUploadInformation(syncUUID);
|
||||
})
|
||||
.setNegativeButton("Discard", null)
|
||||
.show();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -39,8 +39,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="16dp"
|
||||
app:backgroundTint="@color/colorAccent"
|
||||
android:tint="@color/white"
|
||||
android:src="@drawable/ic_qrcode_scan"/>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
|
|
@ -134,8 +134,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="16dp"
|
||||
android:backgroundTint="@color/colorAccent"
|
||||
android:src="@drawable/ic_sync_black_24dp"
|
||||
android:tint="@color/white"/>
|
||||
android:src="@drawable/ic_sync_black_24dp" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
|
|
@ -175,7 +175,6 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_cloud_upload"
|
||||
android:tint="@color/white"
|
||||
android:layout_margin="16dp"
|
||||
android:layout_gravity="bottom|end" />
|
||||
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:padding="8dp"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<lu.circl.mispbump.customViews.MaterialPreferenceText
|
||||
android:id="@+id/url"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:title="URL"
|
||||
app:subtitle="0.0.0.0" />
|
||||
|
||||
<lu.circl.mispbump.customViews.MaterialPreferenceText
|
||||
android:id="@+id/email"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:title="Email"
|
||||
app:subtitle="Keine Ahnung" />
|
||||
|
||||
<lu.circl.mispbump.customViews.MaterialPasswordView
|
||||
android:id="@+id/password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:title="@string/password"
|
||||
app:password="Weiß ich leider auch nicht" />
|
||||
|
||||
<lu.circl.mispbump.customViews.MaterialPasswordView
|
||||
android:id="@+id/authkey"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:title="@string/authkey"
|
||||
app:password="Den erst recht nicht ..." />
|
||||
</LinearLayout>
|
|
@ -4,6 +4,6 @@
|
|||
<item
|
||||
android:id="@+id/menu_delete_sync"
|
||||
android:icon="@drawable/ic_delete_forever"
|
||||
android:title="Delete Synchronisation" />
|
||||
android:title="@string/label_delete_sync" />
|
||||
|
||||
</menu>
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
<resources>
|
||||
<color name="colorPrimary">#047EB4</color>
|
||||
<color name="colorPrimaryDark">#066796</color>
|
||||
|
||||
<color name="colorSecondary">#047EB4</color>
|
||||
<color name="colorOnSecondary">#FFF</color>
|
||||
|
||||
<color name="colorAccent">#12B3FA</color>
|
||||
|
||||
<color name="colorIconLight">#FFFFFF</color>
|
||||
|
|
|
@ -57,4 +57,5 @@
|
|||
<string name="information">Information</string>
|
||||
<string name="upload_changes">Upload Changes</string>
|
||||
<string name="download_changes">Download Changes</string>
|
||||
<string name="label_delete_sync">Delete Synchronisation</string>
|
||||
</resources>
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
<style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
|
||||
<item name="colorSecondary">@color/colorSecondary</item>
|
||||
<item name="colorOnSecondary">@color/colorOnSecondary</item>
|
||||
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
</style>
|
||||
|
||||
|
|
Loading…
Reference in New Issue