mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-30 20:31:34 +02:00
Move clsiServerId and compileGroup from ide to ide.$scope.pdf (#5314)
GitOrigin-RevId: 6050898614b4fc9dee52e893149acfda17c324a0
This commit is contained in:
@@ -55,7 +55,7 @@ export default function PdfPreviewProvider({ children }) {
|
||||
const [, setLogEntryAnnotations] = useScopeValue('pdf.logEntryAnnotations')
|
||||
|
||||
// the id of the CLSI server which ran the compile
|
||||
const [, setClsiServerId] = useScopeValue('ide.clsiServerId')
|
||||
const [, setClsiServerId] = useScopeValue('pdf.clsiServerId')
|
||||
|
||||
// whether to display the editor and preview side-by-side or full-width ("flat")
|
||||
const [pdfLayout, setPdfLayout] = useScopeValue('ui.pdfLayout')
|
||||
|
||||
@@ -35,6 +35,8 @@ export default PdfManager = class PdfManager {
|
||||
highlights: [],
|
||||
position: null,
|
||||
lastCompileTimestamp: null,
|
||||
clsiServerId: null,
|
||||
compileGroup: null,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -374,11 +374,11 @@ App.controller(
|
||||
let qs = {}
|
||||
// add a query string parameter for the compile group
|
||||
if (response.compileGroup != null) {
|
||||
ide.compileGroup = qs.compileGroup = response.compileGroup
|
||||
$scope.pdf.compileGroup = qs.compileGroup = response.compileGroup
|
||||
}
|
||||
// add a query string parameter for the clsi server id
|
||||
if (response.clsiServerId != null) {
|
||||
ide.clsiServerId = qs.clsiserverid = response.clsiServerId
|
||||
$scope.pdf.clsiServerId = qs.clsiserverid = response.clsiServerId
|
||||
}
|
||||
|
||||
// TODO(das7pad): drop this hack once 2747f0d40af8729304 has landed in clsi
|
||||
@@ -573,8 +573,8 @@ App.controller(
|
||||
method: 'GET',
|
||||
url: buildPdfDownloadUrl(options.pdfDownloadDomain, file.url),
|
||||
params: {
|
||||
compileGroup: ide.compileGroup,
|
||||
clsiserverid: ide.clsiServerId,
|
||||
compileGroup: $scope.pdf.compileGroup,
|
||||
clsiserverid: $scope.pdf.clsiServerId,
|
||||
},
|
||||
}
|
||||
return $http(opts)
|
||||
@@ -844,7 +844,7 @@ App.controller(
|
||||
url: `/project/${$scope.project_id}/compile/stop`,
|
||||
method: 'POST',
|
||||
params: {
|
||||
clsiserverid: ide.clsiServerId,
|
||||
clsiserverid: $scope.pdf.clsiServerId,
|
||||
},
|
||||
headers: {
|
||||
'X-Csrf-Token': window.csrfToken,
|
||||
@@ -865,7 +865,7 @@ App.controller(
|
||||
url: `/project/${$scope.project_id}/output`,
|
||||
method: 'DELETE',
|
||||
params: {
|
||||
clsiserverid: ide.clsiServerId,
|
||||
clsiserverid: $scope.pdf.clsiServerId,
|
||||
},
|
||||
headers: {
|
||||
'X-Csrf-Token': window.csrfToken,
|
||||
|
||||
@@ -107,7 +107,7 @@ App.factory('synctex', function (ide, $http, $q) {
|
||||
file: path,
|
||||
line: row + 1,
|
||||
column,
|
||||
clsiserverid: ide.clsiServerId,
|
||||
clsiserverid: ide.$scope.pdf.clsiServerId,
|
||||
},
|
||||
})
|
||||
.then(response => {
|
||||
@@ -172,7 +172,7 @@ App.factory('synctex', function (ide, $http, $q) {
|
||||
page: position.page + 1,
|
||||
h: h.toFixed(2),
|
||||
v: v.toFixed(2),
|
||||
clsiserverid: ide.clsiServerId,
|
||||
clsiserverid: ide.$scope.pdf.clsiServerId,
|
||||
},
|
||||
})
|
||||
.then(response => {
|
||||
|
||||
Reference in New Issue
Block a user