feat(installer): 实现游戏安装与快捷方式创建功能- 添加禁用右键菜单和开发者工具的保护机制

- 引入GAME_CONFIG配置文件统一管理游戏信息
- 安装页面支持记录安装路径到localStorage
- 成功页面增加创建桌面快捷方式选项
- 实现调用系统资源管理器打开游戏目录功能
- 集成Windows COM组件创建快捷方式的能力
- 更新UI界面展示多语言标题和版本信息
- 升级daisyui依赖至5.5.2版本- 调整窗口标题和产品名称为"游戏安装工具 - NoPJ"
This commit is contained in:
Chaos
2025-11-13 23:40:22 +08:00
parent 345acdee91
commit 6b6c61fd08
14 changed files with 326 additions and 81 deletions

View File

@@ -1,61 +1,40 @@
<script lang="ts">
import { goto } from '$app/navigation';
import { GAME_CONFIG } from '$lib/config';
let isHover = false;
// 提取函数:处理“激活”状态
function handleFocus() {
isHover = true;
}
// 提取函数:处理“失活”状态
function handleBlur() {
isHover = false;
}
</script>
<!--<div class={'relative pt-10 px-4 h-screen w-screen flex justify-center items-center transition-all ' }}-->
<!-- class:backdrop-blur-xs={isHover}-->
<!--&gt;-->
<!-- <button class="btn btn-wide" on:mouseenter={()=>{isHover = true}} on:mouseout={()=>{isHover = false}}>安装游戏</button>-->
<!--</div>-->
<div class="hero min-h-screen transition-all duration-300 "
<div class="hero min-h-screen transition-all {isHover ? 'bg-neutral-700/30' : ''} "
class:backdrop-blur-xs={isHover}
>
<div class="hero-content text-center select-none">
<div class="max-w-md" >
<h1 class="text-5xl font-bold"
on:mouseenter={()=>{isHover = true}}
on:mouseout={()=>{isHover = false}}
on:blur={handleBlur}
on:focus={handleFocus}
>逃离鸭科夫</h1>
<p class="py-6"
on:mouseenter={()=>{isHover = true}}
on:mouseout={()=>{isHover = false}}
on:blur={handleBlur}
on:focus={handleFocus}
>
<span class="font-bold">《逃离鸭科夫》</span>是一款鸭子题材PVE俯视角撤离射击游戏。你要在鸭科夫的世界里搜寻物资建造藏身处升级装备从一无所有到做大做强面对虎视眈眈的敌鸭想方设法生存下去——或者逃离。
<div class="hero-content text-center select-none p-12 group hover:backdrop-blur hover:bg-base-100/70">
<div class="w-xl group-hover:w-2xl transition-all duration-1000 ease-in-out ">
<p class="text-5xl font-bold ">
<span class="text-rotate">
<span class="justify-items-center">
<span>{GAME_CONFIG.title}</span>
<span>{GAME_CONFIG.title_en}</span>
<span>{GAME_CONFIG.title_rus}</span>
</span>
</span>
</p>
<button class="btn btn-primary btn-wide "
on:mouseenter={()=>{isHover = true}}
on:mouseout={()=>{isHover = false}}
on:blur={handleBlur}
on:focus={handleFocus}
on:click={()=>{goto('/install')}}
>安装游戏</button>
<button class="btn btn-primary btn-wide "
on:mouseenter={()=>{isHover = true}}
on:mouseout={()=>{isHover = false}}
on:blur={handleBlur}
on:focus={handleFocus}
on:click={()=>{goto('/success')}}
>完成</button>
<p class="pt-2">versin {GAME_CONFIG.version}</p>
<p class="py-6 text-left">
{GAME_CONFIG.description}
</p>
<!-- 事件会冒泡到父元素hero-content因此这些按钮可以不用显式绑定事件 -->
<div class="w-full">
<button class="btn btn-ghost btn-wide group-hover:btn-primary "
on:click="{() => goto('/install')}"
>
安装游戏
</button>
</div>
</div>
</div>
</div>