From 45fdb7023e983cd2c152f93216afd993574d276a Mon Sep 17 00:00:00 2001 From: Gabriel Herbert Date: Thu, 7 Nov 2024 10:48:34 +0100 Subject: [PATCH] Builder, shorten entity names if too long, small fixes --- www/comps/app.css | 9 ++ www/comps/builder/builderApi.js | 2 +- www/comps/builder/builderNew.js | 2 +- www/comps/builder/builderPgTriggers.js | 70 ++++++----- www/comps/builder/builderPresets.js | 20 ++-- www/comps/builder/builderRelation.js | 154 ++++++++++++------------- www/comps/builder/builderRelations.js | 45 ++++---- www/comps/builder/builderVariables.js | 32 +++-- www/comps/builder/builderWidgets.js | 38 +++--- 9 files changed, 180 insertions(+), 192 deletions(-) diff --git a/www/comps/app.css b/www/comps/app.css index ad5fba88..3db977a0 100644 --- a/www/comps/app.css +++ b/www/comps/app.css @@ -904,6 +904,7 @@ table td.maximum{ margin:3px 8px 3px 0px; display:flex; flex-flow:row nowrap; + gap:calc(var(--spacing) / 2.5); align-items:center; justify-content:space-between; font-size:100%; @@ -945,6 +946,14 @@ table td.maximum{ display:flex; flex-flow:column nowrap; gap:5px; + flex:1 1 auto; + overflow:auto; +} +.generic-entry-list .lines span{ + min-width:0px; + text-overflow:ellipsis; + white-space:nowrap; + overflow:hidden; } .generic-entry-list .subtitle{ font-size:80%; diff --git a/www/comps/builder/builderApi.js b/www/comps/builder/builderApi.js index 6e810ec5..a1fe26d7 100644 --- a/www/comps/builder/builderApi.js +++ b/www/comps/builder/builderApi.js @@ -185,7 +185,7 @@ let MyBuilderApiPreview = { return out.length === 0 ? '' : `?${out.join('&')}`; }, request:(s) => { - if(s.isAuth) return `{\n\t"username": "API_LOGIN_USERNAME",\n\t"password": "API_LOGIN_PASSWORD"\n}`; + if(s.isAuth) return `{\n\t"username": "API_USER_NAME",\n\t"password": "API_USER_PASSWORD"\n}`; if(s.isPost) return s.getBodyPreview(true); return s.capApp.empty; }, diff --git a/www/comps/builder/builderNew.js b/www/comps/builder/builderNew.js index b0add712..3a4eae33 100644 --- a/www/comps/builder/builderNew.js +++ b/www/comps/builder/builderNew.js @@ -151,7 +151,7 @@ let MyBuilderNew = { computed:{ nameMaxLength:(s) => { switch(s.entity) { - case 'api': return 64; break; + case 'api': return 60; break; case 'collection': return 64; break; case 'form': return 64; break; case 'jsFunction': return 64; break; diff --git a/www/comps/builder/builderPgTriggers.js b/www/comps/builder/builderPgTriggers.js index 2991fc3c..b14a59ef 100644 --- a/www/comps/builder/builderPgTriggers.js +++ b/www/comps/builder/builderPgTriggers.js @@ -21,44 +21,40 @@ let MyBuilderPgTriggers = { @click="idEdit = trg.id" v-for="trg in triggers" > -
- -
- {{ trg.fires }} - - {{ isFromRelation ? pgFunctionIdMap[trg.pgFunctionId].name + '()' : relationIdMap[trg.relationId].name }} - -
-
-
- - - - + +
+ {{ trg.fires }} + + {{ isFromRelation ? pgFunctionIdMap[trg.pgFunctionId].name + '()' : relationIdMap[trg.relationId].name }} +
+ + + +
-
- -
- {{ p.name }} - {{ getPreview(p) }} -
-
-
+ +
+ {{ p.name }} + {{ getPreview(p) }}
diff --git a/www/comps/builder/builderRelation.js b/www/comps/builder/builderRelation.js index 3357895e..b5d1c4db 100644 --- a/www/comps/builder/builderRelation.js +++ b/www/comps/builder/builderRelation.js @@ -188,48 +188,44 @@ let MyBuilderRelation = { @click="attributeIdEdit = atr.id" v-for="atr in relation.attributes.filter(v => nameFilter === '' || v.name.includes(nameFilter.toLowerCase()))" > -
- -
- {{ atr.name }} - - [{{ atr.captions.attributeTitle[builderLanguage] }}] - -
-
-
- - - - + +
+ {{ atr.name }} + + [{{ atr.captions.attributeTitle[builderLanguage] }}] +
+ + + +
@@ -262,46 +258,42 @@ let MyBuilderRelation = { @click="indexIdEdit = ind.id" v-for="ind in relation.indexes" > -
- -
{{ displayIndexName(ind) }}
-
-
- - - - - -
+ +
{{ displayIndexName(ind) }}
+ + + + + diff --git a/www/comps/builder/builderRelations.js b/www/comps/builder/builderRelations.js index 9406b816..cb742df1 100644 --- a/www/comps/builder/builderRelations.js +++ b/www/comps/builder/builderRelations.js @@ -33,29 +33,30 @@ let MyBuilderRelations = { :title="r.comment" :to="'/builder/relation/'+r.id" > - {{ r.name }} -
- - - +
+ {{ r.name }} + {{ r.comment }}
+ + +
diff --git a/www/comps/builder/builderVariables.js b/www/comps/builder/builderVariables.js index b7acb6a1..f449d828 100644 --- a/www/comps/builder/builderVariables.js +++ b/www/comps/builder/builderVariables.js @@ -35,25 +35,21 @@ let MyBuilderVariables = { v-for="v in module.variables.filter(v => filter === '' || v.name.toLowerCase().includes(filter.toLowerCase()))" @click="variableIdEdit = v.id" > -
- -
- {{ v.name }} - {{ formIdMap[v.formId].name }}: {{ v.name }} -
-
-
- + +
+ {{ v.name }} + {{ formIdMap[v.formId].name }}: {{ v.name }}
+
diff --git a/www/comps/builder/builderWidgets.js b/www/comps/builder/builderWidgets.js index e4cd80cd..7055edf5 100644 --- a/www/comps/builder/builderWidgets.js +++ b/www/comps/builder/builderWidgets.js @@ -40,26 +40,24 @@ let MyBuilderWidgets = { [{{ w.captions.widgetTitle[builderLanguage] }}] -
- - - -
+ + +