add toggle to select all options in file transfer
This commit is contained in:
@@ -53,6 +53,9 @@ function OptionEntry(
|
||||
fileTransferViewModel.selectedPaths.remove(fileOption.path);
|
||||
}
|
||||
});
|
||||
fileTransferViewModel.allOptionsSelected.subscribe(allSelected => {
|
||||
isSelected.value = allSelected;
|
||||
})
|
||||
function toggle() {
|
||||
isSelected.value = !isSelected.value;
|
||||
}
|
||||
@@ -249,7 +252,14 @@ function FileSelectionModal(
|
||||
fileTransferViewModel.chatFileOptions,
|
||||
OptionConverter,
|
||||
]}
|
||||
></div>
|
||||
></div>
|
||||
|
||||
<hr></hr>
|
||||
|
||||
<label class="inline">
|
||||
<input type="checkbox" bind:checked={fileTransferViewModel.allOptionsSelected}></input>
|
||||
{coreViewModel.translations.general.selectAllLabel}
|
||||
</label>
|
||||
</main>
|
||||
<div class="flex-row width-100">
|
||||
<button
|
||||
@@ -705,6 +715,13 @@ function ExportFileSelectionModal(
|
||||
OptionConverter,
|
||||
]}
|
||||
></div>
|
||||
|
||||
<hr></hr>
|
||||
|
||||
<label class="inline">
|
||||
<input type="checkbox" bind:checked={fileTransferViewModel.allOptionsSelected}></input>
|
||||
{coreViewModel.translations.general.selectAllLabel}
|
||||
</label>
|
||||
</main>
|
||||
<div class="flex-row width-100">
|
||||
<button
|
||||
|
||||
@@ -22,6 +22,8 @@ const englishTranslations = {
|
||||
saveButton: "Save",
|
||||
setButton: "Set",
|
||||
|
||||
selectAllLabel: "Select all",
|
||||
|
||||
filterOrCreateLabel: (type: string) => `Search or create ${type}`,
|
||||
createLabel: (query: string) => `Create "${query}"`,
|
||||
|
||||
@@ -402,6 +404,8 @@ export const allTranslations: {
|
||||
saveButton: "Speichern",
|
||||
setButton: "OK",
|
||||
|
||||
selectAllLabel: "Alle auswählen",
|
||||
|
||||
filterOrCreateLabel: (type: string) =>
|
||||
`${type} suchen oder erstellen`,
|
||||
createLabel: (query: string) => `"${query}" erstellen`,
|
||||
@@ -747,6 +751,8 @@ export const allTranslations: {
|
||||
saveButton: "Guardar",
|
||||
setButton: "OK",
|
||||
|
||||
selectAllLabel: "Seleccionar todos",
|
||||
|
||||
filterOrCreateLabel: (type: string) => `Buscar o crear ${type}`,
|
||||
createLabel: (query: string) => `Crear "${query}"`,
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ export default class FileTransferViewModel extends Context {
|
||||
chatFileOptions: React.ListState<FileTransferOption> =
|
||||
new React.ListState();
|
||||
selectedPaths: React.ListState<string[]> = new React.ListState();
|
||||
allOptionsSelected: React.State<boolean> = new React.State(false);
|
||||
|
||||
transferChannel: React.State<string> = new React.State("");
|
||||
transferKey: React.State<string> = new React.State("");
|
||||
|
||||
Reference in New Issue
Block a user