Skip to content

Commit

Permalink
🔀 Merge pull request Lissy93#1423 from stinkybernie/update-simple-icons
Browse files Browse the repository at this point in the history
Update 'simple-icons' from v7.19.0 to v10.4.0
Fixes Lissy93#1254
  • Loading branch information
Lissy93 authored Apr 29, 2024
2 parents d92ae25 + c3aa2b5 commit 5854db4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"register-service-worker": "^1.7.2",
"remedial": "^1.0.8",
"rss-parser": "3.13.0",
"simple-icons": "^10.4.0",
"rsup-progress": "^3.2.0",
"simple-icons": "^7.19.0",
"v-jsoneditor": "^1.4.5",
"v-tooltip": "^2.1.3",
"vue": "^2.7.0",
Expand Down
7 changes: 4 additions & 3 deletions src/components/LinkItems/ItemIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@
</template>

<script>
import simpleIcons from 'simple-icons';
import BrokenImage from '@/assets/interface-icons/broken-icon.svg';
import ErrorHandler from '@/utils/ErrorHandler';
import EmojiUnicodeRegex from '@/utils/EmojiUnicodeRegex';
import emojiLookup from '@/utils/emojis.json';
import { asciiHash } from '@/utils/MiscHelpers';
import { faviconApi as defaultFaviconApi, faviconApiEndpoints, iconCdns } from '@/utils/defaults';
const simpleicons = require('simple-icons');
export default {
name: 'Icon',
props: {
Expand Down Expand Up @@ -186,8 +187,8 @@ export default {
},
/* Returns the SVG path content */
getSimpleIcon(img) {
const imageName = img.replace('si-', '');
const icon = simpleIcons.Get(imageName);
const imageName = img.charAt(3).toUpperCase() + img.slice(4);
const icon = simpleicons[`si${imageName}`];
if (!icon) {
this.imageNotFound(`No icon was found for '${imageName}' in Simple Icons`);
return null;
Expand Down

0 comments on commit 5854db4

Please sign in to comment.