Make current shared env ace editor full width
This commit is contained in:
@@ -339,7 +339,31 @@ const SharedEnvironments = {
|
||||
m("div.flex-1", [
|
||||
m("h3.text-xl.font-semibold.text-gray-900.dark:text-white.mb-1", env.name),
|
||||
env.description ? m("p.text-gray-600.dark:text-gray-400.text-sm.mb-3", env.description) : null,
|
||||
m("div.border.border-gray-300.dark:border-gray-600.rounded.overflow-hidden", {
|
||||
|
||||
]),
|
||||
m("div.flex.space-x-2.ml-4", [
|
||||
m("button.text-purple-600.hover:text-purple-800.dark:text-purple-400.dark:hover:text-purple-300.p-2[title=History]",
|
||||
{ onclick: () => SharedEnvironments.openHistoryModal(env.id, env.name) },
|
||||
m("svg.w-5.h-5[fill=none][stroke=currentColor][viewBox=0 0 24 24]",
|
||||
m("path[stroke-linecap=round][stroke-linejoin=round][stroke-width=2][d=M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z]")
|
||||
)
|
||||
),
|
||||
m("button.text-blue-600.hover:text-blue-800.dark:text-blue-400.dark:hover:text-blue-300.p-2[title=Edit]",
|
||||
{ onclick: () => SharedEnvironments.openEditModal(env) },
|
||||
m("svg.w-5.h-5[fill=none][stroke=currentColor][viewBox=0 0 24 24]",
|
||||
m("path[stroke-linecap=round][stroke-linejoin=round][stroke-width=2][d=M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z]")
|
||||
)
|
||||
),
|
||||
m("button.text-red-600.hover:text-red-800.dark:text-red-400.dark:hover:text-red-300.p-2[title=Delete]",
|
||||
{ onclick: () => SharedEnvironments.deleteEnvironment(env) },
|
||||
m("svg.w-5.h-5[fill=none][stroke=currentColor][viewBox=0 0 24 24]",
|
||||
m("path[stroke-linecap=round][stroke-linejoin=round][stroke-width=2][d=M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16]")
|
||||
)
|
||||
)
|
||||
])
|
||||
]),
|
||||
m("div", [
|
||||
m("div.border.border-gray-300.dark:border-gray-600.rounded.overflow-hidden", {
|
||||
oncreate: function(vnode) {
|
||||
const editorId = `env-display-${env.id}`;
|
||||
const editorDiv = document.createElement('div');
|
||||
@@ -399,27 +423,6 @@ const SharedEnvironments = {
|
||||
]),
|
||||
isExpanded ? SharedEnvironments.renderLinkedFunctions(env.id, linked) : null
|
||||
])
|
||||
]),
|
||||
m("div.flex.space-x-2.ml-4", [
|
||||
m("button.text-purple-600.hover:text-purple-800.dark:text-purple-400.dark:hover:text-purple-300.p-2[title=History]",
|
||||
{ onclick: () => SharedEnvironments.openHistoryModal(env.id, env.name) },
|
||||
m("svg.w-5.h-5[fill=none][stroke=currentColor][viewBox=0 0 24 24]",
|
||||
m("path[stroke-linecap=round][stroke-linejoin=round][stroke-width=2][d=M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z]")
|
||||
)
|
||||
),
|
||||
m("button.text-blue-600.hover:text-blue-800.dark:text-blue-400.dark:hover:text-blue-300.p-2[title=Edit]",
|
||||
{ onclick: () => SharedEnvironments.openEditModal(env) },
|
||||
m("svg.w-5.h-5[fill=none][stroke=currentColor][viewBox=0 0 24 24]",
|
||||
m("path[stroke-linecap=round][stroke-linejoin=round][stroke-width=2][d=M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z]")
|
||||
)
|
||||
),
|
||||
m("button.text-red-600.hover:text-red-800.dark:text-red-400.dark:hover:text-red-300.p-2[title=Delete]",
|
||||
{ onclick: () => SharedEnvironments.deleteEnvironment(env) },
|
||||
m("svg.w-5.h-5[fill=none][stroke=currentColor][viewBox=0 0 24 24]",
|
||||
m("path[stroke-linecap=round][stroke-linejoin=round][stroke-width=2][d=M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16]")
|
||||
)
|
||||
)
|
||||
])
|
||||
])
|
||||
]);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user