Skip to content

Commit 6194259

Browse files
committed
fix(files_external): prevent dropdown heights from shrinking
Signed-off-by: Kent Delante <kent@delante.me>
1 parent cf73e9f commit 6194259

16 files changed

Lines changed: 31 additions & 14 deletions

apps/files_external/src/components/AddExternalStorageDialog/AddExternalStorageDialog.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,15 @@ watch(authMechanisms, () => {
9393
<ApplicableEntities
9494
v-if="isAdmin"
9595
v-model:groups="internalStorage.applicableGroups"
96-
v-model:users="internalStorage.applicableUsers" />
96+
v-model:users="internalStorage.applicableUsers"
97+
:class="$style.externalStorageDialog__dropdown" />
9798

9899
<NcSelect
99100
v-model="backend"
100101
:options="backends"
101102
:disabled="!!(internalStorage.id && internalStorage.backend)"
102103
:inputLabel="t('files_external', 'External storage')"
104+
:class="$style.externalStorageDialog__dropdown"
103105
label="name"
104106
required />
105107

@@ -108,6 +110,7 @@ watch(authMechanisms, () => {
108110
:options="authMechanisms"
109111
:disabled="!internalStorage.backend || authMechanisms.length <= 1 || !!(internalStorage.id && internalStorage.authMechanism)"
110112
:inputLabel="t('files_external', 'Authentication')"
113+
:class="$style.externalStorageDialog__dropdown"
111114
label="name"
112115
required />
113116

@@ -146,4 +149,8 @@ watch(authMechanisms, () => {
146149
.externalStorageDialog__configuration {
147150
margin-block: 0.5rem;
148151
}
152+
153+
.externalStorageDialog__dropdown {
154+
flex: 0 0 auto;
155+
}
149156
</style>

apps/files_external/src/components/AddExternalStorageDialog/ConfigurationEntry.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,20 @@ defineProps<{
2727
:name="configKey"
2828
:required="!(configOption.flags & ConfigurationFlag.Optional)"
2929
:label="configOption.value"
30-
:title="configOption.tooltip" />
30+
:title="configOption.tooltip"
31+
:class="$style.configurationEntry" />
3132
<NcCheckboxRadioSwitch
3233
v-else
3334
v-model="value"
3435
type="switch"
35-
:title="configOption.tooltip">
36+
:title="configOption.tooltip"
37+
:class="$style.configurationEntry">
3638
{{ configOption.value }}
3739
</NcCheckboxRadioSwitch>
3840
</template>
41+
42+
<style module>
43+
.configurationEntry {
44+
flex: 1 0 auto;
45+
}
46+
</style>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import{b as g,n as _,u as o,o as r,c as p,C as M,y as d,w as v,j as V,t as b,s as k,z as x,f,F as E,B as q,L as K,M as U,k as c,l as j}from"./Web-DipEvAM1.chunk.mjs";import{c as w}from"./index-BFQdpkfu.chunk.mjs";import{a as C}from"./index-DL1yHC1K-BEAXQkdE.chunk.mjs";import{t as u}from"./translation-DoG5ZELJ-Cix2nzZD.chunk.mjs";import{b as L}from"./index-Cp0kcsps.chunk.mjs";import{N}from"./logger-D3RVzcfQ-DGD7l52c.chunk.mjs";import{N as S}from"./index-ZIXfkejI.chunk.mjs";import{N as z}from"./NcCheckboxRadioSwitch-BVTMQSAg-DacvAHW1.chunk.mjs";import{N as A}from"./NcPasswordField-Be5_qcfm-CrRxoSpQ.chunk.mjs";import{_ as B}from"./NcTextField.vue_vue_type_script_setup_true_lang-BQHjkK8r-B7pCt4h9.chunk.mjs";import{a as y,C as O}from"./types-Ccm1pe7Y.chunk.mjs";import{_ as $}from"./public-C1mLBHT3.chunk.mjs";import{l as P}from"./logger-BFB83ufD.chunk.mjs";const R=g({__name:"ConfigurationEntry",props:k({configKey:{},configOption:{}},{modelValue:{type:[String,Boolean],default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=_(e,"modelValue");return(l,i)=>e.configOption.type!==o(y).Boolean?(r(),p(M(e.configOption.type===o(y).Password?o(A):o(B)),{key:0,modelValue:a.value,"onUpdate:modelValue":i[0]||(i[0]=t=>a.value=t),name:e.configKey,required:!(e.configOption.flags&o(O).Optional),label:e.configOption.value,title:e.configOption.tooltip,class:d(l.$style.configurationEntry)},null,8,["modelValue","name","required","label","title","class"])):(r(),p(o(z),{key:1,modelValue:a.value,"onUpdate:modelValue":i[1]||(i[1]=t=>a.value=t),type:"switch",title:e.configOption.tooltip,class:d(l.$style.configurationEntry)},{default:v(()=>[V(b(e.configOption.value),1)]),_:1},8,["modelValue","title","class"]))}}),F="_configurationEntry_1cmcq_2",G={configurationEntry:F},H={$style:G},T=$(R,[["__cssModules",H]]),D=g({__name:"AuthMechanismRsa",props:k({authMechanism:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=_(e,"modelValue"),l=j();x(l,()=>{l.value&&(a.value.private_key="",a.value.public_key="")});async function i(){try{const{data:t}=await w.post(L("/apps/files_external/ajax/public_key.php"),{keyLength:l.value});a.value.private_key=t.data.private_key,a.value.public_key=t.data.public_key}catch(t){P.error("Error generating RSA key pair",{error:t}),C(u("files_external","Error generating key pair"))}}return(t,m)=>(r(),f("div",null,[(r(!0),f(E,null,q(e.authMechanism.configuration,(n,s)=>K((r(),p(T,{key:n.value,modelValue:a.value[s],"onUpdate:modelValue":h=>a.value[s]=h,configKey:s,configOption:n},null,8,["modelValue","onUpdate:modelValue","configKey","configOption"])),[[U,!(n.flags&o(O).Hidden)]])),128)),c(o(S),{modelValue:l.value,"onUpdate:modelValue":m[0]||(m[0]=n=>l.value=n),clearable:!1,inputLabel:o(u)("files_external","Key size"),options:[1024,2048,4096],required:""},null,8,["modelValue","inputLabel"]),c(o(N),{disabled:!l.value,wide:"",onClick:i},{default:v(()=>[V(b(o(u)("files_external","Generate keys")),1)]),_:1},8,["disabled"])]))}}),ne=Object.freeze(Object.defineProperty({__proto__:null,default:D},Symbol.toStringTag,{value:"Module"}));export{ne as A,T as C};
2+
//# sourceMappingURL=AuthMechanismRsa-B3Uxd9K3.chunk.mjs.map
File renamed without changes.

dist/AuthMechanismRsa-B3Uxd9K3.chunk.mjs.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

dist/AuthMechanismRsa-O0ouGq2J.chunk.mjs

Lines changed: 0 additions & 2 deletions
This file was deleted.

dist/AuthMechanismRsa-O0ouGq2J.chunk.mjs.map

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
._configurationEntry_1cmcq_2{flex:1 0 auto}

0 commit comments

Comments
 (0)