Commit 031bb10f authored by KesaubeEire's avatar KesaubeEire

feat: config 加入新参数.

parent 62a7b915
......@@ -53,8 +53,22 @@
<div class="flex flex-col">
<div class="form-control w-60">
<label class="label cursor-pointer w-full inline-flex justify-between">
<span class="label-text">显示语言分类</span>
<input type="checkbox" bind:checked={$_config.card_showCateGory} class="toggle" />
<span class="label-text">显示游戏ID</span>
<input type="checkbox" bind:checked={$_config.card_showId} class="toggle" />
</label>
</div>
<div class="form-control w-60">
<label class="label cursor-pointer w-full inline-flex justify-between">
<span class="label-text">显示语言: 标题</span>
<input type="checkbox" bind:checked={$_config.card_showCateGoryTitle} class="toggle" />
</label>
</div>
<div class="form-control w-60">
<label class="label cursor-pointer w-full inline-flex justify-between">
<span class="label-text">显示语言: 标签</span>
<input type="checkbox" bind:checked={$_config.card_showCateGoryTag} class="toggle" />
</label>
</div>
......
......@@ -114,11 +114,20 @@
onclick="globalModal.showModal()"
on:keypress={() => {}}
/>
{#if $_config.card_showId}
<div
class="
absolute w-10 right-0 top-0 p-1 text-center
bg-neutral text-neutral-content rounded-bl-box border border-neutral"
>
{id}
</div>
{/if}
</figure>
<div class="card-body justify-between">
<h2 class="card-title block text-lg">
<!-- NOTE: 游戏类别 -->
{#if $_config.card_showCateGory}
<!-- NOTE: 游戏类别(title) -->
{#if $_config.card_showCateGoryTitle}
<div
class="badge badge-secondary m-auto cursor-pointer hover:badge-neutral"
style="height: inherit;line-height: inherit;"
......@@ -143,8 +152,8 @@
{/if}
<!-- NOTE: tags -->
{#if $_config.card_showTag}
<div class="card-actions justify-end">
<div class="card-actions justify-end">
{#if $_config.card_showTag}
{#if !raw_tags || tags.length == 0}
<!-- <div class="badge badge-outline">Tag 示例</div> -->
{:else}
......@@ -160,8 +169,21 @@
</div>
{/each}
{/if}
</div>
{/if}
{/if}
<!-- NOTE: 游戏类别(tag) -->
{#if $_config.card_showCateGoryTag}
<div class="tooltip">
<div
class="badge badge-secondary cursor-pointer hover:badge-outline hover:bg-neutral hover:text-neutral-content"
on:click={p_searchCategory(category)}
on:keypress={() => {}}
>
{language ?? '示例'}
</div>
</div>
{/if}
</div>
</div>
</div>
......
......@@ -41,12 +41,16 @@ export const _env = persistStore('_env', "");
/** 永久持久化: 配置 */
export const _config = persistStore('_config', {
// 卡片配置 显示游戏ID
card_showId: true,
// 卡片配置 显示副标题
card_showSubTitle: true,
// 卡片配置 显示标签
card_showTag: true,
// 卡片配置 显示语言分类
card_showCateGory: true,
card_showCateGoryTitle: true,
// 卡片配置 显示语言分类
card_showCateGoryTag: false,
// 分页配置 单页显示(单次瀑布流加载)数量
page_singleNum: 20,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment