Frontend refactor, PascalCase to camelCase, remove unused code (#17365)

* Frontend refactor, PascalCase to camelCase, remove unused code

* fix
This commit is contained in:
wxiaoguang 2021-10-21 15:37:43 +08:00 committed by GitHub
parent 5879ab83b5
commit 2add8fe9be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 162 additions and 182 deletions

View file

@ -1,6 +1,6 @@
import {svg} from '../svg.js';
const {AppSubUrl, csrf} = window.config;
const {appSubUrl, csrfToken} = window.config;
let i18nTextEdited;
let i18nTextOptions;
@ -37,7 +37,7 @@ function showContentHistoryDetail(issueBaseUrl, commentId, historyId, itemTitleH
if (optionItem === 'delete') {
if (window.confirm(i18nTextDeleteFromHistoryConfirm)) {
$.post(`${issueBaseUrl}/content-history/soft-delete?comment_id=${commentId}&history_id=${historyId}`, {
_csrf: csrf,
_csrf: csrfToken,
}).done((resp) => {
if (resp.ok) {
$dialog.modal('hide');
@ -59,7 +59,7 @@ function showContentHistoryDetail(issueBaseUrl, commentId, historyId, itemTitleH
$.ajax({
url: `${issueBaseUrl}/content-history/detail?comment_id=${commentId}&history_id=${historyId}`,
data: {
_csrf: csrf,
_csrf: csrfToken,
},
}).done((resp) => {
$dialog.find('.content').html(resp.diffHtml);
@ -110,12 +110,12 @@ export function initIssueContentHistory() {
if (!issueIndex || !$itemIssue.length) return;
const repoLink = $('#repolink').val();
const issueBaseUrl = `${AppSubUrl}/${repoLink}/issues/${issueIndex}`;
const issueBaseUrl = `${appSubUrl}/${repoLink}/issues/${issueIndex}`;
$.ajax({
url: `${issueBaseUrl}/content-history/overview`,
data: {
_csrf: csrf,
_csrf: csrfToken,
},
}).done((resp) => {
i18nTextEdited = resp.i18n.textEdited;