mirror of
https://github.com/setube/ogame-vue-ts.git
synced 2026-05-11 23:45:11 +08:00
添加了docs目录及其静态资源文件,支持前端文档和演示页面部署。新增dist-electron/main.js,实现Electron主进程窗口加载本地docs或开发服务器。更新.gitignore,允许docs目录纳入版本控制。
2 lines
1.9 KiB
JavaScript
2 lines
1.9 KiB
JavaScript
import{At as e,Cn as t,Dt as n,Et as r,Kt as i,Mt as a,N as o,Nt as s,On as c,hn as l,in as u,jt as d,kt as f}from"./game-logic-CfBcTF_c.js";import{D as p}from"./vendor-icons-W6Ny__75.js";import{h as m,u as h}from"./game-config-D-D7cMgJ.js";import{I as g,M as _,P as v}from"./index-DWmvUlvu.js";import{t as y}from"./useGameConfig-B5wf1i8i.js";import{t as b}from"./AlertDialog-CiXBEnQ0.js";var x={key:0,class:`absolute inset-0 z-10 bg-background/70 backdrop-blur-[2px] rounded-lg flex items-center justify-center`},S={class:`text-center p-4 space-y-2`},C={class:`flex justify-center`},w={class:`rounded-full bg-muted p-2`},T={class:`text-xs font-medium text-muted-foreground`},E=s({__name:`CardUnlockOverlay`,props:{requirements:{},currentLevel:{}},setup(s){let E=s,D=g(),{t:O}=v(),{BUILDINGS:k,TECHNOLOGIES:A}=y(),j=l(null),M=r(()=>E.currentLevel!==void 0&&E.currentLevel>0||!E.requirements||!D.currentPlanet?!0:o(D.currentPlanet,D.player.technologies,E.requirements)),N=()=>{if(!E.requirements||!D.currentPlanet)return``;let e=[];for(let[t,n]of Object.entries(E.requirements))if(Object.values(h).includes(t)){let r=t,i=D.currentPlanet.buildings[r]||0,a=k.value[r]?.name||r,o=i>=n?`✓`:`✗`;e.push(`${o} ${a}: Lv ${n} (${O(`common.current`)}: Lv ${i})`)}else if(Object.values(m).includes(t)){let r=t,i=D.player.technologies[r]||0,a=A.value[r]?.name||r,o=i>=n?`✓`:`✗`;e.push(`${o} ${a}: Lv ${n} (${O(`common.current`)}: Lv ${i})`)}return e.join(`
|
|
`)},P=()=>{j.value?.show({title:O(`common.requirementsNotMet`),message:N()})};return(r,o)=>M.value?f(``,!0):(i(),e(`div`,x,[n(`div`,S,[n(`div`,C,[n(`div`,w,[a(t(p),{size:20,class:`text-muted-foreground`})])]),n(`p`,T,c(t(O)(`common.locked`)),1),a(t(_),{variant:`outline`,size:`sm`,onClick:P,class:`text-xs`},{default:u(()=>[d(c(t(O)(`common.viewRequirements`)),1)]),_:1})]),a(b,{ref_key:`requirementsDialog`,ref:j},null,512)]))}});export{E as t}; |