forked from forgejo/forgejo
Update JS dependencies (#21881)
- Update all JS deps - Regenerate SVGs - Add new eslint rules, fix issues - Tested Mermaid, Swagger, Vue, Webpack, Citation Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
1c7496c7a7
commit
c8b217110b
19 changed files with 1076 additions and 1331 deletions
|
@ -4,7 +4,7 @@ const {copy_success, copy_error} = window.config.i18n;
|
|||
|
||||
export async function copyToClipboard(content) {
|
||||
if (content instanceof Blob) {
|
||||
const item = new window.ClipboardItem({[content.type]: content});
|
||||
const item = new ClipboardItem({[content.type]: content});
|
||||
await navigator.clipboard.write([item]);
|
||||
} else { // text
|
||||
try {
|
||||
|
|
|
@ -463,10 +463,10 @@ export function initRepository() {
|
|||
$('.enable-system-radio').on('change', function () {
|
||||
if (this.value === 'false') {
|
||||
$($(this).data('target')).addClass('disabled');
|
||||
if (typeof $(this).data('context') !== 'undefined') $($(this).data('context')).removeClass('disabled');
|
||||
if ($(this).data('context') !== undefined) $($(this).data('context')).removeClass('disabled');
|
||||
} else if (this.value === 'true') {
|
||||
$($(this).data('target')).removeClass('disabled');
|
||||
if (typeof $(this).data('context') !== 'undefined') $($(this).data('context')).addClass('disabled');
|
||||
if ($(this).data('context') !== undefined) $($(this).data('context')).addClass('disabled');
|
||||
}
|
||||
});
|
||||
const $trackerIssueStyleRadios = $('.js-tracker-issue-style');
|
||||
|
|
|
@ -9,7 +9,7 @@ export function initRepoMigrationStatusChecker() {
|
|||
$('#repo_migrating_progress_message').hide();
|
||||
if (migrating) {
|
||||
const task = migrating.attr('task');
|
||||
if (typeof task === 'undefined') {
|
||||
if (task === undefined) {
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
|
|
|
@ -21,7 +21,7 @@ function makeCollections({mentions, emoji}) {
|
|||
},
|
||||
lookup: (item) => item,
|
||||
selectTemplate: (item) => {
|
||||
if (typeof item === 'undefined') return null;
|
||||
if (item === undefined) return null;
|
||||
return emojiString(item.original);
|
||||
},
|
||||
menuItemTemplate: (item) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue