forked from kevadesu/forgejo
Change form actions to fetch for submit review box (#25219)
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 >  > >  > >  --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
parent
6348823eab
commit
a43ea22479
14 changed files with 208 additions and 36 deletions
|
@ -4,20 +4,22 @@
|
|||
}
|
||||
|
||||
.is-loading {
|
||||
background: transparent !important;
|
||||
color: transparent !important;
|
||||
border: transparent !important;
|
||||
pointer-events: none !important;
|
||||
position: relative !important;
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
.is-loading > * {
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.is-loading::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 4rem;
|
||||
height: 4rem;
|
||||
max-height: 50%;
|
||||
aspect-ratio: 1 / 1;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
|
@ -28,18 +30,24 @@
|
|||
border-radius: 100%;
|
||||
}
|
||||
|
||||
.is-loading.small-loading-icon::after {
|
||||
border-width: 2px;
|
||||
}
|
||||
|
||||
.markup pre.is-loading,
|
||||
.editor-loading.is-loading,
|
||||
.pdf-content.is-loading {
|
||||
height: var(--height-loading);
|
||||
}
|
||||
|
||||
/* TODO: not needed, use "is-loading small-loading-icon" instead */
|
||||
.btn-octicon.is-loading::after {
|
||||
border-width: 2px;
|
||||
height: 1.25rem;
|
||||
width: 1.25rem;
|
||||
}
|
||||
|
||||
/* TODO: not needed, use "is-loading small-loading-icon" instead */
|
||||
code.language-math.is-loading::after {
|
||||
padding: 0;
|
||||
border-width: 2px;
|
||||
|
@ -47,11 +55,6 @@ code.language-math.is-loading::after {
|
|||
height: 1.25rem;
|
||||
}
|
||||
|
||||
#oauth2-login-navigator.is-loading::after {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
@keyframes fadein {
|
||||
0% {
|
||||
opacity: 0;
|
||||
|
|
|
@ -29,6 +29,12 @@
|
|||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue