v0.10.1
- fix - detail panel not update when switch booru.
This commit is contained in:
parent
1913e010b6
commit
b5bd8aa736
File diff suppressed because one or more lines are too long
2
dist/index.html
vendored
2
dist/index.html
vendored
@ -16,7 +16,7 @@
|
||||
|
||||
gtag('config', 'G-59HBGP98WR');
|
||||
</script>
|
||||
<script type="module" crossorigin src="/assets/index-C_KR8nb7.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-BWVK_Osd.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-BgVVzy-z.css">
|
||||
</head>
|
||||
<body>
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "danbooru-viewer",
|
||||
"module": "index.ts",
|
||||
"type": "module",
|
||||
"version": "0.10.0",
|
||||
"version": "0.10.1",
|
||||
"scripts": {
|
||||
"dev": "bun x vite",
|
||||
"build": "bun x vite build",
|
||||
|
@ -189,10 +189,11 @@ function $postsPageComponents($route: $Route, query: {tags?: string}) {
|
||||
const $postGrid = new $PostGrid(query);
|
||||
const $detail = new $DetailPanel({preview: true, tagsType: 'name_only'}).hide(detailPanelEnable$.convert(bool => !bool)).position($route);
|
||||
detailPanelCheck();
|
||||
detailPanelEnable$.on('update', detailPanelCheck)
|
||||
detailPanelEnable$.on('update', detailPanelCheck);
|
||||
Booru.events.on('set', () => $detail.update(null));
|
||||
function detailPanelCheck() { detailPanelEnable$.value ? $postGrid.addClass('detail-panel-enabled') : $postGrid.removeClass('detail-panel-enabled') }
|
||||
$postGrid.$focus
|
||||
.on('focus', ({$focused: $target}) => {if ($target instanceof $PostTile) $detail.update($target.post) })
|
||||
.on('focus', ({$focused: $target}) => {if ($target.inDOM() && $target instanceof $PostTile) $detail.update($target.post) })
|
||||
.on('blur', () => $detail.update(null))
|
||||
return { $postGrid, $detail };
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user