gitea/web_src/less/_repository.less

3606 lines
65 KiB
Plaintext
Raw Normal View History

2015-07-23 20:50:05 +00:00
.repository {
.repo-header {
.ui.compact.menu {
margin-left: 1rem;
}
.ui.header {
margin-top: 0;
}
.fork-flag {
font-size: 12px;
margin-top: 2px;
}
.repo-buttons .svg {
margin: 0 .42857143em 0 -.21428571em;
}
2015-12-01 01:45:55 +00: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;
}
.unicode-escaped .escaped-code-point {
&[data-escaped]::before {
visibility: visible;
content: attr(data-escaped);
font-family: var(--fonts-monospace);
color: var(--color-red);
}
.char {
display: none;
}
}
.broken-code-point {
font-family: var(--fonts-monospace);
color: var(--color-blue);
}
.unicode-escaped .ambiguous-code-point {
border: 1px var(--color-yellow) solid;
}
.metas {
.menu {
overflow-x: auto;
Scoped labels (#22585) Add a new "exclusive" option per label. This makes it so that when the label is named `scope/name`, no other label with the same `scope/` prefix can be set on an issue. The scope is determined by the last occurence of `/`, so for example `scope/alpha/name` and `scope/beta/name` are considered to be in different scopes and can coexist. Exclusive scopes are not enforced by any database rules, however they are enforced when editing labels at the models level, automatically removing any existing labels in the same scope when either attaching a new label or replacing all labels. In menus use a circle instead of checkbox to indicate they function as radio buttons per scope. Issue filtering by label ensures that only a single scoped label is selected at a time. Clicking with alt key can be used to remove a scoped label, both when editing individual issues and batch editing. Label rendering refactor for consistency and code simplification: * Labels now consistently have the same shape, emojis and tooltips everywhere. This includes the label list and label assignment menus. * In label list, show description below label same as label menus. * Don't use exactly black/white text colors to look a bit nicer. * Simplify text color computation. There is no point computing luminance in linear color space, as this is a perceptual problem and sRGB is closer to perceptually linear. * Increase height of label assignment menus to show more labels. Showing only 3-4 labels at a time leads to a lot of scrolling. * Render all labels with a new RenderLabel template helper function. Label creation and editing in multiline modal menu: * Change label creation to open a modal menu like label editing. * Change menu layout to place name, description and colors on separate lines. * Don't color cancel button red in label editing modal menu. * Align text to the left in model menu for better readability and consistent with settings layout elsewhere. Custom exclusive scoped label rendering: * Display scoped label prefix and suffix with slightly darker and lighter background color respectively, and a slanted edge between them similar to the `/` symbol. * In menus exclusive labels are grouped with a divider line. --------- Co-authored-by: Yarden Shoham <hrsi88@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
2023-02-18 19:17:39 +00:00
max-height: 500px;
}
.ui.list {
&.assignees .icon {
line-height: 2em;
}
&.assignees .teamavatar {
margin-top: .125rem;
margin-left: 6.75px;
margin-right: 8.75px;
}
.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 {
&.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 {
Scoped labels (#22585) Add a new "exclusive" option per label. This makes it so that when the label is named `scope/name`, no other label with the same `scope/` prefix can be set on an issue. The scope is determined by the last occurence of `/`, so for example `scope/alpha/name` and `scope/beta/name` are considered to be in different scopes and can coexist. Exclusive scopes are not enforced by any database rules, however they are enforced when editing labels at the models level, automatically removing any existing labels in the same scope when either attaching a new label or replacing all labels. In menus use a circle instead of checkbox to indicate they function as radio buttons per scope. Issue filtering by label ensures that only a single scoped label is selected at a time. Clicking with alt key can be used to remove a scoped label, both when editing individual issues and batch editing. Label rendering refactor for consistency and code simplification: * Labels now consistently have the same shape, emojis and tooltips everywhere. This includes the label list and label assignment menus. * In label list, show description below label same as label menus. * Don't use exactly black/white text colors to look a bit nicer. * Simplify text color computation. There is no point computing luminance in linear color space, as this is a perceptual problem and sRGB is closer to perceptually linear. * Increase height of label assignment menus to show more labels. Showing only 3-4 labels at a time leads to a lot of scrolling. * Render all labels with a new RenderLabel template helper function. Label creation and editing in multiline modal menu: * Change label creation to open a modal menu like label editing. * Change menu layout to place name, description and colors on separate lines. * Don't color cancel button red in label editing modal menu. * Align text to the left in model menu for better readability and consistent with settings layout elsewhere. Custom exclusive scoped label rendering: * Display scoped label prefix and suffix with slightly darker and lighter background color respectively, and a slanted edge between them similar to the `/` symbol. * In menus exclusive labels are grouped with a divider line. --------- Co-authored-by: Yarden Shoham <hrsi88@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
2023-02-18 19:17:39 +00:00
max-height: 500px;
overflow-x: auto;
right: 0 !important;
left: auto !important;
}
}
.select-label {
.desc {
Scoped labels (#22585) Add a new "exclusive" option per label. This makes it so that when the label is named `scope/name`, no other label with the same `scope/` prefix can be set on an issue. The scope is determined by the last occurence of `/`, so for example `scope/alpha/name` and `scope/beta/name` are considered to be in different scopes and can coexist. Exclusive scopes are not enforced by any database rules, however they are enforced when editing labels at the models level, automatically removing any existing labels in the same scope when either attaching a new label or replacing all labels. In menus use a circle instead of checkbox to indicate they function as radio buttons per scope. Issue filtering by label ensures that only a single scoped label is selected at a time. Clicking with alt key can be used to remove a scoped label, both when editing individual issues and batch editing. Label rendering refactor for consistency and code simplification: * Labels now consistently have the same shape, emojis and tooltips everywhere. This includes the label list and label assignment menus. * In label list, show description below label same as label menus. * Don't use exactly black/white text colors to look a bit nicer. * Simplify text color computation. There is no point computing luminance in linear color space, as this is a perceptual problem and sRGB is closer to perceptually linear. * Increase height of label assignment menus to show more labels. Showing only 3-4 labels at a time leads to a lot of scrolling. * Render all labels with a new RenderLabel template helper function. Label creation and editing in multiline modal menu: * Change label creation to open a modal menu like label editing. * Change menu layout to place name, description and colors on separate lines. * Don't color cancel button red in label editing modal menu. * Align text to the left in model menu for better readability and consistent with settings layout elsewhere. Custom exclusive scoped label rendering: * Display scoped label prefix and suffix with slightly darker and lighter background color respectively, and a slanted edge between them similar to the `/` symbol. * In menus exclusive labels are grouped with a divider line. --------- Co-authored-by: Yarden Shoham <hrsi88@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
2023-02-18 19:17:39 +00:00
padding-left: 23px;
}
}
.ui.tabs {
&.container {
margin-top: 14px;
margin-bottom: 0;
.ui.menu {
border-bottom: 0;
}
}
&.divider {
margin-top: 0;
margin-bottom: 20px;
}
}
#clone-panel {
#repo-clone-url {
width: 320px;
@media @mediaMd {
width: 200px;
}
@media @mediaSm {
width: 200px;
}
}
#repo-clone-https,
#repo-clone-ssh {
border-right: none;
}
#more-btn {
border-left: none;
}
button:first-of-type {
border-radius: var(--border-radius) 0 0 var(--border-radius) !important;
}
button:last-of-type {
border-radius: 0 var(--border-radius) var(--border-radius) 0 !important;
}
.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;
}
.repo-path {
.section,
.divider {
display: inline;
}
}
#repo-files-table {
table-layout: fixed;
thead {
th {
padding-top: 8px;
padding-bottom: 5px;
font-weight: normal;
}
.ui.avatar {
margin-bottom: 5px;
}
}
tbody {
.svg {
margin-left: 3px;
margin-right: 5px;
&.octicon-reply {
margin-right: 10px;
}
&.octicon-file-directory-fill,
&.octicon-file-submodule {
color: var(--color-primary);
}
&.octicon-file,
&.octicon-file-symlink-file {
color: var(--color-secondary-dark-7);
}
}
}
td {
padding-top: 0;
padding-bottom: 0;
overflow: initial;
&.name {
@media @mediaXl {
max-width: 150px;
}
@media @mediaLg {
max-width: 200px;
}
@media @mediaMd {
max-width: 300px;
}
width: 33%;
max-width: calc(100vw - 140px);
}
&.message {
color: var(--color-text-light-1);
@media @mediaXl {
max-width: 400px;
}
@media @mediaLg {
max-width: 350px;
}
@media @mediaMd {
max-width: 250px;
}
width: 66%;
}
&.age {
width: 120px;
color: var(--color-text-light-1);
}
.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:last-of-type {
td:first-child {
border-bottom-left-radius: var(--border-radius);
}
td:last-child {
border-bottom-right-radius: var(--border-radius);
}
}
tr:hover {
background-color: var(--color-hover);
}
tr.has-parent a {
display: inline-block;
padding-top: 8px;
padding-bottom: 8px;
width: calc(100% - 1.25rem);
}
}
.non-diff-file-content {
.header {
.icon {
font-size: 1em;
}
.small.icon {
font-size: .75em;
}
.tiny.icon {
font-size: .5em;
}
.file-actions {
.btn-octicon {
line-height: 1;
padding: 10px 8px;
vertical-align: middle;
color: var(--color-text);
}
.btn-octicon:hover {
color: var(--color-primary);
}
.btn-octicon-danger:hover {
color: var(--color-red);
}
.btn-octicon.disabled {
color: inherit;
opacity: var(--opacity-disabled);
cursor: default;
}
}
}
.view-raw {
padding: 5px;
> * {
max-width: 100%;
border: 1px solid var(--color-secondary);
}
img {
margin: 1rem 0;
border-radius: 0;
object-fit: contain;
}
img[src$='.svg' i] {
max-height: 600px !important;
max-width: 600px !important;
}
}
.plain-text {
padding: 1em 2em;
pre {
word-break: break-word;
white-space: pre-wrap;
}
}
.csv {
overflow-x: auto;
padding: 0 !important;
}
pre {
overflow: auto;
}
Support asciicast files as new markup (#22448) Support [asciicast files](https://github.com/asciinema/asciinema/blob/develop/doc/asciicast-v2.md) as a new markup via [asciinema-player](https://github.com/asciinema/asciinema-player). For more on asciinema, see the [introduction](https://asciinema.org/). So users can use asciinema recorder to generate an asciicast file (or you can download a sample file from https://asciinema.org/a/335480.cast?dl=1), then upload it to Gitea and play it on Gitea. Snapshots: <details> ## Upload asciicast files <img width="1134" alt="image" src="https://user-images.githubusercontent.com/9418365/212461061-cc2c7181-0e14-4534-af55-1ec60a639fd1.png"> ## Open an asciicast file <img width="1137" alt="image" src="https://user-images.githubusercontent.com/9418365/212461090-a3b5141f-4894-430d-a2b4-ea257801a0ed.png"> ## Play it <img width="1144" alt="image" src="https://user-images.githubusercontent.com/9418365/212461157-4e82db69-0e41-471d-928f-ac1fe0737105.png"> ## Copy contents from the "video" <img width="1145" alt="image" src="https://user-images.githubusercontent.com/9418365/212461286-211612bc-15d6-427a-89a9-6abff5c6a0a5.png"> ## View the source <img width="1140" alt="image" src="https://user-images.githubusercontent.com/9418365/212461187-05473b2d-ba3d-4072-84a6-4aa1e7d82182.png"> </details> Known issue: Don't support the [v1 version asciicast files](https://github.com/asciinema/asciinema/blob/develop/doc/asciicast-v1.md), it's a poorly designed version, it does not specify the file extension and uses `*.json` usually, so it's impossible to recognize the files. Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-01-18 00:46:58 +00:00
.asciicast {
padding: 5px !important;
}
}
.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 10:44:09 +00: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 10:44:09 +00:00
&::after {
border-right-color: var(--color-box-body);
}
2015-08-19 20:31:28 +00: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 01:55:12 +00:00
input {
width: 240px !important;
padding-left: 26px !important;
}
}
2015-08-03 09:42:09 +00:00
.octicon-git-branch {
position: absolute;
top: 9px;
left: 10px;
color: var(--color-grey);
}
}
}
}
}
2015-08-03 09:42:09 +00: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 14:43:14 +00:00
&::after {
border-right-color: var(--color-box-body);
}
.markup {
font-size: 14px;
}
}
.metas {
min-width: 220px;
.filter.menu {
Scoped labels (#22585) Add a new "exclusive" option per label. This makes it so that when the label is named `scope/name`, no other label with the same `scope/` prefix can be set on an issue. The scope is determined by the last occurence of `/`, so for example `scope/alpha/name` and `scope/beta/name` are considered to be in different scopes and can coexist. Exclusive scopes are not enforced by any database rules, however they are enforced when editing labels at the models level, automatically removing any existing labels in the same scope when either attaching a new label or replacing all labels. In menus use a circle instead of checkbox to indicate they function as radio buttons per scope. Issue filtering by label ensures that only a single scoped label is selected at a time. Clicking with alt key can be used to remove a scoped label, both when editing individual issues and batch editing. Label rendering refactor for consistency and code simplification: * Labels now consistently have the same shape, emojis and tooltips everywhere. This includes the label list and label assignment menus. * In label list, show description below label same as label menus. * Don't use exactly black/white text colors to look a bit nicer. * Simplify text color computation. There is no point computing luminance in linear color space, as this is a perceptual problem and sRGB is closer to perceptually linear. * Increase height of label assignment menus to show more labels. Showing only 3-4 labels at a time leads to a lot of scrolling. * Render all labels with a new RenderLabel template helper function. Label creation and editing in multiline modal menu: * Change label creation to open a modal menu like label editing. * Change menu layout to place name, description and colors on separate lines. * Don't color cancel button red in label editing modal menu. * Align text to the left in model menu for better readability and consistent with settings layout elsewhere. Custom exclusive scoped label rendering: * Display scoped label prefix and suffix with slightly darker and lighter background color respectively, and a slanted edge between them similar to the `/` symbol. * In menus exclusive labels are grouped with a divider line. --------- Co-authored-by: Yarden Shoham <hrsi88@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
2023-02-18 19:17:39 +00:00
max-height: 500px;
overflow-x: auto;
}
}
}
}
2015-08-08 14:43:14 +00:00
&.view.issue {
.instruct-toggle {
display: inline-block;
}
.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);
}
a[data-clipboard-text] {
cursor: pointer;
svg {
vertical-align: middle;
position: relative;
top: -2px;
right: 1px;
}
}
}
2015-08-20 12:18:49 +00: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;
Timeline and color tweaks (#21799) Followup to https://github.com/go-gitea/gitea/pull/21784. - Restore muted effect on timeline author and issuelist comment icon - Remove whitespace inside shared user templates, fixing link hover underline - Use shared author link template more - Use `bold` class instead of CSS - Fix grey-light color being too dark on arc-green - Add missing black-light color - Fix issuelist progress bar color - Fix various other cases of missing `.muted` <img width="416" alt="Screenshot 2022-11-13 at 12 15 22" src="https://user-images.githubusercontent.com/115237/201519497-1d4725c6-bc8b-47b5-9f68-1278ac9a8c92.png"> <img width="324" alt="Screenshot 2022-11-13 at 12 16 52" src="https://user-images.githubusercontent.com/115237/201519501-c0d03700-f9af-4316-ab46-482f2c7c738b.png"> <img width="79" alt="Screenshot 2022-11-13 at 12 30 55" src="https://user-images.githubusercontent.com/115237/201519502-46dc2d73-bbdf-4a2e-84d3-d2976f793163.png"> <img width="440" alt="Screenshot 2022-11-13 at 12 41 03" src="https://user-images.githubusercontent.com/115237/201519876-ada33948-f84a-4aeb-a40d-5c873f9a49e9.png"> <img width="213" alt="Screenshot 2022-11-13 at 12 52 54" src="https://user-images.githubusercontent.com/115237/201520291-a4d7238e-aeca-46c7-9008-8b644b1b676e.png"> <img width="208" alt="Screenshot 2022-11-13 at 12 56 16" src="https://user-images.githubusercontent.com/115237/201520436-aa8ba109-b959-42fb-831a-021e806c7082.png"> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-11-19 04:02:30 +00:00
left: -68px;
img {
width: 40px !important;
height: 40px !important;
}
}
Improve UI on mobile (#19546) Start making the mobile experience not painful and be actually usable. This contains a few smaller changes to enhance this experience. - Submit buttons on the review forms aren't columns anymore and are now allowed to be displayed on one row. - The label/milestone & New Issue buttons were given each own row even tough, there's enough place to do it one the same row. This commit fixes that. - The issues+Pull tab on repo's has a third item besides the label/milestone & New Issue buttons, the search bar. On desktop there's enough place to do this on one row, for mobile it isn't, currently it was using for each item a new row. This commits fixes that by only giving the searchbar a new row and have the other two buttons on the same row. - The notification table will now be show a scrollbar instead of overflow. - The repo buttons(Watch, Star, Fork) on mobile were showing quite big and the SVG wasn't even displayed on the same line, if the count of those numbers were too high it would even overflow. This commit removes the SVG, as there isn't any place to show them on the same row and allows them to have a new row if the counts of those buttons are high. - The admin page can show you a lot of interesting information, on mobile the System Status + Configuration weren't properly displayed as the margin's were too high. This commit fixes that by reducing the margin to a number that makes sense on mobile. - Fixes to not overflow the tables but instead force them to be scrollable. - When viewing a issue or pull request, the comments aren't full-width but instead 80% and aligned to right, on mobile this is a annoyance as there isn't much width to begin with. This commits fixes that by forcing full-width and removing the avatars on the left side and instead including them inline in the comment header.
2022-05-01 16:11:21 +00:00
/* Don't show the mobile oriented avatar ".inline-timeline-avatar" on desktop. Desktop uses the avatar with class ".timeline-avatar" */
.inline-timeline-avatar {
display: none;
}
img.avatar,
.avatar img {
width: 20px;
height: 20px;
vertical-align: middle;
}
&: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);
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 */
clear: both; // reset the "float right shabox", in the future, use flexbox instead
> img.avatar,
> .avatar img {
position: relative;
top: -2px;
}
.shabox {
.sha.label {
margin: 0;
border: 1px solid var(--color-light-border);
&.isSigned.isWarning {
border: 1px solid var(--color-red-badge);
background: var(--color-red-badge-bg);
.shortsha {
display: inline-block;
padding-top: 1px;
}
&:hover {
background: var(--color-red-badge-hover-bg) !important;
}
}
&.isSigned.isVerified {
border: 1px solid var(--color-green-badge);
background: var(--color-green-badge-bg);
.shortsha {
display: inline-block;
padding-top: 1px;
}
&:hover {
background: var(--color-green-badge-hover-bg) !important;
}
}
&.isSigned.isVerifiedUntrusted {
border: 1px solid var(--color-yellow-badge);
background: var(--color-yellow-badge-bg);
.shortsha {
display: inline-block;
padding-top: 1px;
}
&:hover {
background: var(--color-yellow-badge-hover-bg) !important;
}
}
&.isSigned.isVerifiedUnmatched {
border: 1px solid var(--color-orange-badge);
background: var(--color-orange-badge-bg);
.shortsha {
display: inline-block;
padding-top: 1px;
}
&:hover {
background: var(--color-orange-badge-hover-bg) !important;
}
}
}
}
}
}
&.event > .commit-status-link {
float: right;
margin-right: 8px;
margin-top: 4px;
}
.comparebox {
line-height: 32px;
vertical-align: middle;
.compare.label {
font-size: 1rem;
margin: 0;
border: 1px solid var(--color-light-border);
}
}
@media @mediaSm {
.ui.segments {
margin-left: -2rem;
}
}
}
.ui.comments {
max-width: 100%;
.avatar {
margin-right: .5rem;
}
}
.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 {
@media @mediaSm {
.form .button {
width: 100%;
margin: 0;
&:not(:last-child) {
margin-bottom: 1rem;
}
}
}
}
2015-08-20 16:18:30 +00:00
.merge-section {
background-color: var(--color-box-body);
2018-09-07 02:32:46 +00:00
.item-section {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0;
margin-top: -.25rem;
margin-bottom: -.25rem;
}
@media @mediaSm {
.item-section {
align-items: flex-start;
flex-direction: column;
}
}
.divider {
margin-left: -1rem;
margin-right: -1rem;
}
&.no-header {
#avatar-arrow();
&::after {
border-right-color: var(--color-box-body);
}
}
}
.markup {
font-size: 14px;
}
.no-content {
color: var(--color-text-light-2);
font-style: italic;
}
.ui.form {
.field {
&:first-child {
clear: none;
}
&.footer {
overflow: hidden;
}
.tab.markup {
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 04:14:46 +00: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 04:14:46 +00: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 04:14:46 +00:00
.code-comment {
border: 1px solid transparent;
padding: .25rem .5rem;
margin: 0;
.content {
border: none !important;
}
.comment-header {
background: transparent;
border-bottom: 0 !important;
padding: 0 !important;
&::after,
&::before {
display: none;
}
}
.comment-content {
margin-left: 36px;
}
}
.code-comment,
.comment {
img.avatar {
width: 28px;
height: 28px;
}
}
.comment-code-cloud {
.segment.reactions {
margin-top: 16px !important;
margin-bottom: -8px !important;
border-top: none !important;
.ui.label {
border: 1px solid;
padding: 6px 10px !important;
margin: 0 2px;
border-radius: var(--border-radius);
border-color: var(--color-secondary-dark-1) !important;
}
.ui.label.basic.primary {
background-color: var(--color-reaction-active-bg) !important;
border-color: var(--color-primary-alpha-80) !important;
}
}
button.comment-form-reply {
margin: 0;
}
}
.event {
padding-left: 15px;
.detail {
Timeline and color tweaks (#21799) Followup to https://github.com/go-gitea/gitea/pull/21784. - Restore muted effect on timeline author and issuelist comment icon - Remove whitespace inside shared user templates, fixing link hover underline - Use shared author link template more - Use `bold` class instead of CSS - Fix grey-light color being too dark on arc-green - Add missing black-light color - Fix issuelist progress bar color - Fix various other cases of missing `.muted` <img width="416" alt="Screenshot 2022-11-13 at 12 15 22" src="https://user-images.githubusercontent.com/115237/201519497-1d4725c6-bc8b-47b5-9f68-1278ac9a8c92.png"> <img width="324" alt="Screenshot 2022-11-13 at 12 16 52" src="https://user-images.githubusercontent.com/115237/201519501-c0d03700-f9af-4316-ab46-482f2c7c738b.png"> <img width="79" alt="Screenshot 2022-11-13 at 12 30 55" src="https://user-images.githubusercontent.com/115237/201519502-46dc2d73-bbdf-4a2e-84d3-d2976f793163.png"> <img width="440" alt="Screenshot 2022-11-13 at 12 41 03" src="https://user-images.githubusercontent.com/115237/201519876-ada33948-f84a-4aeb-a40d-5c873f9a49e9.png"> <img width="213" alt="Screenshot 2022-11-13 at 12 52 54" src="https://user-images.githubusercontent.com/115237/201520291-a4d7238e-aeca-46c7-9008-8b644b1b676e.png"> <img width="208" alt="Screenshot 2022-11-13 at 12 56 16" src="https://user-images.githubusercontent.com/115237/201520436-aa8ba109-b959-42fb-831a-021e806c7082.png"> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-11-19 04:02:30 +00:00
margin-top: 4px;
margin-left: 14px;
.svg {
margin-right: 2px;
}
}
.segments {
box-shadow: none;
}
}
@media @mediaSm {
padding: 1rem 0 !important; // Important is required here to override existing fomantic styles.
}
}
.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);
}
Limit max-height of CodeMirror editors for issue comment and wiki (#18271) * Make the wiki editor bar sticky for longer wiki edits On codeberg community it was requested to make the wiki editor toolbar sticky for longer wiki posts, so one wouldn't have to scroll to the top to use it. (Reference; https://codeberg.org/Codeberg/Community/issues/533). In order to make this happen, the .editor-toolbar class needs to become position: sticky, and we need to fix it's transparent background and border-bottom. Because the bottom disappears, we add it. This makes the border become a double border, because the CodeMirror area defines borders for all. As such I've added a border-top: none, on the wiki write tab for the CodeMirror class. * Make the issue bar in the issue view sticky for issue #10675 In issue #10675 it's requested to make the issue bar sticky upon scrolling in the issue view. The proposed change changes inline html, which is not desirable. As such I've added the position sticky option to it's container, and fix the background upon scrolling. * Make linter happy on _repository.less Fix 0px -> 0 to make the linter happy. * Make linter happy on _editor.less Fix 0px -> 0 to make the linter happy. * Change z-index to the lowest boundary of 1 As per review of @silverwind change the z-index to it's lowest requirement of 1. * Change z-index to the lowest boundary of 1 As per review of @silverwind change the z-index to it's lowest requirement of 1. * Revert changes made to wiki editor (unsticky) and add max-height Fixes the max-height to 85vh, on the proposed 90vh it just came out just slightly too large. Unstickies the changes from the sticky commits. * Revert changes for the sticky title editor Removes the changes as done by the sticky title editor. * Add max-height definition to CodeMirror-scroll Add the max-height definition for the CodeMirror-scroll class in order to generalize the changes spoken about in PR #18271 * Remove CodeMirror-scroll definition Remove the max-height in CodeMirror-scroll definition, in order to generalize it in the CodeMirror less file. As per discussion in #18271. * fine tune CodeMirror min-height/max-height Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-06-05 08:09:50 +00:00
.CodeMirror-scroll {
max-height: 85vh;
}
}
}
.milestone.list {
list-style: none;
padding-top: 15px;
> .item {
padding-top: 10px;
padding-bottom: 10px;
border-bottom: 1px dashed var(--color-secondary);
progress {
width: 200px;
height: 16px;
}
.meta {
color: var(--color-text-light-2);
padding-top: 5px;
.issue-stats .svg {
padding-left: 5px;
}
.overdue {
color: var(--color-red);
2020-05-25 10:04:02 +00:00
}
}
2020-05-25 10:04:02 +00: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;
}
.markup {
font-size: 14px;
}
.title {
.issue-title {
margin-bottom: .5rem;
.index {
color: var(--color-text-light-2);
}
}
}
}
.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-dark-2);
}
}
.count {
margin: 0 3px;
&.count-ahead {
text-align: left;
}
&.count-behind {
text-align: right;
}
}
.bar {
height: 4px;
position: absolute;
background-color: var(--color-secondary-dark-2);
&.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 04:43:22 +00:00
}
width: 200px;
}
}
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-02 23:58:36 +00: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 17:21:54 +00:00
#rev-list .sha.label,
.timeline-item.commits-list .singular-commit .sha.label {
border: 1px solid var(--color-light-border);
.ui.signature.avatar {
height: 16px;
margin-bottom: 0;
width: 16px;
}
.detail.icon {
background: var(--color-light);
margin: -6px -10px -4px 0;
padding: 5px 4px 5px 6px;
border-left: 1px solid var(--color-light-border);
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 var(--color-red-badge);
background: var(--color-red-badge-bg);
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 13:42:42 +00:00
.shortsha {
display: inline-block;
padding-top: 1px;
}
.detail.icon {
border-left: 1px solid var(--color-red-badge);
color: var(--color-red-badge);
}
&:hover {
background: var(--color-red-badge-hover-bg) !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 13:42:42 +00:00
&.isSigned.isVerified {
border: 1px solid var(--color-green-badge);
background: var(--color-green-badge-bg);
.shortsha {
display: inline-block;
padding-top: 1px;
}
.detail.icon {
border-left: 1px solid var(--color-green-badge);
color: var(--color-green-badge);
}
&:hover {
background: var(--color-green-badge-hover-bg) !important;
}
}
&.isSigned.isVerifiedUntrusted {
border: 1px solid var(--color-yellow-badge);
background: var(--color-yellow-badge-bg);
.shortsha {
display: inline-block;
padding-top: 1px;
}
.detail.icon {
border-left: 1px solid var(--color-yellow-badge);
color: var(--color-yellow-badge);
}
&:hover {
background: var(--color-yellow-badge-hover-bg) !important;
}
}
&.isSigned.isVerifiedUnmatched {
border: 1px solid var(--color-orange-badge);
background: var(--color-orange-badge-bg);
.shortsha {
display: inline-block;
padding-top: 1px;
}
.detail.icon {
border-left: 1px solid var(--color-orange-badge);
color: var(--color-orange-badge);
}
&:hover {
background: var(--color-orange-badge-hover-bg) !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 04:43:22 +00:00
}
}
2015-11-16 04:52:46 +00:00
.data-table {
width: 100%;
tr {
border-top: 0;
}
td,
th {
padding: 5px !important;
overflow: hidden;
font-size: 12px;
text-align: left;
white-space: nowrap;
border: 1px solid var(--color-secondary);
}
td {
white-space: pre-line;
}
th {
font-weight: 600;
background: var(--color-box-header);
border-top: 0;
}
td.added,
th.added,
tr.added {
background-color: var(--color-diff-added-row-bg) !important;
}
td.removed,
th.removed,
tr.removed {
background-color: var(--color-diff-removed-row-bg) !important;
}
Prevent NPE in CSV diff rendering when column removed (#17018) Fixes #16837 if a column is deleted. We were clobbering the columns that were added by looping through the aline (base) and then when bline (head) was looped through, it clobbered what was in the "cells" array that is show in the diff, and then left a nil cell because nothing was shifted. This fix properly shifts the cells, and properly puts the b cell either at its location or after, according to what the aline placed in the cells. This includes test, adding a new test function since adding/removing cells works best with three columns, not two, which results in 4 columns of the resulting cells because it has a deleted column and an added column. If you try this locally, you can try those cases and others, such as adding a column. There was no need to do anything special for the rows when `aline == 0 || bline == 0` so that was removed. This allows the same code to be used for removed or added lines, with the bcell text always being the RightCell, acell text being the LeftCell. I still added the patch zeripath gave at https://github.com/go-gitea/gitea/issues/16837#issuecomment-913007382 so that just in case for some reason a cell is nil (which shouldn't happen now) it doesn't throw a 500 error, so the user can at least view the raw diff. Also fixes in the [view.go](https://github.com/go-gitea/gitea/pull/17018/files#diff-43a7f4747c7ba8bff888c9be11affaafd595fd55d27f3333840eb19df9fad393L521) file how if a CSV file is empty (either created empty or if you edit it and remove all contents) it throws a huge 500 error when you then save it (when you view the file). Since we allow creating, saving and pushing empty files, we shouldn't throw an error on an empty CSV file, but just show its empty contents. This doesn't happen if it is a Markdown file or other type of file that is empty. EDIT: Now handled in the markup/csv renderer code
2021-10-20 19:10:03 +00:00
td.moved,
th.moved,
tr.moved {
background-color: var(--color-diff-moved-row-bg) !important;
}
tbody.section {
border-top: 2px solid var(--color-secondary);
}
.line-num {
&:extend(.unselectable);
width: 1%;
min-width: 50px;
font-family: monospace;
line-height: 20px;
color: var(--color-secondary-dark-2);
white-space: nowrap;
vertical-align: top;
cursor: pointer;
text-align: right;
background: var(--color-body);
border: 0;
}
}
.diff-detail-box {
padding: 7px 0;
background: var(--color-body);
line-height: 30px;
@media @mediaMdAndDown {
flex-direction: column;
align-items: flex-start;
}
@media (max-width: 480px) {
flex-wrap: wrap;
}
&.sticky {
position: sticky;
top: 0;
z-index: 8;
border-bottom: 1px solid var(--color-secondary);
padding-left: 2px;
padding-right: 2px;
margin-left: -1px;
margin-right: -1px;
}
> div::after {
clear: both;
content: "";
display: block;
}
.diff-detail-stats strong {
margin-left: .25rem;
margin-right: .25rem;
}
// Because the translations contain the <strong> we need to style with nth-of-type
.diff-detail-stats strong:nth-of-type(1) {
color: var(--color-yellow);
}
.diff-detail-stats strong:nth-of-type(2) {
color: var(--color-green);
}
.diff-detail-stats strong:nth-of-type(3) {
color: var(--color-red);
}
.diff-detail-stats {
@media (max-width: 480px) {
font-size: 0;
line-height: 1.6rem;
strong {
font-size: 1rem;
}
}
}
.diff-detail-actions > * {
margin-right: 0;
}
.diff-detail-actions > * + * {
margin-left: .25rem;
}
.diff-detail-actions {
@media (max-width: 480px) {
padding-top: .25rem;
Improve UI on mobile (#19546) Start making the mobile experience not painful and be actually usable. This contains a few smaller changes to enhance this experience. - Submit buttons on the review forms aren't columns anymore and are now allowed to be displayed on one row. - The label/milestone & New Issue buttons were given each own row even tough, there's enough place to do it one the same row. This commit fixes that. - The issues+Pull tab on repo's has a third item besides the label/milestone & New Issue buttons, the search bar. On desktop there's enough place to do this on one row, for mobile it isn't, currently it was using for each item a new row. This commits fixes that by only giving the searchbar a new row and have the other two buttons on the same row. - The notification table will now be show a scrollbar instead of overflow. - The repo buttons(Watch, Star, Fork) on mobile were showing quite big and the SVG wasn't even displayed on the same line, if the count of those numbers were too high it would even overflow. This commit removes the SVG, as there isn't any place to show them on the same row and allows them to have a new row if the counts of those buttons are high. - The admin page can show you a lot of interesting information, on mobile the System Status + Configuration weren't properly displayed as the margin's were too high. This commit fixes that by reducing the margin to a number that makes sense on mobile. - Fixes to not overflow the tables but instead force them to be scrollable. - When viewing a issue or pull request, the comments aren't full-width but instead 80% and aligned to right, on mobile this is a annoyance as there isn't much width to begin with. This commits fixes that by forcing full-width and removing the avatars on the left side and instead including them inline in the comment header.
2022-05-01 16:11:21 +00:00
.ui.button:not(.btn-submit) {
padding-left: .5rem;
padding-right: .5rem;
display: flex;
flex-wrap: wrap;
justify-content: center;
text-align: center;
}
}
}
span.status {
display: inline-block;
width: 12px;
height: 12px;
margin-right: 8px;
vertical-align: middle;
&.modify {
background-color: var(--color-yellow);
}
&.add {
background-color: var(--color-green);
}
&.del {
background-color: var(--color-red);
}
&.rename {
background-color: var(--color-teal);
}
}
.button {
padding: 8px 12px;
}
}
.diff-box .header:not(.resolved-placeholder) {
display: flex;
align-items: center;
.file {
min-width: 0;
.file-link {
max-width: fit-content;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
}
2015-11-16 04:52:46 +00:00
.button {
padding: 8px 12px;
flex: 0 0 auto;
margin-top: -8px;
margin-bottom: -8px;
margin-right: 0;
}
}
.diff-box .resolved-placeholder {
display: flex;
align-items: center;
.button {
padding: 8px 12px;
}
}
.diff-file-box {
.header {
background-color: var(--color-box-header);
}
.file-body.file-code {
background: var(--color-code-bg);
.lines-num {
&:extend(.unselectable);
text-align: right;
color: var(--color-text-light);
width: 1%;
min-width: 50px;
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 {
&:extend(.unselectable);
width: 10px;
min-width: 10px;
}
[data-type-marker]::before {
content: attr(data-type-marker);
text-align: right;
display: inline-block;
}
}
}
}
.code-diff-split {
.tag-code .lines-code code.code-inner {
padding-left: 10px !important;
}
table,
tbody {
width: 100%;
}
}
&.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;
padding-left: 6px;
}
li + li {
border-top: 1px solid var(--color-secondary);
}
}
.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 04:28:46 +00: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;
line-height: 1.4;
}
}
}
&.release {
#release-list {
border-top: 1px solid var(--color-secondary);
margin-top: 20px;
padding-top: 15px;
2022-12-06 13:15:46 +00:00
padding-left: 0;
.release-list-title {
font-size: 2rem;
font-weight: normal;
2022-12-06 13:15:46 +00:00
margin-top: -4px;
margin-bottom: 0;
}
> li {
list-style: none;
.meta,
.detail {
padding-top: 30px;
padding-bottom: 40px;
}
.meta {
text-align: right;
position: relative;
.label {
margin-right: 0;
}
.commit {
display: block;
margin-top: 10px;
}
.choose {
margin-top: 15px;
.button {
margin-right: 0;
}
}
}
.detail {
border-left: 2px solid var(--color-secondary);
2015-11-17 07:18:05 +00:00
.author {
img {
2022-12-06 13:15:46 +00:00
margin-bottom: 3px;
}
}
.download {
> a {
.svg {
margin-left: 5px;
margin-right: 5px;
}
}
.list {
padding-left: 0;
li {
list-style: none;
display: block;
padding: 8px;
border: 1px solid var(--color-secondary);
background: var(--color-light);
a > .text.right {
margin-right: 5px;
}
}
li + li {
border-top: 0;
}
li:first-of-type {
border-radius: var(--border-radius) 0 0 var(--border-radius);
}
li:last-of-type {
border-radius: 0 var(--border-radius) var(--border-radius) 0;
}
}
}
.dot {
width: 10px;
height: 10px;
background-color: var(--color-secondary-dark-3);
z-index: 9;
position: absolute;
display: block;
left: -6px;
top: 40px;
border-radius: 100%;
border: 2.5px solid var(--color-body);
}
}
}
}
#tags-table {
.tag {
padding: 8px 12px;
}
.release-tag-name {
2022-12-06 13:15:46 +00:00
font-size: 18px;
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 01:10:25 +00:00
.prerelease.field {
margin-bottom: 0;
}
.field {
button,
input {
@media (max-width: 438px) {
width: 100%;
}
}
button {
@media @mediaSm {
margin-bottom: 1em;
}
}
.wrap_remove {
height: 38px;
}
.attachment_edit {
width: 450px !important;
}
}
}
2015-11-26 01:10:25 +00:00
&.forks {
.list {
margin-top: 0;
2015-11-27 05:24:24 +00: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 01:45:55 +00:00
.link {
padding-top: 5px;
}
}
}
}
Add Package Registry (#16510) * Added package store settings. * Added models. * Added generic package registry. * Added tests. * Added NuGet package registry. * Moved service index to api file. * Added NPM package registry. * Added Maven package registry. * Added PyPI package registry. * Summary is deprecated. * Changed npm name. * Sanitize project url. * Allow only scoped packages. * Added user interface. * Changed method name. * Added missing migration file. * Set page info. * Added documentation. * Added documentation links. * Fixed wrong error message. * Lint template files. * Fixed merge errors. * Fixed unit test storage path. * Switch to json module. * Added suggestions. * Added package webhook. * Add package api. * Fixed swagger file. * Fixed enum and comments. * Fixed NuGet pagination. * Print test names. * Added api tests. * Fixed access level. * Fix User unmarshal. * Added RubyGems package registry. * Fix lint. * Implemented io.Writer. * Added support for sha256/sha512 checksum files. * Improved maven-metadata.xml support. * Added support for symbol package uploads. * Added tests. * Added overview docs. * Added npm dependencies and keywords. * Added no-packages information. * Display file size. * Display asset count. * Fixed filter alignment. * Added package icons. * Formatted instructions. * Allow anonymous package downloads. * Fixed comments. * Fixed postgres test. * Moved file. * Moved models to models/packages. * Use correct error response format per client. * Use simpler search form. * Fixed IsProd. * Restructured data model. * Prevent empty filename. * Fix swagger. * Implemented user/org registry. * Implemented UI. * Use GetUserByIDCtx. * Use table for dependencies. * make svg * Added support for unscoped npm packages. * Add support for npm dist tags. * Added tests for npm tags. * Unlink packages if repository gets deleted. * Prevent user/org delete if a packages exist. * Use package unlink in repository service. * Added support for composer packages. * Restructured package docs. * Added missing tests. * Fixed generic content page. * Fixed docs. * Fixed swagger. * Added missing type. * Fixed ambiguous column. * Organize content store by sha256 hash. * Added admin package management. * Added support for sorting. * Add support for multiple identical versions/files. * Added missing repository unlink. * Added file properties. * make fmt * lint * Added Conan package registry. * Updated docs. * Unify package names. * Added swagger enum. * Use longer TEXT column type. * Removed version composite key. * Merged package and container registry. * Removed index. * Use dedicated package router. * Moved files to new location. * Updated docs. * Fixed JOIN order. * Fixed GROUP BY statement. * Fixed GROUP BY #2. * Added symbol server support. * Added more tests. * Set NOT NULL. * Added setting to disable package registries. * Moved auth into service. * refactor * Use ctx everywhere. * Added package cleanup task. * Changed packages path. * Added container registry. * Refactoring * Updated comparison. * Fix swagger. * Fixed table order. * Use token auth for npm routes. * Enabled ReverseProxy auth. * Added packages link for orgs. * Fixed anonymous org access. * Enable copy button for setup instructions. * Merge error * Added suggestions. * Fixed merge. * Handle "generic". * Added link for TODO. * Added suggestions. * Changed temporary buffer filename. * Added suggestions. * Apply suggestions from code review Co-authored-by: Thomas Boerger <thomas@webhippie.de> * Update docs/content/doc/packages/nuget.en-us.md Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Thomas Boerger <thomas@webhippie.de>
2022-03-30 08:42:47 +00:00
&.packages {
.empty {
padding-top: 70px;
padding-bottom: 100px;
.svg {
height: 48px;
}
}
.file-size {
white-space: nowrap;
}
}
&.wiki {
&.start {
.ui.segment {
padding-top: 70px;
padding-bottom: 100px;
2015-11-27 05:24:24 +00:00
.svg {
height: 48px;
}
}
}
&.new {
.ui.attached.tabular.menu.previewtabs {
margin-bottom: 15px;
}
}
2015-11-17 07:18:05 +00:00
&.view {
> .markup {
padding: 15px 30px;
h1,
h2,
h3,
h4,
h5,
h6 {
&:first-of-type {
margin-top: 0;
}
}
}
}
Limit max-height of CodeMirror editors for issue comment and wiki (#18271) * Make the wiki editor bar sticky for longer wiki edits On codeberg community it was requested to make the wiki editor toolbar sticky for longer wiki posts, so one wouldn't have to scroll to the top to use it. (Reference; https://codeberg.org/Codeberg/Community/issues/533). In order to make this happen, the .editor-toolbar class needs to become position: sticky, and we need to fix it's transparent background and border-bottom. Because the bottom disappears, we add it. This makes the border become a double border, because the CodeMirror area defines borders for all. As such I've added a border-top: none, on the wiki write tab for the CodeMirror class. * Make the issue bar in the issue view sticky for issue #10675 In issue #10675 it's requested to make the issue bar sticky upon scrolling in the issue view. The proposed change changes inline html, which is not desirable. As such I've added the position sticky option to it's container, and fix the background upon scrolling. * Make linter happy on _repository.less Fix 0px -> 0 to make the linter happy. * Make linter happy on _editor.less Fix 0px -> 0 to make the linter happy. * Change z-index to the lowest boundary of 1 As per review of @silverwind change the z-index to it's lowest requirement of 1. * Change z-index to the lowest boundary of 1 As per review of @silverwind change the z-index to it's lowest requirement of 1. * Revert changes made to wiki editor (unsticky) and add max-height Fixes the max-height to 85vh, on the proposed 90vh it just came out just slightly too large. Unstickies the changes from the sticky commits. * Revert changes for the sticky title editor Removes the changes as done by the sticky title editor. * Add max-height definition to CodeMirror-scroll Add the max-height definition for the CodeMirror-scroll class in order to generalize the changes spoken about in PR #18271 * Remove CodeMirror-scroll definition Remove the max-height in CodeMirror-scroll definition, in order to generalize it in the CodeMirror less file. As per discussion in #18271. * fine tune CodeMirror min-height/max-height Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-06-05 08:09:50 +00:00
.form .CodeMirror-scroll {
max-height: 85vh;
}
@media @mediaSm {
.dividing.header .stackable.grid .button {
margin-top: 2px;
margin-bottom: 2px;
}
}
@media @mediaSm {
#clone-panel #repo-clone-url {
width: 160px;
}
}
}
&.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 var(--color-error-border);
border-right: 1px solid var(--color-error-border);
&.top,
&.message {
border-top: 1px solid var(--color-error-border);
}
&.message {
box-shadow: none;
background-color: var(--color-error-bg);
color: var(--color-error-text);
.ui.text {
color: var(--color-error-text);
}
}
&:last-child,
&.bottom {
border-bottom: 1px solid var(--color-error-border);
}
}
.ui.attached.isSigned.isVerified {
border-left: 1px solid var(--color-success-border);
border-right: 1px solid var(--color-success-border);
&.top,
&.message {
border-top: 1px solid var(--color-success-border);
}
&.message {
box-shadow: none;
background-color: var(--color-success-bg);
color: var(--color-success-text);
.pull-right {
color: var(--color-text);
}
.ui.text {
color: var(--color-success-text);
}
}
&:last-child,
&.bottom {
border-bottom: 1px solid var(--color-success-border);
}
}
.ui.attached.isSigned.isVerifiedUntrusted,
.ui.attached.isSigned.isVerifiedUnmatched {
border-left: 1px solid var(--color-warning-border);
border-right: 1px solid var(--color-warning-border);
&.top,
&.message {
border-top: 1px solid var(--color-warning-border);
}
&.message {
box-shadow: none;
background-color: var(--color-warning-bg);
color: var(--color-warning-text);
.ui.text {
color: var(--color-warning-text);
}
}
&:last-child,
&.bottom {
border-bottom: 1px solid var(--color-warning-border);
}
}
.ui.segment.sub-menu {
padding: 7px;
line-height: 0;
.list {
width: 100%;
display: flex;
align-items: center;
.item {
width: 100%;
color: var(--color-text);
&:first-of-type {
border-radius: var(--border-radius) 0 0 var(--border-radius);
padding-left: .25rem;
}
&:last-of-type {
border-radius: 0 var(--border-radius) var(--border-radius) 0;
padding-right: .25rem;
}
a {
color: var(--color-text);
&:hover {
color: var(--color-primary-light-2);
}
}
&.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;
background: var(--color-reaction-bg);
&.disabled {
cursor: default;
opacity: 1;
}
}
.ui.label.basic {
color: var(--color-primary) !important;
}
.ui.label.basic.primary {
background-color: var(--color-reaction-active-bg) !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 18:05:39 +00: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 {
&:extend(.unselectable);
padding: 0;
height: 11px;
display: flex;
white-space: nowrap;
width: 100%;
border-radius: 0;
@media @mediaSm {
display: 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;
}
2015-08-06 14:48:11 +00:00
}
2015-10-02 23:58:36 +00:00
// End of .repository
2015-08-06 14:48:11 +00:00
#cite-repo-modal {
#citation-panel {
width: 500px;
@media @mediaSm {
width: 100%;
}
input {
border-radius: 0;
padding: 5px 10px;
width: 50%;
line-height: 1.4;
}
.citation.button {
font-size: 13px;
padding: 7.5px 5px;
}
#citation-copy-content {
border-radius: 0;
padding: 5px 10px;
font-size: 1.2em;
line-height: 1.4;
}
#citation-copy-apa,
#citation-copy-bibtex {
border-right: none;
}
#goto-citation-btn {
border-left: none;
}
>:first-child {
border-radius: var(--border-radius) 0 0 var(--border-radius) !important;
}
>:last-child {
border-radius: 0 var(--border-radius) var(--border-radius) 0 !important;
}
.icon.button {
padding: 0 10px;
}
}
}
&.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 06:32:09 +00:00
#search-repo-box,
2015-11-17 07:18:05 +00:00
#search-user-box {
.results {
.result {
img {
float: left;
margin-right: 8px;
width: 2em;
height: 2em;
}
.content {
margin: 6px 0;
}
}
}
2015-11-17 07:18:05 +00:00
}
#search-team-box {
.results {
.result {
.content {
margin: 6px 0;
}
}
}
}
#issue-actions {
margin-top: -1rem !important; // counteract padding from Semantic
}
2020-02-11 21:25:41 +00:00
.ui.menu .item > img:not(.ui) {
width: auto;
2020-02-11 21:25:41 +00:00
}
2015-08-25 14:58:34 +00:00
.page.buttons {
padding-top: 15px;
2015-08-25 14:58:34 +00:00
}
.commit-header-row {
min-height: 50px !important;
padding-top: 0 !important;
padding-bottom: 0 !important;
}
2015-08-15 12:55:03 +00:00
.settings {
.content {
> .header,
.segment {
box-shadow: 0 1px 2px 0 var(--color-box-header);
}
}
&.webhooks .list > .item:not(:first-child),
Implement actions (#21937) Close #13539. Co-authored by: @lunny @appleboy @fuxiaohei and others. Related projects: - https://gitea.com/gitea/actions-proto-def - https://gitea.com/gitea/actions-proto-go - https://gitea.com/gitea/act - https://gitea.com/gitea/act_runner ### Summary The target of this PR is to bring a basic implementation of "Actions", an internal CI/CD system of Gitea. That means even though it has been merged, the state of the feature is **EXPERIMENTAL**, and please note that: - It is disabled by default; - It shouldn't be used in a production environment currently; - It shouldn't be used in a public Gitea instance currently; - Breaking changes may be made before it's stable. **Please comment on #13539 if you have any different product design ideas**, all decisions reached there will be adopted here. But in this PR, we don't talk about **naming, feature-creep or alternatives**. ### ⚠️ Breaking `gitea-actions` will become a reserved user name. If a user with the name already exists in the database, it is recommended to rename it. ### Some important reviews - What is `DEFAULT_ACTIONS_URL` in `app.ini` for? - https://github.com/go-gitea/gitea/pull/21937#discussion_r1055954954 - Why the api for runners is not under the normal `/api/v1` prefix? - https://github.com/go-gitea/gitea/pull/21937#discussion_r1061173592 - Why DBFS? - https://github.com/go-gitea/gitea/pull/21937#discussion_r1061301178 - Why ignore events triggered by `gitea-actions` bot? - https://github.com/go-gitea/gitea/pull/21937#discussion_r1063254103 - Why there's no permission control for actions? - https://github.com/go-gitea/gitea/pull/21937#discussion_r1090229868 ### What it looks like <details> #### Manage runners <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205870657-c72f590e-2e08-4cd4-be7f-2e0abb299bbf.png"> #### List runs <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205872794-50fde990-2b45-48c1-a178-908e4ec5b627.png"> #### View logs <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205872501-9b7b9000-9542-4991-8f55-18ccdada77c3.png"> </details> ### How to try it <details> #### 1. Start Gitea Clone this branch and [install from source](https://docs.gitea.io/en-us/install-from-source). Add additional configurations in `app.ini` to enable Actions: ```ini [actions] ENABLED = true ``` Start it. If all is well, you'll see the management page of runners: <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205877365-8e30a780-9b10-4154-b3e8-ee6c3cb35a59.png"> #### 2. Start runner Clone the [act_runner](https://gitea.com/gitea/act_runner), and follow the [README](https://gitea.com/gitea/act_runner/src/branch/main/README.md) to start it. If all is well, you'll see a new runner has been added: <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205878000-216f5937-e696-470d-b66c-8473987d91c3.png"> #### 3. Enable actions for a repo Create a new repo or open an existing one, check the `Actions` checkbox in settings and submit. <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205879705-53e09208-73c0-4b3e-a123-2dcf9aba4b9c.png"> <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205879383-23f3d08f-1a85-41dd-a8b3-54e2ee6453e8.png"> If all is well, you'll see a new tab "Actions": <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205881648-a8072d8c-5803-4d76-b8a8-9b2fb49516c1.png"> #### 4. Upload workflow files Upload some workflow files to `.gitea/workflows/xxx.yaml`, you can follow the [quickstart](https://docs.github.com/en/actions/quickstart) of GitHub Actions. Yes, Gitea Actions is compatible with GitHub Actions in most cases, you can use the same demo: ```yaml name: GitHub Actions Demo run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 on: [push] jobs: Explore-GitHub-Actions: runs-on: ubuntu-latest steps: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - name: Check out repository code uses: actions/checkout@v3 - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." - run: echo "🖥️ The workflow is now ready to test your code on the runner." - name: List files in the repository run: | ls ${{ github.workspace }} - run: echo "🍏 This job's status is ${{ job.status }}." ``` If all is well, you'll see a new run in `Actions` tab: <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205884473-79a874bc-171b-4aaf-acd5-0241a45c3b53.png"> #### 5. Check the logs of jobs Click a run and you'll see the logs: <img width="1792" alt="image" src="https://user-images.githubusercontent.com/9418365/205884800-994b0374-67f7-48ff-be9a-4c53f3141547.png"> #### 6. Go on You can try more examples in [the documents](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions) of GitHub Actions, then you might find a lot of bugs. Come on, PRs are welcome. </details> See also: [Feature Preview: Gitea Actions](https://blog.gitea.io/2022/12/feature-preview-gitea-actions/) --------- Co-authored-by: a1012112796 <1012112796@qq.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: ChristopherHX <christopher.homberger@web.de> Co-authored-by: John Olheiser <john.olheiser@gmail.com>
2023-01-31 01:45:19 +00:00
&.githooks .list > .item:not(:first-child),
&.runners .list > .item:not(:first-child) {
padding: .25rem 1rem;
margin: 12px -1rem -1rem;
}
.list {
> .item {
&:not(:first-child) {
border-top: 1px solid var(--color-secondary);
padding: 1rem;
margin: 16px -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 16:23:20 +00:00
.ui.vertical.menu {
.header.item {
font-size: 1.1em;
background: var(--color-box-header);
}
2015-08-09 16:23:20 +00: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;
background: var(--color-box-header);
border-bottom: 1px solid var(--color-secondary) !important;
font-weight: normal !important;
Improve UI on mobile (#19546) Start making the mobile experience not painful and be actually usable. This contains a few smaller changes to enhance this experience. - Submit buttons on the review forms aren't columns anymore and are now allowed to be displayed on one row. - The label/milestone & New Issue buttons were given each own row even tough, there's enough place to do it one the same row. This commit fixes that. - The issues+Pull tab on repo's has a third item besides the label/milestone & New Issue buttons, the search bar. On desktop there's enough place to do this on one row, for mobile it isn't, currently it was using for each item a new row. This commits fixes that by only giving the searchbar a new row and have the other two buttons on the same row. - The notification table will now be show a scrollbar instead of overflow. - The repo buttons(Watch, Star, Fork) on mobile were showing quite big and the SVG wasn't even displayed on the same line, if the count of those numbers were too high it would even overflow. This commit removes the SVG, as there isn't any place to show them on the same row and allows them to have a new row if the counts of those buttons are high. - The admin page can show you a lot of interesting information, on mobile the System Status + Configuration weren't properly displayed as the margin's were too high. This commit fixes that by reducing the margin to a number that makes sense on mobile. - Fixes to not overflow the tables but instead force them to be scrollable. - When viewing a issue or pull request, the comments aren't full-width but instead 80% and aligned to right, on mobile this is a annoyance as there isn't much width to begin with. This commits fixes that by forcing full-width and removing the avatars on the left side and instead including them inline in the comment header.
2022-05-01 16:11:21 +00:00
padding: .5rem 1rem;
margin: 0 !important;
position: relative;
color: var(--color-text-light-2);
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;
}
a {
color: var(--color-text);
}
a:hover {
color: var(--color-primary);
}
}
.comment-header .actions a {
margin-right: 0 !important;
padding: .5rem !important;
}
.comment-header-left > * + *,
.comment-header-right > * + * {
margin-left: .25rem;
}
.comment-body {
background: var(--color-box-body);
border: none !important;
width: 100% !important;
max-width: 100% !important;
margin: 0 !important;
}
2015-08-09 14:45:38 +00:00
.edit-label.modal,
Scoped labels (#22585) Add a new "exclusive" option per label. This makes it so that when the label is named `scope/name`, no other label with the same `scope/` prefix can be set on an issue. The scope is determined by the last occurence of `/`, so for example `scope/alpha/name` and `scope/beta/name` are considered to be in different scopes and can coexist. Exclusive scopes are not enforced by any database rules, however they are enforced when editing labels at the models level, automatically removing any existing labels in the same scope when either attaching a new label or replacing all labels. In menus use a circle instead of checkbox to indicate they function as radio buttons per scope. Issue filtering by label ensures that only a single scoped label is selected at a time. Clicking with alt key can be used to remove a scoped label, both when editing individual issues and batch editing. Label rendering refactor for consistency and code simplification: * Labels now consistently have the same shape, emojis and tooltips everywhere. This includes the label list and label assignment menus. * In label list, show description below label same as label menus. * Don't use exactly black/white text colors to look a bit nicer. * Simplify text color computation. There is no point computing luminance in linear color space, as this is a perceptual problem and sRGB is closer to perceptually linear. * Increase height of label assignment menus to show more labels. Showing only 3-4 labels at a time leads to a lot of scrolling. * Render all labels with a new RenderLabel template helper function. Label creation and editing in multiline modal menu: * Change label creation to open a modal menu like label editing. * Change menu layout to place name, description and colors on separate lines. * Don't color cancel button red in label editing modal menu. * Align text to the left in model menu for better readability and consistent with settings layout elsewhere. Custom exclusive scoped label rendering: * Display scoped label prefix and suffix with slightly darker and lighter background color respectively, and a slanted edge between them similar to the `/` symbol. * In menus exclusive labels are grouped with a divider line. --------- Co-authored-by: Yarden Shoham <hrsi88@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
2023-02-18 19:17:39 +00:00
.new-label.modal {
.form {
.column {
padding-right: 0;
}
.buttons {
margin-left: auto;
padding-top: 15px;
}
.color.picker.column {
Scoped labels (#22585) Add a new "exclusive" option per label. This makes it so that when the label is named `scope/name`, no other label with the same `scope/` prefix can be set on an issue. The scope is determined by the last occurence of `/`, so for example `scope/alpha/name` and `scope/beta/name` are considered to be in different scopes and can coexist. Exclusive scopes are not enforced by any database rules, however they are enforced when editing labels at the models level, automatically removing any existing labels in the same scope when either attaching a new label or replacing all labels. In menus use a circle instead of checkbox to indicate they function as radio buttons per scope. Issue filtering by label ensures that only a single scoped label is selected at a time. Clicking with alt key can be used to remove a scoped label, both when editing individual issues and batch editing. Label rendering refactor for consistency and code simplification: * Labels now consistently have the same shape, emojis and tooltips everywhere. This includes the label list and label assignment menus. * In label list, show description below label same as label menus. * Don't use exactly black/white text colors to look a bit nicer. * Simplify text color computation. There is no point computing luminance in linear color space, as this is a perceptual problem and sRGB is closer to perceptually linear. * Increase height of label assignment menus to show more labels. Showing only 3-4 labels at a time leads to a lot of scrolling. * Render all labels with a new RenderLabel template helper function. Label creation and editing in multiline modal menu: * Change label creation to open a modal menu like label editing. * Change menu layout to place name, description and colors on separate lines. * Don't color cancel button red in label editing modal menu. * Align text to the left in model menu for better readability and consistent with settings layout elsewhere. Custom exclusive scoped label rendering: * Display scoped label prefix and suffix with slightly darker and lighter background color respectively, and a slanted edge between them similar to the `/` symbol. * In menus exclusive labels are grouped with a divider line. --------- Co-authored-by: Yarden Shoham <hrsi88@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
2023-02-18 19:17:39 +00:00
display: flex;
.minicolors {
flex: 1;
}
}
.minicolors-swatch.minicolors-sprite {
top: 10px;
left: 10px;
width: 15px;
height: 15px;
}
}
2015-08-29 19:21:59 +00:00
}
2016-02-07 16:41:11 +00: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 19:21:59 +00:00
#transfer-repo-modal,
#delete-repo-modal,
#delete-wiki-modal,
#convert-fork-repo-modal,
#convert-mirror-repo-modal,
#fork-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 .label {
margin: 2px 0;
display: inline-flex !important;
line-height: 1.3em; // there is a `font-size: 1.25em` for inside emoji, so here the line-height needs to be larger slightly
}
// Scoped labels with different colors on left and right
Scoped labels (#22585) Add a new "exclusive" option per label. This makes it so that when the label is named `scope/name`, no other label with the same `scope/` prefix can be set on an issue. The scope is determined by the last occurence of `/`, so for example `scope/alpha/name` and `scope/beta/name` are considered to be in different scopes and can coexist. Exclusive scopes are not enforced by any database rules, however they are enforced when editing labels at the models level, automatically removing any existing labels in the same scope when either attaching a new label or replacing all labels. In menus use a circle instead of checkbox to indicate they function as radio buttons per scope. Issue filtering by label ensures that only a single scoped label is selected at a time. Clicking with alt key can be used to remove a scoped label, both when editing individual issues and batch editing. Label rendering refactor for consistency and code simplification: * Labels now consistently have the same shape, emojis and tooltips everywhere. This includes the label list and label assignment menus. * In label list, show description below label same as label menus. * Don't use exactly black/white text colors to look a bit nicer. * Simplify text color computation. There is no point computing luminance in linear color space, as this is a perceptual problem and sRGB is closer to perceptually linear. * Increase height of label assignment menus to show more labels. Showing only 3-4 labels at a time leads to a lot of scrolling. * Render all labels with a new RenderLabel template helper function. Label creation and editing in multiline modal menu: * Change label creation to open a modal menu like label editing. * Change menu layout to place name, description and colors on separate lines. * Don't color cancel button red in label editing modal menu. * Align text to the left in model menu for better readability and consistent with settings layout elsewhere. Custom exclusive scoped label rendering: * Display scoped label prefix and suffix with slightly darker and lighter background color respectively, and a slanted edge between them similar to the `/` symbol. * In menus exclusive labels are grouped with a divider line. --------- Co-authored-by: Yarden Shoham <hrsi88@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
2023-02-18 19:17:39 +00:00
.scope-parent {
background: none !important;
padding: 0 !important;
}
.ui.label.scope-left {
border-bottom-right-radius: 0;
border-top-right-radius: 0;
margin-right: 0;
}
.ui.label.scope-right {
border-bottom-left-radius: 0;
border-top-left-radius: 0;
margin-left: 0;
}
.repo-button-row {
margin-bottom: 10px;
}
.repo-button-row > * {
margin-top: 8px;
}
.wiki .repo-button-row {
margin-bottom: 0;
}
.wiki .repo-button-row > * {
margin-top: 0;
}
.repo-button-row .button {
padding: 6px 10px !important;
height: 30px;
}
.repo-button-row input {
height: 30px;
}
tbody.commit-list {
vertical-align: baseline;
}
.message-wrapper,
.author-wrapper {
overflow: hidden;
text-overflow: ellipsis;
max-width: calc(100% - 50px);
display: inline-block;
vertical-align: middle;
}
.author-wrapper {
max-width: 180px;
}
// in the commit list, messages can wrap so we can use inline
.commit-list .message-wrapper {
display: inline;
}
// but in the repo-files-table we cannot
#repo-files-table .commit-list .message-wrapper {
display: inline-block;
}
@media @mediaSm {
tr.commit-list {
width: 100%;
}
th .message-wrapper {
display: block;
max-width: calc(100vw - 70px);
}
.author-wrapper {
max-width: 80px;
}
}
@media @mediaMd {
tr.commit-list {
width: 723px;
}
th .message-wrapper {
max-width: 120px;
}
}
@media @mediaLg {
tr.commit-list {
width: 933px;
}
th .message-wrapper {
max-width: 350px;
}
}
@media @mediaXl {
tr.commit-list {
width: 1127px;
}
th .message-wrapper {
max-width: 525px;
}
}
.commit-list .commit-status-link {
display: inline-block;
vertical-align: middle;
}
.commit-body {
white-space: pre-wrap;
line-height: initial;
}
.repository:not(.diff) {
.commit-body { // commit history list
margin: 0;
}
.timeline-item .commit-body { // PR-comment
margin-left: 40px;
}
}
.git-notes.top {
text-align: left;
}
.comment-diff-data {
background: var(--color-code-bg);
max-height: calc(100vh - 10.5rem);
overflow-y: auto;
}
.comment-diff-data pre {
line-height: 18px;
white-space: pre-wrap;
word-break: break-all;
overflow-wrap: break-word;
}
.content-history-detail-dialog .header .avatar {
position: relative;
top: -2px;
}
#topic_edit {
margin-top: 5px;
}
#repo-topics {
margin-top: 5px;
display: flex;
align-items: center;
flex-wrap: wrap;
2018-05-09 16:29:04 +00: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 06:26:32 +00: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;
word-break: break-word;
@media @mediaSm {
+ .container {
margin-top: 7px;
}
}
}
.repo-buttons {
align-items: center;
Improve UI on mobile (#19546) Start making the mobile experience not painful and be actually usable. This contains a few smaller changes to enhance this experience. - Submit buttons on the review forms aren't columns anymore and are now allowed to be displayed on one row. - The label/milestone & New Issue buttons were given each own row even tough, there's enough place to do it one the same row. This commit fixes that. - The issues+Pull tab on repo's has a third item besides the label/milestone & New Issue buttons, the search bar. On desktop there's enough place to do this on one row, for mobile it isn't, currently it was using for each item a new row. This commits fixes that by only giving the searchbar a new row and have the other two buttons on the same row. - The notification table will now be show a scrollbar instead of overflow. - The repo buttons(Watch, Star, Fork) on mobile were showing quite big and the SVG wasn't even displayed on the same line, if the count of those numbers were too high it would even overflow. This commit removes the SVG, as there isn't any place to show them on the same row and allows them to have a new row if the counts of those buttons are high. - The admin page can show you a lot of interesting information, on mobile the System Status + Configuration weren't properly displayed as the margin's were too high. This commit fixes that by reducing the margin to a number that makes sense on mobile. - Fixes to not overflow the tables but instead force them to be scrollable. - When viewing a issue or pull request, the comments aren't full-width but instead 80% and aligned to right, on mobile this is a annoyance as there isn't much width to begin with. This commits fixes that by forcing full-width and removing the avatars on the left side and instead including them inline in the comment header.
2022-05-01 16:11:21 +00:00
display: flex;
flex-direction: row;
flex-wrap: wrap;
word-break: keep-all;
@media @mediaSm {
margin-top: 1em;
}
}
2019-03-06 00:48:30 +00:00
.repo-buttons .ui.labeled.button > .label:hover {
color: var(--color-primary-light-2);
background: var(--color-light);
}
.label-mimic-enabled() {
color: var(--color-text-dark);
background: var(--color-light-mimic-enabled) !important;
&:hover {
color: var(--color-primary-dark-1);
}
}
.repo-buttons button[disabled] ~ .label {
opacity: var(--opacity-disabled);
.label-mimic-enabled();
2019-03-06 00:48:30 +00:00
}
.repo-buttons .ui.labeled.button {
cursor: initial;
> .label {
border-left: 0 !important;
margin: 0 !important;
}
&.disabled {
pointer-events: inherit !important;
> .label {
.label-mimic-enabled();
}
> .button {
pointer-events: none !important;
}
}
Improve UI on mobile (#19546) Start making the mobile experience not painful and be actually usable. This contains a few smaller changes to enhance this experience. - Submit buttons on the review forms aren't columns anymore and are now allowed to be displayed on one row. - The label/milestone & New Issue buttons were given each own row even tough, there's enough place to do it one the same row. This commit fixes that. - The issues+Pull tab on repo's has a third item besides the label/milestone & New Issue buttons, the search bar. On desktop there's enough place to do this on one row, for mobile it isn't, currently it was using for each item a new row. This commits fixes that by only giving the searchbar a new row and have the other two buttons on the same row. - The notification table will now be show a scrollbar instead of overflow. - The repo buttons(Watch, Star, Fork) on mobile were showing quite big and the SVG wasn't even displayed on the same line, if the count of those numbers were too high it would even overflow. This commit removes the SVG, as there isn't any place to show them on the same row and allows them to have a new row if the counts of those buttons are high. - The admin page can show you a lot of interesting information, on mobile the System Status + Configuration weren't properly displayed as the margin's were too high. This commit fixes that by reducing the margin to a number that makes sense on mobile. - Fixes to not overflow the tables but instead force them to be scrollable. - When viewing a issue or pull request, the comments aren't full-width but instead 80% and aligned to right, on mobile this is a annoyance as there isn't much width to begin with. This commits fixes that by forcing full-width and removing the avatars on the left side and instead including them inline in the comment header.
2022-05-01 16:11:21 +00:00
@media @mediaSm {
.svg {
display: none;
}
}
2019-03-06 00:48:30 +00:00
}
.tag-code {
height: 28px;
}
.tag-code,
.tag-code td,
.tag-code .blob-excerpt {
background-color: var(--color-box-body-highlight);
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;
}
td.blob-excerpt {
background-color: var(--color-secondary-alpha-30);
}
.issue-keyword {
border-bottom: 1px dotted var(--color-text-light-3) !important;
}
.issue-keyword:hover {
border-bottom: none !important;
}
.file-header {
align-items: center;
display: flex;
justify-content: space-between;
overflow-x: auto;
padding: 6px 12px !important;
font-size: 13px !important;
}
.file-info {
display: flex;
align-items: center;
}
.file-info-entry {
display: flex;
align-items: center;
width: max-content;
}
.file-info-entry + .file-info-entry {
border-left: 1px solid currentcolor;
margin-left: 8px;
padding-left: 8px;
}
#diff-container {
display: flex;
}
#diff-file-boxes {
flex: 1;
max-width: 100%;
}
#diff-file-tree {
width: 20%;
max-width: 380px;
line-height: inherit;
position: sticky;
padding-top: 0;
top: 47px;
max-height: calc(100vh - 50px);
height: 100%;
overflow-y: auto;
}
@media @mediaMdAndDown {
#diff-file-tree {
display: none !important;
}
.diff-toggle-file-tree-button {
display: none !important;
}
}
.ui.message.unicode-escape-prompt {
margin-bottom: 0;
border-radius: 0;
display: flex;
flex-direction: column;
}
.wiki-content-sidebar .ui.message.unicode-escape-prompt,
.wiki-content-footer .ui.message.unicode-escape-prompt {
p {
display: none;
}
}
.wiki-content-toc {
> ul > li {
margin-bottom: 4px;
}
ul {
margin: 0;
list-style: none;
padding-left: 1em;
}
}
/* fomantic's last-child selector does not work with hidden last child */
.ui.buttons .unescape-button {
border-top-right-radius: .28571429rem;
border-bottom-right-radius: .28571429rem;
}
.webhook-info {
padding: 7px 12px;
margin: 10px 0;
background-color: var(--color-markup-code-block);
border: 1px solid var(--color-secondary);
border-radius: 3px;
font-size: 13px;
line-height: 1.5;
overflow: auto;
}
.title_wip_desc {
margin-top: 1em;
}
.sidebar-item-link {
align-items: center;
word-break: break-all;
}
.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;
}
.diff-file-header-actions > * + * {
margin-left: .5rem !important;
}
.ui.attached.header.diff-file-header {
&.sticky-2nd-row {
position: sticky;
top: 77px;
z-index: 7;
@media (max-width: 480px) {
position: static;
}
}
.diff-file-header-actions {
flex-shrink: 0;
}
.diff-file-name {
flex: auto;
min-width: 100px;
}
}
.diff-file-body {
overflow-x: scroll;
}
.diff-stats-bar {
display: inline-block;
background-color: var(--color-red);
height: 12px;
width: 40px;
.diff-stats-add-bar {
background-color: var(--color-green);
height: 100%;
}
}
/* prevent page shaking on language bar click */
.repository-summary-language-stats {
height: 48px;
overflow: hidden;
@media @mediaSm {
height: auto;
}
}
.ui.form .right .ui.button {
margin-left: .25em;
margin-right: 0;
}
.removed-code {
background: var(--color-diff-removed-word-bg);
}
.added-code {
background: var(--color-diff-added-word-bg);
}
.code-diff-unified .del-code,
.code-diff-unified .del-code td,
.code-diff-split .del-code .lines-num-old,
.code-diff-split .del-code .lines-escape-old,
.code-diff-split .del-code .lines-type-marker-old,
.code-diff-split .del-code .lines-code-old {
background: var(--color-diff-removed-row-bg);
border-color: var(--color-diff-removed-row-border);
}
.code-diff-unified .add-code,
.code-diff-unified .add-code td,
.code-diff-split .add-code .lines-num-new,
.code-diff-split .add-code .lines-type-marker-new,
.code-diff-split .add-code .lines-escape-new,
.code-diff-split .add-code .lines-code-new,
.code-diff-split .del-code .add-code.lines-num-new,
.code-diff-split .del-code .add-code.lines-type-marker-new,
.code-diff-split .del-code .add-code.lines-escape-new,
.code-diff-split .del-code .add-code.lines-code-new {
background: var(--color-diff-added-row-bg);
border-color: var(--color-diff-added-row-border);
}
.code-diff-split .del-code .lines-num-new,
.code-diff-split .del-code .lines-type-marker-new,
.code-diff-split .del-code .lines-code-new,
.code-diff-split .del-code .lines-escape-new,
.code-diff-split .add-code .lines-num-old,
.code-diff-split .add-code .lines-escape-old,
.code-diff-split .add-code .lines-type-marker-old,
.code-diff-split .add-code .lines-code-old {
background: var(--color-diff-inactive);
}
.code-diff-split tbody tr td:nth-child(5),
.code-diff-split tbody tr td.add-comment-right {
border-left: 1px solid var(--color-secondary);
}
.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);
color: var(--color-text);
}
.repository.migrate .card:hover {
transform: scale(105%);
box-shadow: 0 .5rem 1rem var(--color-shadow) !important;
}
@media @mediaSm {
.repository.file.list {
#repo-files-table {
.entry,
.commit-list {
align-items: center;
display: flex !important;
padding-top: 4px;
padding-bottom: 4px;
td.age,
th.age {
margin-left: auto;
}
td.message,
span.commit-summary {
display: none !important;
}
}
}
}
Improve UI on mobile (#19546) Start making the mobile experience not painful and be actually usable. This contains a few smaller changes to enhance this experience. - Submit buttons on the review forms aren't columns anymore and are now allowed to be displayed on one row. - The label/milestone & New Issue buttons were given each own row even tough, there's enough place to do it one the same row. This commit fixes that. - The issues+Pull tab on repo's has a third item besides the label/milestone & New Issue buttons, the search bar. On desktop there's enough place to do this on one row, for mobile it isn't, currently it was using for each item a new row. This commits fixes that by only giving the searchbar a new row and have the other two buttons on the same row. - The notification table will now be show a scrollbar instead of overflow. - The repo buttons(Watch, Star, Fork) on mobile were showing quite big and the SVG wasn't even displayed on the same line, if the count of those numbers were too high it would even overflow. This commit removes the SVG, as there isn't any place to show them on the same row and allows them to have a new row if the counts of those buttons are high. - The admin page can show you a lot of interesting information, on mobile the System Status + Configuration weren't properly displayed as the margin's were too high. This commit fixes that by reducing the margin to a number that makes sense on mobile. - Fixes to not overflow the tables but instead force them to be scrollable. - When viewing a issue or pull request, the comments aren't full-width but instead 80% and aligned to right, on mobile this is a annoyance as there isn't much width to begin with. This commits fixes that by forcing full-width and removing the avatars on the left side and instead including them inline in the comment header.
2022-05-01 16:11:21 +00:00
.issue-list-headers.ui[class].grid {
> div:nth-child(1) {
order: 1;
width: 50%;
}
> div:nth-child(2) {
order: 3;
width: 100%;
}
> div.column:not(.row):nth-child(3) {
order: 2;
width: 50%;
}
}
.repository.view.issue .comment-list {
.timeline,
.timeline-item {
margin-left: 0;
}
.timeline {
&::before {
left: 14px;
}
.inline-timeline-avatar {
display: flex;
margin-bottom: auto;
img.avatar {
Improve UI on mobile (#19546) Start making the mobile experience not painful and be actually usable. This contains a few smaller changes to enhance this experience. - Submit buttons on the review forms aren't columns anymore and are now allowed to be displayed on one row. - The label/milestone & New Issue buttons were given each own row even tough, there's enough place to do it one the same row. This commit fixes that. - The issues+Pull tab on repo's has a third item besides the label/milestone & New Issue buttons, the search bar. On desktop there's enough place to do this on one row, for mobile it isn't, currently it was using for each item a new row. This commits fixes that by only giving the searchbar a new row and have the other two buttons on the same row. - The notification table will now be show a scrollbar instead of overflow. - The repo buttons(Watch, Star, Fork) on mobile were showing quite big and the SVG wasn't even displayed on the same line, if the count of those numbers were too high it would even overflow. This commit removes the SVG, as there isn't any place to show them on the same row and allows them to have a new row if the counts of those buttons are high. - The admin page can show you a lot of interesting information, on mobile the System Status + Configuration weren't properly displayed as the margin's were too high. This commit fixes that by reducing the margin to a number that makes sense on mobile. - Fixes to not overflow the tables but instead force them to be scrollable. - When viewing a issue or pull request, the comments aren't full-width but instead 80% and aligned to right, on mobile this is a annoyance as there isn't much width to begin with. This commits fixes that by forcing full-width and removing the avatars on the left side and instead including them inline in the comment header.
2022-05-01 16:11:21 +00:00
height: 24px;
width: 24px;
}
}
.comment-header {
&::before,
&::after {
content: unset;
}
padding-left: 4px;
}
/* Don't show the general avatar, we show the inline avatar on mobile.
* And don't show the role labels, there's no place for that. */
.timeline-avatar,
.comment-header-right .role-label {
display: none;
}
}
}
.commit-header-row {
.ui.horizontal.list {
width: 100%;
overflow-x: auto;
margin-top: 2px;
.item {
align-items: center;
display: flex;
}
}
.author {
padding: 3px 0;
}
}
.commit-header h3 {
flex-basis: auto !important;
margin-bottom: .5rem !important;
}
.commits-table {
flex-direction: column;
.commits-table-left {
align-items: initial !important;
margin-bottom: 6px;
}
.commits-table-right form {
display: flex;
flex-wrap: wrap;
> div:nth-child(1) {
order: 1;
}
> div:nth-child(2) {
order: 3;
margin-left: .5rem;
margin-top: .5rem;
}
> button:nth-child(3) {
order: 2;
margin-left: .25rem;
}
}
}
.commit-table {
overflow-x: auto;
td.sha,
th.sha {
display: none !important;
}
.commit-list {
span.message-wrapper {
max-width: none;
}
tr td:last-child {
display: block;
width: max-content;
}
td.author {
display: block;
width: calc(100% + .5rem);
}
.copy-commit-sha {
display: none !important;
}
}
}
.comment-header {
flex-wrap: wrap;
.comment-header-left {
flex-wrap: wrap;
}
.comment-header-right {
margin-left: auto;
}
}
}
.branch-dropdown-button {
max-width: 340px;
vertical-align: bottom !important;
@media @mediaMd {
max-width: 185px;
}
@media @mediaSm {
max-width: 165px;
}
}
.pr-status {
padding: 0 !important; // To clear fomantic's padding on .ui.segment elements
display: flex;
align-items: center;
.commit-status {
margin: 1em;
flex-shrink: 0;
}
.status-context {
display: flex;
justify-content: space-between;
width: 100%;
> span {
padding: 1em 0;
}
}
.status-details {
display: flex;
padding-right: .5em;
align-items: center;
justify-content: flex-end;
@media @mediaSm {
flex-direction: column;
align-items: flex-end;
justify-content: center;
}
> span {
padding-right: .5em; // To match the alignment with the "required" label
}
}
}