|
| 1 | +<template> |
| 2 | + <div class="aside-footer"> |
| 3 | + <el-tooltip placement="right-end" :show-arrow="false" trigger="click" popper-class="github-popper" :teleported="false"> |
| 4 | + <template #default> |
| 5 | + <button class="icon-btn github-icon-btn" aria-label="关于 / GitHub"> |
| 6 | + <svg viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" style="width:14px;height:14px;"> |
| 7 | + <path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 |
| 8 | + 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13 |
| 9 | + -.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66 |
| 10 | + .07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15 |
| 11 | + -.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27 |
| 12 | + .68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12 |
| 13 | + .51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 |
| 14 | + 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/> |
| 15 | + </svg> |
| 16 | + </button> |
| 17 | + </template> |
| 18 | + <template #content> |
| 19 | + <div class="github-card"> |
| 20 | + <!-- 头部:app 图标 + 名称 + 副标题 --> |
| 21 | + <div class="github-card-header"> |
| 22 | + <div class="github-card-app-icon"> |
| 23 | + <svg viewBox="0 0 20 20" fill="currentColor"> |
| 24 | + <rect x="2" y="5" width="16" height="11" rx="2" fill="none" stroke="currentColor" stroke-width="1.4"/> |
| 25 | + <path d="M6 5V4a2 2 0 014 0v1" stroke="currentColor" stroke-width="1.4" fill="none" stroke-linecap="round"/> |
| 26 | + <circle cx="10" cy="11" r="1.5" fill="currentColor"/> |
| 27 | + <path d="M10 12.5v1.5" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/> |
| 28 | + </svg> |
| 29 | + </div> |
| 30 | + <div class="github-card-header-text"> |
| 31 | + <div class="github-card-app-name">WebSSH</div> |
| 32 | + <div class="github-card-app-sub">SSH / SFTP 客户端</div> |
| 33 | + </div> |
| 34 | + </div> |
| 35 | + |
| 36 | + <div class="github-card-divider"></div> |
| 37 | + |
| 38 | + <!-- 链接列表 --> |
| 39 | + <a href="https://github.com/dalaolala/webssh" target="_blank" rel="noopener noreferrer" class="github-card-link"> |
| 40 | + <span class="github-card-link-icon github-card-link-icon--green"> |
| 41 | + <svg viewBox="0 0 16 16" fill="currentColor"> |
| 42 | + <path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 |
| 43 | + 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13 |
| 44 | + -.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66 |
| 45 | + .07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15 |
| 46 | + -.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27 |
| 47 | + .68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12 |
| 48 | + .51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 |
| 49 | + 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/> |
| 50 | + </svg> |
| 51 | + </span> |
| 52 | + <span class="github-card-link-label">开源地址</span> |
| 53 | + <svg class="github-card-link-arrow" viewBox="0 0 12 12" fill="none" stroke="currentColor"> |
| 54 | + <path d="M2 6h8M7 3l3 3-3 3" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> |
| 55 | + </svg> |
| 56 | + </a> |
| 57 | + |
| 58 | + <a href="https://github.com/dalaolala/webssh/tags" target="_blank" rel="noopener noreferrer" class="github-card-link"> |
| 59 | + <span class="github-card-link-icon github-card-link-icon--blue"> |
| 60 | + <svg viewBox="0 0 16 16" fill="currentColor"> |
| 61 | + <path d="M1 7.775V2.75C1 2.06 1.56 1.5 2.25 1.5h5.025a.75.75 0 01.53.22l6.25 6.25a.75.75 0 010 1.06l-5.025 5.025a.75.75 0 01-1.06 0L1.72 8.305A.75.75 0 011 7.775zm1.5-.31l5.345 5.345 4.965-4.965L7.465 3H2.5v4.465zM4.5 5.5a1 1 0 110-2 1 1 0 010 2z"/> |
| 62 | + </svg> |
| 63 | + </span> |
| 64 | + <span class="github-card-link-label">版本下载</span> |
| 65 | + <svg class="github-card-link-arrow" viewBox="0 0 12 12" fill="none" stroke="currentColor"> |
| 66 | + <path d="M2 6h8M7 3l3 3-3 3" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> |
| 67 | + </svg> |
| 68 | + </a> |
| 69 | + </div> |
| 70 | + </template> |
| 71 | + </el-tooltip> |
| 72 | + </div> |
| 73 | +</template> |
| 74 | + |
| 75 | +<script setup> |
| 76 | +// 无需额外逻辑,链接由 electron/main.js 的 setWindowOpenHandler 拦截后用系统浏览器打开 |
| 77 | +</script> |
| 78 | + |
| 79 | +<style scoped> |
| 80 | +/* 底部区域 */ |
| 81 | +.aside-footer { |
| 82 | + flex-shrink: 0; |
| 83 | + padding: 8px 10px; |
| 84 | + border-top: 1px solid rgba(0, 0, 0, 0.06); |
| 85 | +} |
| 86 | +
|
| 87 | +.dark-theme .aside-footer { |
| 88 | + border-top-color: rgba(255, 255, 255, 0.07); |
| 89 | +} |
| 90 | +
|
| 91 | +/* 按钮基础样式 */ |
| 92 | +.icon-btn { |
| 93 | + width: 28px; |
| 94 | + height: 28px; |
| 95 | + display: flex; |
| 96 | + align-items: center; |
| 97 | + justify-content: center; |
| 98 | + border: none; |
| 99 | + background: transparent; |
| 100 | + border-radius: 7px; |
| 101 | + color: #636366; |
| 102 | + font-size: 14px; |
| 103 | + cursor: pointer; |
| 104 | +} |
| 105 | +
|
| 106 | +.icon-btn:hover { |
| 107 | + background: rgba(0, 0, 0, 0.07); |
| 108 | + color: #1c1c1e; |
| 109 | +} |
| 110 | +
|
| 111 | +.dark-theme .icon-btn { |
| 112 | + color: #8e8e93; |
| 113 | +} |
| 114 | +
|
| 115 | +.dark-theme .icon-btn:hover { |
| 116 | + background: rgba(255, 255, 255, 0.1); |
| 117 | + color: #f5f5f7; |
| 118 | +} |
| 119 | +
|
| 120 | +/* GitHub 图标按钮颜色覆盖 */ |
| 121 | +.github-icon-btn { |
| 122 | + color: #c0c0c5; |
| 123 | +} |
| 124 | +
|
| 125 | +.dark-theme .github-icon-btn { |
| 126 | + color: #48484e; |
| 127 | +} |
| 128 | +
|
| 129 | +/* Popper 卡片内部样式 */ |
| 130 | +.github-card { |
| 131 | + min-width: 192px; |
| 132 | + padding: 2px 0; |
| 133 | + font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif; |
| 134 | +} |
| 135 | +
|
| 136 | +/* 卡片 header */ |
| 137 | +.github-card-header { |
| 138 | + display: flex; |
| 139 | + align-items: center; |
| 140 | + gap: 10px; |
| 141 | + padding: 10px 12px 10px; |
| 142 | +} |
| 143 | +
|
| 144 | +.github-card-app-icon { |
| 145 | + width: 32px; |
| 146 | + height: 32px; |
| 147 | + border-radius: 8px; |
| 148 | + background: linear-gradient(145deg, #1a1a2e 0%, #16213e 100%); |
| 149 | + display: flex; |
| 150 | + align-items: center; |
| 151 | + justify-content: center; |
| 152 | + color: #5ac8fa; |
| 153 | + flex-shrink: 0; |
| 154 | + box-shadow: 0 1px 4px rgba(0,0,0,0.18); |
| 155 | +} |
| 156 | +
|
| 157 | +.github-card-app-icon svg { |
| 158 | + width: 16px; |
| 159 | + height: 16px; |
| 160 | +} |
| 161 | +
|
| 162 | +.github-card-header-text { |
| 163 | + display: flex; |
| 164 | + flex-direction: column; |
| 165 | + gap: 1px; |
| 166 | +} |
| 167 | +
|
| 168 | +.github-card-app-name { |
| 169 | + font-size: 13px; |
| 170 | + font-weight: 600; |
| 171 | + color: #1c1c1e; |
| 172 | + letter-spacing: -0.1px; |
| 173 | + line-height: 1.2; |
| 174 | +} |
| 175 | +
|
| 176 | +.github-card-app-sub { |
| 177 | + font-size: 11px; |
| 178 | + color: #aeaeb2; |
| 179 | + line-height: 1.3; |
| 180 | +} |
| 181 | +
|
| 182 | +/* 分隔线 */ |
| 183 | +.github-card-divider { |
| 184 | + height: 1px; |
| 185 | + background: rgba(0, 0, 0, 0.07); |
| 186 | + margin: 0 4px 4px; |
| 187 | +} |
| 188 | +
|
| 189 | +/* 链接行 */ |
| 190 | +.github-card-link { |
| 191 | + display: flex; |
| 192 | + align-items: center; |
| 193 | + gap: 9px; |
| 194 | + padding: 6px 8px; |
| 195 | + border-radius: 6px; |
| 196 | + text-decoration: none; |
| 197 | + color: #1c1c1e; |
| 198 | + font-size: 13px; |
| 199 | + font-weight: 400; |
| 200 | + transition: background 0.12s; |
| 201 | + margin: 0 4px; |
| 202 | +} |
| 203 | +
|
| 204 | +.github-card-link:hover { |
| 205 | + background: rgba(0, 122, 255, 0.08); |
| 206 | +} |
| 207 | +
|
| 208 | +/* 彩色图标色块 */ |
| 209 | +.github-card-link-icon { |
| 210 | + width: 24px; |
| 211 | + height: 24px; |
| 212 | + border-radius: 6px; |
| 213 | + display: flex; |
| 214 | + align-items: center; |
| 215 | + justify-content: center; |
| 216 | + flex-shrink: 0; |
| 217 | +} |
| 218 | +
|
| 219 | +.github-card-link-icon svg { |
| 220 | + width: 13px; |
| 221 | + height: 13px; |
| 222 | +} |
| 223 | +
|
| 224 | +.github-card-link-icon--green { |
| 225 | + background: linear-gradient(145deg, #28a745, #34d058); |
| 226 | + color: #fff; |
| 227 | +} |
| 228 | +
|
| 229 | +.github-card-link-icon--blue { |
| 230 | + background: linear-gradient(145deg, #0a84ff, #409eff); |
| 231 | + color: #fff; |
| 232 | +} |
| 233 | +
|
| 234 | +.github-card-link-label { |
| 235 | + flex: 1; |
| 236 | + color: inherit; |
| 237 | +} |
| 238 | +
|
| 239 | +.github-card-link:hover .github-card-link-label { |
| 240 | + color: #007AFF; |
| 241 | +} |
| 242 | +
|
| 243 | +.github-card-link-arrow { |
| 244 | + width: 11px; |
| 245 | + height: 11px; |
| 246 | + opacity: 0.25; |
| 247 | + flex-shrink: 0; |
| 248 | + transition: opacity 0.12s, transform 0.12s; |
| 249 | +} |
| 250 | +
|
| 251 | +.github-card-link:hover .github-card-link-arrow { |
| 252 | + opacity: 0.6; |
| 253 | + transform: translateX(2px); |
| 254 | +} |
| 255 | +</style> |
0 commit comments