Fix text color, broken link and remove last tab

This commit is contained in:
AlphaX-Projects 2024-05-10 10:49:47 +02:00
parent 8f8e625574
commit 5cb2d02063
2 changed files with 38 additions and 25 deletions

View File

@ -421,35 +421,46 @@ class ShowPlugin extends connect(store)(LitElement) {
let iconId = '' let iconId = ''
this.tabs = this.tabs.filter((tab, tIndex) => tIndex !== index) this.tabs = this.tabs.filter((tab, tIndex) => tIndex !== index)
this.currentTab = this.tabs.length - 1; this.currentTab = this.tabs.length - 1
const tabD = this.tabs.length - 1 const tabD = this.tabs.length - 1
const plugObj = this.tabs[tabD].url
theId = this.tabs[tabD].id
tabId = 'tab-' + theId
frameId = 'frame-' + theId
plugId = 'plug-' + theId
iconId = 'icon-' + theId
var tabActive = this.shadowRoot.getElementById(tabId) if (tabD < 0) {
var frameActive = this.shadowRoot.getElementById(frameId) const lengthOfTabs = this.tabs.length
var plugActive = this.shadowRoot.getElementById(plugId) this.addTab({
var iconActive = this.shadowRoot.getElementById(iconId) url: '',
id: this.uid.rnd()
if (plugObj === undefined || '') { })
tabActive.classList.add('active') this.currentTab = lengthOfTabs
iconActive.classList.remove('iconInactive')
iconActive.classList.add('iconActive')
plugActive.classList.remove('hideIframe')
plugActive.classList.add('showIframe')
} else { } else {
tabActive.classList.add('active') const plugObj = this.tabs[tabD].url
iconActive.classList.remove('iconInactive') theId = this.tabs[tabD].id
iconActive.classList.add('iconActive') tabId = 'tab-' + theId
frameActive.classList.remove('hideIframe') frameId = 'frame-' + theId
frameActive.classList.add('showIframe') plugId = 'plug-' + theId
iconId = 'icon-' + theId
var tabActive = this.shadowRoot.getElementById(tabId)
var frameActive = this.shadowRoot.getElementById(frameId)
var plugActive = this.shadowRoot.getElementById(plugId)
var iconActive = this.shadowRoot.getElementById(iconId)
if (plugObj === undefined || '') {
tabActive.classList.add('active')
iconActive.classList.remove('iconInactive')
iconActive.classList.add('iconActive')
plugActive.classList.remove('hideIframe')
plugActive.classList.add('showIframe')
} else {
tabActive.classList.add('active')
iconActive.classList.remove('iconInactive')
iconActive.classList.add('iconActive')
frameActive.classList.remove('hideIframe')
frameActive.classList.add('showIframe')
}
this.requestUpdate()
} }
this.requestUpdate()
} else { } else {
// Remove tab from array // Remove tab from array
this.tabs = this.tabs.filter((tab, tIndex) => tIndex !== index) this.tabs = this.tabs.filter((tab, tIndex) => tIndex !== index)
@ -457,6 +468,7 @@ class ShowPlugin extends connect(store)(LitElement) {
if (this.tabs.length !== 0) { if (this.tabs.length !== 0) {
this.currentTab = 0 this.currentTab = 0
} }
this.requestUpdate() this.requestUpdate()
} }
} }
@ -1583,7 +1595,7 @@ class NavBar extends connect(store)(LitElement) {
if (this.pluginType === 'overview-page') { if (this.pluginType === 'overview-page') {
this.pluginPage = 'overview-page/index.html' this.pluginPage = 'overview-page/index.html'
} else if (this.pluginType === 'minting') { } else if (this.pluginType === 'minting') {
this.pluginPage = 'minting/index.html' this.pluginPage = 'minting-info/index.html'
} else if (this.pluginType === 'become-minter') { } else if (this.pluginType === 'become-minter') {
this.pluginPage = 'become-minter/index.html' this.pluginPage = 'become-minter/index.html'
} else if (this.pluginType === 'sponsorship-list') { } else if (this.pluginType === 'sponsorship-list') {

View File

@ -2497,6 +2497,7 @@ export const showPluginStyles = css`
--mdc-theme-surface: var(--white); --mdc-theme-surface: var(--white);
--mdc-text-field-outlined-idle-border-color: var(--txtfieldborder); --mdc-text-field-outlined-idle-border-color: var(--txtfieldborder);
--mdc-text-field-outlined-hover-border-color: var(--txtfieldhoverborder); --mdc-text-field-outlined-hover-border-color: var(--txtfieldhoverborder);
--mdc-text-field-disabled-ink-color: var(--black);
--mdc-text-field-label-ink-color: var(--black); --mdc-text-field-label-ink-color: var(--black);
--mdc-text-field-ink-color: var(--black); --mdc-text-field-ink-color: var(--black);
--mdc-select-ink-color: var(--black); --mdc-select-ink-color: var(--black);