mirror of
https://github.com/go-gitea/gitea
synced 2024-11-17 23:54:25 +00:00
a43ea22479
Co-author: @wxiaoguang Close #25096 The way to fix it in this PR is to change form submit to fetch using formData, and add flags to avoid post repeatedly. Should be able to apply to more forms that have the same issue after this PR. In the demo below, 'approve' is clicked several times, and then 'comment' is clicked several time after 'request changes' clicked. After: https://github.com/go-gitea/gitea/assets/17645053/beabeb1d-fe66-4b76-b048-4f022b4e83a0 Update: screenshots from /devtest > ![image](https://user-images.githubusercontent.com/2114189/245680011-ee4231e0-a53d-4c2a-a9c2-71ccd98005cc.png) > > ![image](https://user-images.githubusercontent.com/2114189/245680057-9215d348-63d8-406d-8828-17e171163aaa.png) > > ![image](https://user-images.githubusercontent.com/2114189/245680148-89d7b3d1-d7b6-442f-b69e-eadaee112482.png) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
119 lines
2.4 KiB
CSS
119 lines
2.4 KiB
CSS
/* styles are based on node_modules/tippy.js/dist/tippy.css */
|
|
|
|
/* class to hide tippy target elements on page load */
|
|
.tippy-target {
|
|
display: none !important;
|
|
}
|
|
|
|
[data-tippy-root] {
|
|
max-width: calc(100vw - 10px);
|
|
}
|
|
|
|
.tippy-box {
|
|
position: relative;
|
|
background-color: var(--color-body);
|
|
color: var(--color-secondary-dark-6);
|
|
border: 1px solid var(--color-secondary);
|
|
border-radius: var(--border-radius);
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.tippy-box[data-theme="tooltip"] {
|
|
background-color: var(--color-tooltip-bg);
|
|
color: var(--color-tooltip-text);
|
|
border: none;
|
|
}
|
|
|
|
.tippy-box[data-theme="menu"] {
|
|
background-color: var(--color-menu);
|
|
color: var(--color-text);
|
|
}
|
|
|
|
.tippy-box[data-theme="form-fetch-error"] {
|
|
border-color: var(--color-error-border);
|
|
background-color: var(--color-error-bg);
|
|
color: var(--color-error-text);
|
|
}
|
|
|
|
.tippy-content {
|
|
position: relative;
|
|
padding: 1rem;
|
|
z-index: 1;
|
|
}
|
|
|
|
.tippy-box[data-theme="tooltip"] .tippy-content {
|
|
padding: 0.5rem 1rem;
|
|
}
|
|
|
|
.tippy-box[data-theme="menu"] .tippy-content {
|
|
padding: 0;
|
|
}
|
|
|
|
.tippy-box[data-placement^="top"] > .tippy-svg-arrow {
|
|
bottom: 0;
|
|
}
|
|
|
|
.tippy-box[data-placement^="top"] > .tippy-svg-arrow::after,
|
|
.tippy-box[data-placement^="top"] > .tippy-svg-arrow > svg {
|
|
top: 16px;
|
|
transform: rotate(180deg);
|
|
}
|
|
|
|
.tippy-box[data-placement^="bottom"] > .tippy-svg-arrow {
|
|
top: 0;
|
|
}
|
|
|
|
.tippy-box[data-placement^="bottom"] > .tippy-svg-arrow > svg {
|
|
bottom: 16px;
|
|
}
|
|
|
|
.tippy-box[data-placement^="left"] > .tippy-svg-arrow {
|
|
right: 0;
|
|
}
|
|
|
|
.tippy-box[data-placement^="left"] > .tippy-svg-arrow::after,
|
|
.tippy-box[data-placement^="left"] > .tippy-svg-arrow > svg {
|
|
transform: rotate(90deg);
|
|
top: calc(50% - 3px);
|
|
left: 11px;
|
|
}
|
|
|
|
.tippy-box[data-placement^="right"] > .tippy-svg-arrow {
|
|
left: 0;
|
|
}
|
|
|
|
.tippy-box[data-placement^="right"] > .tippy-svg-arrow::after,
|
|
.tippy-box[data-placement^="right"] > .tippy-svg-arrow > svg {
|
|
transform: rotate(-90deg);
|
|
top: calc(50% - 3px);
|
|
right: 11px;
|
|
}
|
|
|
|
.tippy-svg-arrow {
|
|
width: 16px;
|
|
height: 16px;
|
|
text-align: initial;
|
|
}
|
|
|
|
.tippy-svg-arrow,
|
|
.tippy-svg-arrow > svg {
|
|
position: absolute;
|
|
}
|
|
|
|
.tippy-svg-arrow-outer {
|
|
fill: var(--color-secondary);
|
|
}
|
|
|
|
.tippy-svg-arrow-inner {
|
|
fill: var(--color-body);
|
|
}
|
|
|
|
.tippy-box[data-theme="tooltip"] .tippy-svg-arrow-inner,
|
|
.tippy-box[data-theme="tooltip"] .tippy-svg-arrow-outer {
|
|
fill: var(--color-tooltip-bg);
|
|
}
|
|
|
|
.tippy-box[data-theme="menu"] .tippy-svg-arrow-inner {
|
|
fill: var(--color-menu);
|
|
}
|