mirror of
https://github.com/go-gitea/gitea
synced 2025-12-06 12:58:26 +00:00
Add "Go to file", "Delete Directory" to repo file list page (#35911)
/claim #35898 Resolves #35898 ### Summary of key changes: 1. Add file name search/Go to file functionality to repo button row. 2. Add backend functionality to delete directory 3. Add context menu for directories with functionality to copy path & delete a directory 4. Move Add/Upload file dropdown to right for parity with Github UI 5. Add tree view to the edit/upload UI --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -1,23 +1,3 @@
|
||||
.repository.file.editor .tab[data-tab="write"] {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.repository.file.editor .tab[data-tab="write"] .editor-toolbar {
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
.repository.file.editor .tab[data-tab="write"] .CodeMirror {
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.repo-editor-header {
|
||||
display: flex;
|
||||
margin: 1rem 0;
|
||||
padding: 3px 0;
|
||||
}
|
||||
|
||||
.editor-toolbar {
|
||||
border-color: var(--color-secondary);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
aspect-ratio: 1;
|
||||
transform: translate(-50%, -50%);
|
||||
animation: isloadingspin 1000ms infinite linear;
|
||||
border-width: 4px;
|
||||
border-width: 3px;
|
||||
border-style: solid;
|
||||
border-color: var(--color-secondary) var(--color-secondary) var(--color-secondary-dark-8) var(--color-secondary-dark-8);
|
||||
border-radius: var(--border-radius-full);
|
||||
|
||||
@@ -150,63 +150,68 @@ td .commit-summary {
|
||||
}
|
||||
}
|
||||
|
||||
.repository.file.list .non-diff-file-content .header .icon {
|
||||
.non-diff-file-content .header .icon {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.repository.file.list .non-diff-file-content .header .small.icon {
|
||||
.non-diff-file-content .header .small.icon {
|
||||
font-size: 0.75em;
|
||||
}
|
||||
|
||||
.repository.file.list .non-diff-file-content .header .tiny.icon {
|
||||
.non-diff-file-content .header .tiny.icon {
|
||||
font-size: 0.5em;
|
||||
}
|
||||
|
||||
.repository.file.list .non-diff-file-content .header .file-actions .btn-octicon {
|
||||
.non-diff-file-content .header .file-actions .btn-octicon {
|
||||
line-height: var(--line-height-default);
|
||||
padding: 8px;
|
||||
vertical-align: middle;
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.repository.file.list .non-diff-file-content .header .file-actions .btn-octicon:hover {
|
||||
.non-diff-file-content .header .file-actions .btn-octicon:hover {
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
.repository.file.list .non-diff-file-content .header .file-actions .btn-octicon-danger:hover {
|
||||
.non-diff-file-content .header .file-actions .btn-octicon-danger:hover {
|
||||
color: var(--color-red);
|
||||
}
|
||||
|
||||
.repository.file.list .non-diff-file-content .header .file-actions .btn-octicon.disabled {
|
||||
.non-diff-file-content .header .file-actions .btn-octicon.disabled {
|
||||
color: inherit;
|
||||
opacity: var(--opacity-disabled);
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.repository.file.list .non-diff-file-content .plain-text {
|
||||
.non-diff-file-content .plain-text {
|
||||
padding: 1em 2em;
|
||||
}
|
||||
|
||||
.repository.file.list .non-diff-file-content .plain-text pre {
|
||||
.non-diff-file-content .plain-text pre {
|
||||
overflow-wrap: anywhere;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.repository.file.list .non-diff-file-content .csv {
|
||||
.non-diff-file-content .csv {
|
||||
overflow-x: auto;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.repository.file.list .non-diff-file-content pre {
|
||||
.non-diff-file-content pre {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.repository.file.list .non-diff-file-content .asciicast {
|
||||
.non-diff-file-content .asciicast {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.repo-editor-header {
|
||||
display: flex;
|
||||
margin: 1rem 0;
|
||||
padding: 3px 0;
|
||||
width: 100%;
|
||||
gap: 0.5em;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.repo-editor-header input {
|
||||
@@ -216,17 +221,13 @@ td .commit-summary {
|
||||
margin-right: 5px !important;
|
||||
}
|
||||
|
||||
.repository.file.editor .tabular.menu .svg {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.repository.file.editor .commit-form-wrapper {
|
||||
padding-left: 48px;
|
||||
padding-left: 58px;
|
||||
}
|
||||
|
||||
.repository.file.editor .commit-form-wrapper .commit-avatar {
|
||||
float: left;
|
||||
margin-left: -48px;
|
||||
margin-left: -58px;
|
||||
}
|
||||
|
||||
.repository.file.editor .commit-form-wrapper .commit-form {
|
||||
@@ -1409,12 +1410,25 @@ td .commit-summary {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.repo-button-row .ui.button {
|
||||
.repo-button-row .ui.button,
|
||||
.repo-view-container .ui.button.repo-view-file-tree-toggle {
|
||||
flex-shrink: 0;
|
||||
margin: 0;
|
||||
min-height: 30px;
|
||||
}
|
||||
|
||||
.repo-view-container .ui.button.repo-view-file-tree-toggle {
|
||||
padding: 0 6px;
|
||||
}
|
||||
|
||||
.repo-button-row .repo-file-search-container .ui.input {
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.repo-button-row .ui.dropdown > .menu {
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
tbody.commit-list {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
@@ -1483,6 +1497,12 @@ tbody.commit-list {
|
||||
line-height: initial;
|
||||
}
|
||||
|
||||
.commit-body a.commit code,
|
||||
.commit-summary a.commit code {
|
||||
/* these links are generated by the render: <a class="commit" href="...">...</a> */
|
||||
background: inherit;
|
||||
}
|
||||
|
||||
.git-notes.top {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,9 @@
|
||||
gap: var(--page-spacing);
|
||||
}
|
||||
|
||||
.repo-view-container .repo-view-file-tree-container {
|
||||
.repo-view-file-tree-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 0 0 15%;
|
||||
min-width: 0;
|
||||
max-height: 100vh;
|
||||
@@ -65,6 +67,12 @@
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
@media (max-width: 767.98px) {
|
||||
.repo-view-file-tree-container {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.repo-view-content {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
|
||||
@@ -244,6 +244,7 @@ gitea-theme-meta-info {
|
||||
--color-highlight-fg: #87651e;
|
||||
--color-highlight-bg: #352c1c;
|
||||
--color-overlay-backdrop: #080808c0;
|
||||
--color-danger: var(--color-red);
|
||||
accent-color: var(--color-accent);
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
@@ -244,6 +244,7 @@ gitea-theme-meta-info {
|
||||
--color-highlight-fg: #eed200;
|
||||
--color-highlight-bg: #fffbdd;
|
||||
--color-overlay-backdrop: #080808c0;
|
||||
--color-danger: var(--color-red);
|
||||
accent-color: var(--color-accent);
|
||||
color-scheme: light;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user