@bbki.ng/site 1.1.19 → 1.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # @bbki.ng/site
2
2
 
3
+ ## 1.1.21
4
+
5
+ ## 1.1.20
6
+
3
7
  ## 1.1.19
4
8
 
5
9
  ## 1.1.18
package/dev-dist/sw.js CHANGED
@@ -98,7 +98,7 @@ define(["./workbox-baccbcc1"], function (workbox) {
98
98
  [
99
99
  {
100
100
  url: "index.html",
101
- revision: "0.k4fnnpiob1g",
101
+ revision: "0.e53vufj5jdo",
102
102
  },
103
103
  ],
104
104
  {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbki.ng/site",
3
- "version": "1.1.19",
3
+ "version": "1.1.21",
4
4
  "description": "code behind bbki.ng",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -16,7 +16,7 @@
16
16
  "url": "git+https://github.com/bbbottle/bbki.ng.git"
17
17
  },
18
18
  "dependencies": {
19
- "@bbki.ng/components": "workspace:2.1.38",
19
+ "@bbki.ng/components": "workspace:2.1.39",
20
20
  "@supabase/supabase-js": "^1.30.6",
21
21
  "classnames": "2.3.1",
22
22
  "react": "^18.0.0",
package/src/app.tsx CHANGED
@@ -1,6 +1,6 @@
1
1
  import React, { useContext } from "react";
2
2
  import { Routes, Route, Outlet } from "react-router-dom";
3
- import { Nav, Page, NotFound, Link } from "@bbki.ng/components";
3
+ import { Nav, Page, NotFound } from "@bbki.ng/components";
4
4
  import { HotKeyNav, Stickers } from "./components";
5
5
  import { threeColWrapper } from "@/components/with_wrapper";
6
6
  import { Cover } from "./pages";
@@ -21,7 +21,6 @@ import {
21
21
  GlobalLoadingStateProvider,
22
22
  } from "@/global_loading_state_provider";
23
23
  import { UploadPage } from "@/pages/upload";
24
- import { Footer } from "@/components/Footer";
25
24
 
26
25
  const Layout = () => {
27
26
  const { isLoading } = useContext(GlobalLoadingContext);
@@ -32,7 +31,6 @@ const Layout = () => {
32
31
  <Nav paths={usePaths()} className="blur-cover" loading={isLoading} />
33
32
  }
34
33
  main={<Outlet />}
35
- footer={<Footer />}
36
34
  />
37
35
  </>
38
36
  );
@@ -1,15 +1,20 @@
1
1
  ---
2
- title: 在干嘛?
2
+ title: ""
3
3
  ---
4
4
 
5
5
  import { MovieList } from "@/components/movie_list";
6
6
  import { BookList } from "@/components/book_list";
7
7
 
8
8
  ## 编码
9
- - [github](https://github.com/zjhou)
9
+
10
+ - game dev
11
+ - c#
12
+ - unity
10
13
 
11
14
  ## 阅读
15
+
12
16
  <BookList />
13
17
 
14
18
  ## 电影
15
- <MovieList />
19
+
20
+ <MovieList />
@@ -14,7 +14,7 @@ export const Footer = () => {
14
14
  const appVer = GLOBAL_BBKING_VERSION;
15
15
  const tagUrl = `https://github.com/bbbottle/bottle/releases/tag/@bbki.ng/site@${appVer}`;
16
16
  return (
17
- <div className="w-full flex justify-center">
17
+ <div className="mt-32">
18
18
  <Tag to={tagUrl} prefix="v" external>
19
19
  {appVer}
20
20
  </Tag>
@@ -27,8 +27,10 @@ export const BookList = () => {
27
27
  );
28
28
  };
29
29
 
30
+ const filteredBooks = books.filter((m: any) => m.visible == 1);
31
+
30
32
  const renderRow = (index: number) => {
31
- const { name: title, link, status } = books[index];
33
+ const { name: title, link, status } = filteredBooks[index];
32
34
  return (
33
35
  <>
34
36
  <Table.Cell style={CELL_STYLE}>
@@ -42,7 +44,7 @@ export const BookList = () => {
42
44
  };
43
45
  return (
44
46
  <Table
45
- rowCount={books.length}
47
+ rowCount={filteredBooks.length}
46
48
  rowRenderer={renderRow}
47
49
  headerRenderer={renderHeader}
48
50
  />
@@ -10,6 +10,7 @@ const CELL_STYLE = {
10
10
 
11
11
  export const MovieList = () => {
12
12
  const { movies, isLoading, isError } = useMovies();
13
+
13
14
  if (isError) {
14
15
  return <Error error={isError} />;
15
16
  }
@@ -18,6 +19,8 @@ export const MovieList = () => {
18
19
  return <TableSkeleton />;
19
20
  }
20
21
 
22
+ const filteredMovies = movies.filter((m: any) => m.visible == 1);
23
+
21
24
  const renderHeader = () => {
22
25
  return (
23
26
  <>
@@ -28,7 +31,7 @@ export const MovieList = () => {
28
31
  };
29
32
 
30
33
  const renderRow = (index: number) => {
31
- const { name, link, status } = movies[index];
34
+ const { name, link, status } = filteredMovies[index];
32
35
  return (
33
36
  <>
34
37
  <Table.Cell style={CELL_STYLE}>
@@ -42,7 +45,7 @@ export const MovieList = () => {
42
45
  };
43
46
  return (
44
47
  <Table
45
- rowCount={movies.length}
48
+ rowCount={filteredMovies.length}
46
49
  rowRenderer={renderRow}
47
50
  headerRenderer={renderHeader}
48
51
  />
@@ -24,7 +24,7 @@ export const ReloadPrompt = () => {
24
24
  toast("", {
25
25
  description: "发现新版本,是否更新?",
26
26
  duration: 10000,
27
- position: "bottom-center",
27
+ position: "top-center",
28
28
  actionButtonStyle: {
29
29
  backgroundColor: "#fff",
30
30
  color: "rgb(37,99,235)",
@@ -34,9 +34,9 @@ export const ReloadPrompt = () => {
34
34
  onClick: () => {
35
35
  updateServiceWorker(false).then(() => {
36
36
  // @ts-ignore
37
- toast.success("", {
37
+ toast("", {
38
38
  description: `已更新`,
39
- position: "bottom-center",
39
+ position: "top-center",
40
40
  });
41
41
  setNeedRefresh(false);
42
42
  });
@@ -1,21 +1,28 @@
1
1
  import React from "react";
2
- import { LinkList } from "@bbki.ng/components";
3
2
  import { CenterLinkList } from "@/components";
3
+ import { Footer } from "@/components/Footer";
4
4
 
5
5
  export const Cover = (props: { className: string }) => {
6
6
  return (
7
- <CenterLinkList
8
- links={[
9
- {
10
- to: "/projects",
11
- name: "cd ./projects",
12
- },
13
- {
14
- to: "/blog",
15
- name: "cd ./blog",
16
- },
17
- ]}
18
- title=" "
19
- />
7
+ <div className="w-fit m-auto">
8
+ <CenterLinkList
9
+ links={[
10
+ {
11
+ to: "/projects",
12
+ name: "cd ./projects",
13
+ },
14
+ {
15
+ to: "/blog",
16
+ name: "cd ./blog",
17
+ },
18
+ {
19
+ to: "/now",
20
+ name: "cd ./now",
21
+ },
22
+ ]}
23
+ title=" "
24
+ />
25
+ <Footer />
26
+ </div>
20
27
  );
21
28
  };