-
- {logs.map((v, k) => (
-
- {v}
-
-
- ))}
-
-
+
+
+ {logs.length === 0 &&
+ [...Array(20).keys()].map((_v, i) => )}
+ {logs.length > 0 &&
+ logs.map((v, k) => (
+
+ {v}
+
+ ))}
+
+
{rcon && rcon.rconLive && !rcon.rconError && (
-
+
)}
{!(rcon && rcon.rconLive && !rcon.rconError) && (
diff --git a/src/css/rcon.css b/src/css/rcon.css
index a6093ad..c4fb9e3 100644
--- a/src/css/rcon.css
+++ b/src/css/rcon.css
@@ -1,8 +1,7 @@
.rconLogsWrapper {
overflow-y: scroll;
- max-height: 20rem;
+ max-height: calc(100% - 6rem);
word-wrap: break-word;
- margin-bottom: 10px;
}
.rconActions {
display: inline-flex;
diff --git a/src/util/queries.js b/src/util/queries.js
index 14a7035..f2d65b1 100644
--- a/src/util/queries.js
+++ b/src/util/queries.js
@@ -64,6 +64,13 @@ export const createServerFolder = async (serverId, path) =>
export const deleteServerItem = async (serverId, path, isDir) =>
fetchApiCore("/files/item", { id: serverId, path, isDir }, "DELETE");
+export const moveServerItems = async (serverId, files, destination, origin) =>
+ fetchApiCore(
+ "/files/move",
+ { id: serverId, files, destination, origin },
+ "POST",
+ );
+
export async function previewServerItem(serverId, path) {
const resp = await fetchApiCore("/files/item", { id: serverId, path });
if (resp.status !== 200) return console.log("AHHHH");