add title attr to text text links (#1228)
* add title attr to text text links * Revert "add title attr to text text links" This reverts commit c028cd184efd3b2788d8f46134eecf521e5d7b07. * use css tooltips * add to expanded post state * handle theming * add to bskyweb
This commit is contained in:
parent
16b265a861
commit
548ec6c82d
8 changed files with 166 additions and 22 deletions
|
@ -267,13 +267,20 @@ export class ShellUiModel {
|
|||
hydrate(v: unknown) {
|
||||
if (isObj(v)) {
|
||||
if (hasProp(v, 'colorMode') && isColorMode(v.colorMode)) {
|
||||
this.colorMode = v.colorMode
|
||||
this.setColorMode(v.colorMode)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setColorMode(mode: ColorMode) {
|
||||
this.colorMode = mode
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
const html = window.document.documentElement
|
||||
// remove any other color mode classes
|
||||
html.className = html.className.replace(/colorMode--\w+/g, '')
|
||||
html.classList.add(`colorMode--${mode}`)
|
||||
}
|
||||
}
|
||||
|
||||
setMinimalShellMode(v: boolean) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue