mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-10-25 17:22:27 +08:00
feat(icons): switch Pi to the three-color pi.dev mark
pi.dev now uses a three-color logo (coral, blue, yellow) on both light and dark backgrounds. Same 800x800 geometry as before, so the icon keeps its size and position; only the fills change from currentColor to fixed colors.
This commit is contained in:
1 parent
722042ad89
commit
25310890a1
2 files changed
+10
-4
No files matched your search
@@ -97,7 +97,7 @@ export const icons: Record<string, string> = {
|
||||
palm: `<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>PaLM</title><path d="M12 22.926c.928 0 1.679-.752 1.679-1.68V6.696h-3.358v14.552c0 .927.751 1.679 1.679 1.679z" fill="#F9AB00"></path><path d="M18.69 12.005A5.819 5.819 0 0012 10.904l7.188 7.188c.296.296.807.179.933-.22a5.815 5.815 0 00-1.431-5.867z" fill="#5BB974"></path><path d="M5.31 12.005A5.819 5.819 0 0112 10.904l-7.188 7.188a.562.562 0 01-.933-.22 5.815 5.815 0 011.431-5.867z" fill="#129EAF"></path><path d="M18.157 6.426c-2.86 0-5.288 1.875-6.157 4.478h11.367a.629.629 0 00.565-.908c-1.08-2.12-3.26-3.57-5.775-3.57z" fill="#AF5CF7"></path><path d="M13.188 3.384c-2.023 2.024-2.414 5.064-1.188 7.52l8.038-8.039a.629.629 0 00-.242-1.042c-2.264-.735-4.83-.217-6.608 1.561z" fill="#FF8BCB"></path><path d="M10.812 3.384c2.023 2.024 2.414 5.064 1.188 7.52L3.962 2.865a.629.629 0 01.242-1.042c2.264-.735 4.83-.217 6.608 1.561z" fill="#FA7B17"></path><path d="M5.843 6.426c2.86 0 5.288 1.875 6.157 4.478H.633a.629.629 0 01-.565-.908c1.08-2.12 3.26-3.57 5.775-3.57z" fill="#4285F4"></path></svg>`,
|
||||
perplexity: `<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Perplexity</title><path d="M19.785 0v7.272H22.5V17.62h-2.935V24l-7.037-6.194v6.145h-1.091v-6.152L4.392 24v-6.465H1.5V7.188h2.884V0l7.053 6.494V.19h1.09v6.49L19.786 0zm-7.257 9.044v7.319l5.946 5.234V14.44l-5.946-5.397zm-1.099-.08l-5.946 5.398v7.235l5.946-5.234V8.965zm8.136 7.58h1.844V8.349H13.46l6.105 5.54v2.655zm-8.982-8.28H2.59v8.195h1.8v-2.576l6.192-5.62zM5.475 2.476v4.71h5.115l-5.115-4.71zm13.219 0l-5.115 4.71h5.115v-4.71z" fill="#22B8CD" fill-rule="nonzero"></path></svg>`,
|
||||
// Official Pi mark used by https://github.com/earendil-works/pi README.
|
||||
pi: `<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 800 800" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Pi</title><path fill="currentColor" fill-rule="evenodd" d="M165.29 165.29H517.36V400H400V517.36H282.65V634.72H165.29ZM282.65 282.65V400H400V282.65Z"/><path fill="currentColor" d="M517.36 400H634.72V634.72H517.36Z"/></svg>`,
|
||||
pi: `<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 800 800" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Pi</title><path fill="#F09082" d="M165.29 165.29H517.36V400H400V282.65H165.29Z"/><path fill="#4D9ABF" d="M165.29 282.65H282.65V400H400V517.36H282.65V634.72H165.29Z"/><path fill="#F1BE58" d="M517.36 400H634.72V634.72H517.36Z"/></svg>`,
|
||||
qwen: `<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Qwen</title><path d="M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z" fill="url(#lobe-icons-qwen-fill)" fill-rule="nonzero"></path><defs><linearGradient id="lobe-icons-qwen-fill" x1="0%" x2="100%" y1="0%" y2="0%"><stop offset="0%" stop-color="#6336E7" stop-opacity=".84"></stop><stop offset="100%" stop-color="#6F69F7" stop-opacity=".84"></stop></linearGradient></defs></svg>`,
|
||||
soleapi: `<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" style="flex:none;line-height:1" viewBox="0 0 417 417"><title>SoleAPI</title><path fill="currentColor" d="M213 22C227 20 250 34 263 40C274 45 285 51 296 56C306 61 316 65 327 71C333 74 338 82 330 88C325 90 319 90 314 91C301 94 288 97 275 99C267 101 259 102 250 105C243 107 237 111 230 115L212 125C199 132 186 140 174 147C166 151 158 156 150 161C148 162 146 164 144 165C141 168 139 172 138 177C137 183 137 199 137 207L137 250C137 257 138 263 133 269C128 277 115 276 107 274C99 272 92 268 85 266C73 261 60 257 50 249C45 245 41 239 41 232C40 226 40 221 40 215L40 186L40 155C40 147 40 139 41 130C44 108 65 99 83 90C99 81 115 72 131 63L175 39L189 32C197 27 203 23 213 22Z"/><path fill="currentColor" d="M204 395C190 397 167 384 154 377C143 372 132 367 121 362C111 357 101 353 90 347C84 343 79 336 87 329C92 327 98 327 103 326C116 323 129 321 142 318C150 316 158 316 167 313C174 310 180 306 187 303L205 292C218 285 231 278 243 271C251 266 259 261 267 257C269 256 271 254 273 252C276 249 278 245 279 241C280 235 280 218 280 211L280 168C280 161 279 154 284 148C289 141 302 141 310 143C318 145 325 149 332 152C344 157 357 161 367 168C372 172 376 179 376 185C377 191 377 197 377 203L377 232L377 263C377 271 377 279 376 287C373 310 352 318 334 328C318 337 302 346 286 354L242 378L228 386C220 391 214 394 204 395Z"/></svg>`,
|
||||
stability: `<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Stability</title><path d="M7.223 21c4.252 0 7.018-2.22 7.018-5.56 0-2.59-1.682-4.236-4.69-4.918l-1.93-.571c-1.694-.375-2.683-.825-2.45-1.975.194-.957.773-1.497 2.122-1.497 4.285 0 5.873 1.497 5.873 1.497v-3.6S11.62 3 7.293 3C3.213 3 1 5.07 1 8.273c0 2.59 1.534 4.097 4.645 4.812l.334.083c.473.144 1.112.335 1.916.572 1.59.375 1.999.773 1.999 1.966 0 1.09-1.15 1.71-2.67 1.71C2.841 17.416 1 15.231 1 15.231v3.989S2.152 21 7.223 21z" fill="url(#lobe-icons-stability-fill)"></path><path d="M20.374 20.73c1.505 0 2.626-1.073 2.626-2.526 0-1.484-1.089-2.526-2.626-2.526-1.505 0-2.594 1.042-2.594 2.526 0 1.484 1.089 2.526 2.594 2.526z" fill="#E80000"></path><defs><linearGradient id="lobe-icons-stability-fill" x1="50%" x2="50%" y1="0%" y2="100%"><stop offset="0%" stop-color="#9D39FF"></stop><stop offset="100%" stop-color="#A380FF"></stop></linearGradient></defs></svg>`,
|
||||
|
||||
@@ -3,14 +3,20 @@ import { describe, expect, it } from "vitest";
|
||||
import { getIcon, hasIcon } from "@/icons/extracted";
|
||||
|
||||
describe("Pi icon", () => {
|
||||
it("uses the official README mark", () => {
|
||||
it("uses the official three-color pi.dev mark", () => {
|
||||
const icon = getIcon("pi");
|
||||
|
||||
expect(hasIcon("pi")).toBe(true);
|
||||
expect(icon).toContain('viewBox="0 0 800 800"');
|
||||
expect(icon).toContain(
|
||||
"M165.29 165.29H517.36V400H400V517.36H282.65V634.72H165.29Z",
|
||||
'fill="#F09082" d="M165.29 165.29H517.36V400H400V282.65H165.29Z"',
|
||||
);
|
||||
expect(icon).toContain("M517.36 400H634.72V634.72H517.36Z");
|
||||
expect(icon).toContain(
|
||||
'fill="#4D9ABF" d="M165.29 282.65H282.65V400H400V517.36H282.65V634.72H165.29Z"',
|
||||
);
|
||||
expect(icon).toContain(
|
||||
'fill="#F1BE58" d="M517.36 400H634.72V634.72H517.36Z"',
|
||||
);
|
||||
expect(icon).not.toContain("currentColor");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user