feat(ui): ui-shell header with tool links, mobile side nav, Youreka logo
- header: Carbon ui-shell (cds-header) with the Youreka logo (from idid-enterprise-portal), Image Cropper / Fingerprint Agent nav items (aria-current on the active tool), the agent status tag on the wizard, and the operator chip + Sign out on desktop - mobile: cds-side-nav (logo above the items, both tools, a divider, then Sign out) toggled by the ui-shell menu button; account actions move out of the header below 1056px, the nav is hidden at desktop widths - the header is built once in server.js (appHeader) and injected into the landing, both tools and error pages — no per-page duplication - removed my duplicate menu-button toggle: ui-shell coordinates the menu button and side nav itself (the duplicate cancelled it out) - fixes: 'cds-header' was hidden by a selector-list typo (cds-header, cds-side-nav:not(:defined)); the collapsed side nav no longer captures taps Tools banner logo asset added (public/assets/youreka-logo.png).
This commit is contained in:
@@ -41,10 +41,6 @@ Vue.config.ignoredElements = [/^cds-/];
|
||||
},
|
||||
|
||||
computed: {
|
||||
initials: function () {
|
||||
var n = (this.session && (this.session.firstName || this.session.phone)) || '?';
|
||||
return n.slice(0, 2).toUpperCase();
|
||||
},
|
||||
maxStage: function () { return MAX_STAGE; },
|
||||
bothCaptured: function () {
|
||||
return this.fingers['right-thumb'].status === 'done' &&
|
||||
@@ -139,17 +135,27 @@ Vue.config.ignoredElements = [/^cds-/];
|
||||
});
|
||||
},
|
||||
|
||||
/** The agent status tag lives in the server-rendered header. */
|
||||
renderAgentTag: function () {
|
||||
var el = document.getElementById('agent-status');
|
||||
if (!el) return;
|
||||
el.textContent = this.agent.connected ? 'Agent connected' : 'Agent offline';
|
||||
el.setAttribute('type', this.agent.connected ? 'green' : 'red');
|
||||
el.setAttribute('title', this.agent.version ? 'fpagent ' + this.agent.version : '');
|
||||
},
|
||||
|
||||
connectAgent: function () {
|
||||
var self = this;
|
||||
this.socket = io(this.session.agentUrl, { reconnectionDelayMax: 5000 });
|
||||
|
||||
this.socket.on('connect', function () { self.agent.connected = true; });
|
||||
this.socket.on('disconnect', function () { self.agent.connected = false; });
|
||||
this.socket.on('connect_error', function () { self.agent.connected = false; });
|
||||
this.socket.on('connect', function () { self.agent.connected = true; self.renderAgentTag(); });
|
||||
this.socket.on('disconnect', function () { self.agent.connected = false; self.renderAgentTag(); });
|
||||
this.socket.on('connect_error', function () { self.agent.connected = false; self.renderAgentTag(); });
|
||||
|
||||
this.socket.on('agent-hello', function (data) {
|
||||
self.agent.version = (data && data.version) || '';
|
||||
self.agent.captureAgentId = (data && data.captureAgentId) || '';
|
||||
self.renderAgentTag();
|
||||
});
|
||||
|
||||
this.socket.on('fprint-enroll-status', function (data) {
|
||||
|
||||
Reference in New Issue
Block a user