From ff218eb79a9cc6b64273d7fb9a61fdf006b8b4c4 Mon Sep 17 00:00:00 2001 From: litesun <7sunmiao@gmail.com> Date: Tue, 23 Mar 2021 11:36:16 +0800 Subject: [PATCH 1/2] feat: update menuicon --- web/src/helpers.tsx | 9 +++--- web/src/libs/iconfont.js | 68 +++++++++++++++++++++------------------- 2 files changed, 40 insertions(+), 37 deletions(-) diff --git a/web/src/helpers.tsx b/web/src/helpers.tsx index 44fb0d847b..1b66d50dbd 100644 --- a/web/src/helpers.tsx +++ b/web/src/helpers.tsx @@ -17,6 +17,7 @@ import React from 'react'; import { notification } from 'antd'; import type { MenuDataItem } from '@ant-design/pro-layout'; +import { InfoCircleOutlined } from '@ant-design/icons'; import { history } from 'umi'; import moment from 'moment'; import YAML from 'yaml'; @@ -45,17 +46,17 @@ export const getMenuData = (): MenuDataItem[] => { { name: 'service', path: '/service/list', - icon: , + icon: , }, { name: 'consumer', path: '/consumer/list', - icon: , + icon: , }, { name: 'plugin', path: '/plugin/list', - icon: , + icon: , }, { name: 'ssl', @@ -65,7 +66,7 @@ export const getMenuData = (): MenuDataItem[] => { { name: 'serverinfo', path: '/serverinfo', - icon: , + icon: , }, ]; }; diff --git a/web/src/libs/iconfont.js b/web/src/libs/iconfont.js index a470a7dfd5..1ebe71a4c5 100644 --- a/web/src/libs/iconfont.js +++ b/web/src/libs/iconfont.js @@ -22,64 +22,66 @@ * SOFTWARE. */ /* eslint-disable */ -!(function (l) { - var c, + +!(function (c) { + var l, h, - t, a, + t, i, - e, - z = - '', - p = (p = document.getElementsByTagName('script'))[p.length - 1].getAttribute('data-injectcss'); - if (p && !l.__iconfont__svg__cssinject__) { - l.__iconfont__svg__cssinject__ = !0; + z, + o = + '', + s = (s = document.getElementsByTagName('script'))[s.length - 1].getAttribute('data-injectcss'); + if (s && !c.__iconfont__svg__cssinject__) { + c.__iconfont__svg__cssinject__ = !0; try { document.write( '', ); - } catch (l) { - console && console.log(l); + } catch (c) { + console && console.log(c); } } - function o() { - i || ((i = !0), t()); + + function e() { + i || ((i = !0), a()); } - (c = function () { - var l, c, h, t; - ((t = document.createElement('div')).innerHTML = z), - (z = null), - (h = t.getElementsByTagName('svg')[0]) && + (l = function () { + var c, l, h, a; + ((a = document.createElement('div')).innerHTML = o), + (o = null), + (h = a.getElementsByTagName('svg')[0]) && (h.setAttribute('aria-hidden', 'true'), (h.style.position = 'absolute'), (h.style.width = 0), (h.style.height = 0), (h.style.overflow = 'hidden'), - (l = h), - (c = document.body).firstChild - ? ((t = l), (h = c.firstChild).parentNode.insertBefore(t, h)) - : c.appendChild(l)); + (c = h), + (l = document.body).firstChild + ? ((a = c), (h = l.firstChild).parentNode.insertBefore(a, h)) + : l.appendChild(c)); }), document.addEventListener ? ~['complete', 'loaded', 'interactive'].indexOf(document.readyState) - ? setTimeout(c, 0) + ? setTimeout(l, 0) : ((h = function () { - document.removeEventListener('DOMContentLoaded', h, !1), c(); + document.removeEventListener('DOMContentLoaded', h, !1), l(); }), document.addEventListener('DOMContentLoaded', h, !1)) : document.attachEvent && - ((t = c), - (a = l.document), + ((a = l), + (t = c.document), (i = !1), - (e = function () { + (z = function () { try { - a.documentElement.doScroll('left'); - } catch (l) { - return void setTimeout(e, 50); + t.documentElement.doScroll('left'); + } catch (c) { + return void setTimeout(z, 50); } - o(); + e(); })(), - (a.onreadystatechange = function () { - 'complete' == a.readyState && ((a.onreadystatechange = null), o()); + (t.onreadystatechange = function () { + 'complete' == t.readyState && ((t.onreadystatechange = null), e()); })); })(window); From f801aa1f669959fd8c312729dc9b6e395a0d0b50 Mon Sep 17 00:00:00 2001 From: litesun <7sunmiao@gmail.com> Date: Tue, 23 Mar 2021 15:37:03 +0800 Subject: [PATCH 2/2] feat: update consumer icon --- web/src/helpers.tsx | 2 +- web/src/libs/iconfont.js | 51 ++++++++++++++++++++-------------------- 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/web/src/helpers.tsx b/web/src/helpers.tsx index 1b66d50dbd..50e076945e 100644 --- a/web/src/helpers.tsx +++ b/web/src/helpers.tsx @@ -51,7 +51,7 @@ export const getMenuData = (): MenuDataItem[] => { { name: 'consumer', path: '/consumer/list', - icon: , + icon: , }, { name: 'plugin', diff --git a/web/src/libs/iconfont.js b/web/src/libs/iconfont.js index 1ebe71a4c5..324d144048 100644 --- a/web/src/libs/iconfont.js +++ b/web/src/libs/iconfont.js @@ -23,65 +23,64 @@ */ /* eslint-disable */ -!(function (c) { - var l, +!(function (l) { + var c, h, a, t, i, z, - o = - '', - s = (s = document.getElementsByTagName('script'))[s.length - 1].getAttribute('data-injectcss'); - if (s && !c.__iconfont__svg__cssinject__) { - c.__iconfont__svg__cssinject__ = !0; + e = + '', + o = (o = document.getElementsByTagName('script'))[o.length - 1].getAttribute('data-injectcss'); + if (o && !l.__iconfont__svg__cssinject__) { + l.__iconfont__svg__cssinject__ = !0; try { document.write( '', ); - } catch (c) { - console && console.log(c); + } catch (l) { + console && console.log(l); } } - - function e() { + function m() { i || ((i = !0), a()); } - (l = function () { - var c, l, h, a; - ((a = document.createElement('div')).innerHTML = o), - (o = null), + (c = function () { + var l, c, h, a; + ((a = document.createElement('div')).innerHTML = e), + (e = null), (h = a.getElementsByTagName('svg')[0]) && (h.setAttribute('aria-hidden', 'true'), (h.style.position = 'absolute'), (h.style.width = 0), (h.style.height = 0), (h.style.overflow = 'hidden'), - (c = h), - (l = document.body).firstChild - ? ((a = c), (h = l.firstChild).parentNode.insertBefore(a, h)) - : l.appendChild(c)); + (l = h), + (c = document.body).firstChild + ? ((a = l), (h = c.firstChild).parentNode.insertBefore(a, h)) + : c.appendChild(l)); }), document.addEventListener ? ~['complete', 'loaded', 'interactive'].indexOf(document.readyState) - ? setTimeout(l, 0) + ? setTimeout(c, 0) : ((h = function () { - document.removeEventListener('DOMContentLoaded', h, !1), l(); + document.removeEventListener('DOMContentLoaded', h, !1), c(); }), document.addEventListener('DOMContentLoaded', h, !1)) : document.attachEvent && - ((a = l), - (t = c.document), + ((a = c), + (t = l.document), (i = !1), (z = function () { try { t.documentElement.doScroll('left'); - } catch (c) { + } catch (l) { return void setTimeout(z, 50); } - e(); + m(); })(), (t.onreadystatechange = function () { - 'complete' == t.readyState && ((t.onreadystatechange = null), e()); + 'complete' == t.readyState && ((t.onreadystatechange = null), m()); })); })(window);