Update JS dependencies (#17611)

- Update monaco, adapting to breaking changes
- Update dropzone, adapting to breaking changes
- Update linters, fix new issues, disable opinionated stylelint rules
- Rebuild SVGs and images
- Tested Dropzone and Monaco

Replaces: https://github.com/go-gitea/gitea/pull/17574
This commit is contained in:
silverwind 2021-11-11 02:52:16 +01:00 committed by GitHub
parent 0e189eecaa
commit 433e81aecf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 1385 additions and 3181 deletions

View file

@ -45,7 +45,7 @@ function getLanguage(filename) {
function updateEditor(monaco, editor, filename, lineWrapExts) {
editor.updateOptions(getFileBasedOptions(filename, lineWrapExts));
const model = editor.getModel();
const language = model.getModeId();
const language = model.getLanguageId();
const newLanguage = getLanguage(filename);
if (language !== newLanguage) monaco.editor.setModelLanguage(model, newLanguage);
}

View file

@ -3,6 +3,5 @@ export default async function createDropzone(el, opts) {
import(/* webpackChunkName: "dropzone" */'dropzone'),
import(/* webpackChunkName: "dropzone" */'dropzone/dist/dropzone.css'),
]);
Dropzone.autoDiscover = false;
return new Dropzone(el, opts);
}

View file

@ -18,7 +18,7 @@ textarea,
.ui.selection.dropdown,
.ui.checkbox label::before,
.ui.checkbox input:checked ~ label::before,
.ui.checkbox input:not([type=radio]):indeterminate ~ label::before {
.ui.checkbox input:not([type="radio"]):indeterminate ~ label::before {
background: var(--color-input-background);
border-color: var(--color-input-border);
color: var(--color-input-text);
@ -98,8 +98,8 @@ textarea:focus,
.ui.checkbox input:focus ~ label::after,
.ui.checkbox input:checked ~ label::after,
.ui.checkbox label:active::after,
.ui.checkbox input:not([type=radio]):indeterminate ~ label::after,
.ui.checkbox input:not([type=radio]):indeterminate:focus ~ label::after,
.ui.checkbox input:not([type="radio"]):indeterminate ~ label::after,
.ui.checkbox input:not([type="radio"]):indeterminate:focus ~ label::after,
.ui.checkbox input:checked:focus ~ label::after,
.ui.disabled.checkbox label,
.ui.checkbox input[disabled] ~ label {
@ -265,7 +265,7 @@ textarea:focus,
}
}
input[type=number] {
input[type="number"] {
-moz-appearance: textfield;
}

View file

@ -68,7 +68,7 @@
align-items: center;
.node-relation {
font-family: "Bitstream Vera Sans Mono", "Courier", monospace;
font-family: "Bitstream Vera Sans Mono", Courier, monospace;
}
.author {

View file

@ -4,7 +4,7 @@
img {
border: 1px solid var(--color-primary-light-7);
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAG0lEQVQYlWN4+vTpf3SMDTAMBYXYBLFpHgoKAeiOf0SGE9kbAAAAAElFTkSuQmCC) right bottom var(--color-primary-light-7);
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAG0lEQVQYlWN4+vTpf3SMDTAMBYXYBLFpHgoKAeiOf0SGE9kbAAAAAElFTkSuQmCC") right bottom var(--color-primary-light-7);
}
.before-container {