gitea/web_src/less/_repository.less

3219 lines
56 KiB
Plaintext
Raw Normal View History

2015-07-23 22:50:05 +02:00
.repository {
.repo-header {
.ui.compact.menu {
margin-left: 1rem;
}
.ui.header {
margin-top: 0;
}
.ui.huge.breadcrumb {
font-weight: 400;
font-size: 1.5rem;
.label {
vertical-align: middle;
margin-top: -.29165em;
}
&.repo-title .repo-header-icon {
display: inline-block;
position: relative;
.avatar {
position: absolute;
right: 0;
bottom: 0;
width: 16px;
height: 16px;
color: #fafafa;
box-shadow: 0 0 0 2px;
margin: 0;
}
}
}
.fork-flag {
margin-left: 36px;
margin-top: 3px;
display: block;
font-size: 12px;
white-space: nowrap;
}
.repo-buttons .svg {
margin: 0 .42857143em 0 -.21428571em;
}
2015-12-01 02:45:55 +01:00
.button {
margin-top: 2px;
margin-bottom: 2px;
}
}
.tabs {
.navbar {
justify-content: initial;
}
}
.navbar {
display: flex;
justify-content: space-between;
.ui.label {
margin-left: 7px;
padding: 3px 5px;
}
}
.owner.dropdown {
min-width: 40% !important;
}
#file-buttons {
/* The reason for the !important is that Semantic itself has
margin-left: 0 !important on right items on mobile, which is mostly
to make sure elements which on menus would otherwise be on the right
align correctly with other elements when stacked.
Unfortunately, this brings some weird alignment on this particular
element, so we need to override it. */
margin-left: auto !important;
font-weight: normal;
.ui.button {
padding: 8px 10px;
font-weight: normal;
}
}
.metas {
.menu {
overflow-x: auto;
max-height: 300px;
}
.ui.list {
&.assignees .icon {
line-height: 2em;
}
&.assignees .teamavatar {
margin-top: .125rem;
margin-left: 6.75px;
margin-right: 8.75px;
}
.hide {
display: none !important;
}
.dependency {
padding: 0;
white-space: nowrap;
}
.title {
max-width: 200px;
overflow: hidden;
text-overflow: ellipsis;
}
@media @mediaLgAndDown {
.title {
max-width: 150px;
}
}
@media (max-width: 1000px) {
.title {
max-width: 100px;
}
}
}
#deadlineForm input {
width: 12.8rem;
border-radius: 4px 0 0 4px;
border-right: 0;
white-space: nowrap;
}
}
.header-wrapper {
background-color: var(--color-navbar);
.ui.tabs.divider {
border-bottom: 0;
}
.ui.tabular .svg {
margin-right: 5px;
}
}
.filter.menu {
.label.color {
border-radius: 3px;
margin-left: 15px;
padding: 0 8px;
}
&.labels {
.label-filter .menu .info {
display: inline-block;
padding: .5rem .25rem;
border-bottom: 1px solid var(--color-secondary);
font-size: 12px;
width: 100%;
white-space: nowrap;
text-align: center;
code {
border: 1px solid var(--color-secondary);
border-radius: 3px;
padding: 1px 2px;
font-size: 11px;
}
}
}
.menu {
max-height: 300px;
overflow-x: auto;
right: 0 !important;
left: auto !important;
}
}
.select-label {
.desc {
padding-left: 16px;
}
}
.ui.tabs {
&.container {
margin-top: 14px;
margin-bottom: 0;
.ui.menu {
border-bottom: 0;
}
}
&.divider {
margin-top: 0;
margin-bottom: 20px;
}
}
#clone-panel {
width: 350px;
@media @mediaSm {
width: 100%;
}
input {
border-radius: 0;
padding: 5px 10px;
width: 50%;
}
.clone.button {
font-size: 13px;
padding: 7.5px 5px;
&:first-child {
border-radius: var(--border-radius) 0 0 var(--border-radius);
}
}
#repo-clone-https,
#repo-clone-ssh,
#clipboard-btn {
border-right: none;
}
.icon.button {
padding: 0 10px;
}
.dropdown .menu {
right: 0 !important;
left: auto !important;
}
}
&.file.list {
.repo-description {
display: flex;
justify-content: space-between;
align-items: center;
}
#repo-desc {
font-size: 1.2em;
}
.choose.reference {
.header .icon {
font-size: 1.4em;
}
}
.repo-path {
.section,
.divider {
display: inline;
}
}
#file-buttons {
font-weight: normal;
.ui.button {
padding: 8px 10px;
font-weight: normal;
}
.ui.tiny.blue.buttons {
@media @mediaSm {
width: 100%;
}
}
.button + .button {
border-left: none;
}
}
#repo-files-table {
thead {
th {
padding-top: 8px;
padding-bottom: 5px;
font-weight: normal;
}
.ui.avatar {
margin-bottom: 5px;
}
.commit-summary a {
text-decoration: underline;
text-decoration-style: dashed;
&:hover {
text-decoration-style: solid;
}
&.default-link {
text-decoration: none;
&:hover {
text-decoration: underline;
text-decoration-style: solid;
}
}
}
}
tbody {
.svg {
margin-left: 3px;
margin-right: 5px;
color: #777777;
&.octicon-reply {
margin-right: 10px;
}
&.octicon-file-directory,
&.octicon-file-submodule {
color: var(--color-primary);
}
}
}
td {
padding-top: 0;
padding-bottom: 0;
overflow: initial;
&.name {
max-width: 150px;
}
&.message {
max-width: 400px;
}
&.age {
width: 120px;
}
.truncate {
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 100%;
padding-top: 8px;
padding-bottom: 8px;
}
a {
padding-top: 8px;
padding-bottom: 8px;
}
.at {
margin-left: 3px;
margin-right: 3px;
}
> * {
vertical-align: middle;
}
}
td.message .isSigned {
cursor: default;
}
tr:hover {
background-color: #ffffee;
}
tr.has-parent a {
display: inline-block;
padding-top: 8px;
padding-bottom: 8px;
width: calc(100% - 1.25rem);
}
.jumpable-path {
color: var(--color-text-light-2);
}
}
.non-diff-file-content {
.header {
.icon {
font-size: 1em;
}
.small.icon {
font-size: .75em;
}
.tiny.icon {
font-size: .5em;
}
.file-info {
font-size: 13px;
}
.file-actions {
.btn-octicon {
display: inline-block;
padding: 5px;
margin-left: 5px;
line-height: 1;
color: #767676;
vertical-align: middle;
background: transparent;
border: 0;
outline: none;
}
.btn-octicon:hover {
color: var(--color-primary);
}
.btn-octicon-danger:hover {
color: #bd2c00;
}
.btn-octicon.disabled {
color: #bbbbbb;
cursor: default;
}
#delete-file-form {
display: inline-block;
}
}
}
.view-raw {
padding: 5px;
* {
max-width: 100%;
}
img {
border-radius: 0;
}
}
.plain-text {
padding: 1em 2em;
pre {
word-break: break-word;
white-space: pre-wrap;
}
}
.csv {
overflow-x: auto;
padding: 0 !important;
}
pre {
overflow: auto;
}
}
.sidebar {
padding-left: 0;
.svg {
width: 16px;
}
}
}
&.file.editor {
.treepath {
width: 100%;
input {
vertical-align: middle;
box-shadow: rgba(0, 0, 0, .0745098) 0 1px 2px inset;
width: inherit;
padding: 7px 8px;
margin-right: 5px;
}
}
.tabular.menu {
.svg {
margin-right: 5px;
}
}
.commit-form-wrapper {
padding-left: 64px;
.commit-avatar {
float: left;
margin-left: -64px;
width: 3em;
height: auto;
}
2015-08-12 12:44:09 +02:00
.commit-form {
position: relative;
padding: 15px;
margin-bottom: 10px;
border: 1px solid var(--color-secondary);
background: var(--color-box-body);
border-radius: 3px;
#avatar-arrow;
2015-08-12 12:44:09 +02:00
&::after {
border-right-color: var(--color-box-body);
}
2015-08-19 22:31:28 +02:00
.quick-pull-choice {
.branch-name {
display: inline-block;
padding: 2px 4px;
font: 12px var(--fonts-monospace);
color: var(--color-text);
background: var(--color-secondary);
border-radius: 3px;
margin: 0 2px;
}
.new-branch-name-input {
position: relative;
margin-left: 25px;
2016-02-02 02:55:12 +01:00
input {
width: 240px !important;
padding-left: 26px !important;
}
}
2015-08-03 11:42:09 +02:00
.octicon-git-branch {
position: absolute;
top: 9px;
left: 10px;
color: #b0c4ce;
}
}
}
}
}
2015-08-03 11:42:09 +02:00
&.options {
#interval {
width: 100px !important;
min-width: 100px;
}
.danger {
.item {
padding: 20px 15px;
}
.ui.divider {
margin: 0;
}
}
}
@comment-avatar-width: 3em;
.comment textarea {
max-height: none !important;
}
&.new.issue {
.comment.form {
.comment {
.avatar {
width: @comment-avatar-width;
}
}
.content {
margin-left: 4em;
#avatar-arrow;
2015-08-08 16:43:14 +02:00
&::after {
border-right-color: var(--color-box-body);
}
.markdown {
font-size: 14px;
}
}
.metas {
min-width: 220px;
.filter.menu {
max-height: 300px;
overflow-x: auto;
}
}
}
}
2015-08-08 16:43:14 +02:00
&.view.issue {
.title {
padding-bottom: 0 !important;
.issue-title {
margin-bottom: .5rem;
&.edit-active {
display: flex;
align-items: center;
h1 {
display: flex;
width: 100%;
}
@media @mediaSm {
flex-direction: column;
h1 {
margin-right: 0;
margin-bottom: 1rem;
padding-right: 0;
.ui.input input {
width: calc(100% - 2rem);
}
}
.edit-buttons {
padding-bottom: 1rem;
width: 100%;
.button {
width: 100%;
margin-right: .5rem;
&:last-child {
margin-right: 0;
}
}
}
}
}
h1 {
font-weight: 300;
font-size: 2.3rem;
margin: 0;
padding-right: .5rem;
.ui.input {
font-size: .5em;
width: 100%;
input {
font-size: 1.5em;
padding: 6px 1rem;
}
}
}
.edit-button {
float: right;
padding-left: 1rem;
}
.edit-buttons {
display: flex;
}
.index {
color: var(--color-text-light-2);
}
.label {
margin-right: 10px;
}
.edit-zone {
margin-top: 10px;
}
}
}
.pull-desc {
code {
color: var(--color-primary);
}
}
2015-08-20 14:18:49 +02:00
.pull {
&.tabular.menu {
margin-bottom: 1rem;
.svg {
margin-right: 5px;
}
}
.merge.box {
.avatar {
margin-left: 10px;
margin-top: 10px;
}
.branch-update.grid {
.row {
padding-bottom: 1rem;
.icon {
margin-top: 1.1rem;
}
}
}
}
.review-item {
display: flex;
justify-content: space-between;
align-items: center;
.review-item-left,
.review-item-right {
display: flex;
align-items: center;
}
.text {
margin: .3em 0 .5em .5em;
}
.type-icon {
align-self: flex-start;
margin-right: 1em;
i {
line-height: 1.8em;
}
}
.divider {
margin: .5rem 0;
}
.review-content {
padding: 1em 0 1em 3.8em;
}
}
}
.comment-list {
&:not(.prevent-before-timeline)::before {
display: block;
content: "";
position: absolute;
margin-top: 12px;
margin-bottom: 14px;
top: 0;
bottom: 0;
left: 96px;
width: 2px;
background-color: var(--color-timeline);
z-index: -1;
}
.timeline {
position: relative;
display: block;
margin-left: 40px;
padding-left: 16px;
&::before { //ciara
display: block;
content: "";
position: absolute;
margin-top: 12px;
margin-bottom: 14px;
top: 0;
bottom: 0;
left: 30px;
width: 2px;
background-color: var(--color-timeline);
z-index: -1;
}
}
.timeline-item,
.timeline-item-group {
padding: 12px 0;
}
.timeline-item-group {
.timeline-item {
padding-top: 8px;
padding-bottom: 8px;
}
}
.timeline-item {
margin-left: 16px;
position: relative;
.timeline-avatar {
position: absolute;
left: -72px;
img {
width: 40px !important;
height: 40px !important;
}
}
.avatar.image,
.avatar.image img {
width: 20px;
height: 20px;
margin-right: .5rem;
}
&:first-child:not(.commit) {
padding-top: 0 !important;
}
&:last-child:not(.commit) {
padding-bottom: 0 !important;
}
.badge.badge-commit {
border-color: transparent;
background: radial-gradient(var(--color-body) 40%, transparent 40%) no-repeat;
}
.badge {
width: 34px;
height: 34px;
background-color: var(--color-timeline);
border-radius: 50%;
display: flex;
float: left;
margin-left: -33px;
margin-right: 8px;
color: var(--color-text-light-2);
align-items: center;
justify-content: center;
.svg {
width: 22px;
height: 22px;
padding: 3px;
&.octicon-comment {
margin-top: 2px;
}
}
}
&.comment > .content {
margin-left: -16px;
}
&.event > .text {
line-height: 32px;
vertical-align: middle;
}
&.commits-list {
padding-left: 15px;
padding-top: 0;
.singular-commit {
line-height: 34px; /* this must be same as .badge height, to avoid overflow */
> .avatar.image,
> .avatar.image img {
position: relative;
top: -2px;
}
.shabox {
.sha.label {
margin: 0;
border: 1px solid #bbbbbb;
&.isSigned.isWarning {
border: 1px solid #db2828;
background: fade(#db2828, 10%);
.shortsha {
display: inline-block;
padding-top: 1px;
}
&:hover {
background: fade(#db2828, 30%) !important;
}
}
&.isSigned.isVerified {
border: 1px solid #21ba45;
background: fade(#21ba45, 10%);
.shortsha {
display: inline-block;
padding-top: 1px;
}
&:hover {
background: fade(#21ba45, 30%) !important;
}
}
&.isSigned.isVerifiedUntrusted {
border: 1px solid #fbbd08;
background: fade(#fbbd08, 10%);
.shortsha {
display: inline-block;
padding-top: 1px;
}
&:hover {
background: fade(#fbbd08, 30%) !important;
}
}
&.isSigned.isVerifiedUnmatched {
border: 1px solid #f2711c;
background: fade(#f2711c, 10%);
.shortsha {
display: inline-block;
padding-top: 1px;
}
&:hover {
background: fade(#f2711c, 30%) !important;
}
}
}
}
}
}
&.event > .commit-status-link {
float: right;
margin-right: 8px;
margin-top: 4px;
}
.author {
font-weight: 600;
}
.comment-form-reply .footer {
padding-bottom: 1em;
}
}
.comment {
> .content {
> div:first-child {
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}
> div:last-child {
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
}
}
.comment-container {
border: 1px solid var(--color-secondary);
border-radius: var(--border-radius);
}
.content {
> .merge-section {
background-color: var(--color-box-body);
.item {
padding: .25rem 0;
}
2015-08-20 18:18:30 +02:00
.item-section {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0;
margin-top: -.25rem;
margin-bottom: -.25rem;
}
2018-09-07 04:32:46 +02:00
.divider {
margin-left: -1rem;
margin-right: -1rem;
2018-09-07 04:32:46 +02:00
}
&.no-header {
#avatar-arrow;
&::after {
border-right-color: var(--color-box-body);
}
}
@media @mediaSm {
.form .button {
width: 100%;
&:not(:last-child) {
margin-bottom: 1rem;
}
}
}
}
.markdown {
font-size: 14px;
}
.no-content {
color: #767676;
font-style: italic;
}
> .bottom.segment {
background: var(--color-box-body);
.ui.images::after {
clear: both;
content: ' ';
display: block;
}
a {
display: block;
float: left;
margin: 5px;
padding: 5px;
height: 150px;
border: solid 1px var(--color-secondary);
border-radius: 3px;
max-width: 150px;
background-color: var(--color-body);
&::before {
content: ' ';
display: inline-block;
height: 100%;
vertical-align: middle;
}
}
.ui.image {
max-height: 100%;
width: auto;
margin: 0;
vertical-align: middle;
}
span.ui.image {
font-size: 128px;
color: var(--color-text);
}
span.ui.image:hover {
color: var(--color-text);
}
}
}
.ui.form {
.field {
&:first-child {
clear: none;
}
&.footer {
overflow: hidden;
}
.tab.markdown {
min-height: 5rem;
}
}
textarea {
height: 200px;
font-family: var(--fonts-monospace);
}
}
Add Organization Wide Labels (#10814) * Add organization wide labels Implement organization wide labels similar to organization wide webhooks. This lets you create individual labels for organizations that can be used for all repos under that organization (so being able to reuse the same label across multiple repos). This makes it possible for small organizations with many repos to use labels effectively. Fixes #7406 * Add migration * remove comments * fix tests * Update options/locale/locale_en-US.ini Removed unused translation string * show org labels in issue search label filter * Use more clear var name * rename migration after merge from master * comment typo * update migration again after rebase with master * check for orgID <=0 per guillep2k review * fmt * Apply suggestions from code review Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * remove unused code * Make sure RepoID is 0 when searching orgID per code review * more changes/code review requests * More descriptive translation var per code review * func description/delete comment when issue label deleted instead of hiding it * remove comment * only use issues in that repo when calculating number of open issues for org label on repo label page * Add integration test for IssuesSearch API with labels * remove unused function * Update models/issue_label.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Use subquery in GetLabelIDsInReposByNames * Fix tests to use correct orgID * fix more tests * IssuesSearch api now uses new BuildLabelNamesIssueIDsCondition. Add a few more tests as well * update comment for clarity * Revert previous code change now that we can use the new BuildLabelNamesIssueIDsCondition * Don't sort repos by date in IssuesSearch API After much debugging I've found a strange issue where in some cases MySQL will return a different result than other enigines if a query is sorted by a null collumn. For example with our integration test data where we don't set updated_unix in repository fixtures: SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` ORDER BY updated_unix DESC LIMIT 15 OFFSET 45 Returns different results for MySQL than other engines. However, the similar query: SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` ORDER BY updated_unix DESC LIMIT 15 OFFSET 30 Returns the same results. This causes integration tests to fail on MySQL in certain cases but would never show up in a real installation. Since this API call always returns issues based on the optionally provided repo_priority_id or the issueID itself, there is no change to results by changing the repo sorting method used to get ids earlier in the function. * linter is back! * code review * remove now unused option * Fix newline at end of files * more unused code * update to master * check for matching ids before query * Update models/issue_label.go Co-Authored-By: 6543 <6543@obermui.de> * Update models/issue_label.go * update comments * Update routers/org/setting.go Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: 6543 <6543@obermui.de>
2020-04-01 06:14:46 +02:00
.edit.buttons {
margin-top: 10px;
Add Organization Wide Labels (#10814) * Add organization wide labels Implement organization wide labels similar to organization wide webhooks. This lets you create individual labels for organizations that can be used for all repos under that organization (so being able to reuse the same label across multiple repos). This makes it possible for small organizations with many repos to use labels effectively. Fixes #7406 * Add migration * remove comments * fix tests * Update options/locale/locale_en-US.ini Removed unused translation string * show org labels in issue search label filter * Use more clear var name * rename migration after merge from master * comment typo * update migration again after rebase with master * check for orgID <=0 per guillep2k review * fmt * Apply suggestions from code review Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * remove unused code * Make sure RepoID is 0 when searching orgID per code review * more changes/code review requests * More descriptive translation var per code review * func description/delete comment when issue label deleted instead of hiding it * remove comment * only use issues in that repo when calculating number of open issues for org label on repo label page * Add integration test for IssuesSearch API with labels * remove unused function * Update models/issue_label.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Use subquery in GetLabelIDsInReposByNames * Fix tests to use correct orgID * fix more tests * IssuesSearch api now uses new BuildLabelNamesIssueIDsCondition. Add a few more tests as well * update comment for clarity * Revert previous code change now that we can use the new BuildLabelNamesIssueIDsCondition * Don't sort repos by date in IssuesSearch API After much debugging I've found a strange issue where in some cases MySQL will return a different result than other enigines if a query is sorted by a null collumn. For example with our integration test data where we don't set updated_unix in repository fixtures: SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` ORDER BY updated_unix DESC LIMIT 15 OFFSET 45 Returns different results for MySQL than other engines. However, the similar query: SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` ORDER BY updated_unix DESC LIMIT 15 OFFSET 30 Returns the same results. This causes integration tests to fail on MySQL in certain cases but would never show up in a real installation. Since this API call always returns issues based on the optionally provided repo_priority_id or the issueID itself, there is no change to results by changing the repo sorting method used to get ids earlier in the function. * linter is back! * code review * remove now unused option * Fix newline at end of files * more unused code * update to master * check for matching ids before query * Update models/issue_label.go Co-Authored-By: 6543 <6543@obermui.de> * Update models/issue_label.go * update comments * Update routers/org/setting.go Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: 6543 <6543@obermui.de>
2020-04-01 06:14:46 +02:00
}
}
Add Organization Wide Labels (#10814) * Add organization wide labels Implement organization wide labels similar to organization wide webhooks. This lets you create individual labels for organizations that can be used for all repos under that organization (so being able to reuse the same label across multiple repos). This makes it possible for small organizations with many repos to use labels effectively. Fixes #7406 * Add migration * remove comments * fix tests * Update options/locale/locale_en-US.ini Removed unused translation string * show org labels in issue search label filter * Use more clear var name * rename migration after merge from master * comment typo * update migration again after rebase with master * check for orgID <=0 per guillep2k review * fmt * Apply suggestions from code review Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * remove unused code * Make sure RepoID is 0 when searching orgID per code review * more changes/code review requests * More descriptive translation var per code review * func description/delete comment when issue label deleted instead of hiding it * remove comment * only use issues in that repo when calculating number of open issues for org label on repo label page * Add integration test for IssuesSearch API with labels * remove unused function * Update models/issue_label.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Use subquery in GetLabelIDsInReposByNames * Fix tests to use correct orgID * fix more tests * IssuesSearch api now uses new BuildLabelNamesIssueIDsCondition. Add a few more tests as well * update comment for clarity * Revert previous code change now that we can use the new BuildLabelNamesIssueIDsCondition * Don't sort repos by date in IssuesSearch API After much debugging I've found a strange issue where in some cases MySQL will return a different result than other enigines if a query is sorted by a null collumn. For example with our integration test data where we don't set updated_unix in repository fixtures: SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` ORDER BY updated_unix DESC LIMIT 15 OFFSET 45 Returns different results for MySQL than other engines. However, the similar query: SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` ORDER BY updated_unix DESC LIMIT 15 OFFSET 30 Returns the same results. This causes integration tests to fail on MySQL in certain cases but would never show up in a real installation. Since this API call always returns issues based on the optionally provided repo_priority_id or the issueID itself, there is no change to results by changing the repo sorting method used to get ids earlier in the function. * linter is back! * code review * remove now unused option * Fix newline at end of files * more unused code * update to master * check for matching ids before query * Update models/issue_label.go Co-Authored-By: 6543 <6543@obermui.de> * Update models/issue_label.go * update comments * Update routers/org/setting.go Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: 6543 <6543@obermui.de>
2020-04-01 06:14:46 +02:00
.code-comment {
border: 1px solid transparent;
padding: 6px 6px 3px;
.content {
border: none !important;
}
}
.event {
padding-left: 15px;
& > .svg:not(.issue-symbol) {
text-shadow: -2px 0 #fff, 0 2px #fff, 2px 0 #fff, 0 -2px #fff;
Add Organization Wide Labels (#10814) * Add organization wide labels Implement organization wide labels similar to organization wide webhooks. This lets you create individual labels for organizations that can be used for all repos under that organization (so being able to reuse the same label across multiple repos). This makes it possible for small organizations with many repos to use labels effectively. Fixes #7406 * Add migration * remove comments * fix tests * Update options/locale/locale_en-US.ini Removed unused translation string * show org labels in issue search label filter * Use more clear var name * rename migration after merge from master * comment typo * update migration again after rebase with master * check for orgID <=0 per guillep2k review * fmt * Apply suggestions from code review Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * remove unused code * Make sure RepoID is 0 when searching orgID per code review * more changes/code review requests * More descriptive translation var per code review * func description/delete comment when issue label deleted instead of hiding it * remove comment * only use issues in that repo when calculating number of open issues for org label on repo label page * Add integration test for IssuesSearch API with labels * remove unused function * Update models/issue_label.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Use subquery in GetLabelIDsInReposByNames * Fix tests to use correct orgID * fix more tests * IssuesSearch api now uses new BuildLabelNamesIssueIDsCondition. Add a few more tests as well * update comment for clarity * Revert previous code change now that we can use the new BuildLabelNamesIssueIDsCondition * Don't sort repos by date in IssuesSearch API After much debugging I've found a strange issue where in some cases MySQL will return a different result than other enigines if a query is sorted by a null collumn. For example with our integration test data where we don't set updated_unix in repository fixtures: SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` ORDER BY updated_unix DESC LIMIT 15 OFFSET 45 Returns different results for MySQL than other engines. However, the similar query: SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` ORDER BY updated_unix DESC LIMIT 15 OFFSET 30 Returns the same results. This causes integration tests to fail on MySQL in certain cases but would never show up in a real installation. Since this API call always returns issues based on the optionally provided repo_priority_id or the issueID itself, there is no change to results by changing the repo sorting method used to get ids earlier in the function. * linter is back! * code review * remove now unused option * Fix newline at end of files * more unused code * update to master * check for matching ids before query * Update models/issue_label.go Co-Authored-By: 6543 <6543@obermui.de> * Update models/issue_label.go * update comments * Update routers/org/setting.go Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: 6543 <6543@obermui.de>
2020-04-01 06:14:46 +02:00
}
& > .svg.issue-symbol {
font-size: 20px;
margin-left: -35px;
margin-right: -1px;
margin-top: 0 !important;
height: 28px;
width: 28px;
border-radius: 50%;
text-align: center;
line-height: 28px;
background: #eee;
&::before {
width: 15px;
display: inline-block;
}
&.octicon-key::before {
width: 18px;
}
&.octicon-circle-slash::before {
width: 17px;
}
&.octicon-comment {
font-size: 21px;
line-height: 33px;
&::before {
width: 20px;
}
}
}
.detail {
font-size: .9rem;
margin-top: 5px;
margin-left: 8px;
}
.segments {
box-shadow: none;
.show-outdated,
.hide-outdated {
display: block;
}
.label {
margin-left: 6px;
}
}
}
}
.ui.participants {
img {
margin-top: 5px;
margin-right: 5px;
}
}
.ui.depending {
.item.is-closed {
.title {
text-decoration: line-through;
}
}
}
}
.comment.form {
.ui.comments {
margin-top: -12px;
max-width: 100%;
}
.content {
.field:first-child {
clear: none;
}
.form {
#avatar-arrow;
&::after {
border-right-color: var(--color-box-body);
}
}
textarea {
height: 200px;
font-family: var(--fonts-monospace);
}
}
}
.milestone.list {
list-style: none;
padding-top: 15px;
> .item {
padding-top: 10px;
padding-bottom: 10px;
border-bottom: 1px dashed var(--color-secondary);
> a {
padding-top: 5px;
padding-right: 10px;
color: var(--color-text);
&:hover {
color: var(--color-primary);
Compare branches, commits and tags with each other (#6991) * Supports tags when comparing commits or branches Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Hide headline when only comparing and don't load unused data Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Merges compare logics to allow comparing branches, commits and tags with eachother Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Display branch or tag instead of commit when used for comparing Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Show pull request form after click on button Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Transfers relevant pull.go changes from master to compare.go Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Fixes error when comparing forks against a commit or tag Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Removes console.log from JavaScript file Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Show icon next to commit reference when comparing branch or tag Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Updates css file Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Fixes import order * Renames template variable * Update routers/repo/compare.go Co-Authored-By: zeripath <art27@cantab.net> * Update from master Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Allow short-shas in compare * Renames prInfo to compareInfo Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Check PR permissions only if compare is pull request Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Adjusts comment Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Use compareInfo instead of prInfo
2019-06-07 22:29:29 +02:00
}
}
2019-06-13 06:23:45 +02:00
.ui.progress {
width: 40%;
padding: 0;
border: 0;
margin: 0;
.bar {
height: 20px;
}
}
.meta {
color: var(--color-text-light-2);
padding-top: 5px;
.issue-stats .svg {
padding-left: 5px;
}
.overdue {
color: var(--color-red);
2020-05-25 12:04:02 +02:00
}
}
2020-05-25 12:04:02 +02:00
.operate {
margin-top: -15px;
> a {
font-size: 15px;
padding-top: 5px;
padding-right: 10px;
color: var(--color-text-light-2);
&:hover {
color: var(--color-text);
}
}
}
.content {
padding-top: 10px;
}
}
}
&.new.milestone {
textarea {
height: 200px;
}
}
&.compare.pull {
.show-form-container {
text-align: left;
}
.choose.branch {
.svg {
margin-right: 10px;
}
}
.comment.form {
.content {
#avatar-arrow;
&::after {
border-right-color: var(--color-box-body);
}
}
}
.pullrequest-form {
margin-bottom: 1.5rem;
}
.markdown {
font-size: 14px;
}
}
.filter.dropdown .menu {
margin-top: 1px !important;
}
&.branches {
.commit-divergence {
.bar-group {
position: relative;
float: left;
padding-bottom: 6px;
width: 50%;
max-width: 90px;
&:last-child {
border-left: 1px solid var(--color-secondary);
}
}
.count {
margin: 0 3px;
&.count-ahead {
text-align: left;
}
&.count-behind {
text-align: right;
}
}
.bar {
height: 4px;
position: absolute;
background-color: var(--color-secondary);
&.bar-behind {
right: 0;
}
&.bar-ahead {
left: 0;
}
}
}
}
&.commits {
.header {
.search {
input {
font-weight: normal;
padding: 5px 10px;
}
}
}
}
#commits-table {
thead {
th:first-of-type {
padding-left: 15px;
}
.sha {
&td {
text-align: center;
Pull request review/approval and comment on code (#3748) * Initial ui components for pull request review * Add Review Add IssueComment types Signed-off-by: Jonas Franz <info@jonasfranz.software> (cherry picked from commit 2b4daab) Signed-off-by: Jonas Franz <info@jonasfranz.software> * Replace ReviewComment with Content Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add load functions Add ReviewID to findComments Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add create review comment implementation Add migration for review Other small changes Signed-off-by: Jonas Franz <info@jonasfranz.software> * Simplified create and find functions for review Signed-off-by: Jonas Franz <info@jonasfranz.software> * Moved "Pending" to first position Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add GetCurrentReview to simplify fetching current review Signed-off-by: Jonas Franz <info@jonasfranz.software> * Preview for listing comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * Move new comment form to its own file Signed-off-by: Jonas Franz <info@jonasfranz.software> * Implement Review form Show Review comments on comment stream Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add support for single comments Showing buttons in context Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add pending tag to pending review comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add unit tests for Review Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fetch all review ids at once Add unit tests Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Improved comment rendering in "Files" view by adding Comments to DiffLine Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add support for invalidating comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * Switched back to code.gitea.io/git Signed-off-by: Jonas Franz <info@jonasfranz.software> * Moved review migration from v64 to v65 Signed-off-by: Jonas Franz <info@jonasfranz.software> * Rebuild css Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Improve translations Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests by updating fixtures and updating outdated test Signed-off-by: Jonas Franz <info@jonasfranz.software> * Comments will be shown at the right place now Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add support for deleting CodeComments Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix problems caused by files in subdirectories Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add support for showing code comments of reviews in conversation Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add support for "Show/Hide outdated" Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update code.gitea.io/git Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add support for new webhooks Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update comparison Signed-off-by: Jonas Franz <info@jonasfranz.software> * Resolve conflicts Signed-off-by: Jonas Franz <info@jonasfranz.software> * Minor UI improvements * update code.gitea.io/git * Fix ui bug reported by @lunny causing wrong position of add button Add functionality to "Cancel" button Add scale effects to add button Hide "Cancel" button for existing comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * Prepare solving conflicts Signed-off-by: Jonas Franz <info@jonasfranz.software> * Show add button only if no comments already exist for the line Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing vendor files Signed-off-by: Jonas Franz <info@jonasfranz.software> * Check if reviewer is nil Signed-off-by: Jonas Franz <info@jonasfranz.software> * Show forms only to users who are logged in Signed-off-by: Jonas Franz <info@jonasfranz.software> * Revert "Show forms only to users who are logged in" This reverts commit c083682 Signed-off-by: Jonas Franz <info@jonasfranz.software> * Save patch in comment Render patch for code comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add link to comment in code Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add reply form to comment list Show forms only to signed in users Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add 'Reply' as translatable Add CODE_COMMENT_LINES setting Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix problems introduced by checking for singed in user Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add v70 Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update generated stylesheet Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix preview Beginn with new review comment patch system Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add new algo to generate diff for line range Remove old algo used for cutting big diffs (it was very buggy) * Add documentation and example for CutDiffAroundLine * Fix example of CutDiffAroundLine * Fix some comment UI rendering bugs * Add code comment edit mode * Send notifications / actions to users until review gets published Fix diff generation bug Fix wrong hashtag * Fix vet errors * Send notifications also for single comments * Fix some notification bugs, fix link * Fix: add comment icon is only shown on code lines * Add lint comment * Add unit tests for git diff * Add more error messages * Regenerated css Signed-off-by: Jonas Franz <info@jonasfranz.software> * fmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Regenerated CSS with latest less version Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix test by updating comment type to new ID Signed-off-by: Jonas Franz <info@jonasfranz.software> * Introducing CodeComments as type for map[string]map[int64][]*Comment Other minor code improvements Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix data-tab issues Signed-off-by: Jonas Franz <info@jonasfranz.software> * Remove unnecessary change Signed-off-by: Jonas Franz <info@jonasfranz.software> * refactored checkForInvalidation Signed-off-by: Jonas Franz <info@jonasfranz.software> * Append comments instead of setting Signed-off-by: Jonas Franz <info@jonasfranz.software> * Use HeadRepo instead of BaseRepo Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update migration Signed-off-by: Jonas Franz <info@jonasfranz.de> * Regenerated CSS Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add copyright Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update index.css Signed-off-by: Jonas Franz <info@jonasfranz.software>
2018-08-06 06:43:22 +02:00
}
width: 175px;
}
}
td.sha .sha.label {
margin: 0;
}
td.message {
text-overflow: unset;
}
&.ui.basic.striped.table tbody tr:nth-child(2n) {
background-color: rgba(0, 0, 0, .02) !important;
}
}
2015-10-03 01:58:36 +02:00
#commits-table td.sha .sha.label,
#repo-files-table .sha.label,
Multiple GitGraph improvements: Exclude PR heads, Add branch/PR links, Show only certain branches, (#12766) * Multiple GitGraph improvements. Add backend support for excluding PRs, selecting branches and files. Fix #10327 Signed-off-by: Andrew Thornton <art27@cantab.net> * as per @silverwind Signed-off-by: Andrew Thornton <art27@cantab.net> * as per @silverwind Signed-off-by: Andrew Thornton <art27@cantab.net> * Only show refs in dropdown we display on the graph Signed-off-by: Andrew Thornton <art27@cantab.net> * as per @silverwind Signed-off-by: Andrew Thornton <art27@cantab.net> * use flexbox for ui header Signed-off-by: Andrew Thornton <art27@cantab.net> * Move Hide Pull Request button to the dropdown Signed-off-by: Andrew Thornton <art27@cantab.net> * Add SHA and user pictures Signed-off-by: Andrew Thornton <art27@cantab.net> * fix test Signed-off-by: Andrew Thornton <art27@cantab.net> * fix test 2 Signed-off-by: Andrew Thornton <art27@cantab.net> * fixes * async * more tweaks * use tabs in tmpl Signed-off-by: Andrew Thornton <art27@cantab.net> * remove commented thing Signed-off-by: Andrew Thornton <art27@cantab.net> * fix linting Signed-off-by: Andrew Thornton <art27@cantab.net> * Update web_src/js/features/gitgraph.js Co-authored-by: silverwind <me@silverwind.io> * graph tweaks * more tweaks * add title Signed-off-by: Andrew Thornton <art27@cantab.net> * fix loading indicator z-index and position Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv>
2020-11-08 18:21:54 +01:00
#rev-list .sha.label,
.timeline-item.commits-list .singular-commit .sha.label {
border: 1px solid #bbbbbb;
.ui.signature.avatar {
height: 16px;
margin-bottom: 0;
width: 16px;
}
.detail.icon {
background: #fafafa;
margin: -6px -10px -4px 0;
padding: 5px 4px 5px 6px;
border-left: 1px solid #bbbbbb;
border-top: 0;
border-right: 0;
border-bottom: 0;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
img {
margin-right: 0;
}
.svg {
margin: 0 .25em 0 0;
}
> div {
display: flex;
align-items: center;
}
}
&.isSigned.isWarning {
border: 1px solid #db2828;
background: fade(#db2828, 10%);
Sign merges, CRUD, Wiki and Repository initialisation with gpg key (#7631) This PR fixes #7598 by providing a configurable way of signing commits across the Gitea instance. Per repository configurability and import/generation of trusted secure keys is not provided by this PR - from a security PoV that's probably impossible to do properly. Similarly web-signing, that is asking the user to sign something, is not implemented - this could be done at a later stage however. ## Features - [x] If commit.gpgsign is set in .gitconfig sign commits and files created through repofiles. (merges should already have been signed.) - [x] Verify commits signed with the default gpg as valid - [x] Signer, Committer and Author can all be different - [x] Allow signer to be arbitrarily different - We still require the key to have an activated email on Gitea. A more complete implementation would be to use a keyserver and mark external-or-unactivated with an "unknown" trust level icon. - [x] Add a signing-key.gpg endpoint to get the default gpg pub key if available - Rather than add a fake web-flow user I've added this as an endpoint on /api/v1/signing-key.gpg - [x] Try to match the default key with a user on gitea - this is done at verification time - [x] Make things configurable? - app.ini configuration done - [x] when checking commits are signed need to check if they're actually verifiable too - [x] Add documentation I have decided that adjusting the docker to create a default gpg key is not the correct thing to do and therefore have not implemented this.
2019-10-16 15:42:42 +02:00
.shortsha {
display: inline-block;
padding-top: 1px;
}
.detail.icon {
border-left: 1px solid #db2828;
color: #db2828;
}
&:hover {
background: fade(#db2828, 30%) !important;
}
}
Sign merges, CRUD, Wiki and Repository initialisation with gpg key (#7631) This PR fixes #7598 by providing a configurable way of signing commits across the Gitea instance. Per repository configurability and import/generation of trusted secure keys is not provided by this PR - from a security PoV that's probably impossible to do properly. Similarly web-signing, that is asking the user to sign something, is not implemented - this could be done at a later stage however. ## Features - [x] If commit.gpgsign is set in .gitconfig sign commits and files created through repofiles. (merges should already have been signed.) - [x] Verify commits signed with the default gpg as valid - [x] Signer, Committer and Author can all be different - [x] Allow signer to be arbitrarily different - We still require the key to have an activated email on Gitea. A more complete implementation would be to use a keyserver and mark external-or-unactivated with an "unknown" trust level icon. - [x] Add a signing-key.gpg endpoint to get the default gpg pub key if available - Rather than add a fake web-flow user I've added this as an endpoint on /api/v1/signing-key.gpg - [x] Try to match the default key with a user on gitea - this is done at verification time - [x] Make things configurable? - app.ini configuration done - [x] when checking commits are signed need to check if they're actually verifiable too - [x] Add documentation I have decided that adjusting the docker to create a default gpg key is not the correct thing to do and therefore have not implemented this.
2019-10-16 15:42:42 +02:00
&.isSigned.isVerified {
border: 1px solid #21ba45;
background: fade(#21ba45, 10%);
.shortsha {
display: inline-block;
padding-top: 1px;
}
.detail.icon {
border-left: 1px solid #21ba45;
color: #21ba45;
}
&:hover {
background: fade(#21ba45, 30%) !important;
}
}
&.isSigned.isVerifiedUntrusted {
border: 1px solid #fbbd08;
background: fade(#fbbd08, 10%);
.shortsha {
display: inline-block;
padding-top: 1px;
}
.detail.icon {
border-left: 1px solid #fbbd08;
color: #fbbd08;
}
&:hover {
background: fade(#fbbd08, 30%) !important;
}
}
&.isSigned.isVerifiedUnmatched {
border: 1px solid #f2711c;
background: fade(#f2711c, 10%);
.shortsha {
display: inline-block;
padding-top: 1px;
}
.detail.icon {
border-left: 1px solid #f2711c;
color: #f2711c;
}
&:hover {
background: fade(#f2711c, 30%) !important;
}
Pull request review/approval and comment on code (#3748) * Initial ui components for pull request review * Add Review Add IssueComment types Signed-off-by: Jonas Franz <info@jonasfranz.software> (cherry picked from commit 2b4daab) Signed-off-by: Jonas Franz <info@jonasfranz.software> * Replace ReviewComment with Content Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add load functions Add ReviewID to findComments Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add create review comment implementation Add migration for review Other small changes Signed-off-by: Jonas Franz <info@jonasfranz.software> * Simplified create and find functions for review Signed-off-by: Jonas Franz <info@jonasfranz.software> * Moved "Pending" to first position Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add GetCurrentReview to simplify fetching current review Signed-off-by: Jonas Franz <info@jonasfranz.software> * Preview for listing comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * Move new comment form to its own file Signed-off-by: Jonas Franz <info@jonasfranz.software> * Implement Review form Show Review comments on comment stream Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add support for single comments Showing buttons in context Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add pending tag to pending review comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add unit tests for Review Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fetch all review ids at once Add unit tests Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Improved comment rendering in "Files" view by adding Comments to DiffLine Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add support for invalidating comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * Switched back to code.gitea.io/git Signed-off-by: Jonas Franz <info@jonasfranz.software> * Moved review migration from v64 to v65 Signed-off-by: Jonas Franz <info@jonasfranz.software> * Rebuild css Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Improve translations Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests by updating fixtures and updating outdated test Signed-off-by: Jonas Franz <info@jonasfranz.software> * Comments will be shown at the right place now Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add support for deleting CodeComments Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix problems caused by files in subdirectories Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add support for showing code comments of reviews in conversation Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add support for "Show/Hide outdated" Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update code.gitea.io/git Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add support for new webhooks Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update comparison Signed-off-by: Jonas Franz <info@jonasfranz.software> * Resolve conflicts Signed-off-by: Jonas Franz <info@jonasfranz.software> * Minor UI improvements * update code.gitea.io/git * Fix ui bug reported by @lunny causing wrong position of add button Add functionality to "Cancel" button Add scale effects to add button Hide "Cancel" button for existing comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * Prepare solving conflicts Signed-off-by: Jonas Franz <info@jonasfranz.software> * Show add button only if no comments already exist for the line Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing vendor files Signed-off-by: Jonas Franz <info@jonasfranz.software> * Check if reviewer is nil Signed-off-by: Jonas Franz <info@jonasfranz.software> * Show forms only to users who are logged in Signed-off-by: Jonas Franz <info@jonasfranz.software> * Revert "Show forms only to users who are logged in" This reverts commit c083682 Signed-off-by: Jonas Franz <info@jonasfranz.software> * Save patch in comment Render patch for code comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add link to comment in code Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add reply form to comment list Show forms only to signed in users Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add 'Reply' as translatable Add CODE_COMMENT_LINES setting Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix problems introduced by checking for singed in user Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add v70 Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update generated stylesheet Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix preview Beginn with new review comment patch system Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add new algo to generate diff for line range Remove old algo used for cutting big diffs (it was very buggy) * Add documentation and example for CutDiffAroundLine * Fix example of CutDiffAroundLine * Fix some comment UI rendering bugs * Add code comment edit mode * Send notifications / actions to users until review gets published Fix diff generation bug Fix wrong hashtag * Fix vet errors * Send notifications also for single comments * Fix some notification bugs, fix link * Fix: add comment icon is only shown on code lines * Add lint comment * Add unit tests for git diff * Add more error messages * Regenerated css Signed-off-by: Jonas Franz <info@jonasfranz.software> * fmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Regenerated CSS with latest less version Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix test by updating comment type to new ID Signed-off-by: Jonas Franz <info@jonasfranz.software> * Introducing CodeComments as type for map[string]map[int64][]*Comment Other minor code improvements Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix data-tab issues Signed-off-by: Jonas Franz <info@jonasfranz.software> * Remove unnecessary change Signed-off-by: Jonas Franz <info@jonasfranz.software> * refactored checkForInvalidation Signed-off-by: Jonas Franz <info@jonasfranz.software> * Append comments instead of setting Signed-off-by: Jonas Franz <info@jonasfranz.software> * Use HeadRepo instead of BaseRepo Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update migration Signed-off-by: Jonas Franz <info@jonasfranz.de> * Regenerated CSS Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add copyright Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update index.css Signed-off-by: Jonas Franz <info@jonasfranz.software>
2018-08-06 06:43:22 +02:00
}
}
2015-11-16 05:52:46 +01:00
.diff-detail-box {
padding: 7px 0;
background: #ffffff;
line-height: 30px;
@media @mediaMdAndDown {
flex-direction: column;
align-items: flex-start;
}
&.sticky {
position: sticky;
top: 0;
z-index: 8;
margin-bottom: 10px;
border-bottom: 1px solid var(--color-secondary);
padding-left: 2px;
padding-right: 2px;
}
> div::after {
clear: both;
content: "";
display: block;
}
.diff-detail-stats strong {
margin-left: .25rem;
margin-right: .25rem;
}
.diff-detail-actions .btn-review {
margin-right: 0 !important;
}
span.status {
display: inline-block;
width: 12px;
height: 12px;
margin-right: 8px;
vertical-align: middle;
&.modify {
background-color: #f0db88;
}
&.add {
background-color: #b4e2b4;
}
&.del {
background-color: #e9aeae;
}
&.rename {
background-color: #dad8ff;
}
}
.detail-files {
background: #ffffff;
margin: 0;
}
}
.diff-box .header {
display: flex;
align-items: center;
.count {
margin-right: 12px;
font-size: 13px;
flex: 0 0 auto;
.bar {
background-color: var(--color-red);
height: 12px;
width: 40px;
display: inline-block;
margin: 2px 4px 0;
vertical-align: text-top;
.add {
background-color: var(--color-green);
height: 12px;
}
}
}
.file {
flex: 1;
color: var(--color-text-light-2);
word-break: break-all;
}
2015-11-16 05:52:46 +01:00
.button {
margin: -5px 0 -5px 12px;
padding: 8px 10px;
flex: 0 0 auto;
}
}
.diff-file-box {
.header {
background-color: var(--color-box-header);
}
.file-body.file-code {
.lines-num {
text-align: right;
color: #a6a6a6;
width: 1%;
min-width: 50px;
user-select: none;
span.fold {
display: block;
text-align: center;
}
}
}
.code-diff {
font-size: 12px;
td {
padding: 0 0 0 10px !important;
border-top: 0;
}
.lines-num {
padding: 0 5px !important;
}
.tag-code .lines-num,
.tag-code td {
padding: 0 !important;
}
tbody {
tr {
td.halfwidth {
// halfwidth is used in split view - and in that case, 1% of each
width: 49%;
}
td.center {
text-align: center;
}
[data-line-num]::before {
content: attr(data-line-num);
text-align: right;
}
.lines-type-marker {
width: 10px;
min-width: 10px;
user-select: none;
}
[data-type-marker]::before {
content: attr(data-type-marker);
text-align: right;
display: inline-block;
}
}
}
}
.code-diff-unified tbody tr {
&.del-code td {
background-color: #ffeef0;
border-color: #f1c0c0;
}
&.add-code td {
background-color: #e6ffed;
border-color: #bef5cb;
}
&.del-code td.lines-num {
background-color: #ffe5e4;
}
&.add-code td.lines-num {
background-color: #cdffd8;
}
2015-11-17 05:28:46 +01:00
}
.code-diff-split {
table,
tbody {
width: 100%;
}
tbody tr {
// light gray for empty lines before / after commit
&.add-code td:nth-child(1),
&.add-code td:nth-child(2),
&.add-code td:nth-child(3),
&.del-code td:nth-child(4),
&.del-code td:nth-child(5),
&.del-code td:nth-child(6) {
background-color: #fafbfc;
border-right-color: #eaecef;
}
&.del-code {
background-color: #ffeef0;
}
&.del-code td.add-code {
background-color: #e6ffed;
}
&.del-code td.lines-num-new.add-code {
background-color: #cdffd8;
border-color: #bef5cb;
}
&.add-code {
background-color: #e6ffed;
border-color: #bef5cb;
}
&.add-code td.lines-num-new {
background-color: #cdffd8;
}
td:nth-child(4) {
border-left-width: 1px;
border-left-style: solid;
border-left-color: #f6f8fa;
}
}
}
&.file-content {
img {
max-width: 100%;
padding: 0;
border-radius: 0;
}
img.emoji {
padding: 0;
}
clear: right;
}
.ui.bottom.attached.table.segment {
padding-top: 5px;
padding-bottom: 5px;
}
}
.diff-stats {
clear: both;
margin-bottom: 5px;
max-height: 400px;
overflow: auto;
padding-left: 0;
li {
list-style: none;
padding-bottom: 4px;
margin-bottom: 4px;
border-bottom: 1px dashed #dddddd;
padding-left: 6px;
}
2015-11-17 05:28:46 +01:00
.diff-counter {
margin-right: 15px;
.del {
color: var(--color-red);
}
.add {
color: var(--color-green);
}
}
}
.repo-search-result {
padding-top: 10px;
padding-bottom: 10px;
.lines-num a {
color: inherit;
}
}
&.quickstart {
.guide {
.item {
padding: 1em;
small {
font-weight: normal;
}
}
2015-11-17 05:28:46 +01:00
.clone.button:first-child {
border-radius: var(--border-radius) 0 0 var(--border-radius);
}
.ui.action.small.input {
width: 100%;
}
#repo-clone-url {
border-radius: 0;
padding: 5px 10px;
font-size: 1.2em;
}
}
}
&.release {
#release-list {
border-top: 1px solid var(--color-secondary);
margin-top: 20px;
padding-top: 15px;
.release-list-title {
font-size: 2rem;
font-weight: normal;
margin-top: -6px;
}
> li {
list-style: none;
.meta,
.detail {
padding-top: 30px;
padding-bottom: 40px;
}
.meta {
text-align: right;
position: relative;
.tag:not(.icon) {
display: block;
margin-top: 15px;
}
.commit {
display: block;
margin-top: 10px;
}
}
.detail {
border-left: 2px solid var(--color-secondary);
2015-11-17 08:18:05 +01:00
.author {
img {
margin-bottom: -3px;
}
}
.download {
margin-top: 20px;
2015-11-26 02:10:25 +01:00
> a {
.svg {
margin-left: 5px;
margin-right: 5px;
}
}
.list {
padding-left: 0;
border-top: 1px solid var(--color-secondary);
li {
list-style: none;
display: block;
padding-top: 8px;
padding-bottom: 8px;
border-bottom: 1px solid var(--color-secondary);
a > .text.right {
margin-right: 5px;
}
}
}
}
.dot {
width: 9px;
height: 9px;
background-color: #ddd;
z-index: 999;
position: absolute;
display: block;
left: -5px;
top: 40px;
border-radius: 6px;
border: 1px solid #ffffff;
}
}
}
}
#tags-table {
.release-tag-name {
font-size: 1.5rem;
font-weight: normal;
}
}
}
&.new.release {
.target {
min-width: 500px;
#tag-name {
margin-top: -4px;
}
.at {
margin-left: -5px;
margin-right: 5px;
}
.selection.dropdown {
padding-top: 10px;
padding-bottom: 10px;
}
}
2015-11-26 02:10:25 +01:00
.prerelease.field {
margin-bottom: 0;
}
.field {
button,
input {
@media (max-width: 438px) {
width: 100%;
}
}
button {
@media @mediaSm {
margin-bottom: 1em;
}
}
}
}
2015-11-26 02:10:25 +01:00
&.forks {
.list {
margin-top: 0;
2015-11-27 06:24:24 +01:00
.item {
padding-top: 10px;
padding-bottom: 10px;
border-bottom: 1px solid var(--color-secondary);
.ui.avatar {
float: left;
margin-right: 5px;
}
2015-12-01 02:45:55 +01:00
.link {
padding-top: 5px;
}
}
}
}
&.wiki {
&.start {
.ui.segment {
padding-top: 70px;
padding-bottom: 100px;
2015-11-27 06:24:24 +01:00
.svg {
height: 48px;
}
}
}
&.new {
.CodeMirror {
.CodeMirror-code {
font-family: var(--fonts-monospace);
.cm-comment {
background: inherit;
}
}
}
2015-11-26 02:10:25 +01:00
.editor-preview {
background-color: white;
}
2015-11-17 08:18:05 +01:00
.ui.attached.tabular.menu.previewtabs {
margin-bottom: 15px;
& + .field .editor-toolbar:not(.fullscreen) a.fa-eye {
display: none;
}
}
}
2015-11-17 08:18:05 +01:00
&.view {
.choose.page {
margin-top: -5px;
}
2015-11-17 08:18:05 +01:00
> .markdown {
padding: 15px 30px;
h1,
h2,
h3,
h4,
h5,
h6 {
&:first-of-type {
margin-top: 0;
}
}
}
}
@media @mediaSm {
.dividing.header .stackable.grid .button {
margin-top: 2px;
margin-bottom: 2px;
}
}
}
&.settings {
&.collaboration {
.collaborator.list {
padding: 0;
> .item {
margin: 0;
line-height: 2em;
&:not(:last-child) {
border-bottom: 1px solid var(--color-secondary);
}
}
}
#repo-collab-form {
#search-user-box {
.results {
left: 7px;
}
}
.ui.button {
margin-left: 5px;
margin-top: -3px;
}
}
#repo-collab-team-form {
#search-team-box {
.results {
left: 7px;
}
}
.ui.button {
margin-left: 5px;
margin-top: -3px;
}
}
}
&.branches {
.protected-branches {
.selection.dropdown {
width: 300px;
}
.item {
border: 1px solid var(--color-secondary);
padding: 10px 15px;
&:not(:last-child) {
border-bottom: 0;
}
}
}
.branch-protection {
.help {
margin-left: 26px;
padding-top: 0;
}
.fields {
margin-left: 20px;
display: block;
}
.whitelist {
margin-left: 26px;
.dropdown img {
display: inline-block;
}
}
}
}
&.webhook {
.events {
.column {
padding-bottom: 0;
}
.help {
font-size: 13px;
margin-left: 26px;
padding-top: 0;
}
}
}
}
.ui.attached.isSigned.isWarning {
border-left: 1px solid #c29393;
border-right: 1px solid #c29393;
&.top,
&.message {
border-top: 1px solid #c29393;
}
&.message {
box-shadow: none;
background-color: #fff5f5;
color: #d95c5c;
.ui.text {
color: #d64444;
}
}
&:last-child,
&.bottom {
border-bottom: 1px solid #c29393;
}
}
.ui.attached.isSigned:not(.isWarning) .pull-right {
padding-top: 5px;
}
.ui.attached.isSigned.isVerified {
border-left: 1px solid #a3c293;
border-right: 1px solid #a3c293;
&.top,
&.message {
border-top: 1px solid #a3c293;
}
&.message {
box-shadow: none;
background-color: #fcfff5;
color: #6cc644;
.pull-right {
color: var(--color-text);
}
.ui.text {
color: #21ba45;
}
}
&:last-child,
&.bottom {
border-bottom: 1px solid #a3c293;
}
}
.ui.attached.isSigned.isVerifiedUntrusted {
border-left: 1px solid #c2c193;
border-right: 1px solid #c2c193;
&.top,
&.message {
border-top: 1px solid #c2c193;
}
&.message {
box-shadow: none;
background-color: #fffff5;
color: #fbbd08;
.ui.text {
color: #d2ab00;
}
}
&:last-child,
&.bottom {
border-bottom: 1px solid #c2c193;
}
}
.ui.attached.isSigned.isVerifiedUnmatched {
border-left: 1px solid #c2a893;
border-right: 1px solid #c2a893;
&.top,
&.message {
border-top: 1px solid #c2a893;
}
&.message {
box-shadow: none;
background-color: #fffaf5;
color: #f2711c;
.ui.text {
color: #ee5f00;
}
}
&:last-child,
&.bottom {
border-bottom: 1px solid #c2a893;
}
}
.ui.segment.sub-menu {
padding: 7px;
line-height: 0;
.list {
width: 100%;
display: flex;
.item {
width: 100%;
&:first-of-type {
border-radius: var(--border-radius) 0 0 var(--border-radius);
}
&:last-of-type {
border-radius: 0 var(--border-radius) var(--border-radius) 0;
}
a {
color: var(--color-text);
&:hover {
color: var(--color-primary-light-2);
}
}
span.ui {
color: var(--color-text);
}
&.active {
background: var(--color-secondary);
}
}
}
}
.segment.reactions,
.select-reaction {
&.dropdown .menu {
right: 0 !important;
left: auto !important;
min-width: 15em;
> .header {
margin: .75rem 0 .5rem;
}
> .item {
float: left;
padding: .25rem !important;
margin: .25rem;
font-size: 1.5em;
width: 39px;
left: 13px;
border-radius: 6px;
display: flex;
justify-content: center;
align-items: center;
img.emoji {
margin-right: 0;
}
}
> .item:hover {
background: var(--color-primary);
}
}
}
.segment.reactions {
padding: 0;
display: flex;
border: none !important;
border-top: 1px solid var(--color-secondary) !important;
width: 100% !important;
max-width: 100% !important;
margin: 0 !important;
.ui.label {
max-height: 40px;
padding: 10px 18px !important;
display: flex !important;
align-items: center;
border: 0;
border-right: 1px solid;
border-radius: 0;
margin: 0;
font-size: 14px;
font-weight: normal;
border-color: var(--color-secondary) !important;
&.disabled {
cursor: default;
opacity: 1;
}
}
.ui.label.basic {
color: var(--color-primary) !important;
}
.ui.label.basic.blue {
background-color: var(--color-primary-alpha-20) !important;
border-color: var(--color-secondary) !important;
}
.reaction-count {
margin-left: .5rem;
}
Support unicode emojis and remove emojify.js (#11032) * Support unicode emojis and remove emojify.js This PR replaces all use of emojify.js and adds unicode emoji support to various areas of gitea. This works in a few ways: First it adds emoji parsing support into gitea itself. This allows us to * Render emojis from valid alias (:smile:) * Detect unicode emojis and let us put them in their own class with proper aria-labels and styling * Easily allow for custom "emoji" * Support all emoji rendering and features without javascript * Uses plain unicode and lets the system render in appropriate emoji font * Doesn't leave us relying on external sources for updates/fixes/features That same list of emoji is also used to create a json file which replaces the part of emojify.js that populates the emoji search tribute. This file is about 35KB with GZIP turned on and I've set it to load after the page renders to not hinder page load time (and this removes loading emojify.js also) For custom "emoji" it uses a pretty simple scheme of just looking for /emojis/img/name.png where name is something a user has put in the "allowed reactions" setting we already have. The gitea reaction that was previously hard coded into a forked copy of emojify.js is included and works as a custom reaction under this method. The emoji data sourced here is from https://github.com/github/gemoji which is the gem library Github uses for their emoji rendering (and a data source for other sites). So we should be able to easily render any emoji and :alias: that Github can, removing any errors from migrated content. They also update it as well, so we can sync when there are new unicode emoji lists released. I've included a slimmed down and slightly modified forked copy of https://github.com/knq/emoji to make up our own emoji module. The code is pretty straight forward and again allows us to have a lot of flexibility in what happens. I had seen a few comments about performance in some of the other threads if we render this ourselves, but there doesn't seem to be any issue here. In a test it can parse, convert, and render 1,000 emojis inside of a large markdown table in about 100ms on my laptop (which is many more emojis than will ever be in any normal issue). This also prevents any flickering and other weirdness from using javascript to render some things while using go for others. Not included here are image fall back URLS. I don't really think they are necessary for anything new being written in 2020. However, managing the emoji ourselves would allow us to add these as a feature later on if it seems necessary. Fixes: https://github.com/go-gitea/gitea/issues/9182 Fixes: https://github.com/go-gitea/gitea/issues/8974 Fixes: https://github.com/go-gitea/gitea/issues/8953 Fixes: https://github.com/go-gitea/gitea/issues/6628 Fixes: https://github.com/go-gitea/gitea/issues/5130 * add new shared function emojiHTML * don't increase emoji size in issue title * Update templates/repo/issue/view_content/add_reaction.tmpl Co-Authored-By: 6543 <6543@obermui.de> * Support for emoji rendering in various templates * Render code and review comments as they should be * Better way to handle mail subjects * insert unicode from tribute selection * Add template helper for plain text when needed * Use existing replace function I forgot about * Don't include emoji greater than Unicode Version 12 Only include emoji and aliases in JSON * Update build/generate-emoji.go * Tweak regex slightly to really match everything including random invisible characters. Run tests for every emoji we have * final updates * code review * code review * hard code gitea custom emoji to match previous behavior * Update .eslintrc Co-Authored-By: silverwind <me@silverwind.io> * disable preempt Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-04-28 20:05:39 +02:00
.select-reaction {
display: flex;
align-items: center;
padding: 0 14px;
&:not(.active) a {
display: none;
}
}
&:hover .select-reaction a {
display: block;
}
}
.ui.fluid.action.input {
.ui.search.action.input {
flex: auto;
}
}
.repository-summary {
box-shadow: none !important;
.segment.language-stats-details,
.segment.repository-summary {
border-top: none;
background: none;
}
.segment.language-stats-details .item {
white-space: nowrap;
}
.segment.language-stats {
padding: 0;
height: 11px;
display: flex;
white-space: nowrap;
width: 100%;
border-radius: 0;
user-select: none;
.bar {
white-space: nowrap;
border: 0;
padding: 0;
margin: 0;
height: 100%;
}
}
}
.repository-menu {
padding: 0 !important;
}
.repository-menu .item {
padding-top: 9px !important;
padding-bottom: 9px !important;
}
&.diff .committed-by {
padding-top: .5rem;
.ui.avatar {
width: 20px;
height: 20px;
}
span {
margin-right: .25rem;
svg {
vertical-align: text-bottom;
margin-right: 2px;
}
}
}
2015-08-06 16:48:11 +02:00
}
2015-10-03 01:58:36 +02:00
// End of .repository
2015-08-06 16:48:11 +02:00
&.user-cards {
.list {
padding: 0;
display: flex;
flex-wrap: wrap;
.item {
list-style: none;
width: 32%;
margin: 10px 10px 10px 0;
padding-bottom: 14px;
float: left;
.avatar {
width: 48px;
height: 48px;
float: left;
display: block;
margin-right: 10px;
}
.name {
margin-top: 0;
margin-bottom: 0;
font-weight: normal;
}
.meta {
margin-top: 5px;
}
}
}
}
2015-11-22 07:32:09 +01:00
#search-repo-box,
2015-11-17 08:18:05 +01:00
#search-user-box {
.results {
.result {
.image {
float: left;
margin-right: 8px;
width: 2em;
height: 2em;
}
.content {
margin: 6px 0;
}
}
}
2015-11-17 08:18:05 +01:00
}
#search-team-box {
.results {
.result {
.content {
margin: 6px 0;
}
}
}
}
#issue-filters.hide {
display: none;
2017-03-15 02:10:35 +01:00
}
#issue-actions {
margin-top: -1rem !important; // counteract padding from Semantic
}
#issue-actions.hide {
display: none;
}
2020-02-11 22:25:41 +01:00
.ui.menu .item > img:not(.ui) {
width: auto;
2020-02-11 22:25:41 +01:00
}
2015-08-25 16:58:34 +02:00
.page.buttons {
padding-top: 15px;
2015-08-25 16:58:34 +02:00
}
2016-08-30 14:07:50 +02:00
.ui.form {
.dropzone {
border: 2px dashed var(--color-secondary);
background: none;
box-shadow: none !important;
padding: 0;
min-height: 5rem;
border-radius: 4px;
.dz-button {
color: rgba(0, 0, 0, .6);
}
&:hover .dz-button {
color: rgba(0, 0, 0, .8);
}
.dz-error-message {
top: 140px;
}
}
2015-08-12 12:44:09 +02:00
}
2015-08-15 14:55:03 +02:00
.settings {
.content {
margin-top: 2px;
> .header,
.segment {
box-shadow: 0 1px 2px 0 var(--color-box-header);
}
}
.list {
> .item {
&:not(:first-child) {
border-top: 1px solid var(--color-secondary);
padding: 1rem;
margin: 15px -1rem -1rem;
}
> .svg {
display: table-cell;
}
> .svg + .content {
display: table-cell;
padding: 0 0 0 .5em;
vertical-align: top;
}
.info {
margin-top: 10px;
.tab.segment {
border: 0;
padding: 10px 0 0;
}
}
}
&.key {
.meta {
padding-top: 5px;
color: var(--color-text-light-2);
}
}
&.email {
> .item:not(:first-child) {
min-height: 60px;
}
}
&.collaborator {
> .item {
padding: 0;
}
}
}
}
2015-08-09 18:23:20 +02:00
.ui.vertical.menu {
.header.item {
font-size: 1.1em;
background: var(--color-box-header);
}
2015-08-09 18:23:20 +02:00
}
.comment:target .comment-container {
border-color: var(--color-primary) !important;
box-shadow: 0 0 0 3px var(--color-primary-alpha-30) !important;
}
.comment:target .header::before {
border-right-color: var(--color-primary) !important;
filter: drop-shadow(-3px 0 0 var(--color-primary-alpha-30)) !important;
}
.code-comment:target {
border-color: var(--color-primary) !important;
border-radius: var(--border-radius) !important;
box-shadow: 0 0 0 3px var(--color-primary-alpha-30) !important;
}
.code-comment:target .content {
box-shadow: none !important;
}
.comment-header {
#avatar-arrow;
border: none !important;
border-bottom: 1px solid var(--color-secondary) !important;
font-weight: normal !important;
padding: .5rem 1rem !important;
margin: 0 !important;
position: relative;
color: #767676;
min-height: 41px;
background-color: var(--color-box-header);
display: flex;
justify-content: space-between;
align-items: center;
&.arrow-top::before,
&.arrow-top::after {
transform: rotate(90deg);
}
&.arrow-top::before {
top: -9px;
left: 6px;
}
&.arrow-top::after {
top: -8px;
left: 7px;
}
}
.comment-header .actions a {
margin-right: 0 !important;
padding: .5rem !important;
}
.comment-header a {
color: rgba(0, 0, 0, .4) !important;
}
.comment-header .actions a:hover,
.comment-header .actions a.active {
color: rgba(0, 0, 0, .8) !important;
}
.comment-header-left > * + *,
.comment-header-right > * + * {
margin-left: .25rem;
}
.comment-body {
border: none !important;
width: 100% !important;
max-width: 100% !important;
margin: 0 !important;
}
2015-08-09 16:45:38 +02:00
.edit-label.modal,
.new-label.segment {
.form {
.column {
padding-right: 0;
}
.buttons {
margin-left: auto;
padding-top: 15px;
}
.color.picker.column {
width: auto;
.color-picker {
height: 35px;
width: auto;
padding-left: 30px;
}
}
.minicolors-swatch.minicolors-sprite {
top: 10px;
left: 10px;
width: 15px;
height: 15px;
}
.precolors {
padding-left: 0;
padding-right: 0;
margin: 3px 10px auto;
width: 120px;
.color {
float: left;
width: 15px;
height: 15px;
}
}
}
2015-08-29 21:21:59 +02:00
}
2016-02-07 17:41:11 +01:00
#avatar-arrow {
&::before,
&::after {
right: 100%;
top: 20px;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
&::before {
border-right-color: var(--color-secondary);
border-width: 9px;
margin-top: -9px;
}
&::after {
border-right-color: var(--color-box-header);
border-width: 8px;
margin-top: -8px;
}
}
2015-08-29 21:21:59 +02:00
#transfer-repo-modal,
#delete-repo-modal,
#delete-wiki-modal,
#convert-fork-repo-modal,
#convert-mirror-repo-modal {
.ui.message {
width: 100% !important;
}
}
// generate .tab-size-{i} from 1 to 16
.generate-tab-size(16);
.generate-tab-size(@n, @i: 1) when (@i =< @n) {
.tab-size-@{i} {
tab-size: @i !important;
-moz-tab-size: @i !important;
}
.generate-tab-size(@n, (@i + 1));
}
.stats-table {
display: table;
width: 100%;
.table-cell {
display: table-cell;
&.tiny {
height: .5em;
}
}
}
.labels-list {
display: inline-flex;
flex-wrap: wrap;
}
.labels-list .label {
margin-top: 1.5px;
margin-bottom: 1.5px;
margin-right: 3px;
margin-left: 0;
display: inline-block !important;
}
.labels-list .label:last-of-type {
margin-right: 0;
}
tbody.commit-list {
vertical-align: baseline;
}
.message-wrapper {
overflow: hidden;
text-overflow: ellipsis;
max-width: calc(100% - 50px);
display: inline-block;
vertical-align: middle;
}
@media @mediaSm {
tr.commit-list {
width: 100%;
}
th .message-wrapper {
display: block;
max-width: calc(100vw - 70px);
}
}
@media @mediaMd {
tr.commit-list {
width: 723px;
}
th .message-wrapper {
max-width: 280px;
}
}
@media @mediaLg {
tr.commit-list {
width: 933px;
}
th .message-wrapper {
max-width: 490px;
}
}
@media @mediaXl {
tr.commit-list {
width: 1127px;
}
th .message-wrapper {
max-width: 680px;
}
}
.commit-list .commit-summary a {
text-decoration: underline;
text-decoration-style: dashed;
&:hover {
text-decoration-style: solid;
}
&.default-link {
text-decoration: none;
&:hover {
text-decoration: underline;
text-decoration-style: solid;
}
}
}
.commit-list .commit-status-link {
display: inline-block;
vertical-align: middle;
}
.commit-body {
white-space: pre-wrap;
}
.git-notes {
&.top {
text-align: left;
}
2019-06-13 06:23:45 +02:00
.commit-body {
margin: 0;
}
}
@media @mediaSm {
.ui.stackable.menu {
&.mobile--margin-between-items > .item {
margin-top: 5px;
margin-bottom: 5px;
}
&.mobile--no-negative-margins {
margin-left: 0;
margin-right: 0;
}
}
}
#topic_edit {
margin-top: 5px;
}
#repo-topics {
margin-top: 5px;
display: flex;
align-items: center;
flex-wrap: wrap;
2018-05-09 18:29:04 +02:00
}
.repo-topic {
font-weight: normal !important;
cursor: pointer;
margin: 2px !important;
}
#new-dependency-drop-list {
&.ui.selection.dropdown {
min-width: 0;
width: 100%;
border-radius: 4px 0 0 4px;
border-right: 0;
white-space: nowrap;
}
.text {
width: 100%;
overflow: hidden;
}
}
#manage_topic {
font-size: 12px;
}
2019-05-13 08:26:32 +02:00
.label + #manage_topic {
margin-left: 5px;
}
.ui.small.label.topic {
margin-bottom: 4px;
}
.repo-header {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
}
.repo-header .repo-buttons {
display: flex;
align-items: center;
}
2019-03-06 01:48:30 +01:00
.repo-buttons .disabled-repo-button .label {
opacity: .5;
2019-03-06 01:48:30 +01:00
}
.repo-buttons .disabled-repo-button a.button {
opacity: .5;
cursor: not-allowed;
2019-03-06 01:48:30 +01:00
}
.repo-buttons .disabled-repo-button a.button:hover {
background: none !important;
color: rgba(0, 0, 0, .6) !important;
box-shadow: 0 0 0 1px var(--color-secondary) inset !important;
2019-03-06 01:48:30 +01:00
}
2019-05-13 08:26:32 +02:00
.repo-buttons .ui.labeled.button > .label {
border-left: 0 !important;
margin: 0 !important;
2019-03-06 01:48:30 +01:00
}
.tag-code {
height: 28px;
}
.tag-code,
.tag-code td {
background-color: #f0f9ff;
border-color: #f1f8ff !important;
vertical-align: middle;
}
.resolved-placeholder {
font-weight: normal !important;
border: 1px solid var(--color-secondary) !important;
border-radius: var(--border-radius) !important;
margin: 4px !important;
}
.resolved-placeholder + .comment-code-cloud {
padding-top: 0 !important;
}
.board {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
overflow-x: auto;
margin: 0 .5em;
}
.board-column {
background-color: rgba(0, 0, 0, .05) !important;
border: 1px solid var(--color-secondary) !important;
margin: 0 .5rem !important;
padding: .5rem !important;
width: 320px;
height: 60vh;
overflow-y: scroll;
flex: 0 0 auto;
overflow: visible;
display: flex;
flex-direction: column;
}
.board-column-header {
display: flex;
justify-content: space-between;
}
.board-label {
background: none !important;
line-height: 1.25 !important;
}
.board-column > .cards {
flex: 1;
display: flex;
flex-direction: column;
margin: 0 !important;
padding: 0 !important;
.card .meta > a.milestone {
color: #999999;
}
}
.board-column > .divider {
margin: 5px 0;
}
.board-column:first-child {
margin-left: auto !important;
}
.board-column:last-child {
margin-right: auto !important;
}
.board-card {
margin: 3px !important;
width: auto !important;
background-color: #fff;
border-radius: 5px;
cursor: pointer;
}
.board-card .header {
font-size: 1.1em !important;
}
.board-card .content {
padding: 5px 8px !important;
}
.board-card .extra.content {
padding: 5px 8px !important;
}
td.blob-excerpt {
background-color: #fafafa;
}
.issue-keyword {
border-bottom: 1px dotted #959da5;
display: inline-block;
}
.file-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 12px !important;
}
.file-info {
display: flex;
align-items: center;
}
.file-info-entry {
display: flex;
align-items: center;
}
.file-info-entry + .file-info-entry {
border-left: 1px solid currentColor;
margin-left: 8px;
padding-left: 8px;
}
.webhook-info {
padding: 7px 12px;
margin: 10px 0;
background-color: #f8f8f8;
border: 1px solid #dddddd;
border-radius: 3px;
font-size: 13px;
line-height: 1.5;
overflow: auto;
}
.title_wip_desc {
margin-top: 1em;
}
.sidebar-item-link {
display: inline-flex;
align-items: center;
}
.diff-file-box[data-folded="true"] .diff-file-body {
display: none;
}
.diff-file-box[data-folded="true"] .diff-file-header {
border-radius: var(--border-radius) !important;
}
/* prevent page shaking on language bar click */
.repository-summary-language-stats {
height: 48px;
overflow: hidden;
}
.ui.form .right .ui.button {
margin-left: .25em;
margin-right: 0;
}
.removed-code {
background-color: #fdb8c0;
}
.added-code {
background-color: #acf2bd;
}
.repository .ui.menu.new-menu {
background: none !important;
@media @mediaLgAndDown {
&::after {
background: none !important;
}
}
}
.repository.migrate .card {
transition: all .1s ease-in-out;
box-shadow: none !important;
border: 1px solid var(--color-secondary);
}
.repository.migrate .card:hover {
transform: scale(105%);
box-shadow: 0 .5rem 1rem var(--color-shadow) !important;
}