1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-09-11 13:13:59 +03:00

Different versions of vs profile use different icon to differentiate

This commit is contained in:
Liangcheng Juves 2022-05-15 14:48:58 +08:00
parent a5fb726206
commit fa2bbe39c4
5 changed files with 12 additions and 2 deletions

View File

@ -1 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 96 95.51"><defs><style>.a{fill:#fff;}.a,.h{fill-rule:evenodd;}.b{mask:url(#a);}.c{fill:#52218a;}.d{fill:#6c33af;}.e{fill:#854cc7;}.f{fill:#b179f1;}.g{opacity:0.25;}.h{fill:url(#b);}</style><mask id="a" x="0" y="0" width="96" height="95.51" maskUnits="userSpaceOnUse"><g transform="translate(0 -0.25)"><path class="a" d="M68.89,95.6a6,6,0,0,0,3.93-.44L92.6,85.65A6,6,0,0,0,96,80.24V15.76a6,6,0,0,0-3.4-5.41L72.82.84A6,6,0,0,0,68.34.55,6,6,0,0,0,66,2L34.12,37.26,15.5,22l-1.63-1.4a4,4,0,0,0-3.61-.83,2.55,2.55,0,0,0-.53.18L2.46,23A4,4,0,0,0,0,26.37c0,.1,0,.2,0,.3V69.33c0,.1,0,.2,0,.3A4,4,0,0,0,2.46,73l7.27,3a2.55,2.55,0,0,0,.53.18,4,4,0,0,0,3.61-.83L15.5,74,34.12,58.74,66,94A6,6,0,0,0,68.89,95.6ZM72,27.68,47.21,48,72,68.32ZM12,34.27,24.41,48,12,61.73Z"></path></g></mask><linearGradient id="b" x1="48" y1="97.75" x2="48" y2="2.25" gradientTransform="matrix(1, 0, 0, -1, 0, 98)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"></stop><stop offset="1" stop-color="#fff" stop-opacity="0"></stop></linearGradient></defs><title>BrandVisualStudioWin2019</title><g class="b"><path class="c" d="M13.87,75.4a4,4,0,0,1-4.14.65L2.46,73A4,4,0,0,1,0,69.33V26.67A4,4,0,0,1,2.46,23l7.27-3a4,4,0,0,1,4.14.65L15.5,22A2.21,2.21,0,0,0,12,23.8V72.2A2.21,2.21,0,0,0,15.5,74Z" transform="translate(0 -0.25)"></path><path class="d" d="M2.46,73A4,4,0,0,1,0,69.33V69a2.31,2.31,0,0,0,4,1.55L66,2A6,6,0,0,1,72.82.84L92.6,10.36A6,6,0,0,1,96,15.77V16a3.79,3.79,0,0,0-6.19-2.93L15.5,74l-1.63,1.4a4,4,0,0,1-4.14.65Z" transform="translate(0 -0.25)"></path><path class="e" d="M2.46,23A4,4,0,0,0,0,26.67V27a2.31,2.31,0,0,1,4-1.55L66,94a6,6,0,0,0,6.82,1.16L92.6,85.64A6,6,0,0,0,96,80.23V80a3.79,3.79,0,0,1-6.19,2.93L15.5,22l-1.63-1.4A4,4,0,0,0,9.73,20Z" transform="translate(0 -0.25)"></path><path class="f" d="M72.82,95.16A6,6,0,0,1,66,94a3.52,3.52,0,0,0,6-2.49v-87A3.52,3.52,0,0,0,66,2,6,6,0,0,1,72.82.84L92.6,10.35A6,6,0,0,1,96,15.76V80.24a6,6,0,0,1-3.4,5.41Z" transform="translate(0 -0.25)"></path><g class="g"><path class="h" d="M68.89,95.6a6,6,0,0,0,3.93-.44L92.6,85.65A6,6,0,0,0,96,80.24V15.76a6,6,0,0,0-3.4-5.41L72.82.84A6,6,0,0,0,68.34.55,6,6,0,0,0,66,2L34.12,37.26,15.5,22l-1.63-1.4a4,4,0,0,0-3.61-.83,2.55,2.55,0,0,0-.53.18L2.46,23A4,4,0,0,0,0,26.37c0,.1,0,.2,0,.3V69.33c0,.1,0,.2,0,.3A4,4,0,0,0,2.46,73l7.27,3a2.55,2.55,0,0,0,.53.18,4,4,0,0,0,3.61-.83L15.5,74,34.12,58.74,66,94A6,6,0,0,0,68.89,95.6ZM72,27.68,47.21,48,72,68.32ZM12,34.27,24.41,48,12,61.73Z" transform="translate(0 -0.25)"></path></g></g></svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -0,0 +1 @@
<svg width="57.04" height="57.04" color-interpolation-filters="sRGB" viewBox="0 0 42.78 42.78" xmlns="http://www.w3.org/2000/svg" fill="none" fill-rule="evenodd" font-size="12" overflow="visible" stroke-linecap="square" stroke-miterlimit="3"><g transform="translate(-1.5 -1.5)"><g transform="translate(1.5 -1.5)"><path d="M32.08 3v36.74L0 34.97l32.08 10.81 10.7-4.45V7.45zM11.02 23.58l9.83 9.72 5.88-2.5V11.74l-5.88-2.5-9.83 9.72-5.91-4.46-2.44.82v11.9l2.44.82zm9.83-7.41v10.2l-6.76-5.1zM5.11 17.73l3.58 3.54-3.58 3.54z" fill="#5c2d91"/></g></g></svg>

