Use @nc/router

Signed-off-by: Louis Chemineau <louis@chmn.me>
artonge/debt/core_main.js
Louis Chemineau 8 months ago
parent 9610e1839a
commit da56a43efb
No known key found for this signature in database

@ -94,15 +94,15 @@
<form class="version-label-modal"
@submit.prevent="setVersionLabel(formVersionLabelValue)">
<label>
<div class="version-label-modal__title">{{ t('photos', 'Version name') }}</div>
<div class="version-label-modal__title">{{ t('files_versions', 'Version name') }}</div>
<NcTextField ref="labelInput"
:value.sync="formVersionLabelValue"
:placeholder="t('photos', 'Version name')"
:placeholder="t('files_versions', 'Version name')"
:label-outside="true" />
</label>
<div class="version-label-modal__info">
{{ t('photos', 'Named versions are persisted, and excluded from automatic cleanups when your storage quota is full.') }}
{{ t('files_versions', 'Named versions are persisted, and excluded from automatic cleanups when your storage quota is full.') }}
</div>
<div class="version-label-modal__actions">

@ -22,6 +22,8 @@
*
*/
import { generateFilePath } from '@nextcloud/router'
const loadedScripts = {}
const loadedStylesheets = {}
/**
@ -44,7 +46,7 @@ export default {
}
loadedScripts[key] = true
return new Promise(function(resolve, reject) {
const scriptPath = OC.filePath(app, 'js', file)
const scriptPath = generateFilePath(app, 'js', file)
const script = document.createElement('script')
script.src = scriptPath
script.setAttribute('nonce', btoa(OC.requestToken))
@ -68,7 +70,7 @@ export default {
}
loadedStylesheets[key] = true
return new Promise(function(resolve, reject) {
const stylePath = OC.filePath(app, 'css', file)
const stylePath = generateFilePath(app, 'css', file)
const link = document.createElement('link')
link.href = stylePath
link.type = 'text/css'

Loading…
Cancel
Save