<form ref="loginForm"
method="post"
name="login"
- :action="OC.generateUrl('login')"
+ :action="loginActionUrl"
@submit="submit">
<fieldset>
<div v-if="apacheAuthFailed"
class="hidden">
<img class="float-spinner"
alt=""
- :src="OC.imagePath('core', 'loading-dark.gif')">
+ :src="loadingIcon">
<span id="messageText" />
<!-- the following div ensures that the spinner is always inside the #message div -->
<div style="clear: both;" />
<label for="password"
class="infield">{{ t('Password') }}</label>
<a href="#" class="toggle-password" @click.stop.prevent="togglePassword">
- <img :src="OC.imagePath('core', 'actions/toggle.svg')">
+ <img :src="toggleIcon">
</a>
</p>
<script>
import jstz from 'jstimezonedetect'
import LoginButton from './LoginButton'
+import {
+ generateUrl,
+ imagePath,
+} from '@nextcloud/router'
export default {
name: 'LoginForm',
userDisabled() {
return this.errors.indexOf('userdisabled') !== -1
},
+ toggleIcon() {
+ return imagePath('core', 'actions/toggle.svg')
+ },
+ loadingIcon() {
+ return imagePath('core', 'loading-dark.gif')
+ },
+ loginActionUrl() {
+ return generateUrl('login')
+ },
},
mounted() {
if (this.username === '') {