⬆️ - Updated 'simple-icons' from v7.19.0 to v10.4.0 and update API calls

This commit is contained in:
Michael D 2023-12-29 11:50:34 -08:00
parent fd658689e3
commit 69caa99c90
3 changed files with 1954 additions and 1665 deletions

View File

@ -30,8 +30,9 @@
"keycloak-js": "^20.0.3", "keycloak-js": "^20.0.3",
"register-service-worker": "^1.7.2", "register-service-worker": "^1.7.2",
"remedial": "^1.0.8", "remedial": "^1.0.8",
"rss-parser": "3.13.0",
"rsup-progress": "^3.0.0", "rsup-progress": "^3.0.0",
"simple-icons": "^7.19.0", "simple-icons": "^10.4.0",
"v-jsoneditor": "^1.4.5", "v-jsoneditor": "^1.4.5",
"v-tooltip": "^2.1.3", "v-tooltip": "^2.1.3",
"vue": "^2.7.0", "vue": "^2.7.0",
@ -43,8 +44,7 @@
"vue-select": "^3.20.2", "vue-select": "^3.20.2",
"vue-swatches": "^2.1.1", "vue-swatches": "^2.1.1",
"vue-toasted": "^1.1.28", "vue-toasted": "^1.1.28",
"vuex": "^3.6.2", "vuex": "^3.6.2"
"rss-parser": "3.13.0"
}, },
"devDependencies": { "devDependencies": {
"@architect/sandbox": "^4.5.2", "@architect/sandbox": "^4.5.2",

View File

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

3606
yarn.lock

File diff suppressed because it is too large Load Diff