After

Width:  |  Height:  |  Size: 551 B

View File

@ -0,0 +1 @@
<svg viewBox="0 0 96 95.503" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="1652546395" x1="48" x2="48" y1="97.75" y2="2.25" gradientTransform="matrix(1 0 0 -1 0 98)" gradientUnits="userSpaceOnUse"><stop stop-color="#fff" offset="0"/><stop stop-color="#fff" stop-opacity="0" offset="1"/></linearGradient><mask id="1652546356" x="0" y="0" width="96" height="95.51" maskUnits="userSpaceOnUse"><path transform="translate(0 -.25)" d="M68.89 95.6a6 6 0 003.93-.44l19.78-9.51a6 6 0 003.4-5.41V15.76a6 6 0 00-3.4-5.41L72.82.84a6 6 0 00-4.48-.29A6 6 0 0066 2L34.12 37.26 15.5 22l-1.63-1.4a4 4 0 00-3.61-.83 2.55 2.55 0 00-.53.18L2.46 23A4 4 0 000 26.37v43.26A4 4 0 002.46 73l7.27 3a2.55 2.55 0 00.53.18 4 4 0 003.61-.83L15.5 74l18.62-15.26L66 94a6 6 0 002.89 1.6zM72 27.68L47.21 48 72 68.32zm-60 6.59L24.41 48 12 61.73z" fill="#fff" fill-rule="evenodd"/></mask></defs><g transform="translate(0 .002)" mask="url(#1652546356)"><path d="M13.87 75.15a4 4 0 01-4.14.65l-7.27-3.05A4 4 0 010 69.08V26.42a4 4 0 012.46-3.67l7.27-3a4 4 0 014.14.65l1.63 1.35a2.21 2.21 0 00-3.5 1.8v48.4a2.21 2.21 0 003.5 1.8z" fill="#52218a"/><path d="M2.46 72.75A4 4 0 010 69.08v-.33a2.31 2.31 0 004 1.55L66 1.75A6 6 0 0172.82.59l19.78 9.52a6 6 0 013.4 5.41v.23a3.79 3.79 0 00-6.19-2.93L15.5 73.75l-1.63 1.4a4 4 0 01-4.14.65z" fill="#6c33af"/><path d="M2.46 22.75A4 4 0 000 26.42v.33a2.31 2.31 0 014-1.55l62 68.55a6 6 0 006.82 1.16l19.78-9.52a6 6 0 003.4-5.41v-.23a3.79 3.79 0 01-6.19 2.93L15.5 21.75l-1.63-1.4a4 4 0 00-4.14-.6z" fill="#854cc7"/><path d="M72.82 94.91A6 6 0 0166 93.75a3.52 3.52 0 006-2.49v-87a3.52 3.52 0 00-6-2.51A6 6 0 0172.82.59L92.6 10.1a6 6 0 013.4 5.41v64.48a6 6 0 01-3.4 5.41z" fill="#b179f1"/><path transform="translate(0 -.25)" d="M68.89 95.6a6 6 0 003.93-.44l19.78-9.51a6 6 0 003.4-5.41V15.76a6 6 0 00-3.4-5.41L72.82.84a6 6 0 00-4.48-.29A6 6 0 0066 2L34.12 37.26 15.5 22l-1.63-1.4a4 4 0 00-3.61-.83 2.55 2.55 0 00-.53.18L2.46 23A4 4 0 000 26.37v43.26A4 4 0 002.46 73l7.27 3a2.55 2.55 0 00.53.18 4 4 0 003.61-.83L15.5 74l18.62-15.26L66 94a6 6 0 002.89 1.6zM72 27.68L47.21 48 72 68.32zm-60 6.59L24.41 48 12 61.73z" fill="url(#1652546395)" fill-rule="evenodd" opacity=".25"/></g></svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@ -5,6 +5,14 @@ import { HostAppService, Platform } from 'tabby-core'
import { ShellProvider, Shell } from '../api'
/* eslint-disable quote-props */
const vsIconMap: Record<string, string> = {
'2017': require('../icons/vs2017.svg'),
'2019': require('../icons/vs2019.svg'),
'2022': require('../icons/vs2022.svg'),
}
/* eslint-enable quote-props */
/** @hidden */
@Injectable()
export class VSDevToolsProvider extends ShellProvider {
@ -40,7 +48,7 @@ export class VSDevToolsProvider extends ShellProvider {
name: `Developer Prompt for VS ${version}`,
command: 'cmd.exe',
args: ['/k', bat],
icon: require('../icons/vs.svg'),
icon: vsIconMap[version],
env: {},
})
}