diff --git a/scm-ui-components/packages/ui-components/src/repos/changesets/ChangesetTagsCollapsed.js b/scm-ui-components/packages/ui-components/src/repos/changesets/ChangesetTagsCollapsed.js
index 50fb36644d..50b09d4d65 100644
--- a/scm-ui-components/packages/ui-components/src/repos/changesets/ChangesetTagsCollapsed.js
+++ b/scm-ui-components/packages/ui-components/src/repos/changesets/ChangesetTagsCollapsed.js
@@ -18,7 +18,7 @@ class ChangesetTagsCollapsed extends React.Component {
const message = tags.map((tag) => tag.name).join(", ");
return (
-
+
);
}
diff --git a/scm-ui/public/locales/de/commons.json b/scm-ui/public/locales/de/commons.json
index c38dff2468..f32d764ce8 100644
--- a/scm-ui/public/locales/de/commons.json
+++ b/scm-ui/public/locales/de/commons.json
@@ -43,8 +43,10 @@
"previous": "Zurück"
},
"profile": {
- "navigation-label": "Navigation",
- "actions-label": "Aktionen",
+ "navigationLabel": "Profil Navigation",
+ "informationNavLink": "Information",
+ "changePasswordNavLink": "Passwort ändern",
+ "settingsNavLink": "Einstellungen",
"username": "Benutzername",
"displayName": "Anzeigename",
"mail": "E-Mail",
diff --git a/scm-ui/public/locales/de/config.json b/scm-ui/public/locales/de/config.json
index e26c2cddac..5767a2b376 100644
--- a/scm-ui/public/locales/de/config.json
+++ b/scm-ui/public/locales/de/config.json
@@ -1,12 +1,10 @@
{
"config": {
- "navigation-title": "Navigation"
- },
- "global-config": {
+ "navigationLabel": "Einstellungs Navigation",
+ "globalConfigurationNavLink": "Globale Einstellungen",
"title": "Einstellungen",
- "navigation-label": "Globale Einstellungen",
- "error-title": "Fehler",
- "error-subtitle": "Unbekannter Einstellungen Fehler"
+ "errorTitle": "Fehler",
+ "errorSubtitle": "Unbekannter Einstellungen Fehler"
},
"config-form": {
"submit": "Speichern",
diff --git a/scm-ui/public/locales/de/groups.json b/scm-ui/public/locales/de/groups.json
index 768704bf38..1b2504a644 100644
--- a/scm-ui/public/locales/de/groups.json
+++ b/scm-ui/public/locales/de/groups.json
@@ -11,13 +11,16 @@
"title": "Gruppen",
"subtitle": "Verwaltung der Gruppen"
},
- "single-group": {
- "error-title": "Fehler",
- "error-subtitle": "Unbekannter Gruppen Fehler",
- "navigation-label": "Navigation",
- "actions-label": "Aktionen",
- "information-label": "Informationen",
- "back-label": "Zurück"
+ "singleGroup": {
+ "errorTitle": "Fehler",
+ "errorSubtitle": "Unbekannter Gruppen Fehler",
+ "menu": {
+ "navigationLabel": "Gruppen Navigation",
+ "informationNavLink": "Informationen",
+ "settingsNavLink": "Einstellungen",
+ "generalNavLink": "Generell",
+ "setPermissionsNavLink": "Berechtigungen"
+ }
},
"add-group": {
"title": "Gruppe erstellen",
@@ -43,28 +46,26 @@
"placeholder": "Benutzername eingeben",
"loading": "Suche...",
"no-options": "Kein Vorschlag für Benutzername verfügbar"
- },
-
-"group-form": {
+ },
+ "groupForm": {
+ "subtitle": "Gruppe bearbeiten",
"submit": "Speichern",
- "name-error": "Name ist ungültig",
- "description-error": "Beschreibung ist ungültig",
+ "nameError": "Name ist ungültig",
+ "descriptionError": "Beschreibung ist ungültig",
"help": {
"nameHelpText": "Eindeutiger Name der Gruppe",
"descriptionHelpText": "Eine kurze Beschreibung der Gruppe",
"memberHelpText": "Benutzername des Mitglieds der Gruppe"
}
},
- "delete-group-button": {
- "label": "Löschen",
- "confirm-alert": {
+ "deleteGroup": {
+ "subtitle": "Gruppe löschen",
+ "button": "Löschen",
+ "confirmAlert": {
"title": "Gruppe löschen",
"message": "Soll die Gruppe wirklich gelöscht werden?",
"submit": "Ja",
"cancel": "Nein"
}
- },
- "set-permissions-button": {
- "label": "Berechtigungen ändern"
}
}
diff --git a/scm-ui/public/locales/de/permissions.json b/scm-ui/public/locales/de/permissions.json
index d1280808e5..57c061743a 100644
--- a/scm-ui/public/locales/de/permissions.json
+++ b/scm-ui/public/locales/de/permissions.json
@@ -1,8 +1,6 @@
{
- "form": {
- "submit-button": {
- "label": "Berechtigungen speichern"
- },
- "set-permissions-successful": "Berechtigungen erfolgreich gespeichert"
+ "setPermissions": {
+ "button": "Berechtigungen speichern",
+ "setPermissionsSuccessful": "Berechtigungen erfolgreich gespeichert"
}
}
diff --git a/scm-ui/public/locales/de/repos.json b/scm-ui/public/locales/de/repos.json
index 13c302aa67..922a2b270f 100644
--- a/scm-ui/public/locales/de/repos.json
+++ b/scm-ui/public/locales/de/repos.json
@@ -11,41 +11,58 @@
"name-invalid": "Der Name des Repository ist ungültig",
"contact-invalid": "Der Kontakt muss eine gültige E-Mail Adresse sein"
},
+ "help": {
+ "nameHelpText": "Der Name des Repository. Dieser wird Teil der URL des Repository sein.",
+ "typeHelpText": "Der Typ des Repository (Mercurial, Git oder Subversion).",
+ "contactHelpText": "E-Mail Adresse der Person, die für das Repository verantwortlich ist.",
+ "descriptionHelpText": "Eine kurze Beschreibung des Repository."
+ },
+ "repositoryRoot": {
+ "errorTitle": "Fehler",
+ "errorSubtitle": "Unbekannter Repository Fehler",
+ "menu": {
+ "navigationLabel": "Repository Navigation",
+ "informationNavLink": "Informationen",
+ "historyNavLink": "Commits",
+ "sourcesNavLink": "Sources",
+ "settingsNavLink": "Einstellungen",
+ "generalNavLink": "Generell",
+ "permissionsNavLink": "Berechtigungen"
+ }
+ },
"overview": {
"title": "Repositories",
"subtitle": "Übersicht aller verfügbaren Repositories",
- "create-button": "Repository erstellen"
- },
- "repository-root": {
- "error-title": "Fehler",
- "error-subtitle": "Unbekannter Repository Fehler",
- "actions-label": "Aktionen",
- "back-label": "Zurück",
- "navigation-label": "Navigation",
- "history": "Commits",
- "information": "Informationen",
- "permissions": "Berechtigungen",
- "sources": "Sources"
+ "createButton": "Repository erstellen"
},
"create": {
"title": "Repository erstellen",
"subtitle": "Erstellen eines neuen Repository"
},
- "repository-form": {
- "submit": "Speichern"
+ "changesets": {
+ "errorTitle": "Fehler",
+ "errorSubtitle": "Changesets konnten nicht abgerufen werden",
+ "branchSelectorLabel": "Branches"
},
- "edit-nav-link": {
- "label": "Bearbeiten"
- },
- "delete-nav-action": {
- "label": "Löschen",
- "confirm-alert": {
- "title": "Repository löschen",
- "message": "Soll das Repository wirklich gelöscht werden?",
- "submit": "Ja",
- "cancel": "Nein"
+ "changeset": {
+ "description": "Beschreibung",
+ "summary": "Changeset {{id}} wurde committet {{time}}",
+ "shortSummary": "Committet {{id}} {{time}}",
+ "tags": "Tags",
+ "diffNotSupported": "Diff des Changesets wird von diesem Repositorytyp nicht unterstützt",
+ "author": {
+ "prefix": "Verfasst von",
+ "mailto": "Mail senden an"
+ },
+ "buttons": {
+ "details": "Details",
+ "sources": "Sources"
}
},
+ "repositoryForm": {
+ "subtitle": "Repository bearbeiten",
+ "submit": "Speichern"
+ },
"sources": {
"file-tree": {
"name": "Name",
@@ -65,36 +82,8 @@
"size": "Größe"
}
},
- "changesets": {
- "diff": {
- "not-supported": "Diff des Changesets wird von diesem Repositorytyp nicht unterstützt"
- },
- "error-title": "Fehler",
- "error-subtitle": "Changesets konnten nicht abgerufen werden",
- "changeset": {
- "id": "ID",
- "description": "Beschreibung",
- "contact": "Kontakt",
- "date": "Datum",
- "summary": "Changeset {{id}} wurde committet {{time}}",
- "short-summary": "Committet {{id}} {{time}}"
- },
- "tags": "Tags",
- "author": {
- "name": "Autor",
- "mail": "Mail",
- "prefix": "Verfasst von",
- "mailto": "Mail senden an"
- },
- "buttons": {
- "details": "Details",
- "sources": "Sources"
- }
- },
- "branch-selector": {
- "label": "Branches"
- },
"permission": {
+ "title": "Berechtigungen bearbeiten",
"user": "Benutzer",
"group": "Gruppe",
"error-title": "Fehler",
@@ -106,7 +95,7 @@
"user-permission": "Benutzerberechtigung",
"edit-permission": {
"delete-button": "Löschen",
- "save-button": "Änderungen Speichern"
+ "save-button": "Änderungen speichern"
},
"advanced-button": {
"label": "Erweitert"
@@ -146,10 +135,14 @@
}
}
},
- "help": {
- "nameHelpText": "Der Name des Repository. Dieser wird Teil der URL des Repository sein.",
- "typeHelpText": "Der Typ des Repository (Mercurial, Git oder Subversion).",
- "contactHelpText": "E-Mail Adresse der Person, die für das Repository verantwortlich ist.",
- "descriptionHelpText": "Eine kurze Beschreibung des Repository."
+ "deleteRepo": {
+ "subtitle": "Repository löschen",
+ "button": "Löschen",
+ "confirmAlert": {
+ "title": "Repository löschen",
+ "message": "Soll das Repository wirklich gelöscht werden?",
+ "submit": "Ja",
+ "cancel": "Nein"
+ }
}
}
diff --git a/scm-ui/public/locales/de/users.json b/scm-ui/public/locales/de/users.json
index 31b954d996..b38dd9c2fb 100644
--- a/scm-ui/public/locales/de/users.json
+++ b/scm-ui/public/locales/de/users.json
@@ -10,59 +10,55 @@
"creationDate": "Erstellt",
"lastModified": "Zuletzt bearbeitet"
},
- "users": {
- "title": "Benutzer",
- "subtitle": "Verwaltung der Benutzer"
- },
- "create-user-button": {
- "label": "Benutzer erstellen"
- },
- "delete-user-button": {
- "label": "Löschen",
- "confirm-alert": {
- "title": "Benutzer löschen",
- "message": "Soll der Benutzer wirklich gelöscht werden?",
- "submit": "Ja",
- "cancel": "Nein"
- }
- },
- "edit-user-button": {
- "label": "Bearbeiten"
- },
- "set-password-button": {
- "label": "Passwort ändern"
- },
- "set-permissions-button": {
- "label": "Berechtigungen ändern"
- },
- "user-form": {
- "submit": "Speichern"
- },
- "add-user": {
- "title": "Benutzer erstellen",
- "subtitle": "Erstellen eines neuen Benutzers"
- },
- "single-user": {
- "error-title": "Fehler",
- "error-subtitle": "Unbekannter Benutzer Fehler",
- "navigation-label": "Navigation",
- "actions-label": "Aktionen",
- "information-label": "Informationen",
- "back-label": "Zurück"
- },
"validation": {
"mail-invalid": "Diese E-Mail ist ungültig",
"name-invalid": "Dieser Name ist ungültig",
"displayname-invalid": "Dieser Anzeigename ist ungültig"
},
- "password": {
- "set-password-successful": "Das Passwort wurde erfolgreich gespeichert."
- },
"help": {
"usernameHelpText": "Einzigartiger Name des Benutzers",
"displayNameHelpText": "Anzeigename des Benutzers",
"mailHelpText": "E-Mail Adresse des Benutzers",
"adminHelpText": "Ein Administrator kann Repositories, Gruppen und Benutzer erstellen, bearbeiten und löschen.",
"activeHelpText": "Aktivierung oder Deaktivierung eines Benutzers"
+ },
+ "users": {
+ "title": "Benutzer",
+ "subtitle": "Verwaltung der Benutzer",
+ "createButton": "Benutzer erstellen"
+ },
+ "singleUser": {
+ "errorTitle": "Fehler",
+ "errorSubtitle": "Unbekannter Benutzer Fehler",
+ "menu": {
+ "navigationLabel": "Benutzer Navigation",
+ "informationNavLink": "Informationen",
+ "settingsNavLink": "Einstellungen",
+ "generalNavLink": "Generell",
+ "setPasswordNavLink": "Passwort",
+ "setPermissionsNavLink": "Berechtigungen"
+ }
+ },
+ "addUser": {
+ "title": "Benutzer erstellen",
+ "subtitle": "Erstellen eines neuen Benutzers"
+ },
+ "deleteUser": {
+ "subtitle": "Benutzer löschen",
+ "button": "Löschen",
+ "confirmAlert": {
+ "title": "Benutzer löschen",
+ "message": "Soll der Benutzer wirklich gelöscht werden?",
+ "submit": "Ja",
+ "cancel": "Nein"
+ }
+ },
+ "singleUserPassword": {
+ "button": "Passwort setzen",
+ "setPasswordSuccessful": "Das Passwort wurde erfolgreich gespeichert."
+ },
+ "userForm": {
+ "subtitle": "Benutzer bearbeiten",
+ "button": "Speichern"
}
}
diff --git a/scm-ui/public/locales/en/commons.json b/scm-ui/public/locales/en/commons.json
index 4788f7b39f..fed749a200 100644
--- a/scm-ui/public/locales/en/commons.json
+++ b/scm-ui/public/locales/en/commons.json
@@ -43,8 +43,10 @@
"previous": "Previous"
},
"profile": {
- "navigation-label": "Navigation",
- "actions-label": "Actions",
+ "navigationLabel": "Profile Navigation",
+ "informationNavLink": "Information",
+ "changePasswordNavLink": "Change password",
+ "settingsNavLink": "Settings",
"username": "Username",
"displayName": "Display Name",
"mail": "E-Mail",
@@ -67,6 +69,6 @@
"passwordInvalid": "Password has to be between 6 and 32 characters",
"passwordConfirmFailed": "Passwords have to be identical",
"submit": "Submit",
- "changedSuccessfully": "Password successfully changed"
+ "changedSuccessfully": "Password changed successfully"
}
}
diff --git a/scm-ui/public/locales/en/config.json b/scm-ui/public/locales/en/config.json
index bdc7ec21f6..b08c5c2d1b 100644
--- a/scm-ui/public/locales/en/config.json
+++ b/scm-ui/public/locales/en/config.json
@@ -1,12 +1,10 @@
{
"config": {
- "navigation-title": "Navigation"
- },
- "global-config": {
+ "navigationLabel": "Configuration Navigation",
+ "globalConfigurationNavLink": "Global Configuration",
"title": "Configuration",
- "navigation-label": "Global Configuration",
- "error-title": "Error",
- "error-subtitle": "Unknown Config Error"
+ "errorTitle": "Error",
+ "errorSubtitle": "Unknown Config Error"
},
"config-form": {
"submit": "Submit",
diff --git a/scm-ui/public/locales/en/groups.json b/scm-ui/public/locales/en/groups.json
index 60a10e4302..3b34e5722b 100644
--- a/scm-ui/public/locales/en/groups.json
+++ b/scm-ui/public/locales/en/groups.json
@@ -11,13 +11,16 @@
"title": "Groups",
"subtitle": "Create, read, update and delete groups"
},
- "single-group": {
- "error-title": "Error",
- "error-subtitle": "Unknown group error",
- "navigation-label": "Navigation",
- "actions-label": "Actions",
- "information-label": "Information",
- "back-label": "Back"
+ "singleGroup": {
+ "errorTitle": "Error",
+ "errorSubtitle": "Unknown group error",
+ "menu": {
+ "navigationLabel": "Group Navigation",
+ "informationNavLink": "Information",
+ "settingsNavLink": "Settings",
+ "generalNavLink": "General",
+ "setPermissionsNavLink": "Permissions"
+ }
},
"add-group": {
"title": "Create Group",
@@ -43,28 +46,26 @@
"placeholder": "Enter Member",
"loading": "Loading...",
"no-options": "No suggestion available"
- },
-
-"group-form": {
+ },
+ "groupForm": {
+ "subtitle": "Edit Group",
"submit": "Submit",
- "name-error": "Group name is invalid",
- "description-error": "Description is invalid",
+ "nameError": "Group name is invalid",
+ "descriptionError": "Description is invalid",
"help": {
"nameHelpText": "Unique name of the group",
"descriptionHelpText": "A short description of the group",
"memberHelpText": "Usernames of the group members"
}
},
- "delete-group-button": {
- "label": "Delete",
- "confirm-alert": {
+ "deleteGroup": {
+ "subtitle": "Delete Group",
+ "button": "Delete",
+ "confirmAlert": {
"title": "Delete Group",
"message": "Do you really want to delete the group?",
"submit": "Yes",
"cancel": "No"
}
- },
- "set-permissions-button": {
- "label": "Set Permissions"
}
}
diff --git a/scm-ui/public/locales/en/permissions.json b/scm-ui/public/locales/en/permissions.json
index f5ba065ced..9c3663e77b 100644
--- a/scm-ui/public/locales/en/permissions.json
+++ b/scm-ui/public/locales/en/permissions.json
@@ -1,8 +1,6 @@
{
- "form": {
- "submit-button": {
- "label": "Set Permissions"
- },
- "set-permissions-successful": "Permissions set successfully"
+ "setPermissions": {
+ "button": "Set permissions",
+ "setPermissionsSuccessful": "Permissions set successfully"
}
}
diff --git a/scm-ui/public/locales/en/repos.json b/scm-ui/public/locales/en/repos.json
index 94e6dd7fdb..bdb0491489 100644
--- a/scm-ui/public/locales/en/repos.json
+++ b/scm-ui/public/locales/en/repos.json
@@ -11,41 +11,58 @@
"name-invalid": "The repository name is invalid",
"contact-invalid": "Contact must be a valid mail address"
},
+ "help": {
+ "nameHelpText": "The name of the repository. This name will be part of the repository url.",
+ "typeHelpText": "The type of the repository (e.g. Mercurial, Git or Subversion).",
+ "contactHelpText": "Email address of the person who is responsible for this repository.",
+ "descriptionHelpText": "A short description of the repository."
+ },
+ "repositoryRoot": {
+ "errorTitle": "Error",
+ "errorSubtitle": "Unknown repository error",
+ "menu": {
+ "navigationLabel": "Repository Navigation",
+ "informationNavLink": "Information",
+ "historyNavLink": "Commits",
+ "sourcesNavLink": "Sources",
+ "settingsNavLink": "Settings",
+ "generalNavLink": "General",
+ "permissionsNavLink": "Permissions"
+ }
+ },
"overview": {
"title": "Repositories",
"subtitle": "Overview of available repositories",
- "create-button": "Create Repository"
- },
- "repository-root": {
- "error-title": "Error",
- "error-subtitle": "Unknown repository error",
- "actions-label": "Actions",
- "back-label": "Back",
- "navigation-label": "Navigation",
- "history": "Commits",
- "information": "Information",
- "permissions": "Permissions",
- "sources": "Sources"
+ "createButton": "Create Repository"
},
"create": {
"title": "Create Repository",
"subtitle": "Create a new repository"
},
- "repository-form": {
- "submit": "Save"
+ "changesets": {
+ "errorTitle": "Error",
+ "errorSubtitle": "Could not fetch changesets",
+ "branchSelectorLabel": "Branches"
},
- "edit-nav-link": {
- "label": "Edit"
- },
- "delete-nav-action": {
- "label": "Delete",
- "confirm-alert": {
- "title": "Delete Repository",
- "message": "Do you really want to delete the repository?",
- "submit": "Yes",
- "cancel": "No"
+ "changeset": {
+ "description": "Description",
+ "summary": "Changeset {{id}} was committed {{time}}",
+ "shortSummary": "Committed {{id}} {{time}}",
+ "tags": "Tags",
+ "diffNotSupported": "Diff of changesets is not supported by the type of repository",
+ "author": {
+ "prefix": "Authored by",
+ "mailto": "Send mail to"
+ },
+ "buttons": {
+ "details": "Details",
+ "sources": "Sources"
}
},
+ "repositoryForm": {
+ "subtitle": "Edit Repository",
+ "submit": "Save"
+ },
"sources": {
"file-tree": {
"name": "Name",
@@ -65,36 +82,8 @@
"size": "Size"
}
},
- "changesets": {
- "diff": {
- "not-supported": "Diff of changesets is not supported by the type of repository"
- },
- "error-title": "Error",
- "error-subtitle": "Could not fetch changesets",
- "changeset": {
- "id": "ID",
- "description": "Description",
- "contact": "Contact",
- "date": "Date",
- "summary": "Changeset {{id}} was committed {{time}}",
- "short-summary": "Committed {{id}} {{time}}"
- },
- "tags": "Tags",
- "author": {
- "name": "Author",
- "mail": "Mail",
- "prefix": "Authored by",
- "mailto": "Send mail to"
- },
- "buttons": {
- "details": "Details",
- "sources": "Sources"
- }
- },
- "branch-selector": {
- "label": "Branches"
- },
"permission": {
+ "title": "Edit Permissions",
"user": "User",
"group": "Group",
"error-title": "Error",
@@ -114,7 +103,7 @@
"delete-permission-button": {
"label": "Delete",
"confirm-alert": {
- "title": "Delete Permission",
+ "title": "Delete permission",
"message": "Do you really want to delete the permission?",
"submit": "Yes",
"cancel": "No"
@@ -146,10 +135,14 @@
}
}
},
- "help": {
- "nameHelpText": "The name of the repository. This name will be part of the repository url.",
- "typeHelpText": "The type of the repository (e.g. Mercurial, Git or Subversion).",
- "contactHelpText": "Email address of the person who is responsible for this repository.",
- "descriptionHelpText": "A short description of the repository."
+ "deleteRepo": {
+ "subtitle": "Delete Repository",
+ "button": "Delete",
+ "confirmAlert": {
+ "title": "Delete repository",
+ "message": "Do you really want to delete the repository?",
+ "submit": "Yes",
+ "cancel": "No"
+ }
}
}
diff --git a/scm-ui/public/locales/en/users.json b/scm-ui/public/locales/en/users.json
index 4c671617ec..2b72d85cbc 100644
--- a/scm-ui/public/locales/en/users.json
+++ b/scm-ui/public/locales/en/users.json
@@ -10,59 +10,55 @@
"creationDate": "Creation Date",
"lastModified": "Last Modified"
},
- "users": {
- "title": "Users",
- "subtitle": "Create, read, update and delete users"
- },
- "create-user-button": {
- "label": "Create User"
- },
- "delete-user-button": {
- "label": "Delete",
- "confirm-alert": {
- "title": "Delete User",
- "message": "Do you really want to delete the user?",
- "submit": "Yes",
- "cancel": "No"
- }
- },
- "edit-user-button": {
- "label": "Edit"
- },
- "set-password-button": {
- "label": "Set Password"
- },
- "set-permissions-button": {
- "label": "Set Permissions"
- },
- "user-form": {
- "submit": "Submit"
- },
- "add-user": {
- "title": "Create User",
- "subtitle": "Create a new user"
- },
- "single-user": {
- "error-title": "Error",
- "error-subtitle": "Unknown user error",
- "navigation-label": "Navigation",
- "actions-label": "Actions",
- "information-label": "Information",
- "back-label": "Back"
- },
"validation": {
"mail-invalid": "This email is invalid",
"name-invalid": "This name is invalid",
"displayname-invalid": "This displayname is invalid"
},
- "password": {
- "set-password-successful": "Password successfully set"
- },
"help": {
"usernameHelpText": "Unique name of the user.",
"displayNameHelpText": "Display name of the user.",
"mailHelpText": "Email address of the user.",
"adminHelpText": "An administrator is able to create, modify and delete repositories, groups and users.",
"activeHelpText": "Activate or deactivate the user."
+ },
+ "users": {
+ "title": "Users",
+ "subtitle": "Create, read, update and delete users",
+ "createButton": "Create User"
+ },
+ "singleUser": {
+ "errorTitle": "Error",
+ "errorSubtitle": "Unknown user error",
+ "menu": {
+ "navigationLabel": "User Navigation",
+ "informationNavLink": "Information",
+ "settingsNavLink": "Settings",
+ "generalNavLink": "General",
+ "setPasswordNavLink": "Password",
+ "setPermissionsNavLink": "Permissions"
+ }
+ },
+ "addUser": {
+ "title": "Create User",
+ "subtitle": "Create a new user"
+ },
+ "deleteUser": {
+ "subtitle": "Delete User",
+ "button": "Delete",
+ "confirmAlert": {
+ "title": "Delete user",
+ "message": "Do you really want to delete the user?",
+ "submit": "Yes",
+ "cancel": "No"
+ }
+ },
+ "singleUserPassword": {
+ "button": "Set password",
+ "setPasswordSuccessful": "Password successfully set"
+ },
+ "userForm": {
+ "subtitle": "Edit User",
+ "button": "Submit"
}
}
diff --git a/scm-ui/src/config/containers/Config.js b/scm-ui/src/config/containers/Config.js
index 60dc9bb75f..04de525c95 100644
--- a/scm-ui/src/config/containers/Config.js
+++ b/scm-ui/src/config/containers/Config.js
@@ -1,86 +1,87 @@
-// @flow
-import React from "react";
-import { translate } from "react-i18next";
-import { Route } from "react-router";
-import { ExtensionPoint } from "@scm-manager/ui-extensions";
-
-import type { Links } from "@scm-manager/ui-types";
-import { Page, Navigation, NavLink, Section } from "@scm-manager/ui-components";
-import GlobalConfig from "./GlobalConfig";
-import type { History } from "history";
-import {connect} from "react-redux";
-import {compose} from "redux";
-import { getLinks } from "../../modules/indexResource";
-
-type Props = {
- links: Links,
-
- // context objects
- t: string => string,
- match: any,
- history: History
-};
-
-class Config extends React.Component {
- stripEndingSlash = (url: string) => {
- if (url.endsWith("/")) {
- return url.substring(0, url.length - 2);
- }
- return url;
- };
-
- matchedUrl = () => {
- return this.stripEndingSlash(this.props.match.url);
- };
-
- render() {
- const { links, t } = this.props;
-
- const url = this.matchedUrl();
- const extensionProps = {
- links,
- url
- };
-
- return (
-
-
-
- );
- }
-}
-
-const mapStateToProps = (state: any) => {
- const links = getLinks(state);
- return {
- links
- };
-};
-
-export default compose(
- connect(mapStateToProps),
- translate("config")
-)(Config);
-
+// @flow
+import React from "react";
+import { translate } from "react-i18next";
+import { Route } from "react-router";
+import { ExtensionPoint } from "@scm-manager/ui-extensions";
+
+import type { Links } from "@scm-manager/ui-types";
+import { Page, Navigation, NavLink, Section } from "@scm-manager/ui-components";
+import GlobalConfig from "./GlobalConfig";
+import type { History } from "history";
+import { connect } from "react-redux";
+import { compose } from "redux";
+import { getLinks } from "../../modules/indexResource";
+
+type Props = {
+ links: Links,
+
+ // context objects
+ t: string => string,
+ match: any,
+ history: History
+};
+
+class Config extends React.Component {
+ stripEndingSlash = (url: string) => {
+ if (url.endsWith("/")) {
+ return url.substring(0, url.length - 2);
+ }
+ return url;
+ };
+
+ matchedUrl = () => {
+ return this.stripEndingSlash(this.props.match.url);
+ };
+
+ render() {
+ const { links, t } = this.props;
+
+ const url = this.matchedUrl();
+ const extensionProps = {
+ links,
+ url
+ };
+
+ return (
+
+
+
+ );
+ }
+}
+
+const mapStateToProps = (state: any) => {
+ const links = getLinks(state);
+ return {
+ links
+ };
+};
+
+export default compose(
+ connect(mapStateToProps),
+ translate("config")
+)(Config);
diff --git a/scm-ui/src/config/containers/GlobalConfig.js b/scm-ui/src/config/containers/GlobalConfig.js
index 71be3fdd7f..eac8e27bee 100644
--- a/scm-ui/src/config/containers/GlobalConfig.js
+++ b/scm-ui/src/config/containers/GlobalConfig.js
@@ -78,8 +78,8 @@ class GlobalConfig extends React.Component {
if (error) {
return (
@@ -91,7 +91,7 @@ class GlobalConfig extends React.Component {
return (
-
+
{this.renderConfigChangedNotification()}
this.modifyConfig(config)}
diff --git a/scm-ui/src/containers/Login.js b/scm-ui/src/containers/Login.js
index e8c5352d58..3ee9b141ef 100644
--- a/scm-ui/src/containers/Login.js
+++ b/scm-ui/src/containers/Login.js
@@ -143,7 +143,6 @@ class Login extends React.Component {
/>
diff --git a/scm-ui/src/containers/Main.js b/scm-ui/src/containers/Main.js
index d2bc50faf2..e963fb00f9 100644
--- a/scm-ui/src/containers/Main.js
+++ b/scm-ui/src/containers/Main.js
@@ -10,7 +10,7 @@ import Login from "../containers/Login";
import Logout from "../containers/Logout";
import { ProtectedRoute } from "@scm-manager/ui-components";
-import { ExtensionPoint } from "@scm-manager/ui-extensions";
+import {binder, ExtensionPoint } from "@scm-manager/ui-extensions";
import AddUser from "../users/containers/AddUser";
import SingleUser from "../users/containers/SingleUser";
@@ -32,10 +32,15 @@ type Props = {
class Main extends React.Component {
render() {
const { authenticated, links } = this.props;
+ const redirectUrlFactory = binder.getExtension("main.redirect", this.props);
+ let url ="/repos";
+ if (redirectUrlFactory){
+ url = redirectUrlFactory(this.props);
+ }
return (
-
+
{
);
}
+ const extensionProps = {
+ me,
+ url
+ };
+
return (
-
-
diff --git a/scm-ui/src/containers/ProfileInfo.js b/scm-ui/src/containers/ProfileInfo.js
index 4c333174d1..49c79f1fe8 100644
--- a/scm-ui/src/containers/ProfileInfo.js
+++ b/scm-ui/src/containers/ProfileInfo.js
@@ -28,30 +28,20 @@ class ProfileInfo extends React.Component
{
-
- | {t("profile.username")} |
- {me.name} |
-
-
- | {t("profile.displayName")} |
- {me.displayName} |
-
-
- | {t("profile.mail")} |
-
-
- |
-
-
- | {t("profile.groups")} |
-
-
- {me.groups.map((group) => {
- return - {group}
;
- })}
-
- |
-
+
+ | {t("profile.username")} |
+ {me.name} |
+
+
+ | {t("profile.displayName")} |
+ {me.displayName} |
+
+
+ | {t("profile.mail")} |
+
+
+ |
+
diff --git a/scm-ui/src/groups/components/GroupForm.js b/scm-ui/src/groups/components/GroupForm.js
index 7cc2ee5d24..8693cb9b47 100644
--- a/scm-ui/src/groups/components/GroupForm.js
+++ b/scm-ui/src/groups/components/GroupForm.js
@@ -2,6 +2,7 @@
import React from "react";
import { translate } from "react-i18next";
import {
+ Subtitle,
AutocompleteAddEntryToTableField,
LabelWithHelpIcon,
MemberNameTable,
@@ -71,59 +72,67 @@ class GroupForm extends React.Component {
};
render() {
- const { t, loading } = this.props;
+ const { loading, t } = this.props;
const { group } = this.state;
let nameField = null;
+ let subtitle = null;
if (!this.props.group) {
+ // create new group
nameField = (
);
+ } else {
+ // edit existing group
+ subtitle = ;
}
return (
-
+
+
+
+ >
);
}
diff --git a/scm-ui/src/groups/components/navLinks/DeleteGroupNavLink.js b/scm-ui/src/groups/components/navLinks/DeleteGroupNavLink.js
deleted file mode 100644
index 71119b6e9f..0000000000
--- a/scm-ui/src/groups/components/navLinks/DeleteGroupNavLink.js
+++ /dev/null
@@ -1,56 +0,0 @@
-// @flow
-import React from "react";
-import { translate } from "react-i18next";
-import type { Group } from "@scm-manager/ui-types";
-import { NavAction, confirmAlert } from "@scm-manager/ui-components";
-
-type Props = {
- group: Group,
- confirmDialog?: boolean,
- t: string => string,
- deleteGroup: (group: Group) => void
-};
-
-export class DeleteGroupNavLink extends React.Component {
- static defaultProps = {
- confirmDialog: true
- };
-
- deleteGroup = () => {
- this.props.deleteGroup(this.props.group);
- };
-
- confirmDelete = () => {
- const { t } = this.props;
- confirmAlert({
- title: t("delete-group-button.confirm-alert.title"),
- message: t("delete-group-button.confirm-alert.message"),
- buttons: [
- {
- label: t("delete-group-button.confirm-alert.submit"),
- onClick: () => this.deleteGroup(),
- },
- {
- label: t("delete-group-button.confirm-alert.cancel"),
- onClick: () => null
- }
- ]
- });
- };
-
- isDeletable = () => {
- return this.props.group._links.delete;
- };
-
- render() {
- const { confirmDialog, t } = this.props;
- const action = confirmDialog ? this.confirmDelete : this.deleteGroup;
-
- if (!this.isDeletable()) {
- return null;
- }
- return ;
- }
-}
-
-export default translate("groups")(DeleteGroupNavLink);
diff --git a/scm-ui/src/groups/components/navLinks/DeleteGroupNavLink.test.js b/scm-ui/src/groups/components/navLinks/DeleteGroupNavLink.test.js
deleted file mode 100644
index 49f8d95c63..0000000000
--- a/scm-ui/src/groups/components/navLinks/DeleteGroupNavLink.test.js
+++ /dev/null
@@ -1,82 +0,0 @@
-import React from "react";
-import { mount, shallow } from "enzyme";
-import "../../../tests/enzyme";
-import "../../../tests/i18n";
-import DeleteGroupNavLink from "./DeleteGroupNavLink";
-
-import { confirmAlert } from "@scm-manager/ui-components";
-jest.mock("@scm-manager/ui-components", () => ({
- confirmAlert: jest.fn(),
- NavAction: require.requireActual("@scm-manager/ui-components").NavAction
-}));
-
-describe("DeleteGroupNavLink", () => {
- it("should render nothing, if the delete link is missing", () => {
- const group = {
- _links: {}
- };
-
- const navLink = shallow(
- {}} />
- );
- expect(navLink.text()).toBe("");
- });
-
- it("should render the navLink", () => {
- const group = {
- _links: {
- delete: {
- href: "/groups"
- }
- }
- };
-
- const navLink = mount(
- {}} />
- );
- expect(navLink.text()).not.toBe("");
- });
-
- it("should open the confirm dialog on navLink click", () => {
- const group = {
- _links: {
- delete: {
- href: "/groups"
- }
- }
- };
-
- const navLink = mount(
- {}} />
- );
- navLink.find("a").simulate("click");
-
- expect(confirmAlert.mock.calls.length).toBe(1);
- });
-
- it("should call the delete group function with delete url", () => {
- const group = {
- _links: {
- delete: {
- href: "/groups"
- }
- }
- };
-
- let calledUrl = null;
- function capture(group) {
- calledUrl = group._links.delete.href;
- }
-
- const navLink = mount(
-
- );
- navLink.find("a").simulate("click");
-
- expect(calledUrl).toBe("/groups");
- });
-});
diff --git a/scm-ui/src/groups/components/navLinks/EditGroupNavLink.js b/scm-ui/src/groups/components/navLinks/EditGroupNavLink.js
index e8bcd26385..9713c5c5c9 100644
--- a/scm-ui/src/groups/components/navLinks/EditGroupNavLink.js
+++ b/scm-ui/src/groups/components/navLinks/EditGroupNavLink.js
@@ -1,29 +1,28 @@
//@flow
import React from "react";
+import type { Group } from "@scm-manager/ui-types";
import { NavLink } from "@scm-manager/ui-components";
import { translate } from "react-i18next";
-import type { Group } from "@scm-manager/ui-types";
type Props = {
- t: string => string,
+ group: Group,
editUrl: string,
- group: Group
+ t: string => string
};
-type State = {};
-
-class EditGroupNavLink extends React.Component {
- render() {
- const { t, editUrl } = this.props;
- if (!this.isEditable()) {
- return null;
- }
- return ;
- }
-
+class EditGroupNavLink extends React.Component {
isEditable = () => {
return this.props.group._links.update;
};
+
+ render() {
+ const { t, editUrl } = this.props;
+
+ if (!this.isEditable()) {
+ return null;
+ }
+ return ;
+ }
}
export default translate("groups")(EditGroupNavLink);
diff --git a/scm-ui/src/groups/components/navLinks/editGroupNavLink.test.js b/scm-ui/src/groups/components/navLinks/EditGroupNavLink.test.js
similarity index 100%
rename from scm-ui/src/groups/components/navLinks/editGroupNavLink.test.js
rename to scm-ui/src/groups/components/navLinks/EditGroupNavLink.test.js
diff --git a/scm-ui/src/groups/components/navLinks/SetPermissionsNavLink.js b/scm-ui/src/groups/components/navLinks/SetPermissionsNavLink.js
index a1314f9987..b2d7062f5e 100644
--- a/scm-ui/src/groups/components/navLinks/SetPermissionsNavLink.js
+++ b/scm-ui/src/groups/components/navLinks/SetPermissionsNavLink.js
@@ -17,7 +17,7 @@ class ChangePermissionNavLink extends React.Component {
if (!this.hasPermissionToSetPermission()) {
return null;
}
- return ;
+ return ;
}
hasPermissionToSetPermission = () => {
diff --git a/scm-ui/src/groups/components/navLinks/index.js b/scm-ui/src/groups/components/navLinks/index.js
index e589e5b6c9..992e9ab9a3 100644
--- a/scm-ui/src/groups/components/navLinks/index.js
+++ b/scm-ui/src/groups/components/navLinks/index.js
@@ -1,3 +1,2 @@
-export { default as DeleteGroupNavLink } from "./DeleteGroupNavLink";
export { default as EditGroupNavLink } from "./EditGroupNavLink";
export { default as SetPermissionsNavLink } from "./SetPermissionsNavLink";
diff --git a/scm-ui/src/groups/containers/DeleteGroup.js b/scm-ui/src/groups/containers/DeleteGroup.js
new file mode 100644
index 0000000000..d497e4434d
--- /dev/null
+++ b/scm-ui/src/groups/containers/DeleteGroup.js
@@ -0,0 +1,113 @@
+// @flow
+import React from "react";
+import { translate } from "react-i18next";
+import type { Group } from "@scm-manager/ui-types";
+import {
+ Subtitle,
+ DeleteButton,
+ confirmAlert,
+ ErrorNotification
+} from "@scm-manager/ui-components";
+import {
+ deleteGroup,
+ getDeleteGroupFailure,
+ isDeleteGroupPending
+} from "../modules/groups";
+import { connect } from "react-redux";
+import { withRouter } from "react-router-dom";
+import type { History } from "history";
+
+type Props = {
+ loading: boolean,
+ error: Error,
+ group: Group,
+ confirmDialog?: boolean,
+ deleteGroup: (group: Group, callback?: () => void) => void,
+
+ // context props
+ history: History,
+ t: string => string
+};
+
+export class DeleteGroup extends React.Component {
+ static defaultProps = {
+ confirmDialog: true
+ };
+
+ deleteGroup = () => {
+ this.props.deleteGroup(this.props.group, this.groupDeleted);
+ };
+
+ groupDeleted = () => {
+ this.props.history.push("/groups");
+ };
+
+ confirmDelete = () => {
+ const { t } = this.props;
+ confirmAlert({
+ title: t("deleteGroup.confirmAlert.title"),
+ message: t("deleteGroup.confirmAlert.message"),
+ buttons: [
+ {
+ label: t("deleteGroup.confirmAlert.submit"),
+ onClick: () => this.deleteGroup()
+ },
+ {
+ label: t("deleteGroup.confirmAlert.cancel"),
+ onClick: () => null
+ }
+ ]
+ });
+ };
+
+ isDeletable = () => {
+ return this.props.group._links.delete;
+ };
+
+ render() {
+ const { loading, error, confirmDialog, t } = this.props;
+ const action = confirmDialog ? this.confirmDelete : this.deleteGroup;
+
+ if (!this.isDeletable()) {
+ return null;
+ }
+
+ return (
+ <>
+
+
+
+ >
+ );
+ }
+}
+
+const mapStateToProps = (state, ownProps) => {
+ const loading = isDeleteGroupPending(state, ownProps.group.name);
+ const error = getDeleteGroupFailure(state, ownProps.group.name);
+ return {
+ loading,
+ error
+ };
+};
+
+const mapDispatchToProps = dispatch => {
+ return {
+ deleteGroup: (group: Group, callback?: () => void) => {
+ dispatch(deleteGroup(group, callback));
+ }
+ };
+};
+
+export default connect(
+ mapStateToProps,
+ mapDispatchToProps
+)(withRouter(translate("groups")(DeleteGroup)));
diff --git a/scm-ui/src/groups/containers/EditGroup.js b/scm-ui/src/groups/containers/EditGroup.js
index 223ea1eef6..a1f9f31e46 100644
--- a/scm-ui/src/groups/containers/EditGroup.js
+++ b/scm-ui/src/groups/containers/EditGroup.js
@@ -3,9 +3,9 @@ import React from "react";
import { connect } from "react-redux";
import GroupForm from "../components/GroupForm";
import {
+ modifyGroup,
getModifyGroupFailure,
isModifyGroupPending,
- modifyGroup,
modifyGroupReset
} from "../modules/groups";
import type { History } from "history";
@@ -13,12 +13,13 @@ import { withRouter } from "react-router-dom";
import type { Group } from "@scm-manager/ui-types";
import { ErrorNotification } from "@scm-manager/ui-components";
import { getUserAutoCompleteLink } from "../../modules/indexResource";
+import DeleteGroup from "./DeleteGroup";
type Props = {
group: Group,
+ fetchGroup: (name: string) => void,
modifyGroup: (group: Group, callback?: () => void) => void,
modifyGroupReset: Group => void,
- fetchGroup: (name: string) => void,
autocompleteLink: string,
history: History,
loading?: boolean,
@@ -54,7 +55,7 @@ class EditGroup extends React.Component {
};
render() {
- const { group, loading, error } = this.props;
+ const { loading, error, group } = this.props;
return (
@@ -66,6 +67,8 @@ class EditGroup extends React.Component
{
loading={loading}
loadUserSuggestions={this.loadUserAutocompletion}
/>
+
+
);
}
diff --git a/scm-ui/src/groups/containers/SingleGroup.js b/scm-ui/src/groups/containers/SingleGroup.js
index 19c5d53c01..f8d88d7a7d 100644
--- a/scm-ui/src/groups/containers/SingleGroup.js
+++ b/scm-ui/src/groups/containers/SingleGroup.js
@@ -6,33 +6,30 @@ import {
ErrorPage,
Loading,
Navigation,
+ SubNavigation,
Section,
NavLink
} from "@scm-manager/ui-components";
import { Route } from "react-router";
import { Details } from "./../components/table";
import {
- DeleteGroupNavLink,
EditGroupNavLink,
SetPermissionsNavLink
} from "./../components/navLinks";
import type { Group } from "@scm-manager/ui-types";
import type { History } from "history";
import {
- deleteGroup,
fetchGroupByName,
getGroupByName,
isFetchGroupPending,
- getFetchGroupFailure,
- getDeleteGroupFailure,
- isDeleteGroupPending
+ getFetchGroupFailure
} from "../modules/groups";
import { translate } from "react-i18next";
import EditGroup from "./EditGroup";
import { getGroupsLink } from "../../modules/indexResource";
import SetPermissions from "../../permissions/components/SetPermissions";
-import {ExtensionPoint} from "@scm-manager/ui-extensions";
+import { ExtensionPoint } from "@scm-manager/ui-extensions";
type Props = {
name: string,
@@ -42,7 +39,6 @@ type Props = {
groupLink: string,
// dispatcher functions
- deleteGroup: (group: Group, callback?: () => void) => void,
fetchGroupByName: (string, string) => void,
// context objects
@@ -63,14 +59,6 @@ class SingleGroup extends React.Component {
return url;
};
- deleteGroup = (group: Group) => {
- this.props.deleteGroup(group, this.groupDeleted);
- };
-
- groupDeleted = () => {
- this.props.history.push("/groups");
- };
-
matchedUrl = () => {
return this.stripEndingSlash(this.props.match.url);
};
@@ -81,8 +69,8 @@ class SingleGroup extends React.Component {
if (error) {
return (
);
@@ -109,15 +97,17 @@ class SingleGroup extends React.Component {
component={() => }
/>
}
/>
(
-
+
)}
/>
{
-
@@ -167,10 +159,8 @@ class SingleGroup extends React.Component {
const mapStateToProps = (state, ownProps) => {
const name = ownProps.match.params.name;
const group = getGroupByName(state, name);
- const loading =
- isFetchGroupPending(state, name) || isDeleteGroupPending(state, name);
- const error =
- getFetchGroupFailure(state, name) || getDeleteGroupFailure(state, name);
+ const loading = isFetchGroupPending(state, name);
+ const error = getFetchGroupFailure(state, name);
const groupLink = getGroupsLink(state);
return {
@@ -186,9 +176,6 @@ const mapDispatchToProps = dispatch => {
return {
fetchGroupByName: (link: string, name: string) => {
dispatch(fetchGroupByName(link, name));
- },
- deleteGroup: (group: Group, callback?: () => void) => {
- dispatch(deleteGroup(group, callback));
}
};
};
diff --git a/scm-ui/src/permissions/components/SetPermissions.js b/scm-ui/src/permissions/components/SetPermissions.js
index e7e561d739..d78177a745 100644
--- a/scm-ui/src/permissions/components/SetPermissions.js
+++ b/scm-ui/src/permissions/components/SetPermissions.js
@@ -113,7 +113,7 @@ class SetPermissions extends React.Component {
message = (
this.onClose()}
/>
);
@@ -128,7 +128,7 @@ class SetPermissions extends React.Component {
);
diff --git a/scm-ui/src/repos/components/DeleteNavAction.js b/scm-ui/src/repos/components/DeleteNavAction.js
deleted file mode 100644
index fe35a9caf1..0000000000
--- a/scm-ui/src/repos/components/DeleteNavAction.js
+++ /dev/null
@@ -1,58 +0,0 @@
-//@flow
-import React from "react";
-import { translate } from "react-i18next";
-import { NavAction, confirmAlert } from "@scm-manager/ui-components";
-import type { Repository } from "@scm-manager/ui-types";
-
-type Props = {
- repository: Repository,
- confirmDialog?: boolean,
- delete: Repository => void,
-
- // context props
- t: string => string
-};
-
-class DeleteNavAction extends React.Component {
- static defaultProps = {
- confirmDialog: true
- };
-
- delete = () => {
- this.props.delete(this.props.repository);
- };
-
- confirmDelete = () => {
- const { t } = this.props;
- confirmAlert({
- title: t("delete-nav-action.confirm-alert.title"),
- message: t("delete-nav-action.confirm-alert.message"),
- buttons: [
- {
- label: t("delete-nav-action.confirm-alert.submit"),
- onClick: () => this.delete()
- },
- {
- label: t("delete-nav-action.confirm-alert.cancel"),
- onClick: () => null
- }
- ]
- });
- };
-
- isDeletable = () => {
- return this.props.repository._links.delete;
- };
-
- render() {
- const { confirmDialog, t } = this.props;
- const action = confirmDialog ? this.confirmDelete : this.delete();
-
- if (!this.isDeletable()) {
- return null;
- }
- return ;
- }
-}
-
-export default translate("repos")(DeleteNavAction);
diff --git a/scm-ui/src/repos/components/DeleteNavAction.test.js b/scm-ui/src/repos/components/DeleteNavAction.test.js
deleted file mode 100644
index 7c2191864a..0000000000
--- a/scm-ui/src/repos/components/DeleteNavAction.test.js
+++ /dev/null
@@ -1,82 +0,0 @@
-import React from "react";
-import { mount, shallow } from "enzyme";
-import "../../tests/enzyme";
-import "../../tests/i18n";
-import DeleteNavAction from "./DeleteNavAction";
-
-import { confirmAlert } from "@scm-manager/ui-components";
-jest.mock("@scm-manager/ui-components", () => ({
- confirmAlert: jest.fn(),
- NavAction: require.requireActual("@scm-manager/ui-components").NavAction
-}));
-
-describe("DeleteNavAction", () => {
- it("should render nothing, if the delete link is missing", () => {
- const repository = {
- _links: {}
- };
-
- const navLink = shallow(
- {}} />
- );
- expect(navLink.text()).toBe("");
- });
-
- it("should render the navLink", () => {
- const repository = {
- _links: {
- delete: {
- href: "/repositories"
- }
- }
- };
-
- const navLink = mount(
- {}} />
- );
- expect(navLink.text()).not.toBe("");
- });
-
- it("should open the confirm dialog on navLink click", () => {
- const repository = {
- _links: {
- delete: {
- href: "/repositorys"
- }
- }
- };
-
- const navLink = mount(
- {}} />
- );
- navLink.find("a").simulate("click");
-
- expect(confirmAlert.mock.calls.length).toBe(1);
- });
-
- it("should call the delete repository function with delete url", () => {
- const repository = {
- _links: {
- delete: {
- href: "/repos"
- }
- }
- };
-
- let calledUrl = null;
- function capture(repository) {
- calledUrl = repository._links.delete.href;
- }
-
- const navLink = mount(
-
- );
- navLink.find("a").simulate("click");
-
- expect(calledUrl).toBe("/repos");
- });
-});
diff --git a/scm-ui/src/repos/components/EditNavLink.js b/scm-ui/src/repos/components/EditRepoNavLink.js
similarity index 57%
rename from scm-ui/src/repos/components/EditNavLink.js
rename to scm-ui/src/repos/components/EditRepoNavLink.js
index a42625a154..9a502cdafb 100644
--- a/scm-ui/src/repos/components/EditNavLink.js
+++ b/scm-ui/src/repos/components/EditRepoNavLink.js
@@ -1,22 +1,28 @@
//@flow
import React from "react";
+import type { Repository } from "@scm-manager/ui-types";
import { NavLink } from "@scm-manager/ui-components";
import { translate } from "react-i18next";
-import type { Repository } from "@scm-manager/ui-types";
-type Props = { editUrl: string, t: string => string, repository: Repository };
+type Props = {
+ repository: Repository,
+ editUrl: string,
+ t: string => string
+};
-class EditNavLink extends React.Component {
+class EditRepoNavLink extends React.Component {
isEditable = () => {
return this.props.repository._links.update;
};
+
render() {
+ const { editUrl, t } = this.props;
+
if (!this.isEditable()) {
return null;
}
- const { editUrl, t } = this.props;
- return ;
+ return ;
}
}
-export default translate("repos")(EditNavLink);
+export default translate("repos")(EditRepoNavLink);
diff --git a/scm-ui/src/repos/components/EditNavLink.test.js b/scm-ui/src/repos/components/EditRepoNavLink.test.js
similarity index 71%
rename from scm-ui/src/repos/components/EditNavLink.test.js
rename to scm-ui/src/repos/components/EditRepoNavLink.test.js
index fdb13ade8d..22bb06fae0 100644
--- a/scm-ui/src/repos/components/EditNavLink.test.js
+++ b/scm-ui/src/repos/components/EditRepoNavLink.test.js
@@ -3,9 +3,9 @@ import { shallow, mount } from "enzyme";
import "../../tests/enzyme";
import "../../tests/i18n";
import ReactRouterEnzymeContext from "react-router-enzyme-context";
-import EditNavLink from "./EditNavLink";
+import EditRepoNavLink from "./EditRepoNavLink";
-describe("EditNavLink", () => {
+describe("GeneralNavLink", () => {
const options = new ReactRouterEnzymeContext();
it("should render nothing, if the modify link is missing", () => {
@@ -14,7 +14,7 @@ describe("EditNavLink", () => {
};
const navLink = shallow(
- ,
+ ,
options.get()
);
expect(navLink.text()).toBe("");
@@ -30,9 +30,9 @@ describe("EditNavLink", () => {
};
const navLink = mount(
- ,
+ ,
options.get()
);
- expect(navLink.text()).toBe(" edit-nav-link.label");
+ expect(navLink.text()).toBe("repositoryRoot.menu.generalNavLink");
});
});
diff --git a/scm-ui/src/repos/components/PermissionsNavLink.js b/scm-ui/src/repos/components/PermissionsNavLink.js
index 3a6f97588b..773ad94246 100644
--- a/scm-ui/src/repos/components/PermissionsNavLink.js
+++ b/scm-ui/src/repos/components/PermissionsNavLink.js
@@ -20,7 +20,7 @@ class PermissionsNavLink extends React.Component {
}
const { permissionUrl, t } = this.props;
return (
-
+
);
}
}
diff --git a/scm-ui/src/repos/components/PermissionsNavLink.test.js b/scm-ui/src/repos/components/PermissionsNavLink.test.js
index 901175caa0..3f6a95fe7d 100644
--- a/scm-ui/src/repos/components/PermissionsNavLink.test.js
+++ b/scm-ui/src/repos/components/PermissionsNavLink.test.js
@@ -33,6 +33,6 @@ describe("PermissionsNavLink", () => {
,
options.get()
);
- expect(navLink.text()).toBe(" repository-root.permissions");
+ expect(navLink.text()).toBe("repositoryRoot.menu.permissionsNavLink");
});
});
diff --git a/scm-ui/src/repos/components/changesets/ChangesetDetails.js b/scm-ui/src/repos/components/changesets/ChangesetDetails.js
index fab976b797..33d63a30d4 100644
--- a/scm-ui/src/repos/components/changesets/ChangesetDetails.js
+++ b/scm-ui/src/repos/components/changesets/ChangesetDetails.js
@@ -53,7 +53,7 @@ class ChangesetDetails extends React.Component {
@@ -72,7 +72,7 @@ class ChangesetDetails extends React.Component {
@@ -86,7 +86,7 @@ class ChangesetDetails extends React.Component {
return (
diff --git a/scm-ui/src/repos/components/form/RepositoryForm.js b/scm-ui/src/repos/components/form/RepositoryForm.js
index 8f5d932778..fcd88f0417 100644
--- a/scm-ui/src/repos/components/form/RepositoryForm.js
+++ b/scm-ui/src/repos/components/form/RepositoryForm.js
@@ -2,6 +2,7 @@
import React from "react";
import { translate } from "react-i18next";
import {
+ Subtitle,
InputField,
Select,
SubmitButton,
@@ -81,30 +82,39 @@ class RepositoryForm extends React.Component {
const { loading, t } = this.props;
const repository = this.state.repository;
- return (
-
+ return (
+ <>
+ {subtitle}
+
+ >
);
}
diff --git a/scm-ui/src/repos/components/list/RepositoryEntry.js b/scm-ui/src/repos/components/list/RepositoryEntry.js
index 28a6fe1ad3..b8b03a3523 100644
--- a/scm-ui/src/repos/components/list/RepositoryEntry.js
+++ b/scm-ui/src/repos/components/list/RepositoryEntry.js
@@ -64,7 +64,7 @@ class RepositoryEntry extends React.Component {
return (
);
}
diff --git a/scm-ui/src/repos/containers/ChangesetView.js b/scm-ui/src/repos/containers/ChangesetView.js
index 80ab0b71d6..dc53b5d798 100644
--- a/scm-ui/src/repos/containers/ChangesetView.js
+++ b/scm-ui/src/repos/containers/ChangesetView.js
@@ -37,8 +37,8 @@ class ChangesetView extends React.Component {
if (error) {
return (
);
diff --git a/scm-ui/src/repos/containers/Changesets.js b/scm-ui/src/repos/containers/Changesets.js
index 95bf0459a6..5edc677e60 100644
--- a/scm-ui/src/repos/containers/Changesets.js
+++ b/scm-ui/src/repos/containers/Changesets.js
@@ -1,8 +1,13 @@
// @flow
import React from "react";
-import {withRouter} from "react-router-dom";
-import type {Branch, Changeset, PagedCollection, Repository} from "@scm-manager/ui-types";
+import { withRouter } from "react-router-dom";
+import type {
+ Branch,
+ Changeset,
+ PagedCollection,
+ Repository
+} from "@scm-manager/ui-types";
import {
fetchChangesets,
getChangesets,
@@ -11,9 +16,15 @@ import {
selectListAsCollection
} from "../modules/changesets";
-import {connect} from "react-redux";
-import {ErrorNotification, getPageFromMatch, LinkPaginator, ChangesetList, Loading} from "@scm-manager/ui-components";
-import {compose} from "redux";
+import { connect } from "react-redux";
+import {
+ ErrorNotification,
+ getPageFromMatch,
+ LinkPaginator,
+ ChangesetList,
+ Loading
+} from "@scm-manager/ui-components";
+import { compose } from "redux";
type Props = {
repository: Repository,
@@ -64,13 +75,21 @@ class Changesets extends React.Component {
renderList = () => {
const { repository, changesets } = this.props;
- return ;
+ return (
+
+
+
+ );
};
renderPaginator = () => {
const { page, list } = this.props;
if (list) {
- return ;
+ return (
+
+
+
+ );
}
return null;
};
diff --git a/scm-ui/src/repos/containers/ChangesetsRoot.js b/scm-ui/src/repos/containers/ChangesetsRoot.js
index 2eea64b8e1..f6e0c3d359 100644
--- a/scm-ui/src/repos/containers/ChangesetsRoot.js
+++ b/scm-ui/src/repos/containers/ChangesetsRoot.js
@@ -89,10 +89,12 @@ class BranchRoot extends React.Component {
const changesets = ;
return (
- <>
+
+
{this.renderBranchSelector()}
+
changesets} />
- >
+
);
}
@@ -101,7 +103,7 @@ class BranchRoot extends React.Component {
if (repository._links.branches) {
return (
{
diff --git a/scm-ui/src/repos/containers/DeleteRepo.js b/scm-ui/src/repos/containers/DeleteRepo.js
new file mode 100644
index 0000000000..b621a1998b
--- /dev/null
+++ b/scm-ui/src/repos/containers/DeleteRepo.js
@@ -0,0 +1,114 @@
+//@flow
+import React from "react";
+import { translate } from "react-i18next";
+import type { Repository } from "@scm-manager/ui-types";
+import {
+ Subtitle,
+ DeleteButton,
+ confirmAlert,
+ ErrorNotification
+} from "@scm-manager/ui-components";
+import {
+ deleteRepo,
+ getDeleteRepoFailure,
+ isDeleteRepoPending
+} from "../modules/repos";
+import { connect } from "react-redux";
+import { withRouter } from "react-router-dom";
+import type { History } from "history";
+
+type Props = {
+ loading: boolean,
+ error: Error,
+ repository: Repository,
+ confirmDialog?: boolean,
+ deleteRepo: (Repository, () => void) => void,
+
+ // context props
+ history: History,
+ t: string => string
+};
+
+class DeleteRepo extends React.Component {
+ static defaultProps = {
+ confirmDialog: true
+ };
+
+ deleted = () => {
+ this.props.history.push("/repos");
+ };
+
+ deleteRepo = () => {
+ this.props.deleteRepo(this.props.repository, this.deleted);
+ };
+
+ confirmDelete = () => {
+ const { t } = this.props;
+ confirmAlert({
+ title: t("deleteRepo.confirmAlert.title"),
+ message: t("deleteRepo.confirmAlert.message"),
+ buttons: [
+ {
+ label: t("deleteRepo.confirmAlert.submit"),
+ onClick: () => this.deleteRepo()
+ },
+ {
+ label: t("deleteRepo.confirmAlert.cancel"),
+ onClick: () => null
+ }
+ ]
+ });
+ };
+
+ isDeletable = () => {
+ return this.props.repository._links.delete;
+ };
+
+ render() {
+ const { loading, error, confirmDialog, t } = this.props;
+ const action = confirmDialog ? this.confirmDelete : this.deleteRepo;
+
+ if (!this.isDeletable()) {
+ return null;
+ }
+
+ return (
+ <>
+
+
+
+ >
+ );
+ }
+}
+
+const mapStateToProps = (state, ownProps) => {
+ const { namespace, name } = ownProps.repository;
+ const loading = isDeleteRepoPending(state, namespace, name);
+ const error = getDeleteRepoFailure(state, namespace, name);
+ return {
+ loading,
+ error
+ };
+};
+
+const mapDispatchToProps = dispatch => {
+ return {
+ deleteRepo: (repo: Repository, callback: () => void) => {
+ dispatch(deleteRepo(repo, callback));
+ }
+ };
+};
+
+export default connect(
+ mapStateToProps,
+ mapDispatchToProps
+)(withRouter(translate("repos")(DeleteRepo)));
diff --git a/scm-ui/src/repos/containers/Edit.js b/scm-ui/src/repos/containers/EditRepo.js
similarity index 69%
rename from scm-ui/src/repos/containers/Edit.js
rename to scm-ui/src/repos/containers/EditRepo.js
index 816dae8de9..2e5bb69172 100644
--- a/scm-ui/src/repos/containers/Edit.js
+++ b/scm-ui/src/repos/containers/EditRepo.js
@@ -1,8 +1,9 @@
// @flow
import React from "react";
import { connect } from "react-redux";
-import { translate } from "react-i18next";
+import { withRouter } from "react-router-dom";
import RepositoryForm from "../components/form";
+import DeleteRepo from "./DeleteRepo";
import type { Repository } from "@scm-manager/ui-types";
import {
modifyRepo,
@@ -10,34 +11,55 @@ import {
getModifyRepoFailure,
modifyRepoReset
} from "../modules/repos";
-import { withRouter } from "react-router-dom";
import type { History } from "history";
import { ErrorNotification } from "@scm-manager/ui-components";
+import { ExtensionPoint } from "@scm-manager/ui-extensions";
type Props = {
- repository: Repository,
- modifyRepo: (Repository, () => void) => void,
- modifyRepoReset: Repository => void,
loading: boolean,
error: Error,
+ modifyRepo: (Repository, () => void) => void,
+ modifyRepoReset: Repository => void,
+
// context props
- t: string => string,
- history: History
+ repository: Repository,
+ history: History,
+ match: any
};
-class Edit extends React.Component {
+class EditRepo extends React.Component {
componentDidMount() {
const { modifyRepoReset, repository } = this.props;
modifyRepoReset(repository);
}
+
repoModified = () => {
const { history, repository } = this.props;
history.push(`/repo/${repository.namespace}/${repository.name}`);
};
+ stripEndingSlash = (url: string) => {
+ if (url.endsWith("/")) {
+ return url.substring(0, url.length - 2);
+ }
+ return url;
+ };
+
+ matchedUrl = () => {
+ return this.stripEndingSlash(this.props.match.url);
+ };
+
render() {
- const { loading, error } = this.props;
+ const { loading, error, repository } = this.props;
+
+ const url = this.matchedUrl();
+
+ const extensionProps = {
+ repository,
+ url
+ };
+
return (
@@ -48,6 +70,13 @@ class Edit extends React.Component
{
this.props.modifyRepo(repo, this.repoModified);
}}
/>
+
+
+
);
}
@@ -77,4 +106,4 @@ const mapDispatchToProps = dispatch => {
export default connect(
mapStateToProps,
mapDispatchToProps
-)(translate("repos")(withRouter(Edit)));
+)(withRouter(EditRepo));
diff --git a/scm-ui/src/repos/containers/Overview.js b/scm-ui/src/repos/containers/Overview.js
index bbafe14539..598b6c94f2 100644
--- a/scm-ui/src/repos/containers/Overview.js
+++ b/scm-ui/src/repos/containers/Overview.js
@@ -90,7 +90,7 @@ class Overview extends React.Component {
if (showCreateButton) {
return (
);
diff --git a/scm-ui/src/repos/containers/RepositoryRoot.js b/scm-ui/src/repos/containers/RepositoryRoot.js
index 4ab9382cc1..d0d722e1fd 100644
--- a/scm-ui/src/repos/containers/RepositoryRoot.js
+++ b/scm-ui/src/repos/containers/RepositoryRoot.js
@@ -1,20 +1,32 @@
//@flow
import React from "react";
-import {deleteRepo, fetchRepoByName, getFetchRepoFailure, getRepository, isFetchRepoPending} from "../modules/repos";
+import {
+ fetchRepoByName,
+ getFetchRepoFailure,
+ getRepository,
+ isFetchRepoPending
+} from "../modules/repos";
-import {connect} from "react-redux";
-import {Route, Switch} from "react-router-dom";
-import type {Repository} from "@scm-manager/ui-types";
+import { connect } from "react-redux";
+import { Route, Switch } from "react-router-dom";
+import type { Repository } from "@scm-manager/ui-types";
-import {ErrorPage, Loading, Navigation, NavLink, Page, Section} from "@scm-manager/ui-components";
-import {translate} from "react-i18next";
+import {
+ ErrorPage,
+ Loading,
+ Navigation,
+ SubNavigation,
+ NavLink,
+ Page,
+ Section
+} from "@scm-manager/ui-components";
+import { translate } from "react-i18next";
import RepositoryDetails from "../components/RepositoryDetails";
-import DeleteNavAction from "../components/DeleteNavAction";
-import Edit from "../containers/Edit";
+import EditRepo from "./EditRepo";
import Permissions from "../permissions/containers/Permissions";
-import type {History} from "history";
-import EditNavLink from "../components/EditNavLink";
+import type { History } from "history";
+import EditRepoNavLink from "../components/EditRepoNavLink";
import BranchRoot from "./ChangesetsRoot";
import ChangesetView from "./ChangesetView";
@@ -35,7 +47,6 @@ type Props = {
// dispatch functions
fetchRepoByName: (link: string, namespace: string, name: string) => void,
- deleteRepo: (repository: Repository, () => void) => void,
// context props
t: string => string,
@@ -61,14 +72,6 @@ class RepositoryRoot extends React.Component {
return this.stripEndingSlash(this.props.match.url);
};
- deleted = () => {
- this.props.history.push("/repos");
- };
-
- delete = (repository: Repository) => {
- this.props.deleteRepo(repository, this.deleted);
- };
-
matches = (route: any) => {
const url = this.matchedUrl();
const regex = new RegExp(`${url}(/branches)?/?[^/]*/changesets?.*`);
@@ -81,8 +84,8 @@ class RepositoryRoot extends React.Component {
if (error) {
return (
);
@@ -111,11 +114,11 @@ class RepositoryRoot extends React.Component {
component={() => }
/>
}
+ path={`${url}/settings/general`}
+ component={() => }
/>
(
{
-
-
+
+
@@ -186,23 +193,32 @@ class RepositoryRoot extends React.Component {
linkName="sources"
to={`${url}/sources`}
icon="fas fa-code"
- label={t("repository-root.sources")}
+ label={t("repositoryRoot.menu.sourcesNavLink")}
activeOnlyWhenExact={false}
/>
-
-
-
@@ -234,9 +250,6 @@ const mapDispatchToProps = dispatch => {
return {
fetchRepoByName: (link: string, namespace: string, name: string) => {
dispatch(fetchRepoByName(link, namespace, name));
- },
- deleteRepo: (repository: Repository, callback: () => void) => {
- dispatch(deleteRepo(repository, callback));
}
};
};
diff --git a/scm-ui/src/repos/permissions/containers/Permissions.js b/scm-ui/src/repos/permissions/containers/Permissions.js
index 7c20f503c5..38afea441b 100644
--- a/scm-ui/src/repos/permissions/containers/Permissions.js
+++ b/scm-ui/src/repos/permissions/containers/Permissions.js
@@ -24,6 +24,7 @@ import {
import {
Loading,
ErrorPage,
+ Subtitle,
LabelWithHelpIcon
} from "@scm-manager/ui-components";
import type {
@@ -143,6 +144,7 @@ class Permissions extends React.Component {
return (
+
diff --git a/scm-ui/src/repos/sources/components/FileTree.js b/scm-ui/src/repos/sources/components/FileTree.js
index cbe03df62f..18ef1b01c5 100644
--- a/scm-ui/src/repos/sources/components/FileTree.js
+++ b/scm-ui/src/repos/sources/components/FileTree.js
@@ -108,32 +108,34 @@ class FileTree extends React.Component {
}
return (
-
-
-
- |
- {t("sources.file-tree.name")} |
-
- {t("sources.file-tree.length")}
- |
-
- {t("sources.file-tree.lastModified")}
- |
-
- {t("sources.file-tree.description")}
- |
-
-
-
- {files.map(file => (
-
- ))}
-
-
+
+
+
+
+ |
+ {t("sources.file-tree.name")} |
+
+ {t("sources.file-tree.length")}
+ |
+
+ {t("sources.file-tree.lastModified")}
+ |
+
+ {t("sources.file-tree.description")}
+ |
+
+
+
+ {files.map(file => (
+
+ ))}
+
+
+
);
}
}
diff --git a/scm-ui/src/repos/sources/containers/Content.js b/scm-ui/src/repos/sources/containers/Content.js
index a7e9874058..2f3f5ba853 100644
--- a/scm-ui/src/repos/sources/containers/Content.js
+++ b/scm-ui/src/repos/sources/containers/Content.js
@@ -29,9 +29,6 @@ type State = {
};
const styles = {
- toCenterContent: {
- display: "block"
- },
pointer: {
cursor: "pointer"
},
@@ -126,7 +123,6 @@ class Content extends React.Component {
@@ -161,7 +157,7 @@ class Content extends React.Component
{
}
render() {
- const { file, revision, repository, path, classes } = this.props;
+ const { file, revision, repository, path } = this.props;
const { showHistory } = this.state;
const header = this.showHeader();
@@ -180,13 +176,11 @@ class Content extends React.Component {
return (
-
);
}
diff --git a/scm-ui/src/repos/sources/containers/HistoryView.js b/scm-ui/src/repos/sources/containers/HistoryView.js
index 98400248d9..d13b5904d2 100644
--- a/scm-ui/src/repos/sources/containers/HistoryView.js
+++ b/scm-ui/src/repos/sources/containers/HistoryView.js
@@ -79,12 +79,16 @@ class HistoryView extends React.Component {
const currentPage = page + 1;
return (
<>
-
- this.updatePage(newPage)}
- />
+
+
+
+
+ this.updatePage(newPage)}
+ />
+
>
);
}
diff --git a/scm-ui/src/repos/sources/containers/Sources.js b/scm-ui/src/repos/sources/containers/Sources.js
index 810e2309ee..05705a61d1 100644
--- a/scm-ui/src/repos/sources/containers/Sources.js
+++ b/scm-ui/src/repos/sources/containers/Sources.js
@@ -93,8 +93,10 @@ class Sources extends React.Component {
if (currentFileIsDirectory) {
return (
-
- {this.renderBranchSelector()}
+
+
+ {this.renderBranchSelector()}
+
{
{
this.branchSelected(b);
}}
diff --git a/scm-ui/src/repos/sources/containers/SourcesView.js b/scm-ui/src/repos/sources/containers/SourcesView.js
index 1e76c6d6bf..0f729beb2e 100644
--- a/scm-ui/src/repos/sources/containers/SourcesView.js
+++ b/scm-ui/src/repos/sources/containers/SourcesView.js
@@ -90,7 +90,7 @@ class SourcesView extends React.Component {
const sources = this.showSources();
- return <>{sources}>;
+ return {sources}
;
}
}
diff --git a/scm-ui/src/users/components/SetUserPassword.js b/scm-ui/src/users/components/SetUserPassword.js
index d318025f21..a0fe844b0c 100644
--- a/scm-ui/src/users/components/SetUserPassword.js
+++ b/scm-ui/src/users/components/SetUserPassword.js
@@ -90,7 +90,7 @@ class SetUserPassword extends React.Component {
message = (
this.onClose()}
/>
);
@@ -108,7 +108,7 @@ class SetUserPassword extends React.Component {
);
diff --git a/scm-ui/src/users/components/UserForm.js b/scm-ui/src/users/components/UserForm.js
index 9bf36d19d0..c8fae1ff0a 100644
--- a/scm-ui/src/users/components/UserForm.js
+++ b/scm-ui/src/users/components/UserForm.js
@@ -3,6 +3,7 @@ import React from "react";
import { translate } from "react-i18next";
import type { User } from "@scm-manager/ui-types";
import {
+ Subtitle,
Checkbox,
InputField,
PasswordConfirmation,
@@ -113,7 +114,9 @@ class UserForm extends React.Component {
let nameField = null;
let passwordChangeField = null;
+ let subtitle = null;
if (!this.props.user) {
+ // create new user
nameField = (
{
passwordChangeField = (
);
+ } else {
+ // edit existing user
+ subtitle = ;
}
return (
-