Skip to content

Commit

Permalink
Use generateUrl and imagePath instead of OC.*
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
  • Loading branch information
nickvergessen authored and npmbuildbot[bot] committed Jul 14, 2020
1 parent 59bcc5f commit e96ace7
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion core/js/dist/install.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/js/dist/login.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/js/dist/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/js/dist/maintenance.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/js/dist/recommendedapps.js

Large diffs are not rendered by default.

19 changes: 16 additions & 3 deletions core/src/components/login/LoginForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<form ref="loginForm"
method="post"
name="login"
:action="OC.generateUrl('login')"
:action="loginActionUrl"
@submit="submit">
<fieldset>
<div v-if="apacheAuthFailed"
Expand All @@ -47,7 +47,7 @@
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;" />
Expand Down Expand Up @@ -82,7 +82,7 @@
<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>

Expand Down Expand Up @@ -126,6 +126,10 @@
<script>
import jstz from 'jstimezonedetect'
import LoginButton from './LoginButton'
import {
generateUrl,
imagePath,
} from '@nextcloud/router'
export default {
name: 'LoginForm',
Expand Down Expand Up @@ -185,6 +189,15 @@ export default {
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 === '') {
Expand Down

0 comments on commit e96ace7

Please sign in to comment.