Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Feature: In the commit details menu, add a "Copy File Name" action. #1798

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
domys55 wants to merge 1 commit into sourcegit-scm:develop
base: develop
Choose a base branch
Loading
from domys55:CommitDetail_filenameCopy
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
1 change: 1 addition & 0 deletions TRANSLATION.md
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,7 @@ This document shows the translation status of each locale file in the repository
- Text.ConfirmEmptyCommit.WithLocalChanges
- Text.ConfirmRestart.Title
- Text.ConfirmRestart.Message
- Text.CopyFileName
- Text.CopyFullPath
- Text.CreateBranch.OverwriteExisting
- Text.DeinitSubmodule
Expand Down
1 change: 1 addition & 0 deletions src/Resources/Locales/de_DE.axaml
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@
<x:String x:Key="Text.ConventionalCommit.Type" xml:space="preserve">Typ der Änderung:</x:String>
<x:String x:Key="Text.Copy" xml:space="preserve">Kopieren</x:String>
<x:String x:Key="Text.CopyAllText" xml:space="preserve">Gesamten Text kopieren</x:String>
<x:String x:Key="Text.CopyFileName" xml:space="preserve">Dateinamen kopieren</x:String>
<x:String x:Key="Text.CopyFullPath" xml:space="preserve">Ganzen Pfad kopieren</x:String>
<x:String x:Key="Text.CopyPath" xml:space="preserve">Pfad kopieren</x:String>
<x:String x:Key="Text.CreateBranch" xml:space="preserve">Branch erstellen...</x:String>
Expand Down
1 change: 1 addition & 0 deletions src/Resources/Locales/en_US.axaml
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@
<x:String x:Key="Text.ConventionalCommit.Type" xml:space="preserve">Type of Change:</x:String>
<x:String x:Key="Text.Copy" xml:space="preserve">Copy</x:String>
<x:String x:Key="Text.CopyAllText" xml:space="preserve">Copy All Text</x:String>
<x:String x:Key="Text.CopyFileName" xml:space="preserve">Copy File Name</x:String>
<x:String x:Key="Text.CopyFullPath" xml:space="preserve">Copy Full Path</x:String>
<x:String x:Key="Text.CopyPath" xml:space="preserve">Copy Path</x:String>
<x:String x:Key="Text.CreateBranch" xml:space="preserve">Create Branch...</x:String>
Expand Down
1 change: 1 addition & 0 deletions src/Resources/Locales/es_ES.axaml
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@
<x:String x:Key="Text.ConventionalCommit.Type" xml:space="preserve">Tipo de Cambio:</x:String>
<x:String x:Key="Text.Copy" xml:space="preserve">Copiar</x:String>
<x:String x:Key="Text.CopyAllText" xml:space="preserve">Copiar Todo el Texto</x:String>
<x:String x:Key="Text.CopyFileName" xml:space="preserve">Copiar nombre de archivo</x:String>
<x:String x:Key="Text.CopyFullPath" xml:space="preserve">Copiar Ruta Completa</x:String>
<x:String x:Key="Text.CopyPath" xml:space="preserve">Copiar Ruta</x:String>
<x:String x:Key="Text.CreateBranch" xml:space="preserve">Crear Rama...</x:String>
Expand Down
1 change: 1 addition & 0 deletions src/Resources/Locales/fr_FR.axaml
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@
<x:String x:Key="Text.ConventionalCommit.Type" xml:space="preserve">Type de Changement :</x:String>
<x:String x:Key="Text.Copy" xml:space="preserve">Copier</x:String>
<x:String x:Key="Text.CopyAllText" xml:space="preserve">Copier tout le texte</x:String>
<x:String x:Key="Text.CopyFileName" xml:space="preserve">Copier le nom du fichier</x:String>
<x:String x:Key="Text.CopyFullPath" xml:space="preserve">Copier le chemin complet</x:String>
<x:String x:Key="Text.CopyPath" xml:space="preserve">Copier le chemin</x:String>
<x:String x:Key="Text.CreateBranch" xml:space="preserve">Créer une branche...</x:String>
Expand Down
1 change: 1 addition & 0 deletions src/Resources/Locales/it_IT.axaml
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@
<x:String x:Key="Text.ConventionalCommit.Type" xml:space="preserve">Tipo di Modifica:</x:String>
<x:String x:Key="Text.Copy" xml:space="preserve">Copia</x:String>
<x:String x:Key="Text.CopyAllText" xml:space="preserve">Copia Tutto il Testo</x:String>
<x:String x:Key="Text.CopyFileName" xml:space="preserve">Copia nome file</x:String>
<x:String x:Key="Text.CopyFullPath" xml:space="preserve">Copia Intero Percorso</x:String>
<x:String x:Key="Text.CopyPath" xml:space="preserve">Copia Percorso</x:String>
<x:String x:Key="Text.CreateBranch" xml:space="preserve">Crea Branch...</x:String>
Expand Down
1 change: 1 addition & 0 deletions src/Resources/Locales/ja_JP.axaml
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@
<x:String x:Key="Text.ConventionalCommit.Type" xml:space="preserve">変更の種類:</x:String>
<x:String x:Key="Text.Copy" xml:space="preserve">コピー</x:String>
<x:String x:Key="Text.CopyAllText" xml:space="preserve">すべてのテキストをコピー</x:String>
<x:String x:Key="Text.CopyFileName" xml:space="preserve">ファイル名をコピーする</x:String>
<x:String x:Key="Text.CopyFullPath" xml:space="preserve">絶対パスをコピー</x:String>
<x:String x:Key="Text.CopyPath" xml:space="preserve">パスをコピー</x:String>
<x:String x:Key="Text.CreateBranch" xml:space="preserve">ブランチを作成...</x:String>
Expand Down
1 change: 1 addition & 0 deletions src/Resources/Locales/pt_BR.axaml
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@
<x:String x:Key="Text.ConventionalCommit.Type" xml:space="preserve">Tipo de mudança:</x:String>
<x:String x:Key="Text.Copy" xml:space="preserve">Copiar</x:String>
<x:String x:Key="Text.CopyAllText" xml:space="preserve">Copiar todo o texto</x:String>
<x:String x:Key="Text.CopyFileName" xml:space="preserve">Copiar nome do arquivo</x:String>
<x:String x:Key="Text.CopyPath" xml:space="preserve">Copiar Caminho</x:String>
<x:String x:Key="Text.CreateBranch" xml:space="preserve">Criar Branch...</x:String>
<x:String x:Key="Text.CreateBranch.BasedOn" xml:space="preserve">Baseado Em:</x:String>
Expand Down
1 change: 1 addition & 0 deletions src/Resources/Locales/ru_RU.axaml
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@
<x:String x:Key="Text.ConventionalCommit.Type" xml:space="preserve">Тип изменения:</x:String>
<x:String x:Key="Text.Copy" xml:space="preserve">Копировать</x:String>
<x:String x:Key="Text.CopyAllText" xml:space="preserve">Копировать весь текст</x:String>
<x:String x:Key="Text.CopyFileName" xml:space="preserve">Копировать имя файла</x:String>
<x:String x:Key="Text.CopyFullPath" xml:space="preserve">Копировать полный путь</x:String>
<x:String x:Key="Text.CopyPath" xml:space="preserve">Копировать путь</x:String>
<x:String x:Key="Text.CreateBranch" xml:space="preserve">Создать ветку...</x:String>
Expand Down
11 changes: 11 additions & 0 deletions src/Views/CommitDetail.axaml.cs
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,19 @@ public ContextMenu CreateChangeContextMenu(Models.Change change)
e.Handled = true;
};

var copyFileName = new MenuItem();
copyFileName.Header = App.Text("CopyFileName");
copyFileName.Icon = App.CreateMenuIcon("Icons.Copy");
copyFileName.Tag = OperatingSystem.IsMacOS() ? "⌘+⌥+C" : "Ctrl+Alt+C";
copyFileName.Click += async (_, e) =>
{
await App.CopyTextAsync(Path.GetFileName(fullPath));
e.Handled = true;
};

menu.Items.Add(copyPath);
menu.Items.Add(copyFullPath);
menu.Items.Add(copyFileName);
return menu;
}

Expand Down

AltStyle によって変換されたページ (->オリジナル) /