Delete driving footage button
This commit is contained in:
@@ -256,6 +256,20 @@ DevicePanel::DevicePanel(SettingsWindow *parent) : ListWidget(parent) {
|
|||||||
});
|
});
|
||||||
addItem(translateBtn);
|
addItem(translateBtn);
|
||||||
|
|
||||||
|
// Delete driving footage button
|
||||||
|
auto deleteFootageBtn = new ButtonControl(tr("Delete Driving Data"), tr("DELETE"), tr("This button provides a swift and secure way to permanently delete all "
|
||||||
|
"stored driving footage and data from your device. Ideal for maintaining privacy or freeing up space.")
|
||||||
|
);
|
||||||
|
connect(deleteFootageBtn, &ButtonControl::clicked, [=]() {
|
||||||
|
if (!ConfirmationDialog::confirm(tr("Are you sure you want to permanently delete all of your driving footage and data?"), tr("Delete"), this)) return;
|
||||||
|
std::thread([&] {
|
||||||
|
deleteFootageBtn->setValue("Deleting footage...");
|
||||||
|
std::system("rm -rf /data/media/0/realdata");
|
||||||
|
deleteFootageBtn->setValue("");
|
||||||
|
}).detach();
|
||||||
|
});
|
||||||
|
addItem(deleteFootageBtn);
|
||||||
|
|
||||||
// Delete long term toggle storage button
|
// Delete long term toggle storage button
|
||||||
auto deleteStorageParamsBtn = new ButtonControl(tr("Delete Toggle Storage Data"), tr("DELETE"), tr("This button provides a swift and secure way to permanently delete all "
|
auto deleteStorageParamsBtn = new ButtonControl(tr("Delete Toggle Storage Data"), tr("DELETE"), tr("This button provides a swift and secure way to permanently delete all "
|
||||||
"long term stored toggle settings. Ideal for maintaining privacy or freeing up space.")
|
"long term stored toggle settings. Ideal for maintaining privacy or freeing up space.")
|
||||||
|
|||||||
Reference in New Issue
Block a user