Fixed diffs

This commit is contained in:
Eduard Urbach 2019-04-22 15:05:16 +09:00
parent 06daacbbf6
commit 70a62f06e5
2 changed files with 21 additions and 10 deletions

View File

@ -30,15 +30,15 @@ component Profile(viewUser *arn.User, user *arn.User, animeList *arn.AnimeList,
.mountable(data-mountable-type="character")
CharacterSmall(character, user)
//- People
.profile-section
h3.profile-column-header.mountable(data-mountable-type="favorites") People
p.no-data.mountable(data-mountable-type="favorites") Nothing here yet.
//- //- People
//- .profile-section
//- h3.profile-column-header.mountable(data-mountable-type="favorites") People
//- p.no-data.mountable(data-mountable-type="favorites") Nothing here yet.
//- Quotes
.profile-section
h3.profile-column-header.mountable(data-mountable-type="favorites") Quotes
p.no-data.mountable(data-mountable-type="favorites") Nothing here yet.
//- //- Quotes
//- .profile-section
//- h3.profile-column-header.mountable(data-mountable-type="favorites") Quotes
//- p.no-data.mountable(data-mountable-type="favorites") Nothing here yet.
//- Posts
.profile-column.profile-activity.mountable(data-mountable-type="column")

View File

@ -3,13 +3,24 @@ import { requestIdleCallback } from "../Utils"
// Load
export function load(arn: AnimeNotifier, element: HTMLElement) {
let url = element.dataset.url || (element as HTMLAnchorElement).href
let url = element.dataset.url || (element as HTMLAnchorElement).getAttribute("href")
if(!url) {
arn.statusMessage.showError("Link doesn't have a target")
return
}
arn.app.load(url)
}
// Diff
export async function diff(arn: AnimeNotifier, element: HTMLElement) {
let url = element.dataset.url || (element as HTMLAnchorElement).href
let url = element.dataset.url || (element as HTMLAnchorElement).getAttribute("href")
if(!url) {
arn.statusMessage.showError("Link doesn't have a target")
return
}
try {
await arn.diff(url)