Skip to content

Commit 20cefee

Browse files
committed
update icon
1 parent f84c964 commit 20cefee

30 files changed

Lines changed: 450 additions & 57 deletions

src/App.vue

Lines changed: 43 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,15 @@
3939
@toggle-flip="isFlipped = !isFlipped" :has-game-started="hasGameStarted" @undo="handleUndo"
4040
@draw="handleDrawOffer" @resign="handleResign" @restart="handleRestart" @back-to-home="handleBackToHome" />
4141

42-
<!-- 右上角固定设置按钮 -->
43-
<button type="button" class="settings-fab" @click="showSettingsModal = true" title="设置">
44-
45-
</button>
42+
<!-- 右上角固定按钮组 -->
43+
<div class="top-right-fabs">
44+
<a href="https://github.com/DoroWolf/ChessDragon" target="_blank" rel="noopener" class="fab-btn" title="GitHub">
45+
<span class="fab-icon" v-html="githubSvg"></span>
46+
</a>
47+
<button type="button" class="fab-btn" @click="showSettingsModal = true" title="设置">
48+
<span class="fab-icon" v-html="settingSvg"></span>
49+
</button>
50+
</div>
4651

4752
<!-- 设置弹窗 Modal -->
4853
<SettingsModal :visible="showSettingsModal" :is-sound-enabled="isSoundEnabled"
@@ -61,6 +66,8 @@ import BoardPanel from './components/BoardPanel.vue'
6166
import { useSettings } from './composables/useSettings'
6267
import { useBoardDisplay } from './composables/useBoardDisplay'
6368
import { useGameState } from './composables/useGameState'
69+
import settingSvg from './assets/icon/setting.svg?raw'
70+
import githubSvg from './assets/icon/github.svg?raw'
6471
6572
// ---- 设置持久化 ----
6673
const { isSoundEnabled, coordinateLabelMode } = useSettings()
@@ -162,34 +169,55 @@ onUnmounted(() => {
162169
cursor: grabbing !important;
163170
}
164171
165-
/* 右上角固定设置按钮 */
166-
.settings-fab {
172+
/* 右上角固定按钮组 */
173+
.top-right-fabs {
167174
position: fixed;
168175
top: 16px;
169176
right: 16px;
170177
z-index: 10000;
178+
display: flex;
179+
gap: 10px;
180+
}
181+
182+
/* 无边框 FAB 按钮 */
183+
.fab-btn {
171184
width: 44px;
172185
height: 44px;
173186
border-radius: 50%;
174-
border: 2px solid #212529;
175-
background: #fff;
187+
border: none;
188+
background: transparent;
189+
color: #212529;
176190
font-size: 1.4rem;
177191
cursor: pointer;
178-
display: flex;
192+
display: inline-flex;
179193
align-items: center;
180194
justify-content: center;
181-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
182-
transition: background-color 0.15s;
183195
padding: 0;
184-
line-height: 1;
196+
transition: background-color 0.15s, color 0.15s;
197+
text-decoration: none;
185198
}
186199
187-
.settings-fab:hover {
188-
background: #f0f0f0;
200+
.fab-btn:hover .fab-icon :deep(svg) {
201+
opacity: 0.85;
189202
}
190203
191-
.settings-fab:focus-visible {
204+
.fab-btn:focus-visible {
192205
outline: 2px solid #ffd33d;
193206
outline-offset: 2px;
194207
}
208+
209+
/* FAB 图标容器 */
210+
.fab-icon {
211+
display: inline-flex;
212+
align-items: center;
213+
justify-content: center;
214+
width: 32px;
215+
height: 32px;
216+
}
217+
218+
.fab-icon :deep(svg) {
219+
width: 100%;
220+
height: 100%;
221+
display: block;
222+
}
195223
</style>

src/assets/icon/chess960.svg

Lines changed: 38 additions & 0 deletions
Loading

src/assets/icon/classic.svg

Lines changed: 23 additions & 0 deletions
Loading

src/assets/icon/custom.svg

Lines changed: 40 additions & 0 deletions
Loading

src/assets/icon/draw.svg

Lines changed: 40 additions & 0 deletions
Loading

src/assets/icon/export_pgn.svg

Lines changed: 64 additions & 0 deletions
Loading

src/assets/icon/github.svg

Lines changed: 38 additions & 0 deletions
Loading

src/assets/icon/home.svg

Lines changed: 20 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)