summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-11-06 07:57:16 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-11-06 07:57:16 +0900
commitb195fd8145170be99da05e14ed815ef30846306c (patch)
tree5a91682b9c476afbb6e20e6aebaf65385191a39a /src/client
parentFix: download file (#3138) (diff)
downloadsharkey-b195fd8145170be99da05e14ed815ef30846306c.tar.gz
sharkey-b195fd8145170be99da05e14ed815ef30846306c.tar.bz2
sharkey-b195fd8145170be99da05e14ed815ef30846306c.zip
:art:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/app/admin/views/instance.vue2
-rw-r--r--src/client/app/common/views/components/ui/input.vue13
2 files changed, 13 insertions, 2 deletions
diff --git a/src/client/app/admin/views/instance.vue b/src/client/app/admin/views/instance.vue
index 4d7965e703..c5c7c66148 100644
--- a/src/client/app/admin/views/instance.vue
+++ b/src/client/app/admin/views/instance.vue
@@ -14,7 +14,7 @@
<header><fa icon="cloud"/> %i18n:@drive-config%</header>
<ui-switch v-model="cacheRemoteFiles">%i18n:@cache-remote-files%<span slot="desc">%i18n:@cache-remote-files-desc%</span></ui-switch>
<ui-input v-model="localDriveCapacityMb">%i18n:@local-drive-capacity-mb%<span slot="text">%i18n:@mb%</span><span slot="suffix">MB</span></ui-input>
- <ui-input v-model="remoteDriveCapacityMb">%i18n:@remote-drive-capacity-mb%<span slot="text">%i18n:@mb%</span><span slot="suffix">MB</span></ui-input>
+ <ui-input v-model="remoteDriveCapacityMb" :disabled="!cacheRemoteFiles">%i18n:@remote-drive-capacity-mb%<span slot="text">%i18n:@mb%</span><span slot="suffix">MB</span></ui-input>
</section>
<section>
<ui-button @click="updateMeta">%i18n:@save%</ui-button>
diff --git a/src/client/app/common/views/components/ui/input.vue b/src/client/app/common/views/components/ui/input.vue
index e63f0074c1..90df6fedb9 100644
--- a/src/client/app/common/views/components/ui/input.vue
+++ b/src/client/app/common/views/components/ui/input.vue
@@ -1,5 +1,5 @@
<template>
-<div class="ui-input" :class="[{ focused, filled, inline }, styl]">
+<div class="ui-input" :class="[{ focused, filled, inline, disabled }, styl]">
<div class="icon" ref="icon"><slot name="icon"></slot></div>
<div class="input">
<div class="password-meter" v-if="withPasswordMeter" v-show="passwordStrength != ''" :data-strength="passwordStrength">
@@ -11,6 +11,7 @@
<input ref="input"
:type="type"
v-model="v"
+ :disabled="disabled"
:required="required"
:readonly="readonly"
:pattern="pattern"
@@ -62,6 +63,10 @@ export default Vue.extend({
type: Boolean,
required: false
},
+ disabled: {
+ type: Boolean,
+ required: false
+ },
pattern: {
type: String,
required: false
@@ -353,4 +358,10 @@ root(fill)
display inline-block
margin 0
+ &.disabled
+ opacity 0.7
+
+ &, *
+ cursor not-allowed !important
+
</style>