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'
6166import { useSettings } from ' ./composables/useSettings'
6267import { useBoardDisplay } from ' ./composables/useBoardDisplay'
6368import { useGameState } from ' ./composables/useGameState'
69+ import settingSvg from ' ./assets/icon/setting.svg?raw'
70+ import githubSvg from ' ./assets/icon/github.svg?raw'
6471
6572// ---- 设置持久化 ----
6673const { 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 >
0 commit comments