Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,16 @@
<MudMenuItem @onclick="async () => { await Remote_File_Browser_Delete_Directory(remote_file_browser_row.path); }">@Localizer["delete"]</MudMenuItem>
<MudMenuItem @onclick="async () => { await Remote_File_Browser_Move_Directory_Dialog(remote_file_browser_row.path); }">@Localizer["move"]</MudMenuItem>
<MudMenuItem @onclick="async () => { await Remote_File_Browser_Rename_Directory_Dialog(remote_file_browser_row.path); }">@Localizer["rename"]</MudMenuItem>
<MudMenuItem @onclick="async () => { await Remote_File_Browser_Copy_Full_Path(remote_file_browser_row.path); }">@Localizer["copy_full_path"]</MudMenuItem>
}
else
{
<MudMenuItem @onclick="async () => { await Remote_File_Browser_Downlaod_File_From_Device(remote_file_browser_row.path); }">@Localizer["download"]</MudMenuItem>
<MudMenuItem @onclick="async () => { await Remote_File_Browser_Delete_File(remote_file_browser_row.path); }">@Localizer["delete"]</MudMenuItem>
<MudMenuItem @onclick="async () => { await Remote_File_Browser_Move_File_Dialog(remote_file_browser_row.path); }">@Localizer["move"]</MudMenuItem>
<MudMenuItem @onclick="async () => { await Remote_File_Browser_Rename_File_Dialog(remote_file_browser_row.path); }">@Localizer["rename"]</MudMenuItem>
<MudMenuItem @onclick="async () => { await Remote_File_Browser_Copy_Filename(remote_file_browser_row.name); }">@Localizer["copy_filename"]</MudMenuItem>
<MudMenuItem @onclick="async () => { await Remote_File_Browser_Copy_Full_Path(remote_file_browser_row.path); }">@Localizer["copy_full_path"]</MudMenuItem>
}
}

Expand Down Expand Up @@ -1866,6 +1869,26 @@
await Remote_File_Browser_Rename_File(_remote_file_path, _remote_file_path_new);
}

private async Task Remote_File_Browser_Copy_Filename(string filename)
{
Snackbar.Configuration.ShowCloseIcon = true;
Snackbar.Configuration.PositionClass = Defaults.Classes.Position.BottomRight;

await JSRuntime.InvokeVoidAsync("navigator.clipboard.writeText", filename);

Snackbar.Add(Localizer["copied_to_clipboard"], Severity.Info);
}

private async Task Remote_File_Browser_Copy_Full_Path(string path)
{
Snackbar.Configuration.ShowCloseIcon = true;
Snackbar.Configuration.PositionClass = Defaults.Classes.Position.BottomRight;

await JSRuntime.InvokeVoidAsync("navigator.clipboard.writeText", path);

Snackbar.Add(Localizer["copied_to_clipboard"], Severity.Info);
}

private bool uploading_linear = false;
private bool uploading_indeterminate = false;
private double _uploadProgress = 0; // %
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,4 +267,10 @@
<data name="wait_for_device_to_download_file" xml:space="preserve">
<value>Warten auf das Herunterladen der Datei durch das Gerät.</value>
</data>
<data name="copy_filename" xml:space="preserve">
<value>Dateiname kopieren</value>
</data>
<data name="copy_full_path" xml:space="preserve">
<value>Vollständigen pfad kopieren</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -267,4 +267,10 @@
<data name="wait_for_device_to_download_file" xml:space="preserve">
<value>Wait for the device to download the file.</value>
</data>
<data name="copy_filename" xml:space="preserve">
<value>Copy filename</value>
</data>
<data name="copy_full_path" xml:space="preserve">
<value>Copy full path</value>
</data>
</root>