@flowfuse/nr-theme 1.10.0 → 1.10.1-257fe91-202605131145.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/theme/common/forge-common.css +108 -0
- package/lib/theme/common/forge-common.js +125 -0
- package/lib/theme/forge-dark/forge-dark-custom.css +2 -0
- package/lib/theme/forge-dark/forge-dark-custom.js +1 -0
- package/lib/theme/forge-dark/forge-dark-monaco.json +213 -0
- package/lib/theme/forge-dark/forge-dark-theme.css +12 -0
- package/lib/theme/forge-dark/forge-dark.js +61 -0
- package/lib/theme/forge-light/forge-light-custom.css +2 -0
- package/lib/theme/forge-light/forge-light-custom.js +1 -0
- package/lib/theme/forge-light/forge-light-monaco.json +227 -0
- package/lib/theme/forge-light/forge-light-theme.css +12 -0
- package/lib/theme/forge-light/forge-light.js +62 -0
- package/package.json +1 -1
- package/resources/favicon-16x16.png +0 -0
- package/resources/favicon-32x32.png +0 -0
- package/resources/favicon.ico +0 -0
- package/resources/ff-nr.png +0 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
|
|
2
|
+
/* Replace the header image using CSS trick https://css-tricks.com/replace-the-image-in-an-img-with-css/ */
|
|
3
|
+
#red-ui-header span.red-ui-header-logo img { /* header img */
|
|
4
|
+
display: inline-block;
|
|
5
|
+
-moz-box-sizing: border-box;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIyIiBoZWlnaHQ9IjIyMiIgdmlld0JveD0iMCAwIDIyMiAyMjIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xMjIuNCAxMzQuMUMxNDUuMSAxNDMuNyAxNjYuOSAxNTUuMSAxOTAuNCAxNjAuNEMyMDAuOSAxNjIuMSAyMTEuNSAxNjMgMjIxLjkgMTYzVjEwNS4ySDIxMy4yQzE4MSAxMDUuMiAxNTEuMiAxMjEuOSAxMjIuNCAxMzQuMVoiIGZpbGw9IiNEQTNEMEIiLz4KPHBhdGggZD0iTTU1LjMgMTUyLjVDNDQuOCAxNTEuNiAzNC4zIDE1MS42IDIzLjkgMTUxLjZIMFYyMDQuN0MwIDIxNC4zIDcuOCAyMjIgMTcuMyAyMjJIMjA0LjZDMjE0LjIgMjIyIDIyMS45IDIxNC4yIDIyMS45IDIwNC43VjE5OEMxOTkuMiAxOTggMTc1LjYgMTk1LjEgMTU0LjYgMTg2LjNDMTIxLjYgMTc1IDkxLjEgMTUzLjQgNTUuMyAxNTIuNVoiIGZpbGw9IiNEQTNEMEIiLz4KPHBhdGggZD0iTTIwNC43IDBIMTcuM0M3LjggMCAwIDcuOCAwIDE3LjRWMTE1LjhDMjEgMTE1LjggNDMuMSAxMTYuNyA2NCAxMTQuOUM5Mi44IDExMi4zIDExOC4xIDk2LjUgMTQ1LjEgODZDMTY5LjUgNzUuNSAxOTUuOCA2OS40IDIyMiA3MC4yVjE3LjRDMjIyIDcuOCAyMTQuMiAwIDIwNC43IDBaIiBmaWxsPSIjREEzRDBCIi8+CjxwYXRoIGQ9Ik0yMjIgMTA1LjJWNzAuMkMxOTUuOCA2OS4zIDE2OS42IDc1LjUgMTQ1LjEgODZDMTE4IDk2LjUgOTIuOCAxMTIuMyA2NCAxMTQuOUM0My4xIDExNi43IDIxIDExNS44IDAgMTE1LjhWMTUxLjdIMjMuOUMzNC4zIDE1MS43IDQ0LjggMTUxLjcgNTUuMyAxNTIuNkM5MS4xIDE1My41IDEyMS42IDE3NS4xIDE1NC43IDE4Ni40QzE3NS43IDE5NS4yIDE5OS4zIDE5OC4xIDIyMiAxOTguMVYxNjMuMUMyMTEuNiAxNjMuMSAyMDAuOSAxNjIuMiAxOTAuNSAxNjAuNUMxNjYuOSAxNTUuMiAxNDUuMiAxNDMuOSAxMjIuNSAxMzQuMkMxNTEuMyAxMjEuOSAxODEuMSAxMDUuMyAyMTMuMyAxMDUuM0wyMjIgMTA1LjJaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K) no-repeat;
|
|
8
|
+
width: 26px;
|
|
9
|
+
height: 26px;
|
|
10
|
+
padding-left: 26px;
|
|
11
|
+
background-size: contain;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* Replace the login image using CSS trick https://css-tricks.com/replace-the-image-in-an-img-with-css/ */
|
|
15
|
+
#node-dialog-login-image { /* login img */
|
|
16
|
+
display: block;
|
|
17
|
+
-moz-box-sizing: border-box;
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIyIiBoZWlnaHQ9IjIyMiIgdmlld0JveD0iMCAwIDIyMiAyMjIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xMjIuNCAxMzQuMUMxNDUuMSAxNDMuNyAxNjYuOSAxNTUuMSAxOTAuNCAxNjAuNEMyMDAuOSAxNjIuMSAyMTEuNSAxNjMgMjIxLjkgMTYzVjEwNS4ySDIxMy4yQzE4MSAxMDUuMiAxNTEuMiAxMjEuOSAxMjIuNCAxMzQuMVoiIGZpbGw9IiNEQTNEMEIiLz4KPHBhdGggZD0iTTU1LjMgMTUyLjVDNDQuOCAxNTEuNiAzNC4zIDE1MS42IDIzLjkgMTUxLjZIMFYyMDQuN0MwIDIxNC4zIDcuOCAyMjIgMTcuMyAyMjJIMjA0LjZDMjE0LjIgMjIyIDIyMS45IDIxNC4yIDIyMS45IDIwNC43VjE5OEMxOTkuMiAxOTggMTc1LjYgMTk1LjEgMTU0LjYgMTg2LjNDMTIxLjYgMTc1IDkxLjEgMTUzLjQgNTUuMyAxNTIuNVoiIGZpbGw9IiNEQTNEMEIiLz4KPHBhdGggZD0iTTIwNC43IDBIMTcuM0M3LjggMCAwIDcuOCAwIDE3LjRWMTE1LjhDMjEgMTE1LjggNDMuMSAxMTYuNyA2NCAxMTQuOUM5Mi44IDExMi4zIDExOC4xIDk2LjUgMTQ1LjEgODZDMTY5LjUgNzUuNSAxOTUuOCA2OS40IDIyMiA3MC4yVjE3LjRDMjIyIDcuOCAyMTQuMiAwIDIwNC43IDBaIiBmaWxsPSIjREEzRDBCIi8+CjxwYXRoIGQ9Ik0yMjIgMTA1LjJWNzAuMkMxOTUuOCA2OS4zIDE2OS42IDc1LjUgMTQ1LjEgODZDMTE4IDk2LjUgOTIuOCAxMTIuMyA2NCAxMTQuOUM0My4xIDExNi43IDIxIDExNS44IDAgMTE1LjhWMTUxLjdIMjMuOUMzNC4zIDE1MS43IDQ0LjggMTUxLjcgNTUuMyAxNTIuNkM5MS4xIDE1My41IDEyMS42IDE3NS4xIDE1NC43IDE4Ni40QzE3NS43IDE5NS4yIDE5OS4zIDE5OC4xIDIyMiAxOTguMVYxNjMuMUMyMTEuNiAxNjMuMSAyMDAuOSAxNjIuMiAxOTAuNSAxNjAuNUMxNjYuOSAxNTUuMiAxNDUuMiAxNDMuOSAxMjIuNSAxMzQuMkMxNTEuMyAxMjEuOSAxODEuMSAxMDUuMyAyMTMuMyAxMDUuM0wyMjIgMTA1LjJaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K) no-repeat;
|
|
20
|
+
width: 170px;
|
|
21
|
+
height: 170px;
|
|
22
|
+
padding-left: 170px;
|
|
23
|
+
margin-bottom: 14px;
|
|
24
|
+
background-size: 170px 170px;
|
|
25
|
+
}
|
|
26
|
+
#node-dialog-login > div:nth-child(1) { /* parent of login img */
|
|
27
|
+
width: 170px !important;
|
|
28
|
+
}
|
|
29
|
+
#node-dialog-login { /* parent of parent of login img */
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: row;
|
|
32
|
+
align-items: flex-end;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* Size up header to emulate FF */
|
|
36
|
+
#red-ui-header {
|
|
37
|
+
height: 60px !important;
|
|
38
|
+
padding: 8px 0px 8px 16px;
|
|
39
|
+
border-bottom: 2px solid #D12B2B !important;
|
|
40
|
+
}
|
|
41
|
+
#red-ui-main-container {
|
|
42
|
+
top: 60px !important;
|
|
43
|
+
}
|
|
44
|
+
#red-ui-header span.red-ui-header-logo {
|
|
45
|
+
margin-top: 4px;
|
|
46
|
+
}
|
|
47
|
+
#red-ui-header .red-ui-header-toolbar {
|
|
48
|
+
padding: 0px 12px 0px 12px;
|
|
49
|
+
}
|
|
50
|
+
#red-ui-header span.red-ui-header-logo img {
|
|
51
|
+
height: 26px;
|
|
52
|
+
}
|
|
53
|
+
#red-ui-header span.red-ui-header-logo span:not(:first-child) {
|
|
54
|
+
margin-left: 14px;
|
|
55
|
+
font-size: 19px !important;
|
|
56
|
+
text-transform: capitalize;
|
|
57
|
+
top: 1px;
|
|
58
|
+
position: relative;
|
|
59
|
+
font-weight: 500;
|
|
60
|
+
}
|
|
61
|
+
#red-ui-header #red-ui-header-button-user .user-profile {
|
|
62
|
+
width: 26px;
|
|
63
|
+
height: 26px;
|
|
64
|
+
}
|
|
65
|
+
#red-ui-header span.button-group {
|
|
66
|
+
top: 2px;
|
|
67
|
+
position: relative;
|
|
68
|
+
}
|
|
69
|
+
#red-ui-header .button {
|
|
70
|
+
font-size: 26px;
|
|
71
|
+
padding: 1px 6px;
|
|
72
|
+
}
|
|
73
|
+
#red-ui-header-button-sidemenu > i {
|
|
74
|
+
position: relative;
|
|
75
|
+
top: 2px;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** emulate FF menu labels */
|
|
79
|
+
#red-ui-header > ul > li:NOT(.disabled) > ul > li:NOT(.disabled) > ul > li:NOT(.disabled) > a:hover,
|
|
80
|
+
#red-ui-header > ul > li:NOT(.disabled) > ul > li:NOT(.disabled) > a:hover {
|
|
81
|
+
color: #8CE2E7 !important;
|
|
82
|
+
transition: 0.3s background-color, 0.3s color !important;
|
|
83
|
+
-webkit-transition: 0.3s background-color, 0.3s color !important;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** pimped scroll bars */
|
|
87
|
+
.red-ui-editor {
|
|
88
|
+
scrollbar-color: var(--red-ui-secondary-text-color) var(--red-ui-tertiary-background);
|
|
89
|
+
scrollbar-width: auto;
|
|
90
|
+
}
|
|
91
|
+
::-webkit-scrollbar {
|
|
92
|
+
width: 12px;
|
|
93
|
+
height: 12px;
|
|
94
|
+
}
|
|
95
|
+
::-webkit-scrollbar-corner {
|
|
96
|
+
background-color: var(--red-ui-primary-background);
|
|
97
|
+
}
|
|
98
|
+
::-webkit-scrollbar-thumb {
|
|
99
|
+
background-color: var(--red-ui-secondary-text-color);
|
|
100
|
+
border-radius: 6px;
|
|
101
|
+
border: 3px solid var(--red-ui-primary-background);
|
|
102
|
+
}
|
|
103
|
+
::-webkit-scrollbar-track {
|
|
104
|
+
background-color: var(--red-ui-primary-background);
|
|
105
|
+
}
|
|
106
|
+
::-webkit-scrollbar-thumb:hover {
|
|
107
|
+
background-color: var(--red-ui-secondary-text-color-hover);
|
|
108
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
(function () {
|
|
2
|
+
/* global RED, $ */
|
|
3
|
+
// monitorInsertion: derived from https://github.com/naugtur/insertionQuery/blob/master/insQ.min.js (MIT License Copyright (c) 2014-present Zbyszek Tenerowicz <naugtur@gmail.com>)
|
|
4
|
+
// eslint-disable-next-line
|
|
5
|
+
document.head = (document.head || document.getElementsByTagName('head')[0]);
|
|
6
|
+
// eslint-disable-next-line
|
|
7
|
+
const monitorInsertion = (function () { 'use strict'; let m = 100; let t = !1; let u = 'animationName'; let d = ''; const n = 'Webkit Moz O ms Khtml'.split(' '); let e = ''; const i = document.createElement('div'); const s = { strictlyNew: !0, timeout: 20, addImportant: !1 }; if (i.style.animationName && (t = !0), !1 === t) for (let o = 0; o < n.length; o++) if (void 0 !== i.style[n[o] + 'AnimationName']) { e = n[o], u = e + 'AnimationName', d = '-' + e.toLowerCase() + '-', t = !0; break } function c (t) { return s.strictlyNew && !0 === t.QinsQ } function r (t, n) { function e (t) { t.animationName !== o && t[u] !== o || c(t.target) || n(t.target) } let i; var o = 'insQ_' + m++; const r = s.addImportant ? ' !important' : ''; (i = document.createElement('style')).innerHTML = '@' + d + 'keyframes ' + o + ' { from { outline: 1px solid transparent } to { outline: 0px solid transparent } }\n' + t + ' { animation-duration: 0.001s' + r + '; animation-name: ' + o + r + '; ' + d + 'animation-duration: 0.001s' + r + '; ' + d + 'animation-name: ' + o + r + '; } ', document.head.appendChild(i); const a = setTimeout(function () { document.addEventListener('animationstart', e, !1), document.addEventListener('MSAnimationStart', e, !1), document.addEventListener('webkitAnimationStart', e, !1) }, s.timeout); return { destroy: function () { clearTimeout(a), i && (document.head.removeChild(i), i = null), document.removeEventListener('animationstart', e), document.removeEventListener('MSAnimationStart', e), document.removeEventListener('webkitAnimationStart', e) } } } function a (t) { t.QinsQ = !0 } function f (t) { if (t) for (a(t), t = t.firstChild; t; t = t.nextSibling) void 0 !== t && t.nodeType === 1 && f(t) } function l (t, n) { let e; let i = []; const o = function () { clearTimeout(e), e = setTimeout(function () { i.forEach(f), n(i), i = [] }, 10) }; return r(t, function (t) { if (!c(t)) { a(t); const n = (function t (n) { return c(n.parentNode) || n.nodeName === 'BODY' ? n : t(n.parentNode) }(t)); i.indexOf(n) < 0 && i.push(n), o() } }) } function v (n) { return !(!t || !n.match(/[^{}]/)) && (s.strictlyNew && f(document.body), { every: function (t) { return r(n, t) }, summary: function (t) { return l(n, t) } }) } return v.config = function (t) { for (const n in t)t.hasOwnProperty(n) && (s[n] = t[n]) }, v }()); typeof module !== 'undefined' && void 0 !== module.exports && (module.exports = monitorInsertion)
|
|
8
|
+
const context = {
|
|
9
|
+
isEmbedded: window.parent !== window.self,
|
|
10
|
+
shouldEmitInsteadOfRedirect: false
|
|
11
|
+
}
|
|
12
|
+
const navigateTo = (url) => {
|
|
13
|
+
if (context.shouldEmitInsteadOfRedirect) {
|
|
14
|
+
window.parent.postMessage({
|
|
15
|
+
type: 'navigate',
|
|
16
|
+
payload: url
|
|
17
|
+
}, '*')
|
|
18
|
+
} else {
|
|
19
|
+
window.location = url
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
const interceptLogoClick = (url) => {
|
|
23
|
+
const logoAnchor = document.querySelector('#red-ui-header > .red-ui-header-logo > a')
|
|
24
|
+
|
|
25
|
+
if (logoAnchor) {
|
|
26
|
+
logoAnchor.addEventListener(
|
|
27
|
+
'click',
|
|
28
|
+
(e) => {
|
|
29
|
+
e.preventDefault()
|
|
30
|
+
navigateTo(url)
|
|
31
|
+
})
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
const interceptLogOutClick = (url) => {
|
|
35
|
+
document.querySelector('#usermenu-item-logout')
|
|
36
|
+
.addEventListener('click', (e) => {
|
|
37
|
+
e.preventDefault()
|
|
38
|
+
e.stopPropagation()
|
|
39
|
+
if (context.shouldEmitInsteadOfRedirect) {
|
|
40
|
+
window.parent.postMessage({
|
|
41
|
+
type: 'logout'
|
|
42
|
+
}, '*')
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function changeFavicon (src) {
|
|
48
|
+
const link = document.createElement('link')
|
|
49
|
+
const oldLink = $('link[href="favicon.ico"]')[0] || $('#dynamic-favicon"]')[0]
|
|
50
|
+
link.id = 'dynamic-favicon'
|
|
51
|
+
link.rel = 'shortcut icon'
|
|
52
|
+
link.href = src
|
|
53
|
+
if (oldLink) {
|
|
54
|
+
document.head.removeChild(oldLink)
|
|
55
|
+
}
|
|
56
|
+
document.head.appendChild(link)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function handleMessage (event) {
|
|
60
|
+
if (event.data.type === 'prevent-redirect') {
|
|
61
|
+
context.shouldEmitInsteadOfRedirect = event.data.payload
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (context.isEmbedded) {
|
|
66
|
+
window.parent.postMessage({ type: 'load', payload: true }, '*')
|
|
67
|
+
window.addEventListener('message', handleMessage)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
window.addEventListener('load', (_event) => {
|
|
71
|
+
// set favicon
|
|
72
|
+
const favicon32 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADzUlEQVR4AcXB206UVxzG4d+71jcbBmYGpjJIg2iHiNYEJaSKrQe4QeMNcOaR11BP2wuwV2JvQSMkxFAiGk1Q8UCjAoJsAkgRZuZb/wJtk6YtuEN4Ht3o7f0B+AXoBhy7w4Bh4FoEXAe+Z3cJ6AauO+Ake+c7B0TsHe/YY4495thjjj0WsdvMMNaZsSHiC7MQwAwkXBSZT6eJ0ml8MmlyziK+ADODEPDJpNU0N1t9qUT94cPkWlvJNDaSzGbxqZTkHBE7yOIYeU/d/v2h2NVFc3c3De3tShcKOO/Ffynic5lhIRDV1FjhyBFr6emh+dQpMk1NTs7xPhGfyEJgQyqft6auLjt48SL7OjqUyGTER4j4CBYCmOGiyOpaWqz59GlrPXdO9W1tcomEeB8z4nLZqqurhEoFC4HI4pgtSWyQc/h02moKBWtob2f/yZNW7OxUTWOjl8R24nLZlicnbe7RI+bHxmx5fFxri4vE5bIsBKJvr1wxzLAQYlsnkLx38t58MkmUTiuZy1Hb1ERtc7PSDQ3Ie8d2zHg3N2dTd++GicFBzY+NaW1hQRbHbJLYJBF1XL3q+FPEZ7I4tsUXL+xVf79NDA7q7fi4s2pVcg4k5D3/FrEDQqVibx48CC9v3tTUyIhW5+cd6+Qc8p7tOHZAqFRs8flz5p8+ZW1hQZghiQ8RsQOiTMYd6evj4IUL9np4OLy8dYu5x49VXVkRziGJrUTjAwO2KYQYEOvknJP35hMJ+XSaVD5PuqFByWwWeS+2kC4U9M3lyzrQ02Ozo6M2PjAQpu/d08rMjKxaFRKS2CSxQb9euhTMTJgZGyQEQjIknPf4VIp0Q4PlDh2i8cQJKx4/rrqWFrkoEtuwEOz36WmbffjQ3ty/r4Vnz1hbWFB1dZVQrWIhoBu9vQEQ2zHDzMAMOUe6ULB9HR124OxZip2dSmaz4j0sBKssL7O2tGSVt2+prKwQl8tEfAgJSfzt3fy8Xt2+rck7d6y+rc1az5+3r8+cobZYdEj8HzmnZC5HMpcT/+D7SqWfAPERJCHnsBC0MjOj6ZERvR4asnczMyFRV0cqn0feiw/g+0qlnwHxiSSxYW1xUbOjo25icJD5J08slMuWqKsjUVODnBNbiNghco4N5aUlTQwOanJoyGqLRQpHj9pXx46FfKmkTLFIMpuVT6Vw3oNzROw0CXkPZlqemmJ5clIv+/uJUilLZrOk8nlL5nJEmQw+kSACYsDxBUgC79kQl8tamZ1lZWZGmPGX2AHD7BJJyDnkPfIeeX/XAdeAO0Bg9wTgN+DHPwAIHJAeMJ00fgAAAABJRU5ErkJggg=='
|
|
73
|
+
changeFavicon(favicon32)
|
|
74
|
+
|
|
75
|
+
// monitor #red-ui-header-button-sidemenu & add main menu entries
|
|
76
|
+
monitorInsertion('#red-ui-header-button-sidemenu').summary(function (_arrayOfInsertedNodes) {
|
|
77
|
+
if (!RED) { return }
|
|
78
|
+
|
|
79
|
+
RED.menu.addItem('red-ui-header-button-sidemenu', null) // menu seperator
|
|
80
|
+
// add main menu item "About FlowFuse"
|
|
81
|
+
RED.menu.addItem('red-ui-header-button-sidemenu', {
|
|
82
|
+
id: 'usermenu-item-ffsite',
|
|
83
|
+
label: 'About FlowFuse',
|
|
84
|
+
onselect: function () {
|
|
85
|
+
navigateTo('https://flowfuse.com/')
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
|
+
// gather info from settings and page - prep for next 2 menu items
|
|
89
|
+
const ffThemeSettings = RED.settings['forge-light'] || RED.settings['forge-dark']
|
|
90
|
+
let projectURL = ''
|
|
91
|
+
if (ffThemeSettings && ffThemeSettings.projectURL) {
|
|
92
|
+
projectURL = ffThemeSettings.projectURL
|
|
93
|
+
} else {
|
|
94
|
+
const img = $('#red-ui-header > span > a > img')
|
|
95
|
+
const ownerHref = img.parent().prop('href')
|
|
96
|
+
// Test the URL is FlowFuse Project alike
|
|
97
|
+
if (ownerHref && /http[s]*:\/\/.*\/project\/\w+-\w+-\w+-\w+-\w+.*/.test(ownerHref)) {
|
|
98
|
+
projectURL = ownerHref
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
// if projectURL is present, show link to project in main menu
|
|
102
|
+
if (projectURL) {
|
|
103
|
+
RED.menu.addItem('red-ui-header-button-sidemenu', {
|
|
104
|
+
id: 'usermenu-item-ffmain',
|
|
105
|
+
label: 'FlowFuse Application',
|
|
106
|
+
onselect: function () {
|
|
107
|
+
navigateTo(projectURL)
|
|
108
|
+
}
|
|
109
|
+
})
|
|
110
|
+
}
|
|
111
|
+
// if theme settings are present, add launcher version entry in main menu
|
|
112
|
+
if (ffThemeSettings && ffThemeSettings.launcherVersion) {
|
|
113
|
+
RED.menu.addItem('red-ui-header-button-sidemenu', {
|
|
114
|
+
id: 'usermenu-item-fflv',
|
|
115
|
+
label: 'FlowFuse Launcher v' + ffThemeSettings.launcherVersion,
|
|
116
|
+
onselect: function () {
|
|
117
|
+
// do nothing
|
|
118
|
+
}
|
|
119
|
+
})
|
|
120
|
+
}
|
|
121
|
+
interceptLogOutClick()
|
|
122
|
+
interceptLogoClick(projectURL)
|
|
123
|
+
})
|
|
124
|
+
})
|
|
125
|
+
})()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/* future/optional - enable in plugin js to use */
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
{
|
|
2
|
+
"base": "vs-dark",
|
|
3
|
+
"inherit": true,
|
|
4
|
+
"rules": [
|
|
5
|
+
{
|
|
6
|
+
"background": "1f2937",
|
|
7
|
+
"token": ""
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"foreground": "6272a4",
|
|
11
|
+
"token": "comment"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"foreground": "f1fa8c",
|
|
15
|
+
"token": "string"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"foreground": "bd93f9",
|
|
19
|
+
"token": "constant.numeric"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"foreground": "bd93f9",
|
|
23
|
+
"token": "constant.language"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"foreground": "bd93f9",
|
|
27
|
+
"token": "constant.character"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"foreground": "bd93f9",
|
|
31
|
+
"token": "constant.other"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"foreground": "ffb86c",
|
|
35
|
+
"token": "variable.other.readwrite.instance"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"foreground": "ff79c6",
|
|
39
|
+
"token": "constant.character.escaped"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"foreground": "ff79c6",
|
|
43
|
+
"token": "constant.character.escape"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"foreground": "ff79c6",
|
|
47
|
+
"token": "string source"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"foreground": "ff79c6",
|
|
51
|
+
"token": "string source.ruby"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"foreground": "ff79c6",
|
|
55
|
+
"token": "keyword"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"foreground": "ff79c6",
|
|
59
|
+
"token": "storage"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"foreground": "8be9fd",
|
|
63
|
+
"fontStyle": "italic",
|
|
64
|
+
"token": "storage.type"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"foreground": "50fa7b",
|
|
68
|
+
"fontStyle": "underline",
|
|
69
|
+
"token": "entity.name.class"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"foreground": "50fa7b",
|
|
73
|
+
"fontStyle": "italic underline",
|
|
74
|
+
"token": "entity.other.inherited-class"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"foreground": "50fa7b",
|
|
78
|
+
"token": "entity.name.function"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"foreground": "ffb86c",
|
|
82
|
+
"fontStyle": "italic",
|
|
83
|
+
"token": "variable.parameter"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"foreground": "ff79c6",
|
|
87
|
+
"token": "entity.name.tag"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"foreground": "50fa7b",
|
|
91
|
+
"token": "entity.other.attribute-name"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"foreground": "8be9fd",
|
|
95
|
+
"token": "support.function"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"foreground": "6be5fd",
|
|
99
|
+
"token": "support.constant"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"foreground": "66d9ef",
|
|
103
|
+
"fontStyle": " italic",
|
|
104
|
+
"token": "support.type"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"foreground": "66d9ef",
|
|
108
|
+
"fontStyle": " italic",
|
|
109
|
+
"token": "support.class"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"foreground": "f8f8f0",
|
|
113
|
+
"background": "ff79c6",
|
|
114
|
+
"token": "invalid"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"foreground": "f8f8f0",
|
|
118
|
+
"background": "bd93f9",
|
|
119
|
+
"token": "invalid.deprecated"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"foreground": "cfcfc2",
|
|
123
|
+
"token": "meta.structure.dictionary.json string.quoted.double.json"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"foreground": "6272a4",
|
|
127
|
+
"token": "meta.diff"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"foreground": "6272a4",
|
|
131
|
+
"token": "meta.diff.header"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"foreground": "ff79c6",
|
|
135
|
+
"token": "markup.deleted"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"foreground": "50fa7b",
|
|
139
|
+
"token": "markup.inserted"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"foreground": "e6db74",
|
|
143
|
+
"token": "markup.changed"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"foreground": "bd93f9",
|
|
147
|
+
"token": "constant.numeric.line-number.find-in-files - match"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"foreground": "e6db74",
|
|
151
|
+
"token": "entity.name.filename"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"foreground": "f83333",
|
|
155
|
+
"token": "message.error"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"foreground": "eeeeee",
|
|
159
|
+
"token": "punctuation.definition.string.begin.json - meta.structure.dictionary.value.json"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"foreground": "eeeeee",
|
|
163
|
+
"token": "punctuation.definition.string.end.json - meta.structure.dictionary.value.json"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"foreground": "8be9fd",
|
|
167
|
+
"token": "meta.structure.dictionary.json string.quoted.double.json"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"foreground": "f1fa8c",
|
|
171
|
+
"token": "meta.structure.dictionary.value.json string.quoted.double.json"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"foreground": "50fa7b",
|
|
175
|
+
"token": "meta meta meta meta meta meta meta.structure.dictionary.value string"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"foreground": "ffb86c",
|
|
179
|
+
"token": "meta meta meta meta meta meta.structure.dictionary.value string"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"foreground": "ff79c6",
|
|
183
|
+
"token": "meta meta meta meta meta.structure.dictionary.value string"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"foreground": "bd93f9",
|
|
187
|
+
"token": "meta meta meta meta.structure.dictionary.value string"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"foreground": "50fa7b",
|
|
191
|
+
"token": "meta meta meta.structure.dictionary.value string"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"foreground": "ffb86c",
|
|
195
|
+
"token": "meta meta.structure.dictionary.value string"
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
"colors": {
|
|
199
|
+
"editor.foreground": "#f8f8f2",
|
|
200
|
+
"editor.background": "#1f2937",
|
|
201
|
+
"editorCursor.foreground": "#f8f8f0",
|
|
202
|
+
"dropdown.background": "#44475a",
|
|
203
|
+
"editor.selectionBackground": "#44475a70",
|
|
204
|
+
"editor.inactiveSelectionBackground": "#44475a30",
|
|
205
|
+
"editorWidget.background": "#44475a",
|
|
206
|
+
"list.hoverForeground": "#44475a",
|
|
207
|
+
"list.hoverBackground": "#F7F8FC",
|
|
208
|
+
"list.focusForeground": "#44475a",
|
|
209
|
+
"list.focusBackground": "#F7F8FC",
|
|
210
|
+
"list.activeSelectionForeground": "#44475a",
|
|
211
|
+
"list.activeSelectionBackground": "#F7F8FC"
|
|
212
|
+
}
|
|
213
|
+
}
|