cleanup , header & logo

This commit is contained in:
STEINNI
2025-08-27 21:13:25 +00:00
parent 873f7ab88c
commit 8fcbde7edb
314 changed files with 38 additions and 30248 deletions
-53
View File
@@ -1,53 +0,0 @@
/**
* AWS download helper
* @author Nike
* @version 1.0
* @category MyEic
* @subcategory Libraries
*/
class AwsFileDownload {
options = {
pdf : { url: 'https://api.dev.eismea.eu/stable/vod/source?file=',
method: 'GET',
headers: { 'Accept': 'application/json',
'Content-Type': 'application/json',
},
credentials: 'include',
},
}
constructor(options) {
this.mergeOptionsNode(this.options, options);
}
mergeOptionsNode(target, source) {
for (let option in source) {
if(typeof source[option] === 'object' && !Array.isArray(source[option]) && (option in target) && !(target[option] instanceof(Element))) {
this.mergeOptionsNode(target[option], source[option]);
} else {
target[option] = source[option];
}
}
}
async getDownloadUrl(type, filename) {
let response
let uri = this.options[type].url+filename
try {
let foptions = {
method: this.options[type].method,
headers: this.options[type].headers,
}
if(this.options[type].credentials) foptions['credentials'] = this.options[type].credentials
response = await fetch(uri, foptions)
response = await response.json()
if(response && response.payload && response.payload.url) return(response.payload.url)
return(null)
} catch(debugMessage) {
console.warn('Error getting upload signed URL:',debugMessage)
return('')
}
}
}
-55
View File
@@ -1,55 +0,0 @@
/**
* AWS File upload
* @extends FileUpload
* @author Nike
* @version 1.0
* @category MyEic
* @subcategory Libraries
*/
class AwsFileUpload extends FileUpload {
constructor(el, options) {
super(el, options);
this.filename = options.filename
this.pic = options.pic
this.pid = options.pid
}
mergeOptionsNode(target, source) {
for (let option in source) {
if(typeof source[option] === 'object' && !Array.isArray(source[option]) && (option in target) && !(target[option] instanceof(Element))) {
this.mergeOptionsNode(target[option], source[option]);
} else {
target[option] = source[option];
}
}
}
async onBeforeUploadOneStart(file) {
let response
let ext = file.name.substring(file.name.lastIndexOf('.')+1) //Get the extension from the user file name
if((!this.filename) || (this.filename != this.createFileName(this.pic, this.pid)+'.'+ext)) { // Carefull: extension could change !
this.filename = this.createFileName(this.pic, this.pid)+'.'+ext
}
let uri = this.options.getSignedUrl+this.filename
try {
response = await fetch(uri, {
method: this.options.getSignedMethod,
headers: { 'Accept': 'application/json',
'Content-Type': file.type,
},
credentials: 'include',
}).then( response => response.json())
let payload = response.payload
this.options.uploadUrl = payload.url // Signed url is here
this.options.uploadMethod = 'PUT'
} catch(debugMessage) {
console.warn('Error getting upload signed URL:',debugMessage)
return(false)
}
return(true)
}
createFileName(pic, pid) { return(pic+'_'+pid+'_'+crypto.randomUUID()) }
}
-113
View File
@@ -1,113 +0,0 @@
/**
*
* @author Nicolas Stein
* @version 1.0
* @category MyEic
* @subcategory Libraries
*/
class Matomo4Sparc {
/**
* @typedef Matomo4Sparc~options
* @property {string} trackUrl
* @property {string} idsite
* @property {string} method
* @property {object} baseLogObj
* @property {number} baseLogObj.rec
* @property {number} baseLogObj.apiv
* @property {number} baseLogObj.new_visit
*/
/** @type {Matomo4Sparc~options} */
options = {
trackUrl: '',
idsite:'1',
method: 'POST',
baseLogObj : {
rec:1,
apiv:1,
new_visit: 0,
},
}
/**
*
* @param {Matomo4Sparc~options} options
*/
constructor(options) {
this.mergeOptions(this.options, options);
this.options.baseLogObj.idsite = this.options.idsite
//console.log('Matomo4Sparc started...')
}
/**
*
* @param {Object} target
* @param {Object} source
*/
mergeOptions(target, source) {
for (let option in source) {
if(typeof source[option] === 'object' && !Array.isArray(source[option]) && (option in target) && !(target[option] instanceof(Element))) {
this.mergeOptions(target[option], source[option]);
} else {
target[option] = source[option];
}
}
}
/**
* @typedef {Object} Matomo4Sparc~UserInfo
* @property {string} res
* @property {string} ua
* @property {string} uid
* @property {string} _var
*/
/**
*
* @returns {Matomo4Sparc~UserInfo}
*/
userInfos() {
return({
res: window.screen.availWidth+'x'+window.screen.availHeight,
ua: window.navigator.userAgent,
uid: app.User.identity.uuid,
_cvar: JSON.stringify({ userRoles: app.User.roles })
})
}
/**
*
* @param {*} action
* @param {*} callOptions
*/
logAction(action, callOptions) {
let logObj = {
...this.options.baseLogObj,
...this.userInfos(),
...{
rand: crypto.randomUUID(),
action_name: action,
url: document.location.href,
},
...callOptions
}
let fd = new FormData()
for(let key in logObj) fd.set(key, logObj[key])
fetch(
this.options.trackUrl,{
method: this.options.method,
body: fd
})
}
}
app.registerClass('Matomo4Sparc', Matomo4Sparc)
if(app.config.matomo4sparc && app.config.matomo4sparc.enabled) {
app.matomo = new Matomo4Sparc(app.config.matomo4sparc)
app.matomo.logAction('Launched Myeic App', { new_visit: 1 })
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+8 -3
View File
@@ -573,9 +573,9 @@ body[eicapp] {
[eicapp] p { padding: var(--eicui-base-spacing-m) 0 !important; }
[eicapp] [eicapptoolbar] {
background: var(--eicui-app-header-bg-color);
background: #1d261d;
align-items: center;
border-bottom: 3px solid var(--eicui-app-toolbar-bg-color);
border-bottom: 4px ridge #7D7;
color: var(--eicui-app-toolbar-color);
width: 100%;
height: var(--eicui-app-toolbar-height-active);
@@ -585,10 +585,15 @@ body[eicapp] {
box-sizing: border-box;
}
[eicapp] [eicapptoolbar] img.logo{
height: var(--eicui-app-toolbar-height-active);
border-right: 4px ridge #7D7;
}
[eicapp] [eicapptoolbar] .app-menu {
margin: 0 var(--eicui-base-spacing-xs) 0 0;
border: none;
background: none;
color: white;
}
[eicapp] [eicapptoolbar] .app-menu:active,
[eicapp] [eicapptoolbar] .app-menu:focus {
@@ -2731,7 +2736,7 @@ menu[eicmenu][collapsed]:not(:hover) [menuitem] > a > label {
}
[eicuser] {
display: inline-grid;
background-color: var(--eicui-base-color-info-25);
background-color: var(--eicui-base-color-success-50);
border-radius: 50%;
font-size: var(--app-font-size-2xs);
height: var(--eicui-base-spacing-xl);
File diff suppressed because one or more lines are too long
-9
View File
@@ -1,9 +0,0 @@
/*!
Theme: Default
Description: Original highlight.js style
Author: (c) Ivan Sagalaev <maniac@softwaremaniacs.org>
Maintainer: @highlightjs/core-team
Website: https://highlightjs.org/
License: see project LICENSE
Touched: 2021
*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#f3f3f3;color:#444}.hljs-comment{color:#697070}.hljs-punctuation,.hljs-tag{color:#444a}.hljs-tag .hljs-attr,.hljs-tag .hljs-name{color:#444}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-tag{font-weight:700}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#800}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-link,.hljs-operator,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#ab5656}.hljs-literal{color:#695}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta .hljs-string{color:#38a}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}
-1
View File
@@ -1 +0,0 @@
pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#272822;color:#ddd}.hljs-keyword,.hljs-literal,.hljs-name,.hljs-selector-tag,.hljs-strong,.hljs-tag{color:#f92672}.hljs-code{color:#66d9ef}.hljs-attribute,.hljs-link,.hljs-regexp,.hljs-symbol{color:#bf79db}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-emphasis,.hljs-section,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-string,.hljs-subst,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type,.hljs-variable{color:#a6e22e}.hljs-class .hljs-title,.hljs-title.class_{color:#fff}.hljs-comment,.hljs-deletion,.hljs-meta,.hljs-quote{color:#75715e}.hljs-doctag,.hljs-keyword,.hljs-literal,.hljs-section,.hljs-selector-id,.hljs-selector-tag,.hljs-title,.hljs-type{font-weight:700}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long