Compare commits
No commits in common. "V1.2" and "unfixed-loli" have entirely different histories.
V1.2
...
unfixed-lo
|
@ -1,7 +0,0 @@
|
|||
# Custom Environment Variables (Must be named with VITE_ prefix)
|
||||
|
||||
VITE_API_UPLOADS_URL = `http://127.0.0.1:10007/uploads`
|
||||
VITE_API_BASE_URL = `http://127.0.0.1:10007/api`
|
||||
|
||||
## Router Mode, hash or html5
|
||||
VITE_ROUTER_HISTORY = 'html5'
|
28
.github/ISSUE_TEMPLATE/bug_report.md
vendored
|
@ -1,28 +0,0 @@
|
|||
---
|
||||
name: Bug Report
|
||||
about: Create a report to help us improve
|
||||
title: KUN Visual Novel Bug Report
|
||||
labels: bug, enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
|
@ -1,20 +0,0 @@
|
|||
---
|
||||
name: Feature Request
|
||||
about: Suggest an idea or enhancement
|
||||
title: KUN Visual Novel Feature Request
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of the problem or need. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
12
.gitignore
vendored
|
@ -10,13 +10,11 @@ lerna-debug.log*
|
|||
node_modules
|
||||
dist
|
||||
dist-ssr
|
||||
static
|
||||
static-ssr
|
||||
kun
|
||||
kun-ssr
|
||||
*.local
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
.DS_Store
|
||||
*.suo
|
||||
|
@ -24,9 +22,3 @@ kun-ssr
|
|||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
|
||||
# rollup-plugin-visualizer
|
||||
stats.html
|
||||
|
||||
# .env.production
|
||||
.env.production
|
||||
|
|
126
.vscode/settings.json
vendored
|
@ -1,126 +0,0 @@
|
|||
{
|
||||
"cSpell.words": [
|
||||
"ACGNGAME",
|
||||
"Ahahaha",
|
||||
"Akai",
|
||||
"Amayui",
|
||||
"arpa",
|
||||
"Asuka",
|
||||
"atrule",
|
||||
"axios",
|
||||
"azkhx",
|
||||
"bangumi",
|
||||
"Bilibili",
|
||||
"Bishoujo",
|
||||
"Chuudoku",
|
||||
"Codepen",
|
||||
"commonmark",
|
||||
"cooldown",
|
||||
"cout",
|
||||
"dompurify",
|
||||
"fontawesome",
|
||||
"galgame",
|
||||
"Galgame",
|
||||
"Galworld",
|
||||
"gsap",
|
||||
"Hana",
|
||||
"Haruki",
|
||||
"Hikari",
|
||||
"Hitomi",
|
||||
"Hokenshitsu",
|
||||
"iconify",
|
||||
"indexdb",
|
||||
"INTLIFY",
|
||||
"Irotoridori",
|
||||
"Joshu",
|
||||
"Karenai",
|
||||
"kfmax",
|
||||
"Koori",
|
||||
"kungal",
|
||||
"kungalgame",
|
||||
"kungalgamer",
|
||||
"ldquo",
|
||||
"Licence",
|
||||
"localforage",
|
||||
"loli",
|
||||
"majesticons",
|
||||
"Mangekyou",
|
||||
"Maniwa",
|
||||
"Meister",
|
||||
"Milkdown",
|
||||
"Minato",
|
||||
"mingcute",
|
||||
"Mirai",
|
||||
"mockjs",
|
||||
"moemoe",
|
||||
"moemoepoint",
|
||||
"moemoepoints",
|
||||
"Murasame",
|
||||
"Nanami",
|
||||
"nawa",
|
||||
"NEKOPARA",
|
||||
"non-moe",
|
||||
"nord",
|
||||
"nprogress",
|
||||
"okaidia",
|
||||
"Otome",
|
||||
"Owaru",
|
||||
"persistedstate",
|
||||
"Pinia",
|
||||
"prismjs",
|
||||
"prosemirror",
|
||||
"rdquo",
|
||||
"Roka",
|
||||
"Sahou",
|
||||
"Sakura",
|
||||
"scrollbars",
|
||||
"Sekai",
|
||||
"Senren",
|
||||
"Sensei",
|
||||
"Shabondama",
|
||||
"Shiki",
|
||||
"shinnku",
|
||||
"Shugaten",
|
||||
"signin",
|
||||
"sina",
|
||||
"SMEE",
|
||||
"Somnium",
|
||||
"Sugarfull",
|
||||
"tachi",
|
||||
"tada",
|
||||
"tdesign",
|
||||
"templating",
|
||||
"tencent",
|
||||
"Tomotake",
|
||||
"Tsubasa",
|
||||
"Tsuki",
|
||||
"Tsumugi",
|
||||
"twotone",
|
||||
"unplugin",
|
||||
"unref",
|
||||
"upid",
|
||||
"upvoted",
|
||||
"Upvotes",
|
||||
"upvoting",
|
||||
"Utsuru",
|
||||
"VARCHAR",
|
||||
"Vite",
|
||||
"VNDB",
|
||||
"vueup",
|
||||
"waifu",
|
||||
"Wataridori",
|
||||
"weixin",
|
||||
"Wenders",
|
||||
"ymgal",
|
||||
"Yorisou",
|
||||
"Yoshino",
|
||||
"Yuki",
|
||||
"Yukino",
|
||||
"yurzhang",
|
||||
"Yuuki",
|
||||
"yuyu",
|
||||
"zako"
|
||||
],
|
||||
"i18n-ally.localesPaths": ["src/language"],
|
||||
"vue.codeActions.enabled": false
|
||||
}
|
661
LICENSE
|
@ -1,661 +0,0 @@
|
|||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
128
README.md
|
@ -1,118 +1,26 @@
|
|||
![Logo](https://github.com/KUN1007/kun-galgame-vue/blob/unfixed-loli/src/assets/images/favicon.png)
|
||||
# KUNGalgame 论坛的 Vue 前端重构版本
|
||||
|
||||
The image is sourced from the game [Ark Order](https://apps.qoo-app.com/en/app/9593), featuring the character '鲲' (Kun).
|
||||
这个项目的技术栈为:Vite + Vue3 + Ts + Pinia + less,它并没有依赖任何 UI 库
|
||||
|
||||
# kun-galgame-vue
|
||||
|
||||
## Introduction
|
||||
|
||||
This is the frontend for KUN Visual Novel forum, and it is the first version. We have developed it using the `vue` framework.
|
||||
|
||||
The purpose of creating KUN Visual Novel is to:
|
||||
|
||||
- Promote genuinely good games so that everyone can access visual data through platforms like VNDB, avoiding the influence of "experts."
|
||||
- Distance ourselves from the culture of praising one moment and condemning the next in the modern internet, promoting critique as a virtue, among other things.
|
||||
- Encourage anyone to learn basic computer skills to avoid "superficial experts."
|
||||
- Construct a forum primarily driven by individual user enjoyment to resist the formation of social hierarchies.
|
||||
- Many current websites use templates, resulting in a lack of diversity, causing aesthetic fatigue.
|
||||
- And much more.
|
||||
|
||||
We believe that "what truly makes a good game is something that makes you feel happy and genuinely laugh."
|
||||
|
||||
**The backend project for the first version is [kun-galgame-koa](https://github.com/KUN1007/kun-galgame-koa).**
|
||||
|
||||
## Mission Statement
|
||||
|
||||
- The world's cutest galgame forum.
|
||||
- Our mission is to create the best possible atmosphere.
|
||||
- We will never have advertisements.
|
||||
- We will never charge users.
|
||||
|
||||
## Technical Support
|
||||
|
||||
- Compatible with all modern browsers on both mobile and desktop.
|
||||
- Responsive design for screens of any size.
|
||||
- Developed entirely using `Vue3` Composition API and fully supports `Typescript`. The coding style follows the best practices recommended on the [Vue official website](https://vuejs.org/).
|
||||
|
||||
## Features
|
||||
|
||||
### Global Website Settings
|
||||
|
||||
- `I18n` internationalization.
|
||||
- Custom background images.
|
||||
- Day/Night mode.
|
||||
- Font selection for the entire site.
|
||||
- Adjust website page width.
|
||||
|
||||
### Note
|
||||
|
||||
- The website refreshes the `token` every 60 minutes, causing a brief white screen. This is done for security reasons.
|
||||
- The website uses [`vue-quill`](https://github.com/vueup/vue-quill) as the rich text editor. However, this editor employs outdated [API](https://github.com/vueup/vue-quill/issues/409), which may generate console warnings when the editor appears. This is due to the editor's design and is not an error in the website's code. We plan to develop our own rich text editor in the future.
|
||||
- If you encounter any errors on the website or have suggestions, please [contact us](https://github.com/KUN1007/kun-galgame-vue#contact-us).
|
||||
|
||||
To view all the features of the website, please [click here](https://github.com/KUN1007/kun-galgame-vue/blob/V1/docs/en/feat.md).
|
||||
|
||||
To explore all the page functionalities, please [click here](https://github.com/KUN1007/kun-galgame-vue/blob/V1/docs/en/pages.md).
|
||||
|
||||
## Project Introduction
|
||||
|
||||
### Overview
|
||||
|
||||
This is a **reconstructed version** of [`KUNGalgame-pure-css`](https://github.com/KUN1007/kungalgame-pure-css). It is developed using `Vite + Vue3 + Vue-router4 + Typescript + SCSS + Pinia` as the frontend technology stack. It does not rely on any UI frameworks, as this project aims to stand out without UI frameworks. The world is already full of sameness, and we want to bring something different. The project does not integrate `ESLint`, `Prettier`, and similar tools because they can be troublesome, and we love to take it easy. We plan to integrate the necessary project configurations when the first version of the project goes live.
|
||||
|
||||
### Preview
|
||||
|
||||
##### The repository for the pure HTML + CSS project can be found [here](https://github.com/KUN1007/kungalgame-pure-css).
|
||||
|
||||
However, during the reconstruction, we added substantial content and switched from `fontawesome` to `iconify` for icons. This may result in a different appearance. Here, we provide a preview of the homepage:
|
||||
|
||||
#### Web Browsers
|
||||
|
||||
![Light Mode](https://github.com/KUN1007/kun-galgame-vue/blob/V1/docs/images/preview.png)
|
||||
|
||||
![Dark Mode](https://github.com/KUN1007/kun-galgame-vue/blob/V1/docs/images/preview-dark.png)
|
||||
|
||||
#### Mobile Browsers
|
||||
|
||||
![Light Mode](https://github.com/KUN1007/kun-galgame-vue/blob/V1/docs/images/mobile-preview.png)
|
||||
|
||||
![Dark Mode](https://github.com/KUN1007/kun-galgame-vue/blob/V1/docs/images/mobile-preview-dark.png)
|
||||
|
||||
### Getting Started
|
||||
|
||||
- Clone the repository: `git clone https://github.com/KUN1007/kun-galgame-vue`
|
||||
- Navigate to the project directory: `cd kun-galgame-vue`
|
||||
- Install dependencies: `pnpm i`
|
||||
- Start the development server: `vite dev`
|
||||
|
||||
## Important Notes
|
||||
|
||||
The upcoming release is only the first version. We had planned the content for versions 2 and 3 from the project's initial design, including:
|
||||
|
||||
- Analyzing data from websites such as [`VNDB`](https://vndb.org/), [`-エロゲー批評空間-`](https://erogamescape.dyndns.org/), [`bangumi`](https://bangumi.tv/), etc.
|
||||
- Streaming media publishing (uploading and releasing videos).
|
||||
- Creating a mobile app version.
|
||||
- And more. In short, we will do our best to implement anything you can think of.
|
||||
|
||||
## Contact Us
|
||||
|
||||
If you want to join our development or Galgame groups, you can connect with us through the following channels:
|
||||
|
||||
- [Telegram Group](https://t.me/KUNForum)
|
||||
- Tencent QQ Group: 872839714
|
||||
|
||||
The following two groups are Galgame groups for discussions and feedback:
|
||||
|
||||
- [Telegram Group](https://t.me/kungalgame)
|
||||
- Tencent QQ Group: 871857690
|
||||
### 纯 HTML / CSS 版本:https://github.com/KUN1007/kungalgame-pure-css
|
||||
|
||||
|
||||
## Translation
|
||||
PS: 这个项目现在令我感到无从下手,如果你觉得有好的想法,欢迎帮我看看,该项目的介绍文档位于 ./src/assets/docs 下
|
||||
|
||||
[中文版](https://github.com/KUN1007/kun-galgame-vue/blob/V1/docs/zh/README.md)
|
||||
目前的问题是,要处理的问题太多,没有一个合理的入手点
|
||||
|
||||
Special thanks to `yuyu` for the Chinese translation.
|
||||
比如说:
|
||||
|
||||
## License
|
||||
* 没有合适的后端数据接口供我调用。我尝试使用 express 搭建了微型的数据接口,可是这并不能为我带来什么作用
|
||||
* 我不清楚这个项目应该如何布局。因为这个项目本身较大,我现在甚至连如何合理的规划项目结构都做不到,例如我不知道是否需要 ./src/layout
|
||||
* 我不清楚如何对数据进行集成。例如我要将单个帖子和单个用户的数据定义好,然后再统一在项目的任何位置进行调用。我觉得这可能是我 pinia 学的不好??
|
||||
* 我不清楚该如何预留合理的接口。我觉得这可能是我的 axios 学的不够好
|
||||
* 我的每个组件嵌套过于深了。例如 Home 组件足足有 7 层,这显然是不合理的,我要找到合理的解决方案
|
||||
* 我已经深深的感觉到我的 ts / js 学的不好了(????
|
||||
|
||||
This project follows the `GPL` open-source license.
|
||||
其实最大的问题就在于无从下手,因为我不清楚该把基础的数据放在哪里,比如说 store 之类的地方,然后我再去调用。现在对我的开发造成了巨大的阻碍,因为我的大部分页面都需要数据,没有数据的流动,一切免谈。
|
||||
|
||||
---
|
||||
|
||||
06/05/2023
|
||||
现在我明白了,我目前的这个项目已经属于大前端的范畴了,涉及到 Web 架构师的知识,用到的许多交互技术需要学习,我目前并不具备一个大前端的知识量,所以本项目暂时搁置,以后再写
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
# KUNGalgame Forum Vue Frontend Refactor
|
||||
|
||||
The technology stack for this project is: Vite + Vue3 + Ts + Pinia + Scss, and it does not rely on any UI libraries.
|
||||
|
||||
### Pure HTML/CSS version: [kungalgame-pure-css](https://github.com/KUN1007/kungalgame-pure-css)
|
||||
|
||||
PS: This project is currently overwhelming for me. If you have any good ideas, feel free to help out. The project's documentation can be found in ./src/assets/docs.
|
||||
|
||||
The current issues are that there are too many problems to handle, and there is no reasonable starting point. For example:
|
||||
|
||||
* There are no suitable backend data interfaces for me to use. I tried to set up a tiny data interface using Express, but it didn't serve any purpose for me.
|
||||
* I'm unsure how to layout this project. Because the project itself is relatively large, I can't even figure out how to structure it properly. For instance, I'm not sure if I need a ./src/layout.
|
||||
* I'm unsure how to integrate data. For example, I need to define the data for individual topics and users and then call them from anywhere in the project. I think this might be because I haven't learned Pinia well enough?
|
||||
* I'm unsure how to provide reasonable interfaces. I think this may be because my knowledge of Axios is not sufficient.
|
||||
* My components are nested too deeply. For instance, the Home component has 7 layers, which is obviously unreasonable. I need to find a reasonable solution.
|
||||
* I've come to realize that my knowledge of TypeScript/JavaScript is not sufficient (???).
|
||||
|
||||
The biggest problem is that I don't know where to start because I'm not sure where to put basic data, such as in a store, and then how to call it. This is causing significant obstacles to my development because most of my pages require data, and without data flow, nothing is possible.
|
||||
|
||||
---
|
||||
|
||||
06/05/2023
|
||||
Now I understand that my current project falls into the realm of the "big frontend." It involves knowledge of web architecture and requires learning many interactive technologies. I currently lack the knowledge of a "big frontend," so I'm temporarily shelving this project for now and will revisit it later.
|
||||
|
||||
12/06/2023
|
||||
I've encountered another tricky problem, the issue of frontend-backend integration. I find that I can never figure out how to design the API properly. It seems that this indeed requires a good understanding of backend knowledge.
|
||||
|
||||
In summary, the current state of this project is somewhat improved, but it's still a shell. I'll call it an advanced shell (HTML++?). It can only be considered a website once the interface and authentication-related work is completed.
|
|
@ -1,72 +0,0 @@
|
|||
# KUNGalgame Forum Vue Frontend Refactor
|
||||
|
||||
As of June 18, 2023, two months, and over 200 commits, we have almost completed all the static pages. Next, we will be working on the backend of the website.
|
||||
|
||||
## Introduction
|
||||
|
||||
KUNGalgame - The cutest Galgame forum in the world!
|
||||
|
||||
Striving to create the best environment for Galgame discussions!
|
||||
|
||||
Tips: The website is currently under construction...
|
||||
|
||||
## Operating Philosophy
|
||||
|
||||
- The cutest Galgame forum in the world
|
||||
- Based on the idea of creating the best atmosphere
|
||||
- No advertisements, ever
|
||||
- No charges, ever
|
||||
|
||||
## Project Introduction
|
||||
|
||||
### Overview
|
||||
|
||||
This is a **refactored version** of [`KUNGalgame-pure-css`](https://github.com/KUN1007/kungalgame-pure-css), using Vite + Vue3 + Vue-router4 + Typescript + SCSS + Pinia as the frontend tech stack. It doesn't rely on any UI framework, as this project emphasizes a non-UI framework. As my VScode comes with necessary plugins like ESLint, I haven't integrated them into the project. I plan to integrate the required environment and project configurations in the first version of the project.
|
||||
|
||||
When the frontend project is ready, there is a built-in mini `express` server in the project's root directory that can be started, located in the `server` folder. This is not the project's backend; it's just a data mock similar to `mockjs`. Our backend is planned to be written in `Rust`.
|
||||
|
||||
### Preview
|
||||
|
||||
##### The address of the original project is: [https://github.com/KUN1007/kungalgame-pure-css](https://github.com/KUN1007/kungalgame-pure-css)
|
||||
|
||||
However, during the refactoring, we added a lot of content and changed the icons from `fontawesome` to `iconify`, so the appearance may be different. Here, we are only showing a preview of the homepage.
|
||||
|
||||
#### Web Browser
|
||||
![](https://github.com/KUN1007/KUNGalGame-vue/blob/layout/introduction/images/preview.png)
|
||||
![](https://github.com/KUN1007/KUNGalGame-vue/blob/layout/introduction/images/preview-dark.png)
|
||||
|
||||
#### Mobile Browser
|
||||
![](https://github.com/KUN1007/KUNGalGame-vue/blob/layout/introduction/images/mobile-preview.png)
|
||||
![](https://github.com/KUN1007/KUNGalGame-vue/blob/layout/introduction/images/mobile-preview-dark.png)
|
||||
|
||||
### How to Start
|
||||
|
||||
`git clone https://github.com/KUN1007/KUNGalGame-vue`
|
||||
|
||||
`cd KUNGalGame-vue`
|
||||
|
||||
#### Server
|
||||
|
||||
`cd server`
|
||||
|
||||
`pnpm i`
|
||||
|
||||
`pnpm start`
|
||||
|
||||
#### Frontend
|
||||
|
||||
`cd ..`
|
||||
|
||||
`pnpm i`
|
||||
|
||||
`vite dev`
|
||||
|
||||
Please note, start the server first to have simulated data.
|
||||
|
||||
## Important Notes
|
||||
|
||||
Only the V1 version will be released. We have already planned the content for V2 and V3 versions during the initial design, including data analysis of websites such as `VNDB`, `Erogame Space`, `Bangumi`, streaming content uploads, an app version, and more. In summary, we will do our best to implement anything you can think of.
|
||||
|
||||
## Open Source Declaration
|
||||
|
||||
This project follows the `GPL` open-source license.
|
|
@ -1,76 +0,0 @@
|
|||
# kun-galgame-vue
|
||||
|
||||
## Introduction
|
||||
|
||||
This is the frontend of the KUNGalgame forum, and it's the first version. We have built it using the Vue framework, and in the future, we plan to refactor it using the Svelte framework.
|
||||
|
||||
The link to the first version of the backend project is [kun-galgame-koa](https://github.com/KUN1007/kun-galgame-koa).
|
||||
|
||||
## About the Website
|
||||
|
||||
KUNGalgame — The Cutest Galgame Forum in the World!
|
||||
|
||||
We strive to create the best environment for Galgame discussions.
|
||||
|
||||
Tips: The website is currently under construction...
|
||||
|
||||
## Operational Philosophy
|
||||
|
||||
- The cutest galgame forum in the world.
|
||||
- With the aim of creating the best atmosphere.
|
||||
- There will never be any ads.
|
||||
- There will never be any charges.
|
||||
|
||||
## Project Introduction
|
||||
|
||||
### Overview
|
||||
|
||||
This is a **restructured version** of [`KUNGalgame-pure-css`](https://github.com/KUN1007/kungalgame-pure-css). We have used Vite, Vue3, Vue-router4, Typescript, SCSS, and Pinia as the frontend technology stack. We do not depend on any UI framework because this project is focused on a non-UI framework approach. As my VSCode comes with necessary plugins like ESLint, we haven't integrated them into the project. We plan to integrate the required environment and project configurations in the first version to be launched.
|
||||
|
||||
When the frontend project was completed, there was a built-in, lightweight `express` server in the root directory of the project, located in the `server` folder. This server is not the backend for the project; it is merely a data simulation similar to `mockjs`. We plan to write our backend in `Rust`.
|
||||
|
||||
### Preview
|
||||
|
||||
The original project is located at https://github.com/KUN1007/kungalgame-pure-css. However, during the restructuring, we added a lot of content and changed the icons from `fontawesome` to `iconify`. So, the appearance may be different. Here, we provide a preview of the homepage only.
|
||||
|
||||
#### Web Browser
|
||||
|
||||
![Preview](https://github.com/KUN1007/KUNGalGame-vue/blob/layout/docs/images/preview.png) ![Dark Preview](https://github.com/KUN1007/KUNGalGame-vue/blob/layout/docs/images/preview-dark.png)
|
||||
|
||||
#### Mobile Browser
|
||||
|
||||
![Mobile Preview](https://github.com/KUN1007/KUNGalGame-vue/blob/layout/docs/images/mobile-preview.png) ![Mobile Dark Preview](https://github.com/KUN1007/KUNGalGame-vue/blob/layout/docs/images/mobile-preview-dark.png)
|
||||
|
||||
### How to Start
|
||||
|
||||
1. Clone the repository: `git clone https://github.com/KUN1007/KUNGalGame-vue`
|
||||
2. Change the directory: `cd KUNGalGame-vue`
|
||||
|
||||
#### Server
|
||||
|
||||
1. Navigate to the server directory: `cd server`
|
||||
2. Install dependencies: `pnpm i`
|
||||
3. Start the server: `pnpm start`
|
||||
|
||||
#### Frontend
|
||||
|
||||
1. Return to the parent directory: `cd ..`
|
||||
2. Install frontend dependencies: `pnpm i`
|
||||
3. Start the development server: `vite dev`
|
||||
|
||||
Please note that you should start the server first to have simulated data.
|
||||
|
||||
## Notes
|
||||
|
||||
Only version 1 will be released. During the initial design, we have already planned the content for versions 2 and 3, including data analysis for websites like `VNDB`, `批评空间`, `bangumi`, streaming video uploads, and an app version. In short, we will try to implement anything you can think of.
|
||||
|
||||
## Contact Us
|
||||
|
||||
If you wish to participate in our development, you can join our development groups:
|
||||
|
||||
- QQ: 872839714
|
||||
- Telegram: https://t.me/KUNForum
|
||||
|
||||
## Open Source Statement
|
||||
|
||||
This project follows the `GPL` open-source license.
|
|
@ -1,77 +0,0 @@
|
|||
## KUNGalgame Forum Feature Showcase
|
||||
|
||||
### Global Website Settings
|
||||
|
||||
- `I18n` Internationalization
|
||||
- Custom background image
|
||||
- Light / Dark mode
|
||||
- Global font switching
|
||||
- Website page width adjustment
|
||||
|
||||
### User Information Display
|
||||
|
||||
- Username
|
||||
- Cutie Points
|
||||
- Registration number
|
||||
- User role
|
||||
- User status
|
||||
- Number of times the user has been pushed
|
||||
- Number of times the user has been liked
|
||||
- Number of times the user has been disliked
|
||||
- Number of topics the user posted today
|
||||
- Total number of topics posted by the user
|
||||
- Total number of replies posted by the user
|
||||
- Total number of comments posted by the user
|
||||
- User registration time
|
||||
- User signature
|
||||
- Change user avatar
|
||||
- Change user signature
|
||||
- Change user email
|
||||
- Change user password
|
||||
- Topics posted by the user
|
||||
- Topics liked by the user
|
||||
- Topics pushed by the user
|
||||
- Replies posted by the user
|
||||
- Comments posted by the user
|
||||
|
||||
### Topic Information Display
|
||||
|
||||
- Topic title
|
||||
- Topic tags
|
||||
- Topic posting time
|
||||
- Topic poster's avatar, username, Cutie Points
|
||||
- Topic content, rich text
|
||||
- Topic status
|
||||
- Whether the topic has been re-edited
|
||||
- Number of times the topic has been pushed
|
||||
- Number of topic views
|
||||
- Number of topic likes
|
||||
- Number of topic dislikes
|
||||
- Reply to the topic
|
||||
- Share the topic
|
||||
- Re-edit the topic
|
||||
|
||||
### Reply Information Display
|
||||
|
||||
- Avatar, username, Cutie Points of the replier
|
||||
- Person being replied to
|
||||
- Reply floor number
|
||||
- Reply tags
|
||||
- Reply posting time
|
||||
- Reply re-edit time
|
||||
- Reply content, rich text
|
||||
- Number of times the reply has been pushed
|
||||
- Number of times the reply has been liked
|
||||
- Number of times the reply has been disliked
|
||||
- Reply to the reply
|
||||
- Share the reply
|
||||
- Comment on the reply
|
||||
|
||||
### Comment Information Display
|
||||
|
||||
- Avatar, username of the commenter
|
||||
- Person being commented on
|
||||
- Number of times the comment has been liked
|
||||
- Number of times the comment has been disliked
|
||||
- Comment on the comment
|
||||
- Comment content
|
210
docs/en/pages.md
|
@ -1,210 +0,0 @@
|
|||
## Page Introductions
|
||||
|
||||
KUNGalgame consists of dozens of pages and numerous sub-interfaces.
|
||||
|
||||
### Homepage
|
||||
|
||||
- Website icon, site name, top navigation bar
|
||||
- Settings panel
|
||||
- Light / Dark mode switch
|
||||
- Website language selection
|
||||
- Website width adjustment
|
||||
- Website font adjustment
|
||||
- Website background adjustment
|
||||
- Custom website background
|
||||
- Reset website blank background
|
||||
- Reset all settings to default
|
||||
- Website mascot - Ren from the Visual Novel"枯れない世界と終わる花" ([source](http://sweet.clearrave.co.jp/karehana/))
|
||||
- User information
|
||||
- User avatar
|
||||
- Username
|
||||
- Cutie Points
|
||||
- Navigate to user profile
|
||||
- Logout
|
||||
- Open the sidebar
|
||||
- Collapse the sidebar
|
||||
- Create a new topic
|
||||
- Function bar
|
||||
- Update log
|
||||
- Income and expenses disclosure
|
||||
- Leaderboard
|
||||
- Bylaws
|
||||
- Join us
|
||||
- Not-cute records
|
||||
- Today's hot topics
|
||||
- Today's latest topics
|
||||
- Sort topics by updates, time, popularity, views, likes, replies, comments, ascending, and descending
|
||||
- Dynamic topic search
|
||||
- Search history
|
||||
- Clear search history
|
||||
- Clear all records
|
||||
- Jump to all topics
|
||||
- Topic display - User avatar, username, topic preview, topic title, topic views, topic likes, topic replies, topic posting time
|
||||
- Footer
|
||||
- Other communication
|
||||
- Technical information
|
||||
- About us
|
||||
- Friendly links
|
||||
- Website introduction
|
||||
- Contact us
|
||||
- Copyright information
|
||||
|
||||
### Topic Details Page
|
||||
|
||||
- Collapse the sidebar
|
||||
- Expand the sidebar
|
||||
- Back to top
|
||||
- Sort by floor
|
||||
- Sort by time
|
||||
- Sort by likes
|
||||
- Sort by replies
|
||||
- Sort by update time
|
||||
- Ascending order
|
||||
- Descending order
|
||||
- Other topics under the same tag
|
||||
- Other topics by the original poster
|
||||
- Copyright information
|
||||
- Topic display
|
||||
- Topic title
|
||||
- Topic tags
|
||||
- Topic posting time
|
||||
- Topic poster's avatar, username, Cutie Points
|
||||
- Topic content, rich text
|
||||
- Topic status - Normal, pushed, banned
|
||||
- Time of topic re-edit
|
||||
- Number of times the topic has been pushed
|
||||
- Number of topic views
|
||||
- Number of topic likes
|
||||
- Number of topic dislikes
|
||||
- Reply to topic
|
||||
- Share topic
|
||||
- Re-edit topic
|
||||
- Reply display
|
||||
- Replier's avatar, username, Cutie Points
|
||||
- Person being replied to
|
||||
- Reply floor number
|
||||
- Reply tags
|
||||
- Reply posting time
|
||||
- Time of reply re-edit
|
||||
- Reply content
|
||||
- Number of times the reply has been pushed
|
||||
- Number of times the reply has been liked
|
||||
- Number of times the reply has been disliked
|
||||
- Reply to the reply
|
||||
- Share reply
|
||||
- Re-edit reply
|
||||
- Comment on the reply
|
||||
- Comment display
|
||||
- Commenter's avatar
|
||||
- Commenter's username
|
||||
- Person being commented on
|
||||
- Number of times the comment has been liked
|
||||
- Number of times the comment has been disliked
|
||||
- Comment on the comment
|
||||
|
||||
### User Profile Page
|
||||
|
||||
- User avatar
|
||||
- Username
|
||||
- MoeMoePoints
|
||||
- Registration number
|
||||
- User role
|
||||
- User status
|
||||
- Number of times the user has been pushed
|
||||
- Number of times the user has been liked
|
||||
- Number of times the user has been disliked
|
||||
- Number of topics the user posted today
|
||||
- Total number of topics posted by the user
|
||||
- Total number of replies posted by the user
|
||||
- Total number of comments posted by the user
|
||||
- User registration date
|
||||
- User signature
|
||||
- Change user avatar
|
||||
- Change user signature
|
||||
- User email (encrypted)
|
||||
- Change user email
|
||||
- Change user password
|
||||
- Forgot password
|
||||
- Topics posted by the user
|
||||
- Topics liked by the user
|
||||
- Topics pushed by the user
|
||||
- Replies posted by the user
|
||||
- Comments posted by the user
|
||||
|
||||
### Topic Editing Page
|
||||
|
||||
- Topic title
|
||||
- Editor - vue-quill
|
||||
- Editor settings
|
||||
- Editor height
|
||||
- Editor mode
|
||||
- Show popular tags
|
||||
- Topic tags
|
||||
- Popular topic tags
|
||||
- Topic category
|
||||
- Publish topic
|
||||
- Save as draft
|
||||
- Re-edit topic
|
||||
- Confirm re-edit
|
||||
|
||||
### Update Log Page
|
||||
|
||||
- Next version update information
|
||||
- GitHub link
|
||||
- Estimated update time
|
||||
- Historical update records
|
||||
- Update time
|
||||
- Update description
|
||||
- Copyright information
|
||||
|
||||
### Income and Expenditure Disclosure Page
|
||||
|
||||
- Income
|
||||
- Income time
|
||||
- Income reason
|
||||
- Income consequences
|
||||
- Total income
|
||||
- Expenditure
|
||||
- Expense occurrence time
|
||||
- Expense reason
|
||||
- Expense consequences
|
||||
- Total expenses
|
||||
- Profit and loss status
|
||||
- Total profit/loss amount
|
||||
- Copyright information
|
||||
|
||||
### Leaderboard Page
|
||||
|
||||
- MoeMoe Users Ranking
|
||||
- Ascending/descending
|
||||
- Sort users by MoeMoe Points, pushes, likes, topics posted, replies posted, comments posted
|
||||
- User avatar
|
||||
- Username
|
||||
- Cutie Points, pushes, likes, topics posted, replies posted
|
||||
- MoeMoe Topics Ranking
|
||||
- Ascending/descending
|
||||
- Sort topics by popularity, pushes, views, likes, shares, comments
|
||||
- Topic name
|
||||
- Topic popularity, pushes, views, likes, shares, comments
|
||||
|
||||
### Non-Moe Records Page
|
||||
|
||||
- Individuals who engaged in non-moe behavior
|
||||
- Reasons for non-moe behavior
|
||||
- Time when non-moe behavior occurred
|
||||
- Consequences of non-moe behavior
|
||||
|
||||
### About Us Page
|
||||
|
||||
- Website introduction
|
||||
- Mission statement
|
||||
- Forum rules
|
||||
- Privacy policy
|
||||
- Bylaws
|
||||
- Update log
|
||||
- Income and expenses disclosure
|
||||
- Non-moe records
|
||||
- Join us
|
||||
- Acknowledgments
|
||||
- Sponsor us
|
||||
- Back to the homepage
|
|
@ -1,28 +0,0 @@
|
|||
# Code Writing Guidelines
|
||||
|
||||
## Overview
|
||||
|
||||
- Code must follow the `Vue3 composition API + setup + Typescript` approach, following official documentation examples.
|
||||
- Direct DOM operations like `document.getElementById` are not allowed unless absolutely necessary.
|
||||
- Folder names should use `kebab-case`, `.ts` files should use `camelCase`, and `.vue` files should use `PascalCase` for naming.
|
||||
- Packages larger than `500kb` are not allowed to be imported.
|
||||
|
||||
## Vue3
|
||||
|
||||
- Functions like `defineProps` and `defineEmits` must have types declared using TypeScript, in the format `const props = defineProps<{param: type}>()`.
|
||||
- When there are four or more levels of calls, `computed` must be used. Ternary operators must use `computed`.
|
||||
- Component names should be in `PascalCase`, and built-in components must be imported in `PascalCase`, for example, `<RouterLink to="/kun" />`.
|
||||
- When passing props from a parent component to a child component, use `kebab-case` naming. Use `camelCase` for `v-on` events.
|
||||
|
||||
## TypeScript
|
||||
|
||||
- The use of `any` is not allowed.
|
||||
- Interfaces should be named in `PascalCase`.
|
||||
- Declaration files with a `.d.ts` extension should be named using `kebab-case`.
|
||||
|
||||
## Variables and Functions
|
||||
|
||||
- Variables should preferably be declared using `const`, and functions should preferably be declared using arrow function syntax like `const kun = () => {}`.
|
||||
- Boolean values should always start with `is`, for example, `isShowToolbar`.
|
||||
- Functions in the `store` should be named using the `use...store` convention, for example, `useKUNGalgameEditStore`.
|
||||
- For complex functions, use the `@param {type} paramName` format for writing comments.
|
Before Width: | Height: | Size: 368 KiB |
Before Width: | Height: | Size: 366 KiB |
Before Width: | Height: | Size: 1.3 MiB |
Before Width: | Height: | Size: 1.3 MiB |
Before Width: | Height: | Size: 1.9 MiB |
|
@ -1,33 +0,0 @@
|
|||
这是在写这个项目时我的心理状态(以前的 Readme)
|
||||
|
||||
# KUNGalgame 论坛的 Vue 前端重构版本
|
||||
|
||||
这个项目的技术栈为:Vite + Vue3 + Ts + Pinia + Scss,它并没有依赖任何 UI 库
|
||||
|
||||
### 纯 HTML / CSS 版本:https://github.com/KUN1007/kungalgame-pure-css
|
||||
|
||||
|
||||
PS: 这个项目现在令我感到无从下手,如果你觉得有好的想法,欢迎帮我看看,该项目的介绍文档位于 ./src/assets/docs 下
|
||||
|
||||
目前的问题是,要处理的问题太多,没有一个合理的入手点
|
||||
|
||||
比如说:
|
||||
|
||||
* 没有合适的后端数据接口供我调用。我尝试使用 express 搭建了微型的数据接口,可是这并不能为我带来什么作用
|
||||
* 我不清楚这个项目应该如何布局。因为这个项目本身较大,我现在甚至连如何合理的规划项目结构都做不到,例如我不知道是否需要 ./src/layout
|
||||
* 我不清楚如何对数据进行集成。例如我要将单个话题和单个用户的数据定义好,然后再统一在项目的任何位置进行调用。我觉得这可能是我 pinia 学的不好??
|
||||
* 我不清楚该如何预留合理的接口。我觉得这可能是我的 axios 学的不够好
|
||||
* 我的每个组件嵌套过于深了。例如 Home 组件足足有 7 层,这显然是不合理的,我要找到合理的解决方案
|
||||
* 我已经深深的感觉到我的 ts / js 学的不好了(????
|
||||
|
||||
其实最大的问题就在于无从下手,因为我不清楚该把基础的数据放在哪里,比如说 store 之类的地方,然后我再去调用。现在对我的开发造成了巨大的阻碍,因为我的大部分页面都需要数据,没有数据的流动,一切免谈。
|
||||
|
||||
---
|
||||
|
||||
06/05/2023
|
||||
现在我明白了,我目前的这个项目已经属于大前端的范畴了,涉及到 Web 架构师的知识,用到的许多交互技术需要学习,我目前并不具备一个大前端的知识量,所以本项目暂时搁置,以后再写
|
||||
|
||||
12/06/2023
|
||||
现在又碰到棘手的问题了,还是前后端联调的问题,我发现我永远也想不好 API 怎么设计,看来这确实需要良好的后端知识
|
||||
-
|
||||
综上所述现在这个项目的状况好一点了,但是还是壳,我将其成为高级壳(HTML++ ?),等到接口和鉴权之类的工作做好了才能被成为网站
|
|
@ -1,93 +0,0 @@
|
|||
# KUNGalgame 论坛的 Vue 前端重构版本
|
||||
|
||||
.
|
||||
|
||||
## 截止到 18/06/2023,两个月的时间,200 多次 commit,我们几乎完成了所有的静态页面,接下来我们将会对网站的后端进行编写
|
||||
|
||||
.
|
||||
## 介绍
|
||||
|
||||
KUNGalgame —— 世界上最萌的 Galgame 论坛!
|
||||
|
||||
为营造最良好的 Galgame 讨论环境为目的进行努力!
|
||||
|
||||
Tips: 网站目前正在建设中······
|
||||
|
||||
|
||||
|
||||
## 运营理念
|
||||
|
||||
- 世界上最萌的 galgame 论坛
|
||||
- 以营造最良好的氛围为理念
|
||||
- 永远不会有广告
|
||||
- 永远不会收费
|
||||
|
||||
|
||||
|
||||
## 项目介绍
|
||||
|
||||
.
|
||||
|
||||
### 简介
|
||||
|
||||
.
|
||||
|
||||
这是[`KUNGalgame-pure-css`](https://github.com/KUN1007/kungalgame-pure-css) 的**重构版本**,使用 Vite + Vue3 + Vue-router4 + Typescript + SCSS + Pinia 作为前端技术栈,不依赖任何 UI 框架,因为这个项目主打的就是非 UI 框架,世界都一样多没意思呀。由于我的 VScode 自带`ESLint`等必要插件,所以并未在项目中进行集成,预计在项目的第一个版本上线时会集成必要的环境类项目配置。
|
||||
|
||||
.
|
||||
|
||||
前端项目成型时在项目根目录有一个自带的微型`express`服务器可启动,存放于`server`文件夹,这并不是该项目的后端,只是一个类似于`mockjs`的数据模拟而已,我们的后端计划使用`Rust`编写
|
||||
|
||||
.
|
||||
|
||||
### 预览
|
||||
|
||||
##### 原项目的地址为:[https://github.com/KUN1007/kungalgame-pure-css](https://github.com/KUN1007/kungalgame-pure-css)
|
||||
|
||||
但是我们在重构的时候增加了大量的内容,并且将图标由`fontawesome`改为了`iconify`,所以外观可能会不同,这里仅展示主页预览
|
||||
|
||||
.
|
||||
#### Web 端浏览器
|
||||
![](https://github.com/KUN1007/KUNGalGame-vue/blob/layout/introduction/images/preview.png)
|
||||
![](https://github.com/KUN1007/KUNGalGame-vue/blob/layout/introduction/images/preview-dark.png)
|
||||
.
|
||||
#### 手机端浏览器
|
||||
![](https://github.com/KUN1007/KUNGalGame-vue/blob/layout/introduction/images/mobile-preview.png)
|
||||
![](https://github.com/KUN1007/KUNGalGame-vue/blob/layout/introduction/images/mobile-preview-dark.png)
|
||||
|
||||
### 启动方法
|
||||
|
||||
`git clone https://github.com/KUN1007/KUNGalGame-vue`
|
||||
|
||||
`cd KUNGalGame-vue`
|
||||
|
||||
#### 服务端
|
||||
|
||||
`cd server `
|
||||
|
||||
`pnpm i`
|
||||
|
||||
`pnpm start`
|
||||
|
||||
#### 前端
|
||||
|
||||
`cd ..`
|
||||
|
||||
`pnpm i`
|
||||
|
||||
`vite dev`
|
||||
|
||||
请注意,请先启动服务端,这样才有模拟的数据
|
||||
|
||||
.
|
||||
|
||||
## 注意事项
|
||||
|
||||
将要发布的只是 V1 版本,我们在设计之初就已经规划好了 V2, V3 版本的内容,包括对 `VNDB` `批评空间` `bangumi` 等网站的数据进行分析,流媒体发布(上传发布视频),APP 版本等等。总之,只要您能想到的,我们都会尽力实现。
|
||||
|
||||
.
|
||||
|
||||
## 开源声明
|
||||
|
||||
本项目遵从`GPL`开源协议
|
||||
|
|
@ -1,117 +0,0 @@
|
|||
# kun-galgame-vue
|
||||
|
||||
.
|
||||
|
||||
## 介绍
|
||||
|
||||
|
||||
|
||||
这是 KUNGalgame 论坛的前端,这是第一个版本,我们使用 `vue` 框架编写,之后我们会使用 `svelte` 框架重构
|
||||
|
||||
|
||||
|
||||
后端项目第一个版本的地址为 [kun-galgame-koa](https://github.com/KUN1007/kun-galgame-koa)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## 关于该网站
|
||||
|
||||
|
||||
|
||||
KUNGalgame —— 世界上最萌的 Galgame 论坛!
|
||||
|
||||
|
||||
|
||||
为营造最良好的 Galgame 讨论环境为目的进行努力!
|
||||
|
||||
|
||||
|
||||
Tips: 网站目前正在建设中······
|
||||
|
||||
## 运营理念
|
||||
|
||||
- 世界上最萌的 galgame 论坛
|
||||
- 以营造最良好的氛围为理念
|
||||
- 永远不会有广告
|
||||
- 永远不会收费
|
||||
|
||||
|
||||
|
||||
## 项目介绍
|
||||
|
||||
.
|
||||
|
||||
### 简介
|
||||
|
||||
.
|
||||
|
||||
这是[`KUNGalgame-pure-css`](https://github.com/KUN1007/kungalgame-pure-css) 的**重构版本**,使用 Vite + Vue3 + Vue-router4 + Typescript + SCSS + Pinia 作为前端技术栈,不依赖任何 UI 框架,因为这个项目主打的就是非 UI 框架,世界都一样多没意思呀。由于我的 VScode 自带`ESLint`等必要插件,所以并未在项目中进行集成,预计在项目的第一个版本上线时会集成必要的环境类项目配置。
|
||||
|
||||
.
|
||||
|
||||
前端项目成型时在项目根目录有一个自带的微型`express`服务器可启动,存放于`server`文件夹,这并不是该项目的后端,只是一个类似于`mockjs`的数据模拟而已,我们的后端计划使用`Rust`编写
|
||||
|
||||
.
|
||||
|
||||
### 预览
|
||||
|
||||
##### 原项目的地址为:[https://github.com/KUN1007/kungalgame-pure-css](https://github.com/KUN1007/kungalgame-pure-css)
|
||||
|
||||
但是我们在重构的时候增加了大量的内容,并且将图标由`fontawesome`改为了`iconify`,所以外观可能会不同,这里仅展示主页预览
|
||||
|
||||
.
|
||||
#### Web 端浏览器
|
||||
![](https://github.com/KUN1007/KUNGalGame-vue/blob/layout/docs/images/preview.png)
|
||||
![](https://github.com/KUN1007/KUNGalGame-vue/blob/layout/docs/images/preview-dark.png)
|
||||
.
|
||||
|
||||
#### 手机端浏览器
|
||||
![](https://github.com/KUN1007/KUNGalGame-vue/blob/layout/docs/images/mobile-preview.png)
|
||||
![](https://github.com/KUN1007/KUNGalGame-vue/blob/layout/docs/images/mobile-preview-dark.png)
|
||||
|
||||
### 启动方法
|
||||
|
||||
`git clone https://github.com/KUN1007/KUNGalGame-vue`
|
||||
|
||||
`cd KUNGalGame-vue`
|
||||
|
||||
#### 服务端
|
||||
|
||||
`cd server `
|
||||
|
||||
`pnpm i`
|
||||
|
||||
`pnpm start`
|
||||
|
||||
#### 前端
|
||||
|
||||
`cd ..`
|
||||
|
||||
`pnpm i`
|
||||
|
||||
`vite dev`
|
||||
|
||||
请注意,请先启动服务端,这样才有模拟的数据
|
||||
|
||||
.
|
||||
|
||||
## 注意事项
|
||||
|
||||
将要发布的只是 V1 版本,我们在设计之初就已经规划好了 V2, V3 版本的内容,包括对 `VNDB` `批评空间` `bangumi` 等网站的数据进行分析,流媒体发布(上传发布视频),APP 版本等等。总之,只要您能想到的,我们都会尽力实现。
|
||||
|
||||
.
|
||||
|
||||
## 联系我们
|
||||
|
||||
如果您想参与我们的开发,可以加入我们的开发群组
|
||||
|
||||
QQ:872839714
|
||||
|
||||
Telegram:https://t.me/KUNForum
|
||||
|
||||
## 开源声明
|
||||
|
||||
本项目遵从`GPL`开源协议
|
||||
|
|
@ -1,140 +0,0 @@
|
|||
![](https://github.com/KUN1007/kun-galgame-vue/blob/layout/src/assets/images/favicon.png)
|
||||
|
||||
图片来源为游戏 [方舟指令](https://apps.qoo-app.com/en/app/9593) 中的角色 `鲲`
|
||||
|
||||
# kun-galgame-vue
|
||||
|
||||
|
||||
|
||||
## 介绍
|
||||
|
||||
这是 KUNGalgame 论坛的前端,这是第一个版本,我们使用 `vue` 框架编写
|
||||
|
||||
|
||||
|
||||
KUNGalgame 创建的意义在于:
|
||||
|
||||
|
||||
|
||||
- 大力宣传真正的好游戏,让大家都会用 VNDB 等网站,看到真正的 可视化数据,避免被“大佬”毒害
|
||||
- **远离现代互联网捧一踩一,以批评为美德等等不好的现状**
|
||||
- 让任何人都学习基本的计算机基础,避免“爷新”的出现
|
||||
- 构建一个以用户个人乐趣为主的论坛,抵制鄙视链的产生
|
||||
- 目前的网站大多数套用模板,千篇一律,令人审美疲劳
|
||||
- ......等等。
|
||||
|
||||
|
||||
|
||||
我们认为:“**让你觉得快乐的,让你发自内心笑出来的,才是真正的好游戏!**”
|
||||
|
||||
|
||||
|
||||
**后端项目第一个版本的地址为 [kun-galgame-koa](https://github.com/KUN1007/kun-galgame-koa)**
|
||||
|
||||
|
||||
|
||||
## 运营理念
|
||||
|
||||
- 世界上最萌的 galgame 论坛
|
||||
- 以营造最良好的氛围为理念
|
||||
- 永远不会有广告
|
||||
- 永远不会收费
|
||||
|
||||
|
||||
|
||||
## 技术支持
|
||||
|
||||
* 支持所有手机和电脑端**现代**浏览器
|
||||
* 适配任意大小屏幕
|
||||
* 全部 `Vue3` 组合式 `API`,全部 `Typescript` 支持,编写方式遵从[Vue 官网](vuejs.org)最佳实践
|
||||
|
||||
|
||||
|
||||
## 特性
|
||||
|
||||
### 网站全局设置
|
||||
|
||||
* `I18n` 国际化
|
||||
* 自定义背景图片
|
||||
* 白天 / 黑夜模式
|
||||
* 网站全体字体切换
|
||||
* 网站页面宽度调整
|
||||
|
||||
### 需要注意的是
|
||||
|
||||
* 网站会在每 `60min` 刷新一次 `token`,会有短暂白屏,这是为了更加安全
|
||||
* 网站使用了 [`vue-quill`](https://github.com/vueup/vue-quill) 作为富文本编辑器,但是该编辑器使用了[过时的 `API`](https://github.com/vueup/vue-quill/issues/409),所以编辑器出现时控制台会有警告,这是编辑器的原因,并不是网站代码的错误,我们之后会自己开发一款富文本编辑器
|
||||
* 如果您遇到网站的任何错误,或者有所建议,请[联系我们](https://github.com/KUN1007/kun-galgame-vue#contact-us)
|
||||
|
||||
要查看网站的全部特性请[点击这里](https://github.com/KUN1007/kun-galgame-vue/blob/V1/docs/en/feat.md)
|
||||
|
||||
要查看网站的所有页面功能请[点击这里](https://github.com/KUN1007/kun-galgame-vue/blob/V1/docs/en/pages.md)
|
||||
|
||||
## 项目介绍
|
||||
|
||||
### 简介
|
||||
|
||||
这是[`KUNGalgame-pure-css`](https://github.com/KUN1007/kungalgame-pure-css) 的**重构版本**,使用 Vite + Vue3 + Vue-router4 + Typescript + SCSS + Pinia 作为前端技术栈,不依赖任何 UI 框架,因为这个项目主打的就是非 UI 框架,世界都一样多没意思呀。
|
||||
|
||||
项目中并未集成 `ESLint`, `Prettier` 等,因为太麻烦了,我爱摸鱼,预计在项目的第一个版本上线时会集成必要的环境类项目配置。
|
||||
|
||||
### 预览
|
||||
|
||||
##### 纯 HTML + CSS 项目的地址为:[https://github.com/KUN1007/kungalgame-pure-css](https://github.com/KUN1007/kungalgame-pure-css)
|
||||
|
||||
但是我们在重构的时候增加了大量的内容,并且将图标由`fontawesome`改为了`iconify`,所以外观可能会不同,这里仅展示主页预览
|
||||
|
||||
#### Web 端浏览器
|
||||
![白天模式](https://github.com/KUN1007/kun-galgame-vue/blob/V1/docs/images/preview.png)
|
||||
![黑夜模式](https://github.com/KUN1007/kun-galgame-vue/blob/V1/docs/images/preview-dark.png)
|
||||
|
||||
#### 手机端浏览器
|
||||
![白天模式](https://github.com/KUN1007/kun-galgame-vue/blob/V1/docs/images/mobile-preview.png)
|
||||
![黑夜模式](https://github.com/KUN1007/kun-galgame-vue/blob/V1/docs/images/mobile-preview-dark.png)
|
||||
|
||||
### 启动方法
|
||||
|
||||
`git clone https://github.com/KUN1007/kun-galgame-vue`
|
||||
|
||||
`cd kun-galgame-vue`
|
||||
|
||||
`pnpm i`
|
||||
|
||||
`vite dev`
|
||||
|
||||
## 注意事项
|
||||
|
||||
将要发布的只是 V1 版本,我们在设计之初就已经规划好了 V2, V3 版本的内容,包括
|
||||
|
||||
* 对 [`VNDB`](https://vndb.org/), [`批评空间`](https://erogamescape.dyndns.org/), [`bangumi`](https://bangumi.tv/) 等网站的数据进行分析
|
||||
* 流媒体发布(上传发布视频)
|
||||
* APP 版本
|
||||
* ......等等
|
||||
|
||||
总之,只要您能想到的,我们都会尽力实现。
|
||||
|
||||
|
||||
## 联系我们
|
||||
|
||||
如果您想参与我们的开发,可以加入我们的开发群组
|
||||
|
||||
Telegram:https://t.me/KUNForum
|
||||
|
||||
Tencent QQ Group: 872839714
|
||||
|
||||
下面两个群组是 Galgame 群,交流与反馈
|
||||
|
||||
Telegram: https://t.me/kungalgame
|
||||
|
||||
Tencent QQ Group: 871857690
|
||||
|
||||
## Translation
|
||||
|
||||
[中文版](https://github.com/KUN1007/kun-galgame-vue/blob/V1/docs/zh/README.md)
|
||||
|
||||
特别感谢 `yuyu` 的中文版翻译
|
||||
|
||||
## License
|
||||
|
||||
本项目遵从`GPL`开源协议
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
## KUNGalgame 论坛特性展示
|
||||
|
||||
### 网站全局设置
|
||||
|
||||
* `I18n` 国际化
|
||||
* 自定义背景图片
|
||||
* 白天 / 黑夜模式
|
||||
* 网站全体字体切换
|
||||
* 网站页面宽度调整
|
||||
|
||||
### 用户信息展示
|
||||
|
||||
* 用户名
|
||||
* 萌萌点
|
||||
* 注册序号
|
||||
* 用户角色
|
||||
* 用户状态
|
||||
* 用户被推数
|
||||
* 用户被赞数
|
||||
* 用户被踩数
|
||||
* 用户今日发布话题数
|
||||
* 用户发布话题数
|
||||
* 用户发布回复数
|
||||
* 用户发布评论数
|
||||
* 用户注册时间
|
||||
* 用户签名
|
||||
* 更改用户头像
|
||||
* 更改用户签名
|
||||
* 更改用户邮箱
|
||||
* 更改用户密码
|
||||
* 用户发布的话题
|
||||
* 用户点赞的话题
|
||||
* 用户推的话题
|
||||
* 用户发布的回复
|
||||
* 用户发布的评论
|
||||
|
||||
### 话题信息展示
|
||||
|
||||
* 话题标题
|
||||
* 话题标签
|
||||
* 话题发布时间
|
||||
* 话题发布人头像,用户名,萌萌点
|
||||
* 话题内容,富文本
|
||||
* 话题状态
|
||||
* 话题是否被重新编辑
|
||||
* 话题被推数
|
||||
* 话题浏览数
|
||||
* 话题点赞数
|
||||
* 话题点赞数
|
||||
* 回复话题
|
||||
* 分享话题
|
||||
* 重新编辑话题
|
||||
|
||||
### 回复信息展示
|
||||
|
||||
* 回复人头像,用户名,萌萌点
|
||||
* 被回复人
|
||||
* 回复楼层数
|
||||
* 回复标签
|
||||
* 回复发布时间
|
||||
* 回复重新编辑时间
|
||||
* 回复内容,富文本
|
||||
* 回复被推数
|
||||
* 回复被赞数
|
||||
* 回复被踩数
|
||||
* 回复回复
|
||||
* 分享回复
|
||||
* 评论回复
|
||||
|
||||
### 评论信息展示
|
||||
|
||||
* 评论人头像,用户名
|
||||
* 被评论人
|
||||
* 评论被赞数
|
||||
* 评论被踩数
|
||||
* 评论评论
|
||||
* 评论内容
|
211
docs/zh/pages.md
|
@ -1,211 +0,0 @@
|
|||
## 页面介绍
|
||||
|
||||
KUNGalgame 总共含有数十个页面,以及大量子界面
|
||||
|
||||
|
||||
|
||||
### 主页
|
||||
|
||||
* 网站图标,网站名,顶部导航条
|
||||
* 设置面板
|
||||
- 网站白天 / 黑夜切换
|
||||
- 网站语言切换
|
||||
- 网站宽度调整
|
||||
- 网站字体调整
|
||||
- 网站背景调整
|
||||
- 网站自定义背景
|
||||
- 网站恢复空白背景
|
||||
- 网站恢复所有设置为默认
|
||||
- 网站看板娘,出自 Galgame [枯れない世界と終わる花](http://sweet.clearrave.co.jp/karehana/) 中的レン
|
||||
* 用户信息
|
||||
- 用户头像
|
||||
- 用户名
|
||||
- 用户萌萌点
|
||||
- 跳转用户主页
|
||||
- 退出登录
|
||||
* 打开侧边栏
|
||||
* 折叠侧边栏
|
||||
* 发布新话题
|
||||
* 功能栏
|
||||
- 更新日志
|
||||
- 收支公示
|
||||
- 排行榜单
|
||||
- 执行条例
|
||||
- 加入我们
|
||||
- 不萌记录
|
||||
* 今日热门话题
|
||||
* 今日最新话题
|
||||
* 根据更新,时间,热度,浏览数,点赞数,回复数,评论数,升序,降序排序话题
|
||||
* 动态搜索话题
|
||||
- 搜索记录
|
||||
- 清除搜索记录
|
||||
- 清除全部记录
|
||||
* 跳转到所有话题
|
||||
* 话题展示,用户头像,用户名,话题预览,话题标题,话题浏览数,话题点赞数,话题回复数,话题发布时间
|
||||
* 底部 `Footer`
|
||||
- 其他交流
|
||||
- 技术相关
|
||||
- 关于我们
|
||||
- 友情链接
|
||||
- 网站简介
|
||||
- 联系我们
|
||||
- 版权信息
|
||||
|
||||
### 话题详情页
|
||||
|
||||
* 折叠侧边栏
|
||||
* 展开侧边栏
|
||||
- 回到顶端
|
||||
- 按照楼层排序
|
||||
- 按照时间排序
|
||||
- 按照点赞排序
|
||||
- 按照回复排序
|
||||
- 按照更新时间排序
|
||||
- 升序
|
||||
- 降序
|
||||
* 相同标签下的其它话题
|
||||
* 楼主的其他话题
|
||||
* 版权信息
|
||||
* 话题展示
|
||||
- 话题标题
|
||||
- 话题标签
|
||||
- 话题发布时间
|
||||
- 话题发布人头像,用户名,萌萌点
|
||||
- 话题内容,富文本
|
||||
- 话题状态,正常,被推,封禁
|
||||
- 话题被重新编辑的时间
|
||||
- 话题被推数
|
||||
- 话题浏览数
|
||||
- 话题被赞数
|
||||
- 话题被踩数
|
||||
- 回复话题
|
||||
- 分享话题
|
||||
- 重新编辑话题
|
||||
* 回复展示
|
||||
- 回复人头像,用户名,萌萌点
|
||||
- 被回复人
|
||||
- 回复的楼层数
|
||||
- 回复被重新编辑的时间
|
||||
- 回复发布时间
|
||||
- 回复的内容
|
||||
- 回复的被推数
|
||||
- 回复的被赞数
|
||||
- 回复的被踩数
|
||||
- 回复回复
|
||||
- 分享回复
|
||||
- 重新编辑回复
|
||||
- 评论回复
|
||||
* 评论展示
|
||||
- 评论人头像
|
||||
- 评论人用户名
|
||||
- 被评论人用户名
|
||||
- 评论点赞数
|
||||
- 评论点踩数
|
||||
- 评论评论
|
||||
|
||||
### 用户个人主页
|
||||
|
||||
* 用户头像
|
||||
* 用户名
|
||||
* 用户萌萌点
|
||||
* 用户注册序号
|
||||
* 用户角色
|
||||
* 用户状态
|
||||
* 用户被推数
|
||||
* 用户被赞数
|
||||
* 用户被踩数
|
||||
* 用户今日发表话题数
|
||||
* 用户发表的话题数
|
||||
* 用户发表的回复数
|
||||
* 用户发表的评论数
|
||||
* 用户注册日期
|
||||
* 用户签名
|
||||
* 更改用户头像
|
||||
* 更改用户签名
|
||||
* 用户邮箱(已加密)
|
||||
* 更改用户邮箱
|
||||
* 更改用户密码
|
||||
* 忘记密码
|
||||
* 用户发布的话题
|
||||
* 用户点赞的话题
|
||||
* 用户推的话题
|
||||
* 用户发布的回复
|
||||
* 用户发布的评论
|
||||
|
||||
### 话题编辑页
|
||||
|
||||
* 话题标题
|
||||
* 编辑器 - vue-quill
|
||||
* 编辑器设置
|
||||
- 编辑器高度
|
||||
- 编辑器模式
|
||||
- 是否显示热门标签
|
||||
* 话题标签
|
||||
* 话题热门标签
|
||||
* 话题分类
|
||||
* 发布话题
|
||||
* 保存草稿
|
||||
* 重新编辑话题
|
||||
* 确认重新编辑
|
||||
|
||||
### 更新日志页面
|
||||
|
||||
* 下个版本更新信息
|
||||
* `GitHub` 链接
|
||||
* 预计更新时间
|
||||
* 历史更新记录
|
||||
- 更新时间
|
||||
- 更新描述
|
||||
* 版权信息
|
||||
|
||||
### 收支公示页面
|
||||
|
||||
* 收入
|
||||
- 收入时间
|
||||
- 收入原因
|
||||
- 收入后果
|
||||
- 总收入
|
||||
* 支出
|
||||
- 支出发生的时间
|
||||
- 支出发生的原因
|
||||
- 支出的后果
|
||||
- 总支出
|
||||
* 盈亏状态
|
||||
* 盈余 / 亏损总金额
|
||||
* 版权信息
|
||||
|
||||
### 排行榜单页面
|
||||
|
||||
* 萌萌用户排行
|
||||
- 升序降序
|
||||
- 根据萌萌点,被推数,被赞数,发布话题数,发布回复数,发布评论数对用户进行排序
|
||||
- 用户头像
|
||||
- 用户名
|
||||
- 用户萌萌点,被推数,被赞数,发布话题数,发布回复数
|
||||
* 萌萌话题排行
|
||||
- 升序降序
|
||||
- 根据热度,被推数,浏览数,点赞数,分享数,评论数对话题进行排序
|
||||
- 话题名
|
||||
- 话题热度,被推数,浏览数,点赞数,分享数,评论数
|
||||
|
||||
### 不萌记录页面
|
||||
|
||||
* 不萌行为发生人
|
||||
* 不萌行为发生原因
|
||||
* 不萌行为发生时间
|
||||
* 不萌行为发生后果
|
||||
|
||||
### 关于我们页面
|
||||
|
||||
* 网站介绍
|
||||
* 运营理念
|
||||
* 论坛规定
|
||||
* 隐私政策
|
||||
* 执行条例
|
||||
* 更新日志
|
||||
* 收支公示
|
||||
* 不萌记录
|
||||
* 加入我们
|
||||
* 感谢名单
|
||||
* 赞助我们
|
||||
* 回到主页
|
|
@ -1,40 +0,0 @@
|
|||
# 代码编写说明
|
||||
|
||||
|
||||
|
||||
## 概览
|
||||
|
||||
|
||||
|
||||
* 总体必须采用 `Vue3 composition API + setup + Typescript ` 写法,参照官网示例
|
||||
* 不允许 `document.getElementById` 等直接的 `DOM` 操作,除非万不得已
|
||||
* 文件夹命名使用 `kebab-case` 命名,`.ts` 文件使用 `camelCase` 命名,`.vue` 文件使用 `PascalCase` 命名
|
||||
* 不允许引入超过 `500kb` 的包
|
||||
|
||||
|
||||
|
||||
## Vue3
|
||||
|
||||
|
||||
|
||||
* `defineProps` 以及 `defineEmits` 等函数必须使用 `ts` 标注类型,格式为 `const props = defineProps<{param: type}>()`
|
||||
* 当调用大于等于 `4` 层时必须用 `computed`,三元运算符必须用 `computed`
|
||||
* 组件名使用 `PascalCase` 命名,内置组件必须以 `PascalCase` 的形式引入,例如 `<RouterLink to="/kun" />`
|
||||
* 父组件给子组件传参使用 `kebab-case` 命名,`v-on` 使用 `camelCase` 命名
|
||||
|
||||
|
||||
|
||||
## Typescript
|
||||
|
||||
* 不允许出现 `any`
|
||||
* 接口一律用 `PascalCase ` 命名
|
||||
* `.s.ts` 的声明文件一律用 `kebab-case` 命名
|
||||
|
||||
|
||||
|
||||
## 变量、函数
|
||||
|
||||
* 变量尽可能使用 `const` 声明,函数尽量使用 `const kun = () => {}` 的箭头函数写法声明
|
||||
* 布尔类型的值一律以 `is` 开头,例如 `isShowToolbar`
|
||||
* `store` 中的函数一律使用 `use...store` 命名,例如 `useKUNGalgameEditStore`
|
||||
* 复杂函数请采用 `@param {type} paramName` 的形式编写注释
|
102
index.html
|
@ -2,108 +2,12 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link
|
||||
rel="icon"
|
||||
type="image/svg+xml"
|
||||
href="/src/assets/images/favicon.webp"
|
||||
/>
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta
|
||||
name="description"
|
||||
content="KUN Visual Novel Forum. 鲲 Galgame 论坛。 The CUTEST Visual Novel Forum!世界上最萌的 Galgame 论坛. Topic, Technique. NO ADs Forever. Free Forever"
|
||||
/>
|
||||
<title>KUN Visual Novel Forum| 鲲 Galgame 论坛</title>
|
||||
<style>
|
||||
:root {
|
||||
--kungalgame-blue-1: #b6e3ff;
|
||||
--kungalgame-blue-4: #218bff;
|
||||
|
||||
--kungalgame-trans-blue-1: #b6e3ff77;
|
||||
|
||||
--kungalgame-shadow-0: 0px 0px 17px 5px var(--kungalgame-blue-1);
|
||||
}
|
||||
|
||||
#kungalgame-loading-container {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#kungalgame-loading {
|
||||
height: 4.8px;
|
||||
background: var(--kungalgame-blue-4);
|
||||
box-shadow: var(--kungalgame-shadow-0);
|
||||
box-sizing: border-box;
|
||||
animation: kungalgame-loading 7.7s linear infinite;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#kungalgame-loading::after,
|
||||
#kungalgame-loading::before {
|
||||
content: '';
|
||||
width: 10px;
|
||||
height: 1px;
|
||||
background: var(--kungalgame-blue-4);
|
||||
position: absolute;
|
||||
top: 9px;
|
||||
right: -2px;
|
||||
opacity: 0;
|
||||
transform: rotate(-45deg) translateX(0px);
|
||||
box-sizing: border-box;
|
||||
animation: coli1 0.3s linear infinite;
|
||||
}
|
||||
|
||||
#kungalgame-loading::before {
|
||||
top: -4px;
|
||||
transform: rotate(45deg);
|
||||
animation: coli2 0.3s linear infinite;
|
||||
}
|
||||
|
||||
#kungalgame-loading h2 {
|
||||
position: absolute;
|
||||
top: 17px;
|
||||
color: var(--kungalgame-blue-4);
|
||||
}
|
||||
|
||||
@keyframes kungalgame-loading {
|
||||
0% {
|
||||
width: 0;
|
||||
}
|
||||
100% {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes coli1 {
|
||||
0% {
|
||||
transform: rotate(-45deg) translateX(0px);
|
||||
opacity: 0.7;
|
||||
}
|
||||
100% {
|
||||
transform: rotate(-45deg) translateX(-45px);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes coli2 {
|
||||
0% {
|
||||
transform: rotate(45deg) translateX(0px);
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
transform: rotate(45deg) translateX(-45px);
|
||||
opacity: 0.7;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<title>KUNGalgame</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<div id="kungalgame-loading-container">
|
||||
<div id="kungalgame-loading"><h2>Loading</h2></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
4933
package-lock.json
generated
Normal file
64
package.json
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"name": "kun-galgame-vue",
|
||||
"private": false,
|
||||
"name": "kungal-vue",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"description": "The CUTEST Visual Novel Forum!世界上最萌的 Galgame 论坛. Topic, Technique. NO ADs Forever. Free Forever",
|
||||
"description": "世界上最萌的 galgame 论坛",
|
||||
"author": {
|
||||
"name": "kun",
|
||||
"email": "kungalgame@gamil.com"
|
||||
|
@ -18,43 +18,29 @@
|
|||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@milkdown/core": "7.3.6",
|
||||
"@milkdown/ctx": "7.3.6",
|
||||
"@milkdown/plugin-clipboard": "7.3.6",
|
||||
"@milkdown/plugin-history": "7.3.6",
|
||||
"@milkdown/plugin-indent": "7.3.6",
|
||||
"@milkdown/plugin-listener": "7.3.6",
|
||||
"@milkdown/plugin-prism": "7.3.6",
|
||||
"@milkdown/plugin-tooltip": "7.3.6",
|
||||
"@milkdown/plugin-trailing": "7.3.6",
|
||||
"@milkdown/preset-commonmark": "7.3.6",
|
||||
"@milkdown/preset-gfm": "7.3.6",
|
||||
"@milkdown/prose": "7.3.6",
|
||||
"@milkdown/transformer": "7.3.6",
|
||||
"@milkdown/utils": "7.3.6",
|
||||
"@milkdown/vue": "7.3.6",
|
||||
"@prosemirror-adapter/vue": "0.2.6",
|
||||
"@wangeditor/editor": "^5.1.23",
|
||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||
"animate.css": "^4.1.1",
|
||||
"dayjs": "^1.11.10",
|
||||
"localforage": "^1.10.0",
|
||||
"nprogress": "^0.2.0",
|
||||
"pinia": "^2.1.7",
|
||||
"pinia-plugin-persistedstate": "^3.2.1",
|
||||
"refractor": "^4.8.1",
|
||||
"vue": "^3.4.24",
|
||||
"vue-i18n": "^9.13.1",
|
||||
"vue-router": "^4.3.2"
|
||||
"animejs": "^3.2.1",
|
||||
"axios": "^1.4.0",
|
||||
"mockjs": "^1.1.0",
|
||||
"pinia": "^2.0.35",
|
||||
"vue": "^3.2.47",
|
||||
"vue-i18n": "^9.3.0-beta.17",
|
||||
"vue-router": "^4.1.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify/vue": "^4.1.2",
|
||||
"@types/node": "^20.12.7",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"@vitejs/plugin-vue": "^5.0.4",
|
||||
"rollup-plugin-visualizer": "^5.12.0",
|
||||
"sass": "^1.75.0",
|
||||
"typescript": "^5.4.5",
|
||||
"vite": "^5.2.10",
|
||||
"vue-tsc": "^2.0.14"
|
||||
"@iconify/vue": "^4.1.1",
|
||||
"@types/less": "^3.0.3",
|
||||
"@types/node": "^18.15.12",
|
||||
"@vitejs/plugin-vue": "^4.1.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"less": "^4.1.3",
|
||||
"rollup-plugin-visualizer": "^5.9.0",
|
||||
"typescript": "^4.9.3",
|
||||
"vite": "^4.2.0",
|
||||
"vite-plugin-mock": "^3.0.0",
|
||||
"vue-tsc": "^1.2.0"
|
||||
},
|
||||
"keywords": [
|
||||
"kun",
|
||||
|
@ -67,5 +53,5 @@
|
|||
"gal",
|
||||
"visual novel"
|
||||
],
|
||||
"license": "LGPL-3.0-or-later"
|
||||
}
|
||||
"license": "MIT"
|
||||
}
|
||||
|
|
2618
pnpm-lock.yaml
|
@ -1,2 +0,0 @@
|
|||
User-agent: *
|
||||
Allow: /
|
58
src/App.vue
|
@ -1,56 +1,18 @@
|
|||
<!-- App -->
|
||||
<script setup lang="ts">
|
||||
import { defineAsyncComponent, onBeforeMount } from 'vue'
|
||||
// Import notification and alert components
|
||||
import Alert from '@/components/alert/Alert.vue'
|
||||
import Info from '@/components/alert/Info.vue'
|
||||
|
||||
// Import human verification component
|
||||
const Capture = defineAsyncComponent(
|
||||
() => import('@/components/capture/Capture.vue')
|
||||
)
|
||||
const KUNGalgameSearchBox = defineAsyncComponent(
|
||||
() => import('@/components/search/KUNGalgameSearchBox.vue')
|
||||
)
|
||||
|
||||
import { useKUNGalgameSettingsStore } from '@/store/modules/settings'
|
||||
import { storeToRefs } from 'pinia'
|
||||
|
||||
// Use the settings panel store
|
||||
const { showKUNGalgameMode, showKUNGalgameFontStyle } = storeToRefs(
|
||||
useKUNGalgameSettingsStore()
|
||||
)
|
||||
|
||||
// Lifecycle functions must be called here to initialize the theme and font
|
||||
onBeforeMount(() => {
|
||||
const theme = showKUNGalgameMode.value
|
||||
const font = showKUNGalgameFontStyle.value
|
||||
|
||||
// restore saved theme status
|
||||
if (theme) {
|
||||
document.documentElement.className = theme
|
||||
}
|
||||
// restore saved font settings
|
||||
if (font) {
|
||||
document.documentElement.style.fontFamily = font
|
||||
}
|
||||
})
|
||||
import 'animate.css'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<!-- Global alert component -->
|
||||
<Alert />
|
||||
|
||||
<!-- Global info component -->
|
||||
<Info />
|
||||
|
||||
<!-- Global capture component -->
|
||||
<Capture />
|
||||
|
||||
<!-- Global search component -->
|
||||
<KUNGalgameSearchBox />
|
||||
|
||||
<!-- #default 是 v-slot 的简写,route 就是路由,Component 是一个 v-node -->
|
||||
<!-- <router-view #default="{ route, Component }">
|
||||
<transition
|
||||
:enter-active-class="`animate__animated ${route.meta.transition}`"
|
||||
>
|
||||
<component :is="Component"></component>
|
||||
</transition>
|
||||
</router-view> -->
|
||||
<RouterView />
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
<style scoped></style>
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
import { fetchGet } from '@/utils/request'
|
||||
import type * as Balance from './types/balance'
|
||||
// Function to convert an object to query parameters
|
||||
import objectToQueryParams from '@/utils/objectToQueryParams'
|
||||
|
||||
// Get income
|
||||
export async function getIncomeApi(
|
||||
requestData: Balance.BalanceIncomeRequestData
|
||||
): Promise<Balance.BalanceIncomeResponseData> {
|
||||
const queryParams = objectToQueryParams(requestData)
|
||||
const url = `/balance/income?${queryParams}`
|
||||
|
||||
const response = await fetchGet<Balance.BalanceIncomeResponseData>(url)
|
||||
return response
|
||||
}
|
||||
|
||||
// Get expenditure
|
||||
export async function getExpenditureApi(
|
||||
requestData: Balance.BalanceExpenditureRequestData
|
||||
): Promise<Balance.BalanceExpenditureResponseData> {
|
||||
const queryParams = objectToQueryParams(requestData)
|
||||
const url = `/balance/expenditure?${queryParams}`
|
||||
|
||||
const response = await fetchGet<Balance.BalanceExpenditureResponseData>(url)
|
||||
return response
|
||||
}
|
||||
|
||||
// Profit and Loss Statement
|
||||
export async function getPLStatementApi(): Promise<Balance.BalancePLStatementResponseData> {
|
||||
const url = `/balance/statement`
|
||||
const response = await fetchGet<Balance.BalancePLStatementResponseData>(url)
|
||||
return response
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
type SortField = 'time' | 'amount'
|
||||
type SortOrder = 'asc' | 'desc'
|
||||
|
||||
// Get income request data
|
||||
export interface BalanceIncomeRequestData {
|
||||
page: number
|
||||
limit: number
|
||||
sortField: SortField
|
||||
sortOrder: SortOrder
|
||||
}
|
||||
|
||||
// Get expenditure request data
|
||||
export interface BalanceExpenditureRequestData {
|
||||
page: number
|
||||
limit: number
|
||||
sortField: SortField
|
||||
sortOrder: SortOrder
|
||||
}
|
||||
|
||||
// Single income response data
|
||||
export interface BalanceIncome {
|
||||
iid: number
|
||||
reason: string
|
||||
time: number
|
||||
amount: number
|
||||
}
|
||||
|
||||
// Single expenditure response data
|
||||
export interface BalanceExpenditure {
|
||||
eid: number
|
||||
reason: string
|
||||
time: number
|
||||
amount: number
|
||||
}
|
||||
|
||||
// Income and expenditure statement response data
|
||||
export interface PLStatement {
|
||||
totalIncome: number
|
||||
totalExpenditure: number
|
||||
profitLoss: number
|
||||
}
|
||||
|
||||
// Income response data
|
||||
export type BalanceIncomeResponseData = KUNGalgameResponseData<BalanceIncome[]>
|
||||
|
||||
// Expenditure response data
|
||||
export type BalanceExpenditureResponseData = KUNGalgameResponseData<
|
||||
BalanceExpenditure[]
|
||||
>
|
||||
|
||||
// Profit and loss statement response data
|
||||
export type BalancePLStatementResponseData = KUNGalgameResponseData<PLStatement>
|
|
@ -1,44 +0,0 @@
|
|||
import { fetchPost, fetchGet, fetchPut } from '@/utils/request'
|
||||
import type * as Edit from './types/edit'
|
||||
// Function to convert an object to request parameters
|
||||
import objectToQueryParams from '@/utils/objectToQueryParams'
|
||||
|
||||
// Create a new topic
|
||||
export async function postNewTopicApi(
|
||||
newTopicData: Edit.EditCreateTopicRequestData
|
||||
): Promise<Edit.EditCreateTopicResponseData> {
|
||||
// Call the fetchPost function
|
||||
const response = await fetchPost<Edit.EditCreateTopicResponseData>(
|
||||
`/topics`,
|
||||
newTopicData
|
||||
)
|
||||
|
||||
// Return the created topic's tid
|
||||
return response
|
||||
}
|
||||
|
||||
// Update a topic
|
||||
export async function updateNewTopicApi(
|
||||
requestData: Edit.EditUpdateTopicRequestData
|
||||
): Promise<Edit.EditUpdateTopicResponseData> {
|
||||
const url = `/topics/${requestData.tid}`
|
||||
// Call the fetchPost function
|
||||
const response = await fetchPut<Edit.EditUpdateTopicResponseData>(
|
||||
url,
|
||||
requestData
|
||||
)
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
// Get 10 popular tags
|
||||
export async function getTopTagsApi(
|
||||
requestData: Edit.EditGetHotTagsRequestData
|
||||
): Promise<Edit.EditGetHotTagsResponseData> {
|
||||
const queryParams = objectToQueryParams(requestData)
|
||||
|
||||
const response = await fetchGet<Edit.EditGetHotTagsResponseData>(
|
||||
`/tag/popular?${queryParams}`
|
||||
)
|
||||
return response
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
export interface EditCreateTopicRequestData {
|
||||
title: string
|
||||
content: string
|
||||
time: number
|
||||
tags: Array<string>
|
||||
category: Array<string>
|
||||
}
|
||||
|
||||
export interface EditKUNGalgameTopic {
|
||||
tid: number
|
||||
}
|
||||
|
||||
// Request data format for updating a topic
|
||||
export interface EditUpdateTopicRequestData {
|
||||
tid: number
|
||||
title: string
|
||||
content: string
|
||||
tags: string[]
|
||||
category: string[]
|
||||
edited: number
|
||||
}
|
||||
|
||||
// Request data format for getting hot tags
|
||||
export interface EditGetHotTagsRequestData {
|
||||
limit: number
|
||||
}
|
||||
|
||||
// Response data format for creating a topic
|
||||
export type EditCreateTopicResponseData =
|
||||
KUNGalgameResponseData<EditKUNGalgameTopic>
|
||||
|
||||
// Response data format for updating a topic
|
||||
export type EditUpdateTopicResponseData = KUNGalgameResponseData<{}>
|
||||
|
||||
// Response data format for hot tags
|
||||
export type EditGetHotTagsResponseData = KUNGalgameResponseData<string[]>
|
|
@ -1,56 +0,0 @@
|
|||
import { fetchGet } from '@/utils/request'
|
||||
// Function to convert an object to query parameters
|
||||
import objectToQueryParams from '@/utils/objectToQueryParams'
|
||||
import type * as Home from './types/home'
|
||||
|
||||
// URLs to be requested
|
||||
const homeURLs = {
|
||||
search: `/home/search`,
|
||||
home: `/home/topic`,
|
||||
navHot: `/home/nav/hot`,
|
||||
navNew: `/home/nav/new`,
|
||||
}
|
||||
|
||||
// Home page topic list
|
||||
export async function getHomeSearchTopicApi(
|
||||
requestData: Home.HomeSearchTopicRequestData
|
||||
): Promise<Home.HomeSearchTopicResponseData> {
|
||||
const queryParams = objectToQueryParams(requestData)
|
||||
|
||||
const response = await fetchGet<Home.HomeSearchTopicResponseData>(
|
||||
`${homeURLs.search}?${queryParams}`
|
||||
)
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
// Home page topic list
|
||||
export async function getHomeTopicApi(
|
||||
requestData: Home.HomeTopicRequestData
|
||||
): Promise<Home.HomeTopicResponseData> {
|
||||
const queryParams = objectToQueryParams(requestData)
|
||||
|
||||
const response = await fetchGet<Home.HomeTopicResponseData>(
|
||||
`${homeURLs.home}?${queryParams}`
|
||||
)
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
// Today's popular topics on the home page
|
||||
export async function getHomeNavHotTopicApi(): Promise<Home.HomeHotTopicResponseData> {
|
||||
const response = await fetchGet<Home.HomeHotTopicResponseData>(
|
||||
homeURLs.navHot
|
||||
)
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
// Today's newest topics on the home page
|
||||
export async function getHomeNavNewTopicApi(): Promise<Home.HomeNewTopicResponseData> {
|
||||
const response = await fetchGet<Home.HomeNewTopicResponseData>(
|
||||
homeURLs.navNew
|
||||
)
|
||||
|
||||
return response
|
||||
}
|
|
@ -1,70 +0,0 @@
|
|||
export interface HomeSearchTopic {
|
||||
tid: number
|
||||
title: string
|
||||
content: string
|
||||
category: string[]
|
||||
}
|
||||
|
||||
export interface HomeSearchTopicRequestData {
|
||||
keywords: string
|
||||
category: string
|
||||
page: number
|
||||
limit: number
|
||||
sortField: string
|
||||
sortOrder: string
|
||||
}
|
||||
|
||||
interface HomeUserInfo {
|
||||
uid: number
|
||||
avatar: string
|
||||
name: string
|
||||
}
|
||||
|
||||
export interface HomeHotTopic {
|
||||
tid: number
|
||||
title: string
|
||||
popularity: number
|
||||
}
|
||||
|
||||
export interface HomeNewTopic {
|
||||
tid: number
|
||||
title: string
|
||||
time: number
|
||||
}
|
||||
|
||||
export interface HomeTopicRequestData {
|
||||
category: string
|
||||
page: number
|
||||
limit: number
|
||||
sortField: string
|
||||
sortOrder: string
|
||||
}
|
||||
|
||||
export interface HomeTopic {
|
||||
tid: number
|
||||
title: string
|
||||
views: number
|
||||
upvotesCount: number
|
||||
likesCount: number
|
||||
repliesCount: number
|
||||
comments: number
|
||||
|
||||
time: number
|
||||
content: string
|
||||
tags: string[]
|
||||
category: string[]
|
||||
popularity: number
|
||||
user: HomeUserInfo
|
||||
status: number
|
||||
upvote_time: number
|
||||
}
|
||||
|
||||
export type HomeSearchTopicResponseData = KUNGalgameResponseData<
|
||||
HomeSearchTopic[]
|
||||
>
|
||||
|
||||
export type HomeHotTopicResponseData = KUNGalgameResponseData<HomeHotTopic[]>
|
||||
|
||||
export type HomeNewTopicResponseData = KUNGalgameResponseData<HomeNewTopic[]>
|
||||
|
||||
export type HomeTopicResponseData = KUNGalgameResponseData<HomeTopic[]>
|
|
@ -1,33 +1,11 @@
|
|||
/**
|
||||
* The naming of interfaces and APIs here must follow the convention of
|
||||
*
|
||||
* request method + folder name + Others
|
||||
*
|
||||
* to ensure that the naming is not duplicated.
|
||||
*/
|
||||
import axios from 'axios'
|
||||
|
||||
// Expose all interfaces
|
||||
export * from './balance/types/balance'
|
||||
export * from './edit/types/edit'
|
||||
export * from './home/types/home'
|
||||
export * from './user/types/user'
|
||||
export * from './login/types/login'
|
||||
export * from './non-moe/types/nonMoe'
|
||||
export * from './ranking/types/ranking'
|
||||
export * from './topic/types'
|
||||
export * from './update-log/types/updateLog'
|
||||
export * from './pool/types/pool'
|
||||
export * from './technique/types/technique'
|
||||
const instance = axios.create({
|
||||
baseURL: 'https://api.example.com', // 设置请求的基础URL
|
||||
timeout: 5000, // 设置请求超时时间
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
})
|
||||
|
||||
// Expose all APIs
|
||||
export * from './balance'
|
||||
export * from './edit'
|
||||
export * from './home'
|
||||
export * from './user'
|
||||
export * from './login'
|
||||
export * from './non-moe'
|
||||
export * from './ranking'
|
||||
export * from './topic'
|
||||
export * from './update-log'
|
||||
export * from './pool'
|
||||
export * from './technique'
|
||||
export default instance
|
||||
|
|
|
@ -1,47 +1,11 @@
|
|||
import { fetchPost } from '@/utils/request'
|
||||
import type * as Login from './types/login'
|
||||
|
||||
const loginURLs = {
|
||||
login: `/user/login`,
|
||||
register: `/user/register`,
|
||||
verificationCode: `/auth/email/code`,
|
||||
refreshToken: `/auth/token/refresh`,
|
||||
// 登录返回 token
|
||||
export function loginApi(data: Login.LoginResponseData) {
|
||||
// TODO:
|
||||
}
|
||||
|
||||
// Get user login data
|
||||
export const postLoginDataApi = async (
|
||||
loginData: Login.LoginRequestData
|
||||
): Promise<Login.LoginResponseData> => {
|
||||
const response = await fetchPost<Login.LoginResponseData>(
|
||||
loginURLs.login,
|
||||
loginData
|
||||
)
|
||||
return response
|
||||
// 获取用户信息
|
||||
export function getKUNGalgamerInfoApi() {
|
||||
// TODO:
|
||||
}
|
||||
|
||||
// Send verification code, required during registration
|
||||
export const sendVerificationCodeMailApi = async (
|
||||
email: Login.VerificationCodeMailRequestData
|
||||
): Promise<void> => {
|
||||
await fetchPost<void>(loginURLs.verificationCode, email)
|
||||
}
|
||||
|
||||
// Register a user, log in immediately upon successful registration, and return login data
|
||||
export const postRegisterDataApi = async (
|
||||
registerData: Login.RegisterRequestData
|
||||
): Promise<Login.LoginResponseData> => {
|
||||
const response = await fetchPost<Login.LoginResponseData>(
|
||||
loginURLs.register,
|
||||
registerData
|
||||
)
|
||||
return response
|
||||
}
|
||||
|
||||
// Obtain a new token using a refresh token when the token is invalid
|
||||
export const generateTokenByRefreshTokenApi =
|
||||
async (): Promise<Login.RefreshTokenResponseData> => {
|
||||
const response = await fetchPost<Login.RefreshTokenResponseData>(
|
||||
loginURLs.refreshToken
|
||||
)
|
||||
return response
|
||||
}
|
||||
|
|
|
@ -1,35 +1,9 @@
|
|||
// Interface for KUNGalgame user login request data
|
||||
export interface LoginRequestData {
|
||||
// Username for login
|
||||
name: string
|
||||
// Password for login
|
||||
// 这是 KUNGalgame 用户登录请求数据的接口
|
||||
export interface KUNGalgamerLoginRequestData {
|
||||
// 登录用户名
|
||||
username: string
|
||||
// 登录密码
|
||||
password: string
|
||||
}
|
||||
|
||||
// Format for registration request data
|
||||
export interface RegisterRequestData {
|
||||
name: string
|
||||
email: string
|
||||
password: string
|
||||
code: string
|
||||
}
|
||||
|
||||
// Format for sending verification code request data
|
||||
export interface VerificationCodeMailRequestData {
|
||||
email: string
|
||||
}
|
||||
|
||||
// Format of the login response data
|
||||
export type LoginResponseData = KUNGalgameResponseData<{
|
||||
uid: number
|
||||
name: string
|
||||
avatar: string
|
||||
moemoepoint: number
|
||||
roles: number
|
||||
token: string
|
||||
}>
|
||||
|
||||
// Format of the response data for obtaining a token
|
||||
export type RefreshTokenResponseData = KUNGalgameResponseData<{
|
||||
token: string
|
||||
}>
|
||||
export type LoginResponseData = ApiResponseData<string>
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
import { fetchGet } from '@/utils/request'
|
||||
import * as NonMoe from './types/nonMoe'
|
||||
import objectToQueryParams from '@/utils/objectToQueryParams'
|
||||
|
||||
// Get non-moe logs
|
||||
export async function getNonMoeLogsApi(
|
||||
request: NonMoe.NonMoeLogRequestData
|
||||
): Promise<NonMoe.NonMoeGetLogsResponseData> {
|
||||
const queryParams = objectToQueryParams(request)
|
||||
const url = `/non-moe/logs?${queryParams}`
|
||||
|
||||
const response = fetchGet<NonMoe.NonMoeGetLogsResponseData>(url)
|
||||
return response
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
type SortOrder = 'asc' | 'desc'
|
||||
|
||||
export interface NonMoeLogRequestData {
|
||||
page: number
|
||||
limit: number
|
||||
sortOrder: SortOrder
|
||||
}
|
||||
|
||||
export interface NonMoeLog {
|
||||
nid: number
|
||||
uid: number
|
||||
name: string
|
||||
description: string
|
||||
time: number
|
||||
result: string
|
||||
}
|
||||
|
||||
export type NonMoeGetLogsResponseData = KUNGalgameResponseData<NonMoeLog[]>
|
|
@ -1,19 +0,0 @@
|
|||
import { fetchGet } from '@/utils/request'
|
||||
import objectToQueryParams from '@/utils/objectToQueryParams'
|
||||
import type * as Pool from './types/pool'
|
||||
|
||||
const poolURLs = {
|
||||
topic: `/pool/topic`,
|
||||
}
|
||||
|
||||
export async function getPoolTopicApi(
|
||||
requestData: Pool.PoolTopicsRequestData
|
||||
): Promise<Pool.PoolTopicResponseData> {
|
||||
const queryParams = objectToQueryParams(requestData)
|
||||
|
||||
const response = await fetchGet<Pool.PoolTopicResponseData>(
|
||||
`${poolURLs.topic}?${queryParams}`
|
||||
)
|
||||
|
||||
return response
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
export interface PoolTopic {
|
||||
tid: number
|
||||
title: string
|
||||
views: number
|
||||
likesCount: number
|
||||
time: number
|
||||
content: string
|
||||
}
|
||||
|
||||
export interface PoolTopicsRequestData {
|
||||
page: number
|
||||
limit: number
|
||||
sortField: string
|
||||
sortOrder: string
|
||||
}
|
||||
|
||||
export type PoolTopicResponseData = KUNGalgameResponseData<PoolTopic[]>
|
|
@ -1,25 +0,0 @@
|
|||
import { fetchGet } from '@/utils/request'
|
||||
import objectToQueryParams from '@/utils/objectToQueryParams'
|
||||
import * as Ranking from './types/ranking'
|
||||
|
||||
// Get ranking hot topics
|
||||
export async function getRankingTopicsApi(
|
||||
request: Ranking.RankingGetTopicsRequestData
|
||||
): Promise<Ranking.RankingGetTopicsResponseData> {
|
||||
const queryParams = objectToQueryParams(request)
|
||||
const url = `/ranking/topics?${queryParams}`
|
||||
|
||||
const response = await fetchGet<Ranking.RankingGetTopicsResponseData>(url)
|
||||
return response
|
||||
}
|
||||
|
||||
// Get ranking hot users
|
||||
export async function getRankingUsersApi(
|
||||
request: Ranking.RankingGetUserRequestData
|
||||
): Promise<Ranking.RankingGetUsersResponseData> {
|
||||
const queryParams = objectToQueryParams(request)
|
||||
const url = `/ranking/users?${queryParams}`
|
||||
|
||||
const response = await fetchGet<Ranking.RankingGetUsersResponseData>(url)
|
||||
return response
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
type SortOrder = 'asc' | 'desc'
|
||||
|
||||
type TopicSortFieldRanking =
|
||||
| 'popularity'
|
||||
| 'views'
|
||||
| 'upvotes_count'
|
||||
| 'likes_count'
|
||||
| 'replies_count'
|
||||
| 'comments'
|
||||
|
||||
type UserSortFieldRanking =
|
||||
| 'moemoepoint'
|
||||
| 'upvote'
|
||||
| 'like'
|
||||
| 'topic_count'
|
||||
| 'reply_count'
|
||||
| 'comment_count'
|
||||
|
||||
export interface RankingGetTopicsRequestData {
|
||||
page: number
|
||||
limit: number
|
||||
sortField: TopicSortFieldRanking
|
||||
sortOrder: SortOrder
|
||||
}
|
||||
|
||||
export interface RankingTopics {
|
||||
tid: number
|
||||
title: string
|
||||
field: string
|
||||
}
|
||||
|
||||
export interface RankingGetUserRequestData {
|
||||
page: number
|
||||
limit: number
|
||||
sortField: UserSortFieldRanking
|
||||
sortOrder: SortOrder
|
||||
}
|
||||
|
||||
export interface RankingUsers {
|
||||
uid: number
|
||||
name: string
|
||||
avatar: string
|
||||
field: string
|
||||
}
|
||||
|
||||
export type RankingGetTopicsResponseData = KUNGalgameResponseData<
|
||||
RankingTopics[]
|
||||
>
|
||||
|
||||
export type RankingGetUsersResponseData = KUNGalgameResponseData<RankingUsers[]>
|
0
src/api/reply/index.ts
Normal file
0
src/api/reply/types/reply.ts
Normal file
|
@ -1,19 +0,0 @@
|
|||
import { fetchGet } from '@/utils/request'
|
||||
import objectToQueryParams from '@/utils/objectToQueryParams'
|
||||
import type * as Technique from './types/technique'
|
||||
|
||||
const techniqueURLs = {
|
||||
topic: `/technique/topic`,
|
||||
}
|
||||
|
||||
export async function getTechniqueTopicApi(
|
||||
requestData: Technique.TechniqueTopicsRequestData
|
||||
): Promise<Technique.TechniqueTopicResponseData> {
|
||||
const queryParams = objectToQueryParams(requestData)
|
||||
|
||||
const response = await fetchGet<Technique.TechniqueTopicResponseData>(
|
||||
`${techniqueURLs.topic}?${queryParams}`
|
||||
)
|
||||
|
||||
return response
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
export interface TechniqueTopic {
|
||||
tid: number
|
||||
title: string
|
||||
views: number
|
||||
likesCount: number
|
||||
replyCount: number
|
||||
content: string
|
||||
tags: string[]
|
||||
}
|
||||
|
||||
export interface TechniqueTopicsRequestData {
|
||||
page: number
|
||||
limit: number
|
||||
sortField: string
|
||||
sortOrder: string
|
||||
}
|
||||
|
||||
export type TechniqueTopicResponseData = KUNGalgameResponseData<
|
||||
TechniqueTopic[]
|
||||
>
|
|
@ -1,38 +0,0 @@
|
|||
import { fetchGet } from '@/utils/request'
|
||||
// Function to convert an object to query parameters
|
||||
import objectToQueryParams from '@/utils/objectToQueryParams'
|
||||
import * as Aside from './types/aside'
|
||||
|
||||
// Get other topics with the same tags on the left side
|
||||
export async function getRelatedTopicsByTagsApi(
|
||||
request: Aside.TopicAsideOtherTagRequestData
|
||||
): Promise<Aside.TopicAsideResponseData> {
|
||||
try {
|
||||
const queryParams = objectToQueryParams(request, 'tid')
|
||||
const url = `/topics/${request.tid}/related?${queryParams}`
|
||||
|
||||
const response = await fetchGet<Aside.TopicAsideResponseData>(url)
|
||||
|
||||
return response
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
throw new Error('Failed to fetch aside other topic')
|
||||
}
|
||||
}
|
||||
|
||||
// Other topics by the master
|
||||
export async function getPopularTopicsByUserUidApi(
|
||||
request: Aside.TopicAsideMasterRequestData
|
||||
): Promise<Aside.TopicAsideResponseData> {
|
||||
try {
|
||||
const queryParams = objectToQueryParams(request, 'tid')
|
||||
const url = `/topics/${request.tid}/popular?${queryParams}`
|
||||
|
||||
const response = await fetchGet<Aside.TopicAsideResponseData>(url)
|
||||
|
||||
return response
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
throw new Error('Failed to fetch master other topic')
|
||||
}
|
||||
}
|
|
@ -1,65 +0,0 @@
|
|||
import { fetchGet, fetchPut, fetchPost } from '@/utils/request'
|
||||
// Function to convert an object to query parameters
|
||||
import objectToQueryParams from '@/utils/objectToQueryParams'
|
||||
|
||||
import * as Comment from './types/comment'
|
||||
|
||||
// Get all comments under a reply
|
||||
export async function getCommentsByReplyRidApi(
|
||||
tid: number,
|
||||
rid: number
|
||||
): Promise<Comment.TopicCommentResponseData> {
|
||||
try {
|
||||
const url = `/topics/${tid}/comment?rid=${rid}`
|
||||
|
||||
const response = await fetchGet<Comment.TopicCommentResponseData>(url)
|
||||
|
||||
return response
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
throw new Error('Failed to fetch comments')
|
||||
}
|
||||
}
|
||||
|
||||
// Like a comment
|
||||
export async function updateCommentLikeApi(
|
||||
request: Comment.TopicLikeCommentRequestData
|
||||
): Promise<Comment.TopicLikeCommentResponseData> {
|
||||
const queryParams = objectToQueryParams(request, 'tid')
|
||||
const url = `/topics/${request.tid}/comment/like?${queryParams}`
|
||||
|
||||
const response = fetchPut<Comment.TopicLikeCommentResponseData>(url)
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
// Dislike a comment
|
||||
export async function updateCommentDislikeApi(
|
||||
request: Comment.TopicDislikeCommentRequestData
|
||||
): Promise<Comment.TopicDislikeCommentResponseData> {
|
||||
const queryParams = objectToQueryParams(request, 'tid')
|
||||
const url = `/topics/${request.tid}/comment/dislike?${queryParams}`
|
||||
|
||||
const response = fetchPut<Comment.TopicDislikeCommentResponseData>(url)
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
// Create a comment by tid and rid
|
||||
export async function postCommentByPidAndRidApi(
|
||||
request: Comment.TopicCreateCommentRequestData
|
||||
): Promise<Comment.TopicCreateCommentResponseData> {
|
||||
try {
|
||||
const url = `/topics/${request.tid}/comment`
|
||||
|
||||
const response = await fetchPost<Comment.TopicCreateCommentResponseData>(
|
||||
url,
|
||||
request
|
||||
)
|
||||
|
||||
return response
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
throw new Error('Failed to fetch comments')
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
export * from './aside'
|
||||
export * from './topic'
|
||||
export * from './reply'
|
||||
export * from './comment'
|
|
@ -1,80 +0,0 @@
|
|||
import { fetchGet, fetchPost, fetchPut } from '@/utils/request'
|
||||
// Function to convert an object to query parameters
|
||||
import objectToQueryParams from '@/utils/objectToQueryParams'
|
||||
import * as Reply from './types/reply'
|
||||
|
||||
// Get topic replies by tid
|
||||
export async function getRepliesByTidApi(
|
||||
request: Reply.TopicReplyRequestData
|
||||
): Promise<Reply.TopicReplyResponseData> {
|
||||
const queryParams = objectToQueryParams(request, 'tid')
|
||||
const url = `/topics/${request.tid}/replies?${queryParams}`
|
||||
|
||||
const response = await fetchGet<Reply.TopicReplyResponseData>(url)
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
// Create a reply by tid
|
||||
export async function postReplyByTidApi(
|
||||
request: Reply.TopicCreateReplyRequestData
|
||||
): Promise<Reply.TopicCreateReplyResponseData> {
|
||||
const url = `/topics/${request.tid}/reply`
|
||||
|
||||
const response = await fetchPost<Reply.TopicCreateReplyResponseData>(
|
||||
url,
|
||||
request
|
||||
)
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
// Upvote a reply
|
||||
export async function updateReplyUpvoteApi(
|
||||
request: Reply.TopicUpvoteReplyRequestData
|
||||
): Promise<Reply.TopicUpvoteReplyResponseData> {
|
||||
const queryParams = objectToQueryParams(request, 'tid')
|
||||
const url = `/topics/${request.tid}/reply/upvote?${queryParams}`
|
||||
|
||||
const response = fetchPut<Reply.TopicUpvoteReplyResponseData>(url)
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
// Like a reply
|
||||
export async function updateReplyLikeApi(
|
||||
request: Reply.TopicLikeReplyRequestData
|
||||
): Promise<Reply.TopicLikeReplyResponseData> {
|
||||
const queryParams = objectToQueryParams(request, 'tid')
|
||||
const url = `/topics/${request.tid}/reply/like?${queryParams}`
|
||||
|
||||
const response = fetchPut<Reply.TopicLikeReplyResponseData>(url)
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
// Dislike a reply
|
||||
export async function updateReplyDislikeApi(
|
||||
request: Reply.TopicDislikeReplyRequestData
|
||||
): Promise<Reply.TopicDislikeReplyResponseData> {
|
||||
const queryParams = objectToQueryParams(request, 'tid')
|
||||
const url = `/topics/${request.tid}/reply/dislike?${queryParams}`
|
||||
|
||||
const response = fetchPut<Reply.TopicDislikeReplyResponseData>(url)
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
// Update a reply
|
||||
export async function updateReplyApi(
|
||||
requestData: Reply.TopicUpdateReplyRequestData
|
||||
): Promise<Reply.TopicUpdateReplyResponseData> {
|
||||
const url = `/topics/${requestData.tid}/reply`
|
||||
|
||||
const response = fetchPut<Reply.TopicUpdateReplyResponseData>(
|
||||
url,
|
||||
requestData
|
||||
)
|
||||
|
||||
return response
|
||||
}
|
|
@ -1,56 +0,0 @@
|
|||
import { fetchGet, fetchPost, fetchPut } from '@/utils/request'
|
||||
// Function to convert an object to query parameters
|
||||
import objectToQueryParams from '@/utils/objectToQueryParams'
|
||||
import * as Topic from './types/topic'
|
||||
|
||||
// Get a single topic by tid
|
||||
export async function getTopicByTidApi(
|
||||
tid: number
|
||||
): Promise<Topic.TopicDetailResponseData> {
|
||||
try {
|
||||
const url = `/topics/${tid}`
|
||||
|
||||
const response = await fetchGet<Topic.TopicDetailResponseData>(url)
|
||||
|
||||
return response
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
throw new Error('Failed to fetch topic')
|
||||
}
|
||||
}
|
||||
|
||||
// Upvote a topic
|
||||
export async function updateTopicUpvoteApi(
|
||||
request: Topic.TopicUpvoteTopicRequestData
|
||||
): Promise<Topic.TopicUpvoteTopicResponseData> {
|
||||
const queryParams = objectToQueryParams(request, 'tid')
|
||||
const url = `/topics/${request.tid}/upvote?${queryParams}`
|
||||
|
||||
const response = fetchPut<Topic.TopicUpvoteTopicResponseData>(url)
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
// Like a topic
|
||||
export async function updateTopicLikeApi(
|
||||
request: Topic.TopicLikeTopicRequestData
|
||||
): Promise<Topic.TopicLikeTopicResponseData> {
|
||||
const queryParams = objectToQueryParams(request, 'tid')
|
||||
const url = `/topics/${request.tid}/like?${queryParams}`
|
||||
|
||||
const response = fetchPut<Topic.TopicLikeTopicResponseData>(url)
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
// Dislike a topic
|
||||
export async function updateTopicDislikeApi(
|
||||
request: Topic.TopicDislikeTopicRequestData
|
||||
): Promise<Topic.TopicDislikeTopicResponseData> {
|
||||
const queryParams = objectToQueryParams(request, 'tid')
|
||||
const url = `/topics/${request.tid}/dislike?${queryParams}`
|
||||
|
||||
const response = fetchPut<Topic.TopicDislikeTopicResponseData>(url)
|
||||
|
||||
return response
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
// Topic detail page sidebar
|
||||
|
||||
export interface TopicAside {
|
||||
title: string
|
||||
tid: number
|
||||
}
|
||||
|
||||
export interface TopicAsideOtherTagRequestData {
|
||||
// Tags of the current topic
|
||||
tags: string[]
|
||||
// The tid of the current topic, as other topics under the same tag should not include the current one
|
||||
tid: number
|
||||
}
|
||||
|
||||
export interface TopicAsideMasterRequestData {
|
||||
// User uid
|
||||
uid: number
|
||||
// The tid of the current topic, as other topics under the same tag should not include the current one
|
||||
tid: string
|
||||
}
|
||||
|
||||
// Format of Aside response data
|
||||
export type TopicAsideResponseData = KUNGalgameResponseData<TopicAside[]>
|
|
@ -1,48 +0,0 @@
|
|||
import { TopicUserInfo, TopicToUserInfo } from './topic'
|
||||
|
||||
// Comment data
|
||||
export interface TopicComment {
|
||||
cid: number
|
||||
rid: number
|
||||
tid: number
|
||||
c_user: Omit<TopicUserInfo, 'moemoepoint'>
|
||||
to_user: TopicToUserInfo
|
||||
content: string
|
||||
likes: number[]
|
||||
dislikes: number[]
|
||||
}
|
||||
|
||||
// Request data for liking a comment
|
||||
export interface TopicLikeCommentRequestData {
|
||||
tid: number
|
||||
cid: number
|
||||
to_uid: number
|
||||
}
|
||||
|
||||
// Request data for disliking a comment
|
||||
export interface TopicDislikeCommentRequestData {
|
||||
tid: number
|
||||
cid: number
|
||||
to_uid: number
|
||||
}
|
||||
|
||||
// Request data for creating a comment
|
||||
export interface TopicCreateCommentRequestData {
|
||||
tid: number
|
||||
rid: number
|
||||
to_uid: number
|
||||
content: string
|
||||
}
|
||||
|
||||
// An array containing all comments under a single reply
|
||||
export type TopicCommentResponseData = KUNGalgameResponseData<TopicComment[]>
|
||||
|
||||
// Response data for liking a comment
|
||||
export type TopicLikeCommentResponseData = KUNGalgameResponseData<{}>
|
||||
|
||||
// Response data for disliking a comment
|
||||
export type TopicDislikeCommentResponseData = KUNGalgameResponseData<{}>
|
||||
|
||||
// Comment data returned after creating a single comment
|
||||
export type TopicCreateCommentResponseData =
|
||||
KUNGalgameResponseData<TopicComment>
|
|
@ -1,4 +0,0 @@
|
|||
export * from './aside'
|
||||
export * from './topic'
|
||||
export * from './reply'
|
||||
export * from './comment'
|
|
@ -1,92 +0,0 @@
|
|||
import { TopicUserInfo, TopicToUserInfo } from './topic'
|
||||
|
||||
// Request data for replying
|
||||
export interface TopicReplyRequestData {
|
||||
tid: number
|
||||
page?: number
|
||||
limit?: number
|
||||
sortField: string
|
||||
sortOrder: string
|
||||
}
|
||||
|
||||
// Reply data
|
||||
export interface TopicReply {
|
||||
rid: number
|
||||
tid: number
|
||||
// The floor where the reply is located
|
||||
floor: number
|
||||
// The floor of the reply being replied to
|
||||
to_floor: number
|
||||
r_user: TopicUserInfo
|
||||
to_user: TopicToUserInfo
|
||||
edited: number
|
||||
content: string
|
||||
upvotes: number[]
|
||||
upvote_time: number
|
||||
likes: number[]
|
||||
dislikes: number[]
|
||||
tags: string[]
|
||||
time: number
|
||||
comment: number[]
|
||||
}
|
||||
|
||||
// Request data for creating a reply
|
||||
export interface TopicCreateReplyRequestData {
|
||||
tid: number
|
||||
to_uid: number
|
||||
to_floor: number
|
||||
tags: string[]
|
||||
content: string
|
||||
time: number
|
||||
}
|
||||
|
||||
// Upvote reply, the upvote operation is irreversible
|
||||
export interface TopicUpvoteReplyRequestData {
|
||||
tid: number
|
||||
to_uid: number
|
||||
rid: number
|
||||
time: number
|
||||
}
|
||||
|
||||
// Like reply
|
||||
export interface TopicLikeReplyRequestData {
|
||||
tid: number
|
||||
to_uid: number
|
||||
rid: number
|
||||
isPush: boolean
|
||||
}
|
||||
|
||||
// Dislike reply
|
||||
export interface TopicDislikeReplyRequestData {
|
||||
tid: number
|
||||
to_uid: number
|
||||
rid: number
|
||||
isPush: boolean
|
||||
}
|
||||
|
||||
// Request data for updating a reply
|
||||
export interface TopicUpdateReplyRequestData {
|
||||
tid: number
|
||||
rid: number
|
||||
content: string
|
||||
tags: string[]
|
||||
edited: number
|
||||
}
|
||||
|
||||
// Response data format for a single topic reply, returning multiple reply data in an array
|
||||
export type TopicReplyResponseData = KUNGalgameResponseData<TopicReply[]>
|
||||
|
||||
// Reply data returned after creating a single reply
|
||||
export type TopicCreateReplyResponseData = KUNGalgameResponseData<TopicReply>
|
||||
|
||||
// Response data format for upvoting a reply
|
||||
export type TopicUpvoteReplyResponseData = KUNGalgameResponseData<{}>
|
||||
|
||||
// Response data format for liking a reply
|
||||
export type TopicLikeReplyResponseData = KUNGalgameResponseData<{}>
|
||||
|
||||
// Response data format for disliking a reply
|
||||
export type TopicDislikeReplyResponseData = KUNGalgameResponseData<{}>
|
||||
|
||||
// Response data format for updating a reply
|
||||
export type TopicUpdateReplyResponseData = KUNGalgameResponseData<{}>
|
|
@ -1,77 +0,0 @@
|
|||
// Information about the topic author and the replied user
|
||||
export interface TopicUserInfo {
|
||||
uid: number
|
||||
name: string
|
||||
avatar: string
|
||||
moemoepoint: number
|
||||
}
|
||||
|
||||
// Information about the user being replied to
|
||||
export interface TopicToUserInfo {
|
||||
uid: number
|
||||
name: string
|
||||
}
|
||||
|
||||
// Response data for a topic
|
||||
export interface TopicDetail {
|
||||
tid: number
|
||||
title: string
|
||||
views: number
|
||||
likes: number[]
|
||||
dislikes: number[]
|
||||
time: number
|
||||
content: string
|
||||
upvotes: number[]
|
||||
tags: string[]
|
||||
edited: number
|
||||
user: TopicUserInfo
|
||||
replies: number[]
|
||||
status: number
|
||||
share: number[]
|
||||
category: string[]
|
||||
popularity: number
|
||||
upvote_time: number
|
||||
}
|
||||
|
||||
// Request data for upvoting a topic, the upvote operation is irreversible
|
||||
export interface TopicUpvoteTopicRequestData {
|
||||
tid: number
|
||||
to_uid: number
|
||||
time: number
|
||||
}
|
||||
|
||||
// Request data for liking a topic
|
||||
export interface TopicLikeTopicRequestData {
|
||||
tid: number
|
||||
to_uid: number
|
||||
isPush: boolean
|
||||
}
|
||||
|
||||
// Request data for disliking a topic
|
||||
export interface TopicDislikeTopicRequestData {
|
||||
tid: number
|
||||
to_uid: number
|
||||
isPush: boolean
|
||||
}
|
||||
|
||||
// Request data for updating a topic
|
||||
export interface TopicUpdateRequestData {
|
||||
tid: number
|
||||
uid: number
|
||||
title: string
|
||||
content: string
|
||||
tags: string[]
|
||||
category: string[]
|
||||
}
|
||||
|
||||
// Response data format for a single topic
|
||||
export type TopicDetailResponseData = KUNGalgameResponseData<TopicDetail>
|
||||
|
||||
// Response data format for upvoting a topic
|
||||
export type TopicUpvoteTopicResponseData = KUNGalgameResponseData<{}>
|
||||
|
||||
// Response data format for liking a topic
|
||||
export type TopicLikeTopicResponseData = KUNGalgameResponseData<{}>
|
||||
|
||||
// Response data format for disliking a topic
|
||||
export type TopicDislikeTopicResponseData = KUNGalgameResponseData<{}>
|
|
@ -1,7 +0,0 @@
|
|||
import { fetchGet } from '@/utils/request'
|
||||
|
||||
import { UpdateLog } from './types/updateLog'
|
||||
|
||||
export async function getUpdateLogApi(): Promise<UpdateLog[]> {
|
||||
return await fetchGet<UpdateLog[]>(`/update/history`)
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
// Data interface for update logs
|
||||
export interface UpdateLog {
|
||||
// Update description
|
||||
description: string
|
||||
// Release time of the update
|
||||
time: number
|
||||
// Update sorting ID
|
||||
upid: number
|
||||
// Version of the update
|
||||
version: string
|
||||
}
|
|
@ -1,123 +0,0 @@
|
|||
import {
|
||||
fetchGet,
|
||||
fetchPut,
|
||||
fetchPost,
|
||||
fetchPostWithFormData,
|
||||
} from '@/utils/request'
|
||||
import objectToQueryParams from '@/utils/objectToQueryParams'
|
||||
import * as User from './types/user'
|
||||
|
||||
// Get a single user's information
|
||||
export async function getUserByUidApi(
|
||||
uid: number
|
||||
): Promise<User.UserInfoResponseData> {
|
||||
const url = `/user/${uid}`
|
||||
const response = await fetchGet<User.UserInfoResponseData>(url)
|
||||
return response
|
||||
}
|
||||
|
||||
// Update user avatar
|
||||
export async function updateUserAvatarApi(
|
||||
request: User.UserUpdateAvatarRequestData
|
||||
): Promise<User.UserUpdateAvatarResponseData> {
|
||||
const url = `/user/${request.uid}/avatar`
|
||||
const response =
|
||||
await fetchPostWithFormData<User.UserUpdateAvatarResponseData>(
|
||||
url,
|
||||
request.avatar
|
||||
)
|
||||
return response
|
||||
}
|
||||
|
||||
// Update user bio (signature)
|
||||
export async function updateUserBioApi(
|
||||
request: User.UserUpdateBioRequestData
|
||||
): Promise<User.UserUpdateBioResponseData> {
|
||||
const url = `/user/${request.uid}/bio`
|
||||
const response = await fetchPut<User.UserUpdateBioResponseData>(url, request)
|
||||
return response
|
||||
}
|
||||
|
||||
// Get user email
|
||||
export async function getUserEmailApi(
|
||||
uid: number
|
||||
): Promise<User.UserGetUserEmailResponseData> {
|
||||
const url = `/user/${uid}/email`
|
||||
const response = await fetchGet<User.UserGetUserEmailResponseData>(url)
|
||||
return response
|
||||
}
|
||||
|
||||
// Send reset email code
|
||||
export async function getUserResetEmailCodeApi(
|
||||
email: string
|
||||
): Promise<User.UserGetEmailRestCodeResponseData> {
|
||||
const url = `/auth/email/reset`
|
||||
const postData = {
|
||||
email: email,
|
||||
}
|
||||
const response = await fetchPost<User.UserGetEmailRestCodeResponseData>(
|
||||
url,
|
||||
postData
|
||||
)
|
||||
return response
|
||||
}
|
||||
|
||||
// Update email
|
||||
export async function updateUserEmailApi(
|
||||
request: User.UserUpdateEmailRequestData
|
||||
): Promise<User.UserUpdateEmailResponseData> {
|
||||
const url = `/user/${request.uid}/email`
|
||||
const response = fetchPut<User.UserUpdateEmailResponseData>(url, request)
|
||||
return response
|
||||
}
|
||||
|
||||
// Update password
|
||||
export async function updateUserPasswordApi(
|
||||
request: User.UserUpdatePasswordRequestData
|
||||
): Promise<User.UserUpdatePasswordResponseData> {
|
||||
const url = `/user/${request.uid}/password`
|
||||
const response = fetchPut<User.UserUpdatePasswordResponseData>(url, request)
|
||||
return response
|
||||
}
|
||||
|
||||
// Get user topics (published, liked, and upvoted)
|
||||
export async function getUserTopicApi(
|
||||
request: User.UserGetUserTopicRequestData
|
||||
): Promise<User.UserGetUserTopicResponseData> {
|
||||
const queryParams = objectToQueryParams(request, 'uid')
|
||||
const url = `/user/${request.uid}/topics?${queryParams}`
|
||||
const response = fetchGet<User.UserGetUserTopicResponseData>(url)
|
||||
return response
|
||||
}
|
||||
|
||||
// Get user replies
|
||||
export async function getUserReplyApi(
|
||||
request: User.UserGetUserReplyRequestData
|
||||
): Promise<User.UserGetUserReplyResponseData> {
|
||||
const queryParams = objectToQueryParams(request, 'uid')
|
||||
const url = `/user/${request.uid}/replies?${queryParams}`
|
||||
const response = fetchGet<User.UserGetUserReplyResponseData>(url)
|
||||
return response
|
||||
}
|
||||
|
||||
// Get user comments
|
||||
export async function getUserCommentApi(
|
||||
request: User.UserGetUserCommentRequestData
|
||||
): Promise<User.UserGetUserCommentResponseData> {
|
||||
const queryParams = objectToQueryParams(request, 'uid')
|
||||
const url = `/user/${request.uid}/comments?${queryParams}`
|
||||
const response = fetchGet<User.UserGetUserCommentResponseData>(url)
|
||||
return response
|
||||
}
|
||||
|
||||
// Reset password by user email
|
||||
export async function updateUserPasswordByEmailApi(
|
||||
request: User.UserResetPasswordByEmailRequestData
|
||||
): Promise<User.UserResetPasswordByEmailResponseData> {
|
||||
const url = `/auth/password/reset`
|
||||
const response = fetchPost<User.UserResetPasswordByEmailResponseData>(
|
||||
url,
|
||||
request
|
||||
)
|
||||
return response
|
||||
}
|
|
@ -1,120 +1,13 @@
|
|||
export interface UserInfo {
|
||||
uid: number
|
||||
name: string
|
||||
avatar: string
|
||||
roles: number
|
||||
status: number
|
||||
time: number
|
||||
moemoepoint: number
|
||||
bio: string
|
||||
upvote: number
|
||||
like: number
|
||||
dislike: number
|
||||
daily_topic_count: number
|
||||
import axios from 'axios'
|
||||
|
||||
topic: number[]
|
||||
reply: number[]
|
||||
comment: number[]
|
||||
likeTopic: number[]
|
||||
upvoteTopic: number[]
|
||||
export function getUser(id: string) {
|
||||
return axios.get(`/users/${id}`)
|
||||
}
|
||||
|
||||
// User updates avatar
|
||||
export interface UserUpdateAvatarRequestData {
|
||||
uid: number
|
||||
avatar: FormData
|
||||
export function updateUser(id: string, data: string) {
|
||||
return axios.put(`/users/${id}`, data)
|
||||
}
|
||||
|
||||
// User updates bio (signature)
|
||||
export interface UserUpdateBioRequestData {
|
||||
uid: number
|
||||
bio: string
|
||||
export function deleteUser(id: string) {
|
||||
return axios.delete(`/users/${id}`)
|
||||
}
|
||||
|
||||
// User updates email
|
||||
export interface UserUpdateEmailRequestData {
|
||||
uid: number
|
||||
email: string
|
||||
code: string
|
||||
}
|
||||
|
||||
// User updates password
|
||||
export interface UserUpdatePasswordRequestData {
|
||||
uid: number
|
||||
oldPassword: string
|
||||
newPassword: string
|
||||
}
|
||||
|
||||
// Data interface for user's topics
|
||||
export interface UserTopic {
|
||||
tid: number
|
||||
title: string
|
||||
time: number
|
||||
}
|
||||
|
||||
// Get topics published by a user
|
||||
export interface UserGetUserTopicRequestData {
|
||||
uid: number
|
||||
tidArray: number[]
|
||||
}
|
||||
|
||||
// Data interface for user's replies
|
||||
export interface UserReply {
|
||||
tid: number
|
||||
content: string
|
||||
time: number
|
||||
}
|
||||
|
||||
// Get replies published by a user
|
||||
export interface UserGetUserReplyRequestData {
|
||||
uid: number
|
||||
ridArray: number[]
|
||||
}
|
||||
|
||||
// Data interface for user's comments
|
||||
export interface UserComment {
|
||||
tid: number
|
||||
content: string
|
||||
}
|
||||
|
||||
// Get comments published by a user
|
||||
export interface UserGetUserCommentRequestData {
|
||||
uid: number
|
||||
cidArray: number[]
|
||||
}
|
||||
|
||||
// User resets password by email, not by providing the old password
|
||||
export interface UserResetPasswordByEmailRequestData {
|
||||
email: string
|
||||
code: string
|
||||
newPassword: string
|
||||
}
|
||||
|
||||
export type UserInfoResponseData = KUNGalgameResponseData<UserInfo>
|
||||
|
||||
export type UserUpdateAvatarResponseData = KUNGalgameResponseData<{
|
||||
avatar: string
|
||||
avatarMin: string
|
||||
}>
|
||||
|
||||
export type UserUpdateBioResponseData = KUNGalgameResponseData<{}>
|
||||
|
||||
export type UserGetUserEmailResponseData = KUNGalgameResponseData<{
|
||||
email: string
|
||||
}>
|
||||
|
||||
export type UserGetEmailRestCodeResponseData = KUNGalgameResponseData<{}>
|
||||
|
||||
export type UserUpdateEmailResponseData = KUNGalgameResponseData<{}>
|
||||
|
||||
export type UserUpdatePasswordResponseData = KUNGalgameResponseData<{}>
|
||||
|
||||
export type UserGetUserTopicResponseData = KUNGalgameResponseData<UserTopic[]>
|
||||
|
||||
export type UserGetUserReplyResponseData = KUNGalgameResponseData<UserReply[]>
|
||||
|
||||
export type UserGetUserCommentResponseData = KUNGalgameResponseData<
|
||||
UserComment[]
|
||||
>
|
||||
|
||||
export type UserResetPasswordByEmailResponseData = KUNGalgameResponseData<{}>
|
||||
|
|
BIN
src/assets/docs/about.docx
Normal file
BIN
src/assets/images/KUN.jpg
Normal file
After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 6 KiB |
Before Width: | Height: | Size: 5.4 KiB |
BIN
src/assets/images/bg/bg1-m.png
Normal file
After Width: | Height: | Size: 108 KiB |
BIN
src/assets/images/bg/bg1.png
Normal file
After Width: | Height: | Size: 2 MiB |
BIN
src/assets/images/bg/bg2-m.png
Normal file
After Width: | Height: | Size: 108 KiB |
BIN
src/assets/images/bg/bg2.png
Normal file
After Width: | Height: | Size: 5.8 MiB |
BIN
src/assets/images/bg/bg3-m.png
Normal file
After Width: | Height: | Size: 108 KiB |
BIN
src/assets/images/bg/bg3.png
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
src/assets/images/bg/bg4-m.png
Normal file
After Width: | Height: | Size: 108 KiB |
BIN
src/assets/images/bg/bg4.png
Normal file
After Width: | Height: | Size: 3.9 MiB |
BIN
src/assets/images/bg/bg5-m.png
Normal file
After Width: | Height: | Size: 108 KiB |
BIN
src/assets/images/bg/bg5.png
Normal file
After Width: | Height: | Size: 990 KiB |
BIN
src/assets/images/bg/bg6-m.png
Normal file
After Width: | Height: | Size: 108 KiB |
BIN
src/assets/images/bg/bg6.png
Normal file
After Width: | Height: | Size: 5.8 MiB |
BIN
src/assets/images/bg/bg7-m.png
Normal file
After Width: | Height: | Size: 108 KiB |
BIN
src/assets/images/bg/bg7.png
Normal file
After Width: | Height: | Size: 3.8 MiB |
BIN
src/assets/images/bg/bg8-m.png
Normal file
After Width: | Height: | Size: 108 KiB |
BIN
src/assets/images/bg/bg8.png
Normal file
After Width: | Height: | Size: 1.1 MiB |
BIN
src/assets/images/bg/bg9-m.png
Normal file
After Width: | Height: | Size: 108 KiB |
BIN
src/assets/images/bg/bg9.png
Normal file
After Width: | Height: | Size: 1.4 MiB |
BIN
src/assets/images/favicon.png
Normal file
After Width: | Height: | Size: 326 KiB |
Before Width: | Height: | Size: 4.4 KiB |
BIN
src/assets/images/ren/2335.png
Normal file
After Width: | Height: | Size: 125 KiB |
BIN
src/assets/images/ren/2336.png
Normal file
After Width: | Height: | Size: 119 KiB |
BIN
src/assets/images/ren/2337.png
Normal file
After Width: | Height: | Size: 176 KiB |
BIN
src/assets/images/ren/2338.png
Normal file
After Width: | Height: | Size: 182 KiB |
BIN
src/assets/images/ren/2339.png
Normal file
After Width: | Height: | Size: 199 KiB |
BIN
src/assets/images/ren/2340.png
Normal file
After Width: | Height: | Size: 204 KiB |
BIN
src/assets/images/ren/2345.png
Normal file
After Width: | Height: | Size: 196 KiB |
BIN
src/assets/images/ren/2346.png
Normal file
After Width: | Height: | Size: 200 KiB |
BIN
src/assets/images/ren/2352.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
src/assets/images/ren/2356.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
src/assets/images/ren/2360.png
Normal file
After Width: | Height: | Size: 2.1 KiB |