Skip to content

Commit

Permalink
fix [Bug]: 选项卡-外部链接 如果未勾选新窗口打开时,应按iframe方式显示 #5214
Browse files Browse the repository at this point in the history
  • Loading branch information
baozhoutao committed Jul 26, 2023
1 parent 14c8398 commit 9d97d6e
Show file tree
Hide file tree
Showing 15 changed files with 75 additions and 50 deletions.
2 changes: 1 addition & 1 deletion creator/packages/steedos-creator/client/router.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ FlowRouter.route '/app/:app_id/tab_iframe/:tab_id',
Session.set("tab_name", tab_id)
Session.set("object_name", null)
BlazeLayout.render Creator.getLayout(),
main: "creator_tab_iframe"
main: "page_iframe"
triggersExit: [(context, redirect) ->
Session.set("tab_name", null)
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template name="page_iframe">
<iframe name="pageIframe" src="{{url}}" style="{{style}}" class="{{className}}"></iframe>
</template>
11 changes: 11 additions & 0 deletions creator/packages/steedos-creator/client/views/page_iframe.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Template.page_iframe.helpers({
url: ()=>{
return FlowRouter.current().queryParams.url;
},
className: ()=>{
return FlowRouter.current().queryParams.className || "";
},
style: ()=>{
return FlowRouter.current().queryParams.style || "width: 100%; height: 100%;";
}
})
3 changes: 3 additions & 0 deletions creator/packages/steedos-creator/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ Package.onUse(function (api) {
api.addFiles('client/views/app_iframe.coffee', 'client');
api.addFiles('client/views/app_iframe.less', 'client');

api.addFiles('client/views/page_iframe.html', 'client');
api.addFiles('client/views/page_iframe.js', 'client');

api.addFiles('client/views/initiate_approval.html', 'client');
api.addFiles('client/views/initiate_approval.coffee', 'client');

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"name": "standard-minifier-js",
"version": "2.6.0"
},
"totalMinifiedBytes": 4403338,
"totalMinifiedGzipBytes": 1111322,
"totalMinifiedBytes": 4404173,
"totalMinifiedGzipBytes": 1111433,
"minifiedBytesByPackage": {
"packages/meteor.js": 9504,
"packages/coffeescript.js": 32,
Expand Down Expand Up @@ -2485,7 +2485,7 @@
}
],
"packages/steedos_creator.js": [
99248,
100083,
{
"node_modules": {
"meteor": {
Expand Down Expand Up @@ -2516,6 +2516,8 @@
"app_home.coffee": 725,
"template.app_iframe.js": 392,
"app_iframe.coffee": 978,
"template.page_iframe.js": 361,
"page_iframe.js": 275,
"template.initiate_approval.js": 1746,
"initiate_approval.coffee": 1352,
"template.amis_action.js": 350,
Expand All @@ -2535,7 +2537,7 @@
"core.coffee": 18669,
"colors.coffee": 1485,
"temp_navs.coffee": 3922,
"router.coffee": 5735,
"router.coffee": 5728,
"tenant.coffee": 220,
"animate.js": 445,
"colResizable-1.6.js": 5960,
Expand Down
20 changes: 10 additions & 10 deletions server/bundle/programs/web.browser.legacy/program.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
"format": "web-program-pre1",
"manifest": [
{
"path": "49224c9d33a7d01a3658805d2fec73088d5b118b.js",
"path": "00ad7374bc3b10136e5bd4dda90a6728c341d3e3.js",
"where": "client",
"type": "js",
"cacheable": true,
"url": "/49224c9d33a7d01a3658805d2fec73088d5b118b.js?meteor_js_resource=true",
"size": 4403338,
"hash": "49224c9d33a7d01a3658805d2fec73088d5b118b",
"sri": "QdQldHYhw0O9B3TdGdwFwji2d/h9NFGPS0KJV4Um4sRrFrwNEHH5ldQGxXLDfx72a7TT5hj6/Am5a1KYmSuVvw=="
"url": "/00ad7374bc3b10136e5bd4dda90a6728c341d3e3.js?meteor_js_resource=true",
"size": 4404173,
"hash": "00ad7374bc3b10136e5bd4dda90a6728c341d3e3",
"sri": "BwF/aCh2DGC7Te5qLqB+6E9m3BIdbRxGRLFccisJanbw2aKy5tWtIoj1FXr2zLQoZCco/Fdi8/aQ0ChJtxWsdA=="
},
{
"path": "49224c9d33a7d01a3658805d2fec73088d5b118b.stats.json",
"path": "00ad7374bc3b10136e5bd4dda90a6728c341d3e3.stats.json",
"where": "client",
"type": "json",
"cacheable": true,
"url": "/49224c9d33a7d01a3658805d2fec73088d5b118b.stats.json?meteor_js_resource=true",
"size": 93139,
"hash": "e49dafe07abc513ce336f39f89a6ff657d98b789",
"sri": "rPyYMSyvMk0vvK+G3Y8wUasWOpyNVSyGbPJ1eMitX4gVjObsqqaC6aCRswqQdeTk1YdayGEJr53NRXTDyBryKQ=="
"url": "/00ad7374bc3b10136e5bd4dda90a6728c341d3e3.stats.json?meteor_js_resource=true",
"size": 93231,
"hash": "ce8b6b91b77b392a26797188128988bc735d0a12",
"sri": "OUVfCYvN2pXlac+DWQwuFSmvFNsRlCbeaI301l3bOrGVeJ4+kxv9OsKEbMz/JsvtCJjMNDu0dedhOUluOb/CpA=="
},
{
"path": "dynamic/node_modules/formBuilder/dist/form-builder.min.js",
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"name": "standard-minifier-js",
"version": "2.6.0"
},
"totalMinifiedBytes": 4279250,
"totalMinifiedGzipBytes": 1078130,
"totalMinifiedBytes": 4280040,
"totalMinifiedGzipBytes": 1078237,
"minifiedBytesByPackage": {
"packages/meteor.js": 9504,
"packages/coffeescript.js": 32,
Expand Down Expand Up @@ -2530,7 +2530,7 @@
}
],
"packages/steedos_creator.js": [
98889,
99679,
{
"node_modules": {
"meteor": {
Expand Down Expand Up @@ -2561,6 +2561,8 @@
"app_home.coffee": 725,
"template.app_iframe.js": 392,
"app_iframe.coffee": 978,
"template.page_iframe.js": 361,
"page_iframe.js": 230,
"template.initiate_approval.js": 1746,
"initiate_approval.coffee": 1352,
"template.amis_action.js": 350,
Expand All @@ -2580,7 +2582,7 @@
"core.coffee": 18669,
"colors.coffee": 1485,
"temp_navs.coffee": 3922,
"router.coffee": 5735,
"router.coffee": 5728,
"tenant.coffee": 220,
"animate.js": 405,
"colResizable-1.6.js": 5920,
Expand Down
20 changes: 10 additions & 10 deletions server/bundle/programs/web.browser/program.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
"format": "web-program-pre1",
"manifest": [
{
"path": "8dc4ef9bb0b7846c40b17a9d94eae4fba024cb70.js",
"path": "a28e4ec69d47ce47822cb06a3127acb7816ad2a6.js",
"where": "client",
"type": "js",
"cacheable": true,
"url": "/8dc4ef9bb0b7846c40b17a9d94eae4fba024cb70.js?meteor_js_resource=true",
"size": 4279250,
"hash": "8dc4ef9bb0b7846c40b17a9d94eae4fba024cb70",
"sri": "iqs07cajd79zfFRWyAIcbOu3XVtuPzokGkHYkSoTgrboLfj1KAK5DH9Q+dGrVCsJEEkvw7SC6aqwjvkBuIgeKw=="
"url": "/a28e4ec69d47ce47822cb06a3127acb7816ad2a6.js?meteor_js_resource=true",
"size": 4280040,
"hash": "a28e4ec69d47ce47822cb06a3127acb7816ad2a6",
"sri": "C5Ol2u8PuuAHDJSiMkGkhE5poj95IVzGkztXrFQoil3FaKdqRPm8rP3R5INodxqGBlF6e/ILqY+8zQVRymsoJQ=="
},
{
"path": "8dc4ef9bb0b7846c40b17a9d94eae4fba024cb70.stats.json",
"path": "a28e4ec69d47ce47822cb06a3127acb7816ad2a6.stats.json",
"where": "client",
"type": "json",
"cacheable": true,
"url": "/8dc4ef9bb0b7846c40b17a9d94eae4fba024cb70.stats.json?meteor_js_resource=true",
"size": 92860,
"hash": "5556f441078cdd77d30681221f3d83170ba50528",
"sri": "9qq07XPr8ttNsj6Bt25FGEokX5ouvskuoJWQNeKRKOYoz0DqoztbGW6qC2Xd3MVEMetHUaPP/QPOrOb9wmk88g=="
"url": "/a28e4ec69d47ce47822cb06a3127acb7816ad2a6.stats.json?meteor_js_resource=true",
"size": 92951,
"hash": "dc85c8f2305bb3bc84500a2c2b9dabd5bc814635",
"sri": "E6RdDsz/+5Q8Mj07jAGnlebnMuSMpdi1H7P/NM5tfDwCdU8uQBzTrG55B2ilGg5xULchINJO0Z5t+nNB0EjERg=="
},
{
"path": "dynamic/node_modules/formBuilder/dist/form-builder.min.js",
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"name": "standard-minifier-js",
"version": "2.6.0"
},
"totalMinifiedBytes": 4556039,
"totalMinifiedGzipBytes": 1159253,
"totalMinifiedBytes": 4556874,
"totalMinifiedGzipBytes": 1159369,
"minifiedBytesByPackage": {
"packages/meteor.js": 9639,
"packages/coffeescript.js": 32,
Expand Down Expand Up @@ -2486,7 +2486,7 @@
}
],
"packages/steedos_creator.js": [
99248,
100083,
{
"node_modules": {
"meteor": {
Expand Down Expand Up @@ -2517,6 +2517,8 @@
"app_home.coffee": 725,
"template.app_iframe.js": 392,
"app_iframe.coffee": 978,
"template.page_iframe.js": 361,
"page_iframe.js": 275,
"template.initiate_approval.js": 1746,
"initiate_approval.coffee": 1352,
"template.amis_action.js": 350,
Expand All @@ -2536,7 +2538,7 @@
"core.coffee": 18669,
"colors.coffee": 1485,
"temp_navs.coffee": 3922,
"router.coffee": 5735,
"router.coffee": 5728,
"tenant.coffee": 220,
"animate.js": 445,
"colResizable-1.6.js": 5960,
Expand Down
20 changes: 10 additions & 10 deletions server/bundle/programs/web.cordova/program.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
"format": "web-program-pre1",
"manifest": [
{
"path": "cbf82424c303f122d911fc991576111040301fcf.js",
"path": "ee5c0a7c09d0ed7d0cff91b7c9a174e1190ff2df.js",
"where": "client",
"type": "js",
"cacheable": true,
"url": "/__cordova/cbf82424c303f122d911fc991576111040301fcf.js?meteor_js_resource=true",
"size": 4556039,
"hash": "cbf82424c303f122d911fc991576111040301fcf",
"sri": "TKquK3XgSDdjMrYZYQPRRhAWVKRRPFwLPtDW3KklBGECs0GEiuIUx/LyltW/0jZNFJDJ+xmyC6Jebdo+l6m2Jw=="
"url": "/__cordova/ee5c0a7c09d0ed7d0cff91b7c9a174e1190ff2df.js?meteor_js_resource=true",
"size": 4556874,
"hash": "ee5c0a7c09d0ed7d0cff91b7c9a174e1190ff2df",
"sri": "5FlBgDreKIbcIMumKBzT/b0rDtR/9q2SEOpdLdv3OJ/9e+icSUIoM2gDo+U/USg5mWzjQFPBT95GSEP6f+DqMQ=="
},
{
"path": "cbf82424c303f122d911fc991576111040301fcf.stats.json",
"path": "ee5c0a7c09d0ed7d0cff91b7c9a174e1190ff2df.stats.json",
"where": "client",
"type": "json",
"cacheable": true,
"url": "/__cordova/cbf82424c303f122d911fc991576111040301fcf.stats.json?meteor_js_resource=true",
"size": 93244,
"hash": "bd23347e8f67d0e2484c705dbb9dfeab7c40ddba",
"sri": "gpc0JCDdgTwMK/icnZbbSRQbbzuyu0ZBSfja80tFyyUJglM19af75OiWIpOz+ElVKHCCQQmDU6Ef0dhSDld8Lw=="
"url": "/__cordova/ee5c0a7c09d0ed7d0cff91b7c9a174e1190ff2df.stats.json?meteor_js_resource=true",
"size": 93336,
"hash": "a9f7c75b6ebe8bb49242b2672e25e4361b7a9b2f",
"sri": "Q0cGHBmI8PW8xJhJaYKl374XKjd1hhFYy3ERMqoCexxfJEPHNH3lW5dj9oEeVBBFdsHyBhDaCaG3EjjXe9PZnw=="
},
{
"path": "11b5a903682246a83749a7824a51a82b9822753b.css",
Expand Down
2 changes: 1 addition & 1 deletion server/bundle/star.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@
"meteorRelease": "[email protected]",
"nodeVersion": "12.16.1",
"npmVersion": "6.13.4",
"gitCommitHash": "ad6cc4997f76f45e388fa0ff2e8cc7c66c9175b7"
"gitCommitHash": "7e4af5d6b4b6dc307a66c3eb192e21d5c6f6c416"
}
2 changes: 2 additions & 0 deletions services/service-metadata-apps/src/actionsHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ async function tabMenus(ctx: any, appPath, tabApiName, menu, mobile, userSession
};
if (tab.is_new_window) {
urlMenu.target = '_blank'
}else{
urlMenu.path = `${appPath}/tab_iframe/${tab.name}/?url=${tab.url}`
}
menu.children.push(
urlMenu
Expand Down

0 comments on commit 9d97d6e

Please sign in to comment.