Web UI improvements
This commit is contained in:
@@ -217,12 +217,12 @@ async function getViaServersQuery(roomID, api) {
|
|||||||
* @see https://matrix.org/blog/2024/06/20/matrix-v1.11-release/ implementation details
|
* @see https://matrix.org/blog/2024/06/20/matrix-v1.11-release/ implementation details
|
||||||
* @see https://www.sqlite.org/fileformat2.html#record_format SQLite integer field size
|
* @see https://www.sqlite.org/fileformat2.html#record_format SQLite integer field size
|
||||||
* @param {string} mxc
|
* @param {string} mxc
|
||||||
* @returns {string?}
|
* @returns {string | undefined}
|
||||||
*/
|
*/
|
||||||
function getPublicUrlForMxc(mxc) {
|
function getPublicUrlForMxc(mxc) {
|
||||||
assert(hasher, "xxhash is not ready yet")
|
assert(hasher, "xxhash is not ready yet")
|
||||||
const mediaParts = mxc?.match(/^mxc:\/\/([^/]+)\/(\w+)$/)
|
const mediaParts = mxc?.match(/^mxc:\/\/([^/]+)\/(\w+)$/)
|
||||||
if (!mediaParts) return null
|
if (!mediaParts) return undefined
|
||||||
|
|
||||||
const serverAndMediaID = `${mediaParts[1]}/${mediaParts[2]}`
|
const serverAndMediaID = `${mediaParts[1]}/${mediaParts[2]}`
|
||||||
const unsignedHash = hasher.h64(serverAndMediaID)
|
const unsignedHash = hasher.h64(serverAndMediaID)
|
||||||
|
@@ -5,12 +5,13 @@ block body
|
|||||||
.s-empty-state.wmx4.p48
|
.s-empty-state.wmx4.p48
|
||||||
!= icons.Spots.SpotEmptyXL
|
!= icons.Spots.SpotEmptyXL
|
||||||
p You need to log in to manage your servers.
|
p You need to log in to manage your servers.
|
||||||
a.s-btn.s-btn__icon.s-btn__featured.s-btn__filled(href=rel("/oauth"))
|
.d-flex.jc-center.g8
|
||||||
!= icons.Icons.IconDiscord
|
a.s-btn.s-btn__icon.s-btn__featured.s-btn__filled(href=rel("/oauth"))
|
||||||
= ` Log in with Discord`
|
!= icons.Icons.IconDiscord
|
||||||
a.s-btn.s-btn__icon.s-btn__matrix.s-btn__filled(href=rel("/log-in-with-matrix"))
|
= ` Log in with Discord`
|
||||||
!= icons.Icons.IconChatBubble
|
a.s-btn.s-btn__icon.s-btn__matrix.s-btn__filled(href=rel("/log-in-with-matrix"))
|
||||||
= ` Log in with Matrix`
|
!= icons.Icons.IconSpeechBubble
|
||||||
|
= ` Log in with Matrix`
|
||||||
|
|
||||||
else if !guild_id
|
else if !guild_id
|
||||||
.s-empty-state.wmx4.p48
|
.s-empty-state.wmx4.p48
|
||||||
|
@@ -81,6 +81,10 @@ html(lang="en")
|
|||||||
else if managed.size
|
else if managed.size
|
||||||
button.s-topbar--item.s-btn.s-btn__muted.s-btn__dropdown.pr24.s-user-card.bar0.fc-black(popovertarget="guilds")
|
button.s-topbar--item.s-btn.s-btn__muted.s-btn__dropdown.pr24.s-user-card.bar0.fc-black(popovertarget="guilds")
|
||||||
| Your servers
|
| Your servers
|
||||||
|
else
|
||||||
|
.d-flex.ai-center
|
||||||
|
.s-badge.s-badge__bot.py6.px16.bar-md
|
||||||
|
| No servers available
|
||||||
#guilds(popover data-popper-placement="bottom" style="display: revert; width: revert;").s-popover.overflow-visible
|
#guilds(popover data-popper-placement="bottom" style="display: revert; width: revert;").s-popover.overflow-visible
|
||||||
.s-popover--arrow.s-popover--arrow__tc
|
.s-popover--arrow.s-popover--arrow__tc
|
||||||
.s-popover--content.overflow-y-auto.overflow-x-hidden
|
.s-popover--content.overflow-y-auto.overflow-x-hidden
|
||||||
|
Reference in New Issue
Block a user