@saltcorn/mobile-app 0.9.6-beta.19 → 0.9.6-beta.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/www/js/routes/view.js +23 -3
package/package.json
CHANGED
package/www/js/routes/view.js
CHANGED
|
@@ -138,9 +138,9 @@ const getView = async (context) => {
|
|
|
138
138
|
);
|
|
139
139
|
}
|
|
140
140
|
state.queriesCache = {};
|
|
141
|
-
let
|
|
141
|
+
let contents0 = null;
|
|
142
142
|
try {
|
|
143
|
-
|
|
143
|
+
contents0 = await view.run_possibly_on_page(
|
|
144
144
|
query,
|
|
145
145
|
req,
|
|
146
146
|
res,
|
|
@@ -157,5 +157,25 @@ const getView = async (context) => {
|
|
|
157
157
|
context,
|
|
158
158
|
req
|
|
159
159
|
);
|
|
160
|
-
else
|
|
160
|
+
else {
|
|
161
|
+
const contents =
|
|
162
|
+
typeof contents0 === "string"
|
|
163
|
+
? saltcorn.markup.div(
|
|
164
|
+
{
|
|
165
|
+
class: "d-inline",
|
|
166
|
+
"data-sc-embed-viewname": view.name,
|
|
167
|
+
"data-sc-view-source": `/view/${context.params.viewname}${
|
|
168
|
+
context.query
|
|
169
|
+
? context.query.startsWith("?")
|
|
170
|
+
? context.query
|
|
171
|
+
: `?${context.query}`
|
|
172
|
+
: ""
|
|
173
|
+
}`,
|
|
174
|
+
},
|
|
175
|
+
contents0
|
|
176
|
+
)
|
|
177
|
+
: contents0;
|
|
178
|
+
|
|
179
|
+
return wrapContents(contents, viewname, context, req);
|
|
180
|
+
}
|
|
161
181
|
};
|