mirror of
https://github.com/exogen/vl2-forge.git
synced 2026-01-19 19:44:46 +00:00
Fix rename, add audio icon
This commit is contained in:
parent
685a1524f3
commit
90489cf9eb
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
docs/_next/static/chunks/app/page-868baa656c845161.js
Normal file
1
docs/_next/static/chunks/app/page-868baa656c845161.js
Normal file
File diff suppressed because one or more lines are too long
1
docs/_next/static/chunks/f7333993-8f32bf8e5c1e3f32.js
Normal file
1
docs/_next/static/chunks/f7333993-8f32bf8e5c1e3f32.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[516],{7780:function(t,a,r){r.d(a,{Eow:function(){return c}});var n=r(6231);function c(t){return(0,n.w_)({tag:"svg",attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{d:"M10.5 3.75a.75.75 0 0 0-1.264-.546L5.203 7H2.667a.75.75 0 0 0-.7.48A6.985 6.985 0 0 0 1.5 10c0 .887.165 1.737.468 2.52.111.29.39.48.7.48h2.535l4.033 3.796a.75.75 0 0 0 1.264-.546V3.75ZM16.45 5.05a.75.75 0 0 0-1.06 1.061 5.5 5.5 0 0 1 0 7.778.75.75 0 0 0 1.06 1.06 7 7 0 0 0 0-9.899Z"},child:[]},{tag:"path",attr:{d:"M14.329 7.172a.75.75 0 0 0-1.061 1.06 2.5 2.5 0 0 1 0 3.536.75.75 0 0 0 1.06 1.06 4 4 0 0 0 0-5.656Z"},child:[]}]})(t)}}}]);
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
|||
2:I[9330,["51","static/chunks/795d4814-53044e1cf9e42373.js","212","static/chunks/59650de3-d12eb82ab0e85613.js","240","static/chunks/53c13509-17317f399c482fd7.js","699","static/chunks/8e1d74a4-8e519121d6db0557.js","634","static/chunks/634-d90cc75f8d4e4c06.js","931","static/chunks/app/page-835d545c09f56ec6.js"],"Forge"]
|
||||
2:I[9330,["51","static/chunks/795d4814-53044e1cf9e42373.js","212","static/chunks/59650de3-d12eb82ab0e85613.js","516","static/chunks/f7333993-8f32bf8e5c1e3f32.js","240","static/chunks/53c13509-17317f399c482fd7.js","699","static/chunks/8e1d74a4-8e519121d6db0557.js","634","static/chunks/634-d90cc75f8d4e4c06.js","931","static/chunks/app/page-868baa656c845161.js"],"Forge"]
|
||||
3:I[4707,[],""]
|
||||
4:I[6423,[],""]
|
||||
0:["FgY9gJcnpj3lZXg7cOXvf",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{}],[["$","link","0",{"rel":"stylesheet","href":"/vl2-forge/_next/static/css/16a8d2abbd38d527.css","precedence":"next","crossOrigin":"$undefined"}]]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/vl2-forge/_next/static/css/c50e9c221475fcb7.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","className":"__variable_6dd175","children":["$","body",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]],null],null],["$L5",null]]]]
|
||||
0:["nynr0G9Bkz2aJYv1Jy5QI",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{}],[["$","link","0",{"rel":"stylesheet","href":"/vl2-forge/_next/static/css/16a8d2abbd38d527.css","precedence":"next","crossOrigin":"$undefined"}]]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/vl2-forge/_next/static/css/c50e9c221475fcb7.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","className":"__variable_6dd175","children":["$","body",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]],null],null],["$L5",null]]]]
|
||||
5:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"VL2 Forge"}],["$","meta","3",{"name":"description","content":"Create .vl2 files for Tribes 2"}],["$","meta","4",{"name":"next-size-adjust"}]]
|
||||
1:null
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import { FaTrashAlt } from "react-icons/fa";
|
|||
import { MdCastle, MdTerrain } from "react-icons/md";
|
||||
import { LuScrollText } from "react-icons/lu";
|
||||
import { FaClipboardList, FaMapPin } from "react-icons/fa6";
|
||||
import { HiMiniSpeakerWave } from "react-icons/hi2";
|
||||
import styles from "./Forge.module.css";
|
||||
import { base64ArrayBuffer } from "./utils";
|
||||
|
||||
|
|
@ -92,6 +93,8 @@ function FilePreview({ file, onDelete, onRename }) {
|
|||
alt=""
|
||||
/>
|
||||
);
|
||||
} else if (file.type?.genericType === "audio") {
|
||||
icon = <HiMiniSpeakerWave />;
|
||||
} else if (/\.cs$/i.test(file.path)) {
|
||||
icon = <LuScrollText />;
|
||||
} else if (/\.mis$/i.test(file.path)) {
|
||||
|
|
@ -110,14 +113,16 @@ function FilePreview({ file, onDelete, onRename }) {
|
|||
className={styles.Path}
|
||||
onDoubleClick={() => {
|
||||
let newPath = window.prompt(`Rename file (${file.path}):`, file.path);
|
||||
newPath = newPath
|
||||
.trim()
|
||||
.replace(/\/+/g, "/")
|
||||
.replace(/^\//, "")
|
||||
.replace(/\/$/, "")
|
||||
.trim();
|
||||
if (newPath !== file.path) {
|
||||
onRename(file.path, newPath);
|
||||
if (newPath) {
|
||||
newPath = newPath
|
||||
.trim()
|
||||
.replace(/\/+/g, "/")
|
||||
.replace(/^\//, "")
|
||||
.replace(/\/$/, "")
|
||||
.trim();
|
||||
if (newPath && newPath !== file.path) {
|
||||
onRename(file.path, newPath);
|
||||
}
|
||||
}
|
||||
}}
|
||||
>
|
||||
|
|
|
|||
Loading…
Reference in a new issue