Skip to content

Commit

Permalink
feat: 增加内置彩色图标 shout out to @ccc63
Browse files Browse the repository at this point in the history
  • Loading branch information
xream committed Jan 17, 2024
1 parent c6eddd0 commit 0abd389
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 11 deletions.
Binary file added src/assets/icons/clash_color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/clashmeta_color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/loon_color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/quanx_color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/shadowrocket_color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/sing-box_color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/stash_color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/surfboard_color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/surge_color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/v2ray_color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 22 additions & 9 deletions src/components/ArtifactsListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,20 @@ import clashMetaIcon from '@/assets/icons/clashmeta.png';
import loonIcon from '@/assets/icons/loon.png';
import quanxIcon from '@/assets/icons/quanx.png';
import shadowRocketIcon from '@/assets/icons/shadowrocket.png';
import surfboardIcon from '@/assets/icons/surfboard.png';
import stashIcon from '@/assets/icons/stash.png';
import surgeIcon from '@/assets/icons/surge.png';
import v2rayIcon from '@/assets/icons/v2ray.png';
import singboxColorIcon from '@/assets/icons/sing-box_color.png';
import clashColorIcon from '@/assets/icons/clash_color.png';
import clashMetaColorIcon from '@/assets/icons/clashmeta_color.png';
import loonColorIcon from '@/assets/icons/loon_color.png';
import quanxColorIcon from '@/assets/icons/quanx_color.png';
import shadowRocketColorIcon from '@/assets/icons/shadowrocket_color.png';
import surfboardColorIcon from '@/assets/icons/surfboard_color.png';
import stashColorIcon from '@/assets/icons/stash_color.png';
import surgeColorIcon from '@/assets/icons/surge_color.png';
import v2rayColorIcon from '@/assets/icons/v2ray_color.png';
import { useAppNotifyStore } from '@/store/appNotify';
import { useArtifactsStore } from '@/store/artifacts';
import { useSubsStore } from '@/store/subs';
Expand Down Expand Up @@ -179,23 +190,25 @@ const icon = computed(() => {
}
switch (platform) {
case 'Surge':
return surgeIcon;
return isIconColor.value ? surgeColorIcon: surgeIcon;
case 'QX':
return quanxIcon;
return isIconColor.value ? quanxColorIcon: quanxIcon;
case 'Loon':
return loonIcon;
return isIconColor.value ? loonColorIcon: loonIcon;
case 'Clash':
return clashIcon;
return isIconColor.value ? clashColorIcon: clashIcon;
case 'ClashMeta':
return clashMetaIcon;
return isIconColor.value ? clashMetaColorIcon: clashMetaIcon;
case 'Stash':
return stashIcon;
return isIconColor.value ? stashColorIcon: stashIcon;
case 'ShadowRocket':
return shadowRocketIcon;
return isIconColor.value ? shadowRocketColorIcon: shadowRocketIcon;
case 'V2Ray':
return v2rayIcon;
return isIconColor.value ? v2rayColorIcon: v2rayIcon;
case 'sing-box':
return singboxIcon;
return isIconColor.value ? singboxColorIcon: singboxIcon;
case 'Surfboard':
return isIconColor.value ? surfboardColorIcon: surfboardIcon;
default:
return logoIcon;
}
Expand Down
1 change: 0 additions & 1 deletion src/components/FileListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
/>
<nut-avatar
v-else
class="sub-item-customer-icon"
:size="isSimpleMode ? '36' : '48'"
:url="icon"
bg-color=""
Expand Down
1 change: 0 additions & 1 deletion src/components/SubListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
/>
<nut-avatar
v-else
class="sub-item-customer-icon"
:size="isSimpleMode ? '36' : '48'"
:url="icon"
bg-color=""
Expand Down

0 comments on commit 0abd389

Please sign in to comment.