feat: identical msg in flutter and sciter

This commit is contained in:
Kingtous
2023-03-15 17:18:59 +08:00
parent 33ca87718b
commit 7a05910807
41 changed files with 71 additions and 18 deletions

View File

@@ -778,12 +778,14 @@ handler.confirmDeleteFiles = function(id, i, name) {
});
}
handler.overrideFileConfirm = function(id, file_num, to, is_upload) {
handler.overrideFileConfirm = function(id, file_num, to, is_upload, is_identical) {
var jt = file_transfer.job_table;
var identical_msg = is_identical ? translate("This file is identical with the peer's one"): "";
msgbox("custom-skip", "Confirm Write Strategy", "<div .form> \
<div>" + translate('Overwrite') + translate('files') + ".</div> \
<div>" + translate('Overwrite') + " " + translate('files') + ".</div> \
<div>" + translate('This file exists, skip or overwrite this file?') + "</div> \
<div.ellipsis style=\"font-weight: bold;\" .text>" + to + "</div> \
<div>" + identical_msg + "</div> \
<div><button|checkbox(remember) {ts}>" + translate('Do this for all conflicts') + "</button></div> \
</div>", "", function(res=null) {
if (!res) {

View File

@@ -197,10 +197,10 @@ impl InvokeUiSession for SciterHandler {
self.call("confirmDeleteFiles", &make_args!(id, i, name));
}
fn override_file_confirm(&self, id: i32, file_num: i32, to: String, is_upload: bool) {
fn override_file_confirm(&self, id: i32, file_num: i32, to: String, is_upload: bool, is_identical: bool) {
self.call(
"overrideFileConfirm",
&make_args!(id, file_num, to, is_upload),
&make_args!(id, file_num, to, is_upload, is_identical),
);
}