Files
gitea/web_src/less/_admin.less
T
zeripath 7a7f56044a Adopt repositories (#12920)
* Don't automatically delete repository files if they are present

Prior to this PR Gitea would delete any repository files if they are
present during creation or migration. This can in certain circumstances
lead to data-loss and is slightly unpleasant.

This PR provides a mechanism for Gitea to adopt repositories on creation
and otherwise requires an explicit flag for deletion.

PushCreate is slightly different - the create will cause adoption if
that is allowed otherwise it will delete the data if that is allowed.

Signed-off-by: Andrew Thornton <[email protected]>

* Update swagger

Signed-off-by: Andrew Thornton <[email protected]>

* Fix tests and migrate overwrite

Signed-off-by: Andrew Thornton <[email protected]>

* as per @lunny

Only offer to adopt or overwrite if the user can do that.

Allow the site administrator to adopt or overwrite in all
circumstances

Signed-off-by: Andrew Thornton <[email protected]>

* Use setting.Repository.DefaultBranch for the default branch

Signed-off-by: Andrew Thornton <[email protected]>

* Always set setting.Repository.DefaultBranch

Signed-off-by: Andrew Thornton <[email protected]>

* update swagger

Signed-off-by: Andrew Thornton <[email protected]>

* update templates

Signed-off-by: Andrew Thornton <[email protected]>

* ensure repo closed

Signed-off-by: Andrew Thornton <[email protected]>

* Rewrite of adoption as per @6543 and @lunny

Signed-off-by: Andrew Thornton <[email protected]>

* Apply suggestions from code review

* update swagger

Signed-off-by: Andrew Thornton <[email protected]>

* missing not

Signed-off-by: Andrew Thornton <[email protected]>

* add modals and flash reporting

Signed-off-by: Andrew Thornton <[email protected]>

* Make the unadopted page searchable

Signed-off-by: Andrew Thornton <[email protected]>

* Add API

Signed-off-by: Andrew Thornton <[email protected]>

* Fix swagger

Signed-off-by: Andrew Thornton <[email protected]>

* fix swagger

Signed-off-by: Andrew Thornton <[email protected]>

* Handle empty and non-master branched repositories

Signed-off-by: Andrew Thornton <[email protected]>

* placate lint

Signed-off-by: Andrew Thornton <[email protected]>

* remove commented out code

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: techknowlogick <[email protected]>
2020-09-25 07:09:23 +03:00

104 lines
1.6 KiB
Plaintext

.admin {
padding-top: 15px;
.table.segment {
padding: 0;
font-size: 13px;
&:not(.striped) {
thead {
th:last-child {
padding-right: 5px !important;
}
}
}
th {
padding-top: 5px;
padding-bottom: 5px;
}
&:not(.select) {
th,
td {
&:first-of-type {
padding-left: 15px !important;
}
}
}
form tbody button[type='submit'] {
padding: 5px 8px;
}
}
.settings .button.adopt,
.settings .button.delete {
margin-top: -15px;
margin-bottom: -15px;
.label {
vertical-align: middle;
}
}
.ui.header,
.ui.segment {
box-shadow: 0 1px 2px 0 rgba(34, 36, 38, .15);
}
&.user {
.email {
max-width: 200px;
}
}
dl.admin-dl-horizontal {
padding: 20px;
margin: 0;
dd {
margin-left: 275px;
}
dt {
font-weight: bolder;
float: left;
width: 285px;
clear: left;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
&.config {
#test-mail-btn {
margin-left: 5px;
}
}
code,
pre {
white-space: pre-wrap;
word-wrap: break-word;
}
#notice-table {
.notice-description {
@media only screen and (max-width: 767px) {
max-width: 80vw;
}
@media only screen and (max-width: 991px) and (min-width: 768px) {
max-width: 360px;
}
@media only screen and (min-width: 992px) and (max-width: 1199.98px) {
max-width: 510px;
}
@media only screen and (min-width: 1200px) {
max-width: 640px;
}
}
}
}