openvibers/openvibe.tools Commits
Guide the live DNS tool run control (#304)
Changes
@@@ -197,7 +197,11 @@ function inputFor(rec, value = '') {inputmode: URL_TOOLS.has(rec.sub) ? 'url' : 'text',tries: tryItems(rec).length ? { items: tryItems(rec) } : null,});-- return `${input}<div id="options-area" class="ovk-tool-options"></div>`;++ // Framed tool pages use the kit's submit button, not net.html's legacy hub button.++ const guided = rec.sub === 'dns'++ ? input.replace('class="ovk-btn ovk-btn--primary ovk-tool-go"', 'class="ovk-btn ovk-btn--primary ovk-tool-go" data-ov-guide="tools.job"')++ : input;++ return `${guided}<div id="options-area" class="ovk-tool-options"></div>`;}const ex = rec.examples || [];@@@ -13,6 +13,8 @@ const { frameFor } = require('../server/seo/frame');const PUB = path.join(__dirname, '..', 'public');const net = (sub, q) => renderTool(path.join(PUB, 'net.html'), sub, null, q ? { q } : {});const dev = (sub, q) => renderTool(path.join(PUB, 'dev.html'), sub, null, q ? { q } : {});++assert.match(frameFor(CATALOG.get('dns')), /<button type="submit" class="ovk-btn ovk-btn--primary ovk-tool-go" data-ov-guide="tools.job"/,++ 'the live framed DNS page exposes the real run control to Quest');/** The frame's order: each marker appears once, and in this order. */function inOrder(html, parts) {
@@ -197,7 +197,11 @@ function inputFor(rec, value = '') {
@@ -197,7 +197,11 @@ function inputFor(rec, value = '') {
inputmode: URL_TOOLS.has(rec.sub) ? 'url' : 'text',
inputmode: URL_TOOLS.has(rec.sub) ? 'url' : 'text',
tries: tryItems(rec).length ? { items: tryItems(rec) } : null,
tries: tryItems(rec).length ? { items: tryItems(rec) } : null,
});
});
- return `${input}<div id="options-area" class="ovk-tool-options"></div>`;
+ // Framed tool pages use the kit's submit button, not net.html's legacy hub button.
+ const guided = rec.sub === 'dns'
+ ? input.replace('class="ovk-btn ovk-btn--primary ovk-tool-go"', 'class="ovk-btn ovk-btn--primary ovk-tool-go" data-ov-guide="tools.job"')
+ : input;
+ return `${guided}<div id="options-area" class="ovk-tool-options"></div>`;
}
}
const ex = rec.examples || [];
const ex = rec.examples || [];
@@ -13,6 +13,8 @@ const { frameFor } = require('../server/seo/frame');
@@ -13,6 +13,8 @@ const { frameFor } = require('../server/seo/frame');
const PUB = path.join(__dirname, '..', 'public');
const PUB = path.join(__dirname, '..', 'public');
const net = (sub, q) => renderTool(path.join(PUB, 'net.html'), sub, null, q ? { q } : {});
const net = (sub, q) => renderTool(path.join(PUB, 'net.html'), sub, null, q ? { q } : {});
const dev = (sub, q) => renderTool(path.join(PUB, 'dev.html'), sub, null, q ? { q } : {});
const dev = (sub, q) => renderTool(path.join(PUB, 'dev.html'), sub, null, q ? { q } : {});
+assert.match(frameFor(CATALOG.get('dns')), /<button type="submit" class="ovk-btn ovk-btn--primary ovk-tool-go" data-ov-guide="tools.job"/,
+ 'the live framed DNS page exposes the real run control to Quest');
/** The frame's order: each marker appears once, and in this order. */
/** The frame's order: each marker appears once, and in this order. */
function inOrder(html, parts) {
function inOrder(html, parts) {