Skip to content

Commit

Permalink
frontend: update pocketbase domain
Browse files Browse the repository at this point in the history
  • Loading branch information
wuhan005 committed Mar 20, 2023
1 parent 2c21667 commit 850d6a2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion templates/change-logs.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ <h2>NekoBox 开发日记</h2>
<p>这里记录了 NekoBox 的功能迭代历史以及我的一些碎碎念。</p>
</div>
<dl class="uk-description-list uk-description-list-divider" x-data="{ list: [] }"
x-init="list = (await(await fetch('https://pb.app.n3ko.co/api/collections/changelogs/records?sort=-published_at')).json())">
x-init="list = (await(await fetch('https://pb.app.apicon.cn/api/collections/changelogs/records?sort=-published_at')).json())">
<template x-for="log in list.items">
<div x-html="`<br><hr><dt>${new Date(log.published_at).toLocaleDateString()}</dt><dd class=uk-text-small>${log.content}</dd>`"></div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ <h1 class="uk-heading-small">NekoBox</h1>
<br>
<hr>
<div x-data="{ c: '' }" x-init="c = await (async () => {
let log = (await(await fetch('https://pb.app.n3ko.co/api/collections/changelogs/records?sort=-published_at&perPage=1')).json()).items[0];
let log = (await(await fetch('https://pb.app.apicon.cn/api/collections/changelogs/records?sort=-published_at&perPage=1')).json()).items[0];
return `<p class=uk-article-meta>开发日记 - ${new Date(log.published_at).toLocaleDateString()}</p><span class=uk-text-small>${log.content}</span>`;
})()" x-html="c">
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/sponsor.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ <h2>给 NekoBox 打钱</h2>
<tbody x-data="{ s: '' }" x-init="
s = await (async () => {
let html = '';
let items = (await(await fetch('https://pb.app.n3ko.co/api/collections/nekobox_sponsors/records?perPage=500&sort=-date')).json()).items;
let items = (await(await fetch('https://pb.app.apicon.cn/api/collections/nekobox_sponsors/records?perPage=500&sort=-date')).json()).items;
items.forEach(item => {
html += `<tr class=uk-text-meta><td>${item.date.slice(0,10)}</td><td>${item.desc}</td><td>¥ ${item.price.toFixed(2)}</td></tr>`;
})
Expand Down

0 comments on commit 850d6a2

Please sign in to comment.