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