Repository: xjh22222228/nav
Branch: main
Commit: 451927e0a803
Files: 264
Total size: 707.6 KB
Directory structure:
gitextract_rvumvq3o/
├── .editorconfig
├── .eslintignore
├── .github/
│ └── workflows/
│ └── ci.yml
├── .gitignore
├── .npmrc
├── .oxlintrc.json
├── .postcssrc.json
├── .prettierrc.json
├── LICENSE
├── README.md
├── README_EN.md
├── angular.json
├── data/
│ ├── component.json
│ ├── db.json
│ ├── internal.json
│ ├── search.json
│ ├── settings.json
│ └── tag.json
├── nav.config.yaml
├── netlify.toml
├── ngsw-config.json
├── package.json
├── public/
│ ├── manifest.webmanifest
│ └── readme.md
├── scripts/
│ ├── build.ts
│ ├── db.ts
│ ├── loading.ts
│ ├── start.ts
│ └── utils.ts
├── src/
│ ├── api/
│ │ └── index.ts
│ ├── app/
│ │ ├── app.component.html
│ │ ├── app.component.scss
│ │ ├── app.component.ts
│ │ ├── app.config.ts
│ │ └── app.routes.ts
│ ├── assets/
│ │ ├── fonts/
│ │ │ └── iconfont.css
│ │ └── styles/
│ │ ├── dark.scss
│ │ ├── nprogress.css
│ │ └── tailwind.css
│ ├── components/
│ │ ├── breadcrumb/
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ └── index.component.ts
│ │ ├── calendar/
│ │ │ ├── drawer/
│ │ │ │ ├── index.component.html
│ │ │ │ ├── index.component.scss
│ │ │ │ └── index.component.ts
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ └── index.component.ts
│ │ ├── card/
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ └── index.component.ts
│ │ ├── carousel/
│ │ │ ├── drawer/
│ │ │ │ ├── index.component.html
│ │ │ │ ├── index.component.scss
│ │ │ │ └── index.component.ts
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ └── index.component.ts
│ │ ├── class-tabs/
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ └── index.component.ts
│ │ ├── component-group/
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ └── index.component.ts
│ │ ├── countdown/
│ │ │ ├── drawer/
│ │ │ │ ├── index.component.html
│ │ │ │ ├── index.component.scss
│ │ │ │ └── index.component.ts
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ └── index.component.ts
│ │ ├── create-web/
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ └── index.component.ts
│ │ ├── delete-modal/
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ └── index.component.ts
│ │ ├── edit-class/
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ └── index.component.ts
│ │ ├── fixbar/
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ └── index.component.ts
│ │ ├── footer/
│ │ │ ├── footer.component.html
│ │ │ ├── footer.component.scss
│ │ │ ├── footer.component.ts
│ │ │ └── template.ts
│ │ ├── holiday/
│ │ │ ├── drawer/
│ │ │ │ ├── index.component.html
│ │ │ │ ├── index.component.scss
│ │ │ │ └── index.component.ts
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ └── index.component.ts
│ │ ├── html/
│ │ │ ├── drawer/
│ │ │ │ ├── index.component.html
│ │ │ │ ├── index.component.scss
│ │ │ │ └── index.component.ts
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ └── index.component.ts
│ │ ├── icon-git/
│ │ │ ├── icon-git.component.html
│ │ │ ├── icon-git.component.scss
│ │ │ └── icon-git.component.ts
│ │ ├── image/
│ │ │ ├── drawer/
│ │ │ │ ├── index.component.html
│ │ │ │ ├── index.component.scss
│ │ │ │ └── index.component.ts
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ └── index.component.ts
│ │ ├── loading/
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ └── index.component.ts
│ │ ├── login/
│ │ │ ├── login.component.html
│ │ │ ├── login.component.scss
│ │ │ └── login.component.ts
│ │ ├── logo/
│ │ │ ├── logo.component.html
│ │ │ ├── logo.component.scss
│ │ │ └── logo.component.ts
│ │ ├── move-web/
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ └── index.component.ts
│ │ ├── news/
│ │ │ ├── drawer/
│ │ │ │ ├── index.component.html
│ │ │ │ ├── index.component.scss
│ │ │ │ └── index.component.ts
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ ├── index.component.ts
│ │ │ └── types.ts
│ │ ├── no-data/
│ │ │ ├── no-data.component.html
│ │ │ ├── no-data.component.scss
│ │ │ └── no-data.component.ts
│ │ ├── off-work/
│ │ │ ├── drawer/
│ │ │ │ ├── index.component.html
│ │ │ │ ├── index.component.scss
│ │ │ │ └── index.component.ts
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ └── index.component.ts
│ │ ├── phone-class/
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ └── index.component.ts
│ │ ├── runtime/
│ │ │ ├── drawer/
│ │ │ │ ├── index.component.html
│ │ │ │ ├── index.component.scss
│ │ │ │ └── index.component.ts
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ └── index.component.ts
│ │ ├── search/
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ ├── index.component.ts
│ │ │ └── types.ts
│ │ ├── side-images/
│ │ │ ├── image/
│ │ │ │ ├── index.component.html
│ │ │ │ ├── index.component.scss
│ │ │ │ └── index.component.ts
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ └── index.component.ts
│ │ ├── sidebar/
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ └── index.component.ts
│ │ ├── swiper/
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ ├── index.component.ts
│ │ │ └── swiper-item/
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ └── index.component.ts
│ │ ├── tag-list/
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ └── index.component.ts
│ │ ├── toolbar-title/
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ └── index.component.ts
│ │ ├── upload-file/
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ └── index.component.ts
│ │ ├── upload-image/
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ └── index.component.ts
│ │ ├── web-list/
│ │ │ ├── index.component.html
│ │ │ ├── index.component.scss
│ │ │ └── index.component.ts
│ │ └── web-more-menu/
│ │ ├── index.component.html
│ │ ├── index.component.scss
│ │ └── index.component.ts
│ ├── constants/
│ │ ├── index.ts
│ │ └── symbol.ts
│ ├── environments/
│ │ ├── environment.prod.ts
│ │ └── environment.ts
│ ├── locale/
│ │ ├── english.ts
│ │ ├── index.ts
│ │ └── zh_CN.ts
│ ├── main.html
│ ├── main.ts
│ ├── pipe/
│ │ └── safeHtml.pipe.ts
│ ├── services/
│ │ ├── common.ts
│ │ └── jump.ts
│ ├── store/
│ │ └── index.ts
│ ├── styles.scss
│ ├── types/
│ │ ├── index.ts
│ │ └── type.d.ts
│ ├── utils/
│ │ ├── bookmark.ts
│ │ ├── http.ts
│ │ ├── index.ts
│ │ ├── mitt.ts
│ │ ├── pureUtils.ts
│ │ ├── sw.ts
│ │ ├── user.ts
│ │ ├── utils.ts
│ │ └── web.ts
│ └── view/
│ ├── light/
│ │ ├── index.component.html
│ │ ├── index.component.scss
│ │ └── index.component.ts
│ ├── mobile/
│ │ ├── index.component.html
│ │ ├── index.component.scss
│ │ └── index.component.ts
│ ├── shortcut/
│ │ ├── index.component.html
│ │ ├── index.component.scss
│ │ └── index.component.ts
│ ├── side/
│ │ ├── index.component.html
│ │ ├── index.component.scss
│ │ └── index.component.ts
│ ├── sim/
│ │ ├── index.component.html
│ │ ├── index.component.scss
│ │ └── index.component.ts
│ ├── super/
│ │ ├── index.component.html
│ │ ├── index.component.scss
│ │ └── index.component.ts
│ └── system/
│ ├── auth/
│ │ ├── index.component.html
│ │ ├── index.component.scss
│ │ └── index.component.ts
│ ├── bookmark/
│ │ ├── index.component.html
│ │ ├── index.component.scss
│ │ └── index.component.ts
│ ├── bookmark-export/
│ │ ├── index.component.html
│ │ ├── index.component.scss
│ │ └── index.component.ts
│ ├── collect/
│ │ ├── index.component.html
│ │ ├── index.component.scss
│ │ └── index.component.ts
│ ├── component/
│ │ ├── index.component.html
│ │ ├── index.component.scss
│ │ ├── index.component.ts
│ │ └── types.ts
│ ├── config/
│ │ ├── index.component.html
│ │ ├── index.component.scss
│ │ └── index.component.ts
│ ├── index.component.html
│ ├── index.component.scss
│ ├── index.component.ts
│ ├── info/
│ │ ├── index.component.html
│ │ ├── index.component.scss
│ │ └── index.component.ts
│ ├── search/
│ │ ├── index.component.html
│ │ ├── index.component.scss
│ │ └── index.component.ts
│ ├── setting/
│ │ ├── index.component.html
│ │ ├── index.component.scss
│ │ └── index.component.ts
│ ├── tag/
│ │ ├── index.component.html
│ │ ├── index.component.scss
│ │ └── index.component.ts
│ └── web/
│ ├── index.component.html
│ ├── index.component.scss
│ └── index.component.ts
├── tailwind.config.js
├── tsconfig.app.json
├── tsconfig.json
└── vercel.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .editorconfig
================================================
# Editor configuration, see https://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.ts]
quote_type = single
ij_typescript_use_double_quotes = false
[*.md]
max_line_length = off
trim_trailing_whitespace = false
================================================
FILE: .eslintignore
================================================
data/
main.ts
polyfills.ts
test.ts
environments/
assets/
================================================
FILE: .github/workflows/ci.yml
================================================
name: Build web
on:
push:
branches:
- master
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set Node.js
uses: actions/setup-node@v3
with:
node-version: 22.x
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Install
run: |
pnpm install
# dist/404.html: gh-pages history mode
- name: Build
run: |
npm run build-gh-pages
cp dist/browser/index.html dist/browser/404.html
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: dist/browser
================================================
FILE: .gitignore
================================================
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.
# Compiled output
/dist
/tmp
/out-tsc
/bazel-out
# Node
/node_modules
npm-debug.log
yarn-error.log
# IDEs and editors
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# Visual Studio Code
.vscode
.history/*
# Miscellaneous
/.angular/cache
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
testem.log
/typings
# System files
.DS_Store
Thumbs.db
# build output
src/index.html
nav.config.json
_upload
test.md
data/collect.json
data/serverdb.json
data/news.json
data/backup.json
/.dockerignore
/Dockerfile
.next
log/
logs/
================================================
FILE: .npmrc
================================================
shamefully-hoist=true
================================================
FILE: .oxlintrc.json
================================================
{
"rules": {
"no-this-alias": 0,
"no-unused-vars": [
"error",
{
"ignoreRestSiblings": true
}
]
}
}
================================================
FILE: .postcssrc.json
================================================
{
"plugins": {
"@tailwindcss/postcss": {}
}
}
================================================
FILE: .prettierrc.json
================================================
{
"semi": false,
"singleQuote": true
}
================================================
FILE: LICENSE
================================================
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is 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. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
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.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
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 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. Use with the GNU Affero General Public License.
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 Affero 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 special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU 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 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 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 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.
Copyright (C)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Copyright (C)
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
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 GPL, see
.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
.
================================================
FILE: README.md
================================================
发现导航
一个纯静态、支持SEO、在线编辑的强大导航网站,希望您会喜欢
内置收录多达 800+ 优质网站, 助您工作、学习和生活
## 设计理念
无数据库、无服务器、零成本一键部署、开箱即用,但又可以像数据库那样操纵数据和保存。
好用、简单、强大。
[谁在使用?](https://official.nav3.cn/?id=3)
## 特性
- 🍰 内置 `800+` 优质网站
- 🍰 支持 [码云 Gitee](https://gitee.com/xiejiahe/nav)
- 🍰 支持 [GitLab](https://gitlab.com/xjh22222228/nav)
- 🍰 支持从浏览器书签导入
- 🍰 支持将数据导出到浏览器书签
- 🍰 支持 AI 翻译
- 🍰 支持用户提交新增、编辑、删除
- 🍰 支持自有部署(pm2|Docker|宝塔)/Fork
- 🍰 支持分类/网站移动和引用
- 🍰 支持 SEO 搜索引擎
- 🍰 支持网站关联多个网址或标签
- 🍰 支持检测网站存活状态
- 🍰 支持配置仅自己可见
- 🍰 支持自动抓取网站图标/名称/描述
- 🍰 支持小组件个性化定制
- 🍰 支持暗黑模式
- 🍰 支持后台管理, 无需部署
- 🍰 支持足迹记忆
- 🍰 支持多种搜索查询
- 🍰 支持自定义引擎搜索
- 🍰 支持卡片广告展示
- 🍰 支持 PWA 应用
- 🍰 多款高颜值主题切换
- 🍰 强大的响应式系统
- 🍰 多种 Loading 加载动画
- 🍰 多种卡片风格设计
- 🍰 完全纯静态, 提供自动化部署功能
- 🍰 三叉树分类、结构清晰、分类清晰
## 预览
- [https://nav3.cn](https://nav3.cn)

## 可以干嘛
- 部署公司内部导航系统,统一管理常用链接
- 个人书签管理,替代浏览器收藏夹
- 个人导航网站,分享、价值、发现
## 部署
零成本部署,像数 `321` 一样简单。
#### gh-pages (免费)
1、右上角点击 `Fork` 当前项目。
2、[https://github.com/settings/tokens/new](https://github.com/settings/tokens/new) 申请 `token`, 勾选读写权限, 复制并保存 Token。
3、打开 https://github.com/你的用户名/nav/actions 检查是否已开启 action 自动部署
4、修改项目根目录配置文件 [nav.config.yaml](nav.config.yaml) 只需要修改仓库地址 `gitRepoUrl` 字段
5、打开 https://你的用户名.github.io/nav 就能看到一个非常强大的导航网站了。
如果打开 404,请打开 https://github.com/你的用户名/nav/settings/pages 检查分支是否是 **gh-pages**。
#### Netlify 推荐(免费)
打包路径 `dist/browser`
[https://www.netlify.com/](https://www.netlify.com/)
#### Vercel 推荐(免费)
[https://github.com/apps/vercel](https://github.com/apps/vercel)
#### Cloudflare pages 推荐(免费)
[https://www.cloudflare.com/zh-cn](https://www.cloudflare.com/zh-cn)
## 配置说明
只需要修改根目录 `nav.config.yaml` 以下相关字段
|Fork |自有部署 | 字段 | 说明 |
| --------------------------------------------- | -------- |--- |--- |
|√ | | gitRepoUrl | 填写您的仓库地址 |
|√ | | branch | 部署分支 |
|√ | | imageRepoUrl | 图片仓库, 默认主仓库 `https://github.com/xjh22222228/image?branch=main` |
|√ | √| hashMode | 路由是否 Hash 模式, 如果是部署在 `github pages` 务必设为 true |
|√ | √| email | 用户提交收录通知 |
| | √| password | 自有部署登录密码,`Fork` 用户无需填写 |
| | √| address | 自有部署, 一旦填写认为你是自有部署 |
| | √| mailConfig | 自有部署,用户收录通知邮箱配置 |
## 后台
将路由地址修改为 `system` 即可进入,如: https://www.nav3.cn 修改为 https://www.nav3.cn/system
## 升级
将你的仓库克隆下来执行以下命令
```bash
git pull
git remote add upstream https://gitee.com/xiejiahe/nav.git
git fetch upstream main
git merge upstream/main --allow-unrelated-histories --no-edit
git push
# 如果安装了node只需执行
npm run update
```
## 支持
项目于 2018 年到至今一直坚持维护和开源, 经过 N 次的迭代与优化, 如果项目能帮到您是我的荣幸。
您可以请作者喝杯咖啡,继续战斗下去
## LICENSE
For commercial sites, themes, projects, and applications, keep your source code private/proprietary by purchasing a [Commercial License](https://official.nav3.cn/pricing).
Licensed under the GNU General Public License 3.0 for compatible open source projects and non-commercial use.
Copyright 2024-present xiejiahe
================================================
FILE: README_EN.md
================================================
Discovery Navigation
A powerful navigation website that is purely static, supports SEO, and online editing
Built-in collection of 800+ high-quality websites to assist your work, study, and life
## Design Philosophy
No database, no server, zero-cost one-click deployment, ready to use out of the box, yet capable of manipulating and saving data like a database.
Easy to use, simple, and powerful.
[Who is using it?](https://official.nav3.cn/?id=3)
## Features
- 🍰 Built-in `800+` high-quality websites
- 🍰 Support for [Gitee](https://gitee.com/xiejiahe/nav)
- 🍰 Support for [GitLab](https://gitlab.com/xjh22222228/nav)
- 🍰 Support for importing from browser bookmarks
- 🍰 Support for exporting data to browser bookmarks
- 🍰 Support for AI translation
- 🍰 Support for user submissions, edits, and deletions
- 🍰 Support for self-deployment (pm2|Docker|BT Panel)/Fork
- 🍰 Support for category/website movement and references
- 🍰 Support for SEO search engines
- 🍰 Support for associating websites with multiple URLs or tags
- 🍰 Support for detecting website status
- 🍰 Support for configuring visibility only to yourself
- 🍰 Support for automatically fetching website icons/names/descriptions
- 🍰 Support for widget personalization
- 🍰 Support for dark mode
- 🍰 Support for backend management without deployment
- 🍰 Support for footprint memory
- 🍰 Support for multiple search queries
- 🍰 Support for custom search engines
- 🍰 Support for card advertisement display
- 🍰 Support PWA applications
- 🍰 Multiple high-value themes to switch between
- 🍰 Powerful responsive system
- 🍰 Various loading animations
- 🍰 Multiple card style designs
- 🍰 Completely static with automated deployment functionality
- 🍰 Ternary tree categorization with clear structure and classification
## Preview
- [https://nav3.cn](https://nav3.cn)

## Use Cases
- Deploy internal company navigation system for unified link management
- Personal bookmark management, browser bookmark alternative
- Personal navigation website for sharing, value, and discovery
## Deployment
Zero-cost deployment, as easy as counting `3-2-1`.
#### gh-pages (Free)
1. Click `Fork` in the upper right corner to fork this repository.
2. Request a token at [https://github.com/settings/tokens/new](https://github.com/settings/tokens/new), check **repo** and **workflow** permissions, then copy and save the Token.
3. Open https://github.com/your-username/nav/actions to ensure GitHub Actions are enabled.
4. Modify the [gitRepoUrl](file:///Users/xiejiahe/NoCode/develop/open-source/nav/scripts/utils.ts#L64-L67) field in the root configuration file [nav.config.yaml](nav.config.yaml).
5. Visit https://your-username.github.io/nav to access your powerful navigation site.
If you encounter 404, open https://github.com/your-username/nav/settings/pages and verify if the deployment branch is set to **gh-pages**.
#### Netlify (Recommended, Free)
build path `dist/browser`
[https://www.netlify.com/](https://www.netlify.com/)
#### Vercel (Recommended, Free)
[https://github.com/apps/vercel](https://github.com/apps/vercel)
#### Cloudflare pages (Recommended, Free)
[https://www.cloudflare.com](https://www.cloudflare.com)
## Configuration
Only need to modify the following fields in the root `nav.config.yaml`
|Fork |Self-Deploy | Field | Description |
| --------------------------------------------- | -------- |--- |--- |
|√ | | gitRepoUrl | Your repository URL |
|√ | | branch | Deployment branch |
|√ | | imageRepoUrl | Image repository, default `https://github.com/xjh22222228/image?branch=main` |
|√ | √| hashMode | Whether to use Hash mode for routing, must be true for `github pages` |
|√ | √| email | User submission notification |
| | √| password | Self-deployment login password, not needed for `Fork` users |
| | √| address | Self-deployment address |
| | √| mailConfig | Email configuration for self-deployment notifications |
## Backend
Change the route to `system` to access, e.g., https://www.nav3.cn to https://www.nav3.cn/system
## Upgrade
Clone your repository and execute:
```bash
git pull
git remote add upstream https://gitee.com/xiejiahe/nav.git
git fetch upstream main
git merge upstream/main --allow-unrelated-histories --no-edit
git push
# If node is installed, just run
npm run update
```
## Support
This project has been maintained and open-sourced since 2018, through numerous iterations and optimizations. It's my honor if this project can help you.
You can buy the author a coffee to keep fighting
## LICENSE
For commercial sites, themes, projects, and applications, keep your source code private/proprietary by purchasing a Commercial License .
Licensed under the GNU General Public License 3.0 for compatible open source projects and non-commercial use.
Copyright 2024-present xiejiahe
================================================
FILE: angular.json
================================================
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"nav": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:application",
"options": {
"allowedCommonJsDependencies": [
"axios",
"qs",
"nprogress",
"file-saver",
"localforage",
"dayjs",
"lz-string"
],
"outputPath": "dist",
"index": "src/main.html",
"browser": "src/main.ts",
"polyfills": ["zone.js"],
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": [
"src/assets",
{
"glob": "**/*",
"input": "public"
}
],
"styles": ["src/styles.scss"],
"scripts": []
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "5mb",
"maximumError": "500mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "10kb",
"maximumError": "10kb"
}
],
"outputHashing": "all",
"serviceWorker": "ngsw-config.json"
},
"development": {
"optimization": false,
"extractLicenses": false,
"sourceMap": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"buildTarget": "nav:build:production"
},
"development": {
"buildTarget": "nav:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"polyfills": ["zone.js", "zone.js/testing"],
"tsConfig": "tsconfig.spec.json",
"inlineStyleLanguage": "scss",
"assets": [
"src/assets",
{
"glob": "**/*",
"input": "public"
}
],
"styles": ["src/styles.scss"],
"scripts": []
}
}
}
}
},
"cli": {
"analytics": "023667ec-ba02-4d59-956a-8f75ed91ab7a"
}
}
================================================
FILE: data/component.json
================================================
================================================
FILE: data/db.json
================================================
================================================
FILE: data/internal.json
================================================
{}
================================================
FILE: data/search.json
================================================
================================================
FILE: data/settings.json
================================================
{}
================================================
FILE: data/tag.json
================================================
[]
================================================
FILE: nav.config.yaml
================================================
# 发现导航 在未授权的情况下,您可以免费使用,必须公开可见,禁止商业用途。
# LICENSE GPL-3.0 https://github.com/xjh22222228/nav/blob/main/LICENSE
# 配置信息:https://github.com/xjh22222228/nav?tab=readme-ov-file#%E9%85%8D%E7%BD%AE%E8%AF%B4%E6%98%8E
# 网站所有内容都是可以在后台系统配置的,不懂的不要擅自修改源代码,出现异常请自行处理
# Fork 用户通常只需要修改 gitRepoUrl ,其他默认处理
# 问题反馈:xjh22222228@gmail.com ,非授权不接收功能建议
# 联系授权:https://official.nav3.cn/pricing
# 免责声明:使用即表示已阅读 https://official.nav3.cn/disclaimers
# 仓库地址,填写 Fork 后的仓库地址,支持 Gitee / GitHub / GitLab
# 作者 Gitee 仓库地址 https://gitee.com/xiejiahe/nav
# 作者 GitLab 仓库地址 https://gitlab.com/xjh22222228/nav?projectId=68880543, projectId 是项目 ID,可在仓库页面中找到
gitRepoUrl: https://github.com/xjh22222228/nav
# Fork 部署分支
branch: main
# 默认Fork仓库
# 仓库必须自己提前创建,如果打算长期使用本软件,建议每个人都创建一个新的仓库作为图片存储
# e.g 'https://github.com/xjh22222228/image?branch=main'
# gitlab e.g 'https://gitlab.com/xjh22222228/image?branch=main&projectId=1001'
imageRepoUrl: ''
# 只有GitHub pages用户需要设置为true, 其他建议设置为 false
hashMode: true
# 一旦填写认为你是自有部署,Fork 不要填写
address: ''
# 自有部署后台登录密码
password: admin
# 自有部署启动端口
port: 7777
# 收录通知邮箱
email: ''
# 自有部署邮件通知系统
mailConfig:
host: smtp.mxhichina.com
port: 465
secure: true
auth:
user: ''
pass: ''
title: 网站收录通知
message: 有用户提交网站收录啦
# 自有部署
XFAPIPassword: ''
================================================
FILE: netlify.toml
================================================
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
[build.environment]
NODE_VERSION = "22"
[build]
command = "npm run build"
publish = "dist/browser"
[[headers]]
for = "/api/*"
[headers.values]
Access-Control-Allow-Origin = "*"
[[headers]]
for = "/manifest.webmanifest"
[headers.values]
Content-Type = "application/manifest+json"
================================================
FILE: ngsw-config.json
================================================
{
"$schema": "./node_modules/@angular/service-worker/config/schema.json",
"index": "/index.html",
"assetGroups": [
{
"name": "app",
"installMode": "prefetch",
"resources": {
"files": [
"/favicon.ico",
"/index.csr.html",
"/index.html",
"/manifest.webmanifest",
"/*.css",
"/*.js"
]
}
},
{
"name": "assets",
"installMode": "lazy",
"updateMode": "prefetch",
"resources": {
"files": [
"/**/*.(svg|cur|jpg|jpeg|png|apng|webp|avif|gif|otf|ttf|woff|woff2)"
]
}
}
]
}
================================================
FILE: package.json
================================================
{
"name": "nav",
"version": "17.0.0",
"author": "xiejiahe",
"homepage": "https://github.com/xjh22222228/nav",
"scripts": {
"formatlint": "npm run format && npm run lint",
"lint": "oxlint",
"format": "prettier --write \"**/*.{ts,cjs,mjs}\"",
"start": "npm run init && ng serve --host 0.0.0.0 --port=7002 --live-reload=false",
"start:reload": "npm run init && ng serve --host 0.0.0.0 --port=7002",
"init": "tsx ./scripts/start.ts",
"setup": "npm run init && tsx ./scripts/build.ts",
"build-gh-pages": "npm run setup && ng build --base-href ./ --index src/index.html",
"build": "npm run setup && ng build --index src/index.html",
"watch": "ng build --watch --configuration development",
"update": "git pull && (git remote add upstream https://gitee.com/xiejiahe/nav.git || true) && git fetch upstream main && git merge upstream/main --allow-unrelated-histories --no-edit && git push",
"pull": "git pull"
},
"lint-staged": {
"*.{js,jsx,ts,tsx,json,css,scss,md}": "npm run formatlint"
},
"type": "module",
"private": true,
"dependencies": {
"@angular/animations": "^21.0.6",
"@angular/common": "^21.0.6",
"@angular/compiler": "^21.0.6",
"@angular/core": "^21.0.6",
"@angular/forms": "^21.0.6",
"@angular/platform-browser": "^21.0.6",
"@angular/platform-browser-dynamic": "^21.0.6",
"@angular/router": "^21.0.6",
"@angular/service-worker": "^21.0.6",
"axios": "^1.13.2",
"chrome-finder": "^1.0.7",
"cron": "^4.4.0",
"dayjs": "^1.11.19",
"express": "^5.2.1",
"file-saver": "^2.0.5",
"js-base64": "^3.7.8",
"js-yaml": "^4.1.1",
"localforage": "^1.10.0",
"lz-string": "^1.5.0",
"mitt": "^3.0.1",
"ng-zorro-antd": "^20.4.4",
"nprogress": "^0.2.0",
"puppeteer": "^24.34.0",
"qs": "^6.14.0",
"rough-notation": "^0.5.1",
"rxjs": "~7.8.2",
"sharp": "^0.34.5",
"zone.js": "~0.16.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^21.0.4",
"@angular/cli": "^21.0.4",
"@angular/compiler-cli": "^21.0.6",
"@tailwindcss/postcss": "^4.1.18",
"@types/compression": "^1.8.1",
"@types/file-saver": "^2.0.7",
"@types/jasmine": "~5.1.13",
"@types/js-yaml": "^4.0.9",
"@types/nodemailer": "^7.0.4",
"@types/nprogress": "^0.2.3",
"@types/qs": "^6.14.0",
"body-parser": "^2.2.1",
"compression": "^1.8.1",
"connect-history-api-fallback": "^2.0.0",
"cors": "^2.8.5",
"info-web": "^0.0.46",
"jasmine-core": "~5.13.0",
"lint-staged": "^16.2.7",
"nodemailer": "^7.0.11",
"oxlint": "^1.34.0",
"pm2": "^6.0.14",
"postcss": "^8.5.6",
"prettier": "^3.7.4",
"tailwindcss": "^4.1.18",
"tslib": "^2.8.1",
"tsx": "^4.21.0",
"typescript": "~5.9.3"
}
}
================================================
FILE: public/manifest.webmanifest
================================================
{
"name": "发现导航",
"short_name": "发现导航",
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone",
"scope": "./",
"start_url": "./",
"icons": [
{
"src": "icons/icon-192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "icons/icon-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable any"
}
]
}
================================================
FILE: public/readme.md
================================================
https://github.com/xjh22222228/nav
================================================
FILE: scripts/build.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejia.he. All rights reserved.
// See https://github.com/xjh22222228/nav
import fs from 'fs'
import dayjs from 'dayjs'
import utc from 'dayjs/plugin/utc.js'
import timezone from 'dayjs/plugin/timezone.js'
import {
writeSEO,
writeTemplate,
spiderWebs,
PATHS,
getConfig,
fileWriteStream,
writePWA,
} from './utils'
import type { INavProps, ISettings } from '../src/types/index'
dayjs.extend(utc)
dayjs.extend(timezone)
dayjs.tz.setDefault('Asia/Shanghai')
const config = getConfig()
const handleFileOperation = (operation: () => any): any => {
try {
return operation()
} catch (error) {
console.error(`File operation failed: ${(error as Error).message}`)
return null
}
}
const db: INavProps[] = handleFileOperation(() =>
JSON.parse(fs.readFileSync(PATHS.db, 'utf-8')),
)
const settings: ISettings = handleFileOperation(() =>
JSON.parse(fs.readFileSync(PATHS.settings, 'utf-8')),
)
const seoTemplate = writeSEO(db, { settings })
const html = writeTemplate({
html: fs.readFileSync(PATHS.html.main, 'utf-8'),
settings,
seoTemplate,
})
handleFileOperation(() => fs.writeFileSync(PATHS.html.write, html))
handleFileOperation(() =>
writePWA(
{
...settings,
pwaIcon: '',
},
PATHS.manifestPublic,
),
)
let errorUrlCount = 0
process.on('exit', async () => {
settings.errorUrlCount = errorUrlCount
fs.writeFileSync(PATHS.settings, JSON.stringify(settings))
await fileWriteStream(PATHS.db, config.address ? [] : db)
if (config.address) {
await fileWriteStream(PATHS.serverdb, db)
}
console.log('All success!')
})
const { errorUrlCount: count } = await spiderWebs(db, settings)
errorUrlCount = count
================================================
FILE: scripts/db.ts
================================================
const db: string = `NobwRALglhA2CmYBcZB52oCldCnuod0UwBowA7AQwDdlRIYFkxAAfUEXlQD7dBnRXyLIvGjkRUcB6noAs1diXJJKJALZ8wDQA3OgH+1AVEHsAxgCd4xCPAAmAQQi0ATAAYTARgC0F65YAcAAitIzANnYadfAKwEIAHsAB2QIDQBXeACQgBUAT2D4AGcKEwBdAj0UtVoFFTwnQABzQC59QG94wHnEwHK/FUBFf0BNr3YoNUDCWgALCAhg5KQAej6AcxatADoAK2Ts2ChSDVHCeAgh9r6AD3H2k22dkwc+sWsoKWJB+AABY9P4PthAwcDR5NJB9giNWA6unv6hmHaIgAjUYtKTrTa7Hb7MTsQFaYh6TQRKSAihoLC4AiMVjsQQiTJgKB6ZCWAKnVISdIAXzw4GksgA4v8gdYAMIAGQAkup4bpDMYUOYrLYTPZnK4PF4fMh/GBsslcigmRAABJAwAhboAM7UAnaaAXxVACdygBkInBNFptFCdbq9AaDZnA20QAGA4jJZJLZIgwJggBmZGarWSfV9pH9hCeLzeHy+Vt+ahmowdTs9YNh8MRkRRaIwJqxzDYueEYAJROQJjJgwplBLKGsAGZI58Ld9rX9HU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XxvyXdJTP5EUEj2RmearrqGTs2jUj7hVjQ84LKCGAIWURzgqSlkKVceGxcXdnxKubFWyU7JQQAGKXRJWYlqDGbmWpu7GB3Jcc+gAB0aeHAgAAPOlf4au4ILpEQP4ZYSH+GUsW6LNK6lUCipX/4gGiBKW8lPMAacLylAqX1KEKlOsI/JWil7ACcpc8lZiUtxYguEgXCMFIFF7ic5IjRURiAAEQxJxgVwOqAXKWrKMyhpeY72bYakgUuBR2AOyC/pFIA+yBiAGL2aX4apYylYADapUjYJ8XsufiK4wyUCtJe3phnJFHw1FAO5HDggADRzoAABerWpc8lfbCtjE4SHkCAAPZGgACHtp/EIaVsQVFcUs4+pZXx/qW1WAKpp8XYqcuAULzMYt1xiMlIwLxOULxdwPCxNqVklFs8FaVEKmjphvkojAWlWqX0IHclxaUKGb4lF9nLeUC6QAA==`
export default db
================================================
FILE: scripts/loading.ts
================================================
// Copyright @ 2018-present xiejia.he. All rights reserved.
// See https://github.com/xjh22222228/nav
const loadingTemplate: Record = {
loading1: `
`.trim(),
loading2: `
`.trim(),
loading3: `
`.trim(),
loading4: `
`,
}
export default loadingTemplate
================================================
FILE: scripts/start.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present x.iejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import fs from 'fs'
import dayjs from 'dayjs'
import utc from 'dayjs/plugin/utc.js'
import timezone from 'dayjs/plugin/timezone.js'
import defaultDb from './db'
import LZString from 'lz-string'
import {
TAG_ID1,
TAG_ID2,
TAG_ID3,
TAG_ID_NAME1,
TAG_ID_NAME2,
TAG_ID_NAME3,
getWebCount,
setWebs,
PATHS,
getConfig,
fileWriteStream,
} from './utils'
import { replaceJsdelivrCDN } from '../src/utils/pureUtils'
import type {
ITagPropValues,
ISettings,
INavProps,
InternalProps,
IComponentProps,
ISearchProps,
} from '../src/types/index'
import { ComponentType } from '../src/types/index'
dayjs.extend(utc)
dayjs.extend(timezone)
dayjs.tz.setDefault('Asia/Shanghai')
const getNavs = (): INavProps[] => {
try {
const strings = fs.readFileSync(PATHS.db).toString().trim()
if (!strings) throw new Error('empty')
try {
const serverdb = fs.readFileSync(PATHS.serverdb).toString().trim()
return JSON.parse(serverdb)
} catch {}
return strings[0] === '['
? JSON.parse(strings)
: JSON.parse(LZString.decompressFromBase64(strings)) ||
JSON.parse(LZString.decompressFromBase64(defaultDb))
} catch {
return JSON.parse(LZString.decompressFromBase64(defaultDb))
}
}
const main = async () => {
const configJson = getConfig()
fs.writeFileSync(PATHS.configJson, JSON.stringify(configJson))
const db = getNavs()
let internal = {} as InternalProps
let settings = {} as ISettings
let tags: ITagPropValues[] = []
let search = {} as ISearchProps
let component: IComponentProps = { zoom: 1, components: [] }
try {
internal = JSON.parse(fs.readFileSync(PATHS.internal).toString())
settings = JSON.parse(fs.readFileSync(PATHS.settings).toString())
tags = JSON.parse(fs.readFileSync(PATHS.tag).toString())
} catch (e: any) {
console.log(e.message)
}
try {
const s = JSON.parse(fs.readFileSync(PATHS.search).toString())
if (Array.isArray(s)) {
// @ts-ignore
search = {
list: s,
}
} else {
search = s
}
} catch {
} finally {
if (!search.list || !search.list.length) {
search.list = [
{
name: '站内',
icon:
settings.favicon ||
'https://gcore.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/logo.svg',
placeholder: '站内搜索',
blocked: false,
isInner: true,
},
{
name: 'Google',
url: 'https://www.google.com/search?q=',
icon: 'https://www.google.com/favicon.ico',
blocked: false,
isInner: false,
},
]
}
search.logo ||= ''
search.darkLogo ||= ''
search.height ||= 80
search.list = search.list.map((item) => {
item.icon = replaceJsdelivrCDN(item.icon, settings)
return item
})
fs.writeFileSync(PATHS.search, JSON.stringify(search), {
encoding: 'utf-8',
})
}
try {
const components = JSON.parse(fs.readFileSync(PATHS.component).toString())
// < 16
if (Array.isArray(components)) {
component = {
zoom: 1,
components,
}
} else {
component = components
}
} catch {
} finally {
let idx = component.components.findIndex(
(item) => item['type'] === ComponentType.Calendar,
)
const calendar = {
type: ComponentType.Calendar,
id: -ComponentType.Calendar,
topColor: '#ff5a5d',
bgColor: '#1d1d1d',
}
if (idx >= 0) {
component.components[idx] = {
...calendar,
...component.components[idx],
}
} else {
component.components.push(calendar)
}
//
idx = component.components.findIndex(
(item) => item['type'] === ComponentType.OffWork,
)
const offWork = {
type: ComponentType.OffWork,
id: -ComponentType.OffWork,
workTitle: '距离下班还有',
restTitle: '休息啦',
startDate: new Date(2018, 3, 26, 9, 0, 0).getTime(),
date: new Date(2018, 3, 26, 18, 0, 0).getTime(),
}
if (idx >= 0) {
component.components[idx] = {
...offWork,
...component.components[idx],
}
} else {
component.components.push(offWork)
}
//
idx = component.components.findIndex(
(item) => item['type'] === ComponentType.Image,
)
const image = {
type: ComponentType.Image,
id: -ComponentType.Image,
url: 'https://gcore.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/component1.jpg',
go: '',
text: '只有认可,才能强大',
}
if (idx >= 0) {
component.components[idx] = {
...image,
...component.components[idx],
}
component.components[idx]['url'] = replaceJsdelivrCDN(
component.components[idx]['url'],
settings,
)
} else {
component.components.push(image)
}
//
idx = component.components.findIndex(
(item) => item['type'] === ComponentType.Countdown,
)
const countdown = {
type: ComponentType.Countdown,
id: -ComponentType.Countdown,
topColor: 'linear-gradient(90deg, #FAD961 0%, #F76B1C 100%)',
bgColor: 'rgb(235,129,124)',
url: 'https://gcore.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/component2.jpg',
title: '距离春节还有',
dateColor: '#fff',
dayColor: '#fff',
date: '2026-02-17',
}
if (idx >= 0) {
component.components[idx] = {
...countdown,
...component.components[idx],
}
component.components[idx]['url'] = replaceJsdelivrCDN(
component.components[idx]['url'],
settings,
)
} else {
component.components.push(countdown)
}
//
idx = component.components.findIndex(
(item) => item['type'] === ComponentType.Runtime,
)
const runtime = {
type: ComponentType.Runtime,
id: -ComponentType.Runtime,
title: '已稳定运行',
}
if (idx >= 0) {
component.components[idx] = {
...runtime,
...component.components[idx],
}
} else {
component.components.push(runtime)
}
//
idx = component.components.findIndex(
(item) => item['type'] === ComponentType.HTML,
)
const html = {
type: ComponentType.HTML,
id: -ComponentType.HTML,
html: '你好,发现导航',
width: 160,
bgColor: '#fff',
}
if (idx >= 0) {
component.components[idx] = {
...html,
...component.components[idx],
}
} else {
component.components.push(html)
}
//
idx = component.components.findIndex(
(item) => item['type'] === ComponentType.Holiday,
)
const holiday = {
type: ComponentType.Holiday,
id: -ComponentType.Holiday,
items: [],
}
if (idx >= 0) {
component.components[idx] = {
...holiday,
...component.components[idx],
}
} else {
component.components.push(holiday)
}
//
idx = component.components.findIndex(
(item) => item['type'] === ComponentType.News,
)
const news = {
type: ComponentType.News,
id: -ComponentType.News,
bgColor: 'linear-gradient(100deg,#2a2d38, rgb(35, 39, 54))',
types: [],
count: 0,
}
if (idx >= 0) {
component.components[idx] = {
...news,
...component.components[idx],
}
} else {
component.components.push(news)
}
//
idx = component.components.findIndex(
(item) => item['type'] === ComponentType.Carousel,
)
const carousel = {
type: ComponentType.Carousel,
id: -ComponentType.Carousel,
imgs: [],
width: 220,
fit: 'cover',
}
if (idx >= 0) {
component.components[idx] = {
...carousel,
...component.components[idx],
}
} else {
component.components.push(carousel)
}
fs.writeFileSync(PATHS.component, JSON.stringify(component))
}
{
const isEn = settings.language === 'en'
const desc = isEn ? 'The system is built-in' : '系统内置不可删除'
if (!Array.isArray(tags)) {
tags = []
}
const a = tags.some((item) => item.id === TAG_ID1)
if (!a) {
tags.push({
id: TAG_ID1,
name: isEn ? 'Chinese' : TAG_ID_NAME1,
color: '#2db7f5',
desc,
isInner: true,
})
}
const b = tags.some((item) => item.id === TAG_ID2)
if (!b) {
tags.push({
id: TAG_ID2,
name: isEn ? 'English' : TAG_ID_NAME2,
color: '#f50',
desc,
isInner: true,
})
}
const c = tags.some((item) => item.id === TAG_ID3)
if (!c) {
tags.push({
id: TAG_ID3,
name: TAG_ID_NAME3,
color: '#108ee9',
desc,
isInner: true,
})
}
tags = tags.filter((item) => item.name && item.id)
fs.writeFileSync(PATHS.tag, JSON.stringify(tags), {
encoding: 'utf-8',
})
}
{
const banner1 =
'https://gcore.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/banner1.jpg'
const banner2 =
'https://gcore.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/banner2.jpg'
const backgroundImg =
'https://gcore.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/background.jpg'
settings.favicon ??=
'https://gcore.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/logo.svg'
settings.language ||= 'zh-CN'
settings.loading ??= 'random'
settings.runtime ??= dayjs.tz().valueOf()
settings.userActions ||= []
settings.email ||= configJson.email || ''
settings.showGithub ??= true
settings.showLanguage ??= true
settings.showRate ??= true
settings.openSearch ??= true
settings.title ??= '发现导航 - 精选实用导航网站'
settings.description ??= '发现导航是一个轻量级免费且强大的导航网站'
settings.keywords ??= '免费导航,开源导航'
settings.theme ??= 'Light'
settings.actionUrl ??= ''
settings.appTheme ??= 'Current'
settings.openSEO ??= !configJson.address
settings.createWebKey ??= 'E'
settings.headerContent ??= ''
settings.footerContent ??= `
共收录$\{total}个网站
Copyright © 2018-$\{year} $\{hostname}, All Rights Reserved
`.trim()
settings.showThemeToggle ??= true
settings.logo ||= ''
settings.darkLogo ||= ''
settings.lightDocTitle ||= ''
settings.lightCardStyle ||= 'standard'
settings.lightOverType ||= 'overflow'
settings.lightFooterHTML ||= ''
settings.simThemeImages ||= [
{
src: banner1,
url: 'https://github.com/xjh22222228/nav',
},
{
src: banner2,
url: 'https://github.com/xjh22222228/nav',
},
]
settings.simThemeDesc ??=
'这里收录多达 ${total} 个优质网站, 助您工作、学习和生活'
settings.simCardStyle ||= 'original'
settings.simOverType ||= 'overflow'
settings.simThemeHeight ??= 0
settings.simThemeAutoplay ??= true
settings.simDocTitle ||= ''
settings.simTitle ||= ''
settings.simFooterHTML ||= ''
settings.superCardStyle ||= 'column'
settings.superOverType ||= 'overflow'
settings.superFooterHTML ||= ''
settings.superDocTitle ||= ''
settings.superTitle ||= ''
const defImgs = [
{
src: 'https://gcore.jsdelivr.net/gh/xjh22222228/nav-image@image/nav-1717494364392-ad.jpg',
url: 'https://haokawx.lot-ml.com/Product/index/454266',
},
{
src: 'https://gcore.jsdelivr.net/gh/xjh22222228/public@gh-pages/img/10.png',
url: '',
},
]
settings.superImages ??= defImgs
settings.lightImages ??= defImgs
if (!Array.isArray(settings.superImages)) {
settings.superImages = defImgs
}
if (!Array.isArray(settings.lightImages)) {
settings.lightImages = defImgs
}
settings.sideTitle ||= ''
settings.sideDocTitle ||= ''
settings.sideCardStyle ||= 'example'
settings.sideFooterHTML ||= ''
settings.sideThemeHeight ??= 0
settings.sideThemeAutoplay ??= true
settings.sideCollapsed ??= false
settings.sideThemeImages ||= [
{
src: banner2,
url: 'https://github.com/xjh22222228/nav',
},
{
src: banner1,
url: 'https://github.com/xjh22222228/nav',
},
]
settings.shortcutTitle ??= ''
settings.shortcutDocTitle ||= ''
settings.shortcutDockCount ??= 6
settings.shortcutThemeShowWeather ??= true
settings.shortcutThemeImages ??= [
{
src: backgroundImg,
url: '',
},
]
settings.checkUrl ??= false
settings.spiderIcon ??= 'NO'
settings.spiderDescription ??= 'NO'
settings.spiderTitle ??= 'NO'
settings.spiderImg ??= 'NO'
settings.spiderQty ??= 200
settings.spiderTimeout ??= 6
settings.spiderTimeout = Number(settings.spiderTimeout) || 6
settings.loadingCode ??= ''
settings.appCardStyle ??= 'retro'
settings.appDocTitle ||= ''
settings.gitHubCDN ||= 'gcore.jsdelivr.net'
settings.components ||= []
settings.pwaEnable ??= false
settings.pwaName ??= '发现导航'
settings.pwaIcon ||= ''
// 替换CDN
settings.favicon = replaceJsdelivrCDN(settings.favicon, settings)
settings.simThemeImages = settings.simThemeImages.map((item) => {
item.src = replaceJsdelivrCDN(item.src, settings)
return item
})
settings.superImages = settings.superImages.map((item) => {
item.src = replaceJsdelivrCDN(item.src, settings)
return item
})
settings.lightImages = settings.lightImages.map((item) => {
item.src = replaceJsdelivrCDN(item.src, settings)
return item
})
settings.sideThemeImages = settings.sideThemeImages.map((item) => {
item.src = replaceJsdelivrCDN(item.src, settings)
return item
})
settings.shortcutThemeImages = settings.shortcutThemeImages.map((item) => {
item.src = replaceJsdelivrCDN(item.src, settings)
return item
})
fs.writeFileSync(PATHS.settings, JSON.stringify(settings), {
encoding: 'utf-8',
})
}
const { userViewCount, loginViewCount } = getWebCount(db)
internal.userViewCount = userViewCount < 0 ? loginViewCount : userViewCount
internal.loginViewCount = loginViewCount
fs.writeFileSync(PATHS.internal, JSON.stringify(internal))
const webs = setWebs(db, settings, tags)
await fileWriteStream(PATHS.db, webs)
if (configJson.address) {
await fileWriteStream(PATHS.serverdb, webs)
}
}
main().catch(console.error)
================================================
FILE: scripts/utils.ts
================================================
// Copyright @ 2018-present xie.jiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import dayjs from 'dayjs'
import LOAD_MAP from './loading'
import utc from 'dayjs/plugin/utc.js'
import timezone from 'dayjs/plugin/timezone.js'
import getWebInfo from 'info-web'
import path from 'node:path'
import type {
INavProps,
ISearchProps,
ISettings,
ITagPropValues,
IWebProps,
} from '../src/types'
import {
SELF_SYMBOL,
CODE_SYMBOL,
ROUTER_SYMBOL,
DEFAULT_SORT_INDEX,
} from '../src/constants/symbol'
import {
replaceJsdelivrCDN,
removeTrailingSlashes,
isNumber,
dfsNavs,
} from '../src/utils/pureUtils'
import fs from 'node:fs'
import yaml from 'js-yaml'
import sharp from 'sharp'
import axios from 'axios'
dayjs.extend(utc)
dayjs.extend(timezone)
dayjs.tz.setDefault('Asia/Shanghai')
export const TAG_ID1 = -1
export const TAG_ID2 = -2
export const TAG_ID3 = -3
export const TAG_ID_NAME1 = '中文'
export const TAG_ID_NAME2 = '英文'
export const TAG_ID_NAME3 = 'GitHub'
export const PATHS = {
root: path.resolve('dist', 'browser'),
public: path.resolve('public'),
uploadImage: path.resolve('_upload', 'images'),
db: path.resolve('data', 'db.json'),
serverdb: path.resolve('data', 'serverdb.json'),
settings: path.resolve('data', 'settings.json'),
tag: path.resolve('data', 'tag.json'),
search: path.resolve('data', 'search.json'),
collect: path.resolve('data', 'collect.json'),
component: path.resolve('data', 'component.json'),
internal: path.resolve('data', 'internal.json'),
news: path.resolve('data', 'news.json'),
backup: path.resolve('data', 'backup.json'),
config: path.resolve('nav.config.yaml'),
configJson: path.resolve('nav.config.json'),
pkg: path.resolve('package.json'),
html: {
index: path.resolve('dist', 'browser', 'index.html'),
main: path.resolve('src', 'main.html'),
write: path.resolve('src', 'index.html'),
},
manifest: path.resolve('dist', 'browser', 'manifest.webmanifest'),
manifestPublic: path.resolve('public', 'manifest.webmanifest'),
manifestIcon512: path.resolve('dist', 'browser', 'icons', 'icon-512x512.png'),
manifestIcon192: path.resolve('dist', 'browser', 'icons', 'icon-192x192.png'),
} as const
export const getConfig = () => {
const pkgJson = JSON.parse(fs.readFileSync(PATHS.pkg).toString())
const config = yaml.load(fs.readFileSync(PATHS.config).toString()) as Record<
string,
any
>
const gitRepoUrl = removeTrailingSlashes(config['gitRepoUrl'] || '').replace(
/\.git$/,
'',
)
const zorroVersion = pkgJson.dependencies['ng-zorro-antd'].replace(
/[^0-9.]/g,
'',
)
return {
version: pkgJson.version,
zorroDark: `//gcore.jsdelivr.net/npm/ng-zorro-antd@${zorroVersion}/ng-zorro-antd.dark.min.css`,
gitRepoUrl,
imageRepoUrl: config['imageRepoUrl'],
branch: config['branch'],
hashMode: config['hashMode'],
address: config['address'],
email: config['email'],
port: config['port'],
datetime: dayjs.tz().format('YYYY-MM-DD HH:mm'),
} as const
}
interface WebCountResult {
userViewCount: number
loginViewCount: number
}
// 统计网站数量
export function getWebCount(navs: INavProps[]): WebCountResult {
// 用户查看所有数量
let userViewCount = 0
// 登陆者统计所有数量
let loginViewCount = 0
let diffCount = 0
dfsNavs({
navs,
webCallback() {
loginViewCount += 1
userViewCount += 1
},
})
function r2(nav: any[], ownVisible?: boolean): void {
if (!Array.isArray(nav)) return
for (let i = 0; i < nav.length; i++) {
const item = nav[i]
if (item.ownVisible) {
r2(item.nav, true)
} else {
r2(item.nav, ownVisible)
}
if (item.url && item.ownVisible && !ownVisible) {
diffCount += 1
} else if (item.url && ownVisible) {
diffCount += 1
}
}
}
r2(navs)
return {
userViewCount: userViewCount - diffCount,
loginViewCount,
}
}
let maxId = 0
function getMaxWebId(navs: any[]): void {
dfsNavs({
navs,
callback(item: INavProps) {
if (item.id > maxId) {
maxId = item.id
}
if (item['rId'] && item['rId'] > maxId) {
maxId = item['rId']
}
},
webCallback(web: IWebProps) {
if (web.id > maxId) {
maxId = web.id
}
if (web.rId && web.rId > maxId) {
maxId = web.rId
}
},
})
}
function incrementId(id: number | string): number {
id = Number.parseInt(id as string)
if (!id || id < 0) {
return ++maxId
}
return id
}
export function setWebs(
navs: INavProps[],
settings: ISettings,
tags: ITagPropValues[] = [],
): INavProps[] {
if (!Array.isArray(navs)) return []
const tagMap = new Map()
for (const tag of tags) {
if (tag.id) {
tagMap.set(tag.id, tag)
}
}
function handleAdapter(item: any): void {
delete item.collapsed
delete item.createdAt
if (!item.ownVisible) {
delete item.ownVisible
}
item.id = incrementId(item.id)
if (item.rId < 0) {
item.rId = incrementId(item.rId)
}
item.icon = replaceJsdelivrCDN(item.icon, settings)
item.nav ||= []
}
getMaxWebId(navs)
navs = dfsNavs({
navs,
callback(item: INavProps) {
handleAdapter(item)
},
sort: (a, b) => {
const aIndexs = [DEFAULT_SORT_INDEX]
if (isNumber(a.index)) {
aIndexs.push(Number(a.index))
} else {
for (const tag of a.tags || []) {
const tagItem = tagMap.get(Number(tag.id))
if (tagItem?.sort != null) {
aIndexs.push(Number(tagItem.sort))
}
}
}
const aIdx = Math.min(...aIndexs)
const bIndexs = [DEFAULT_SORT_INDEX]
if (isNumber(b.index)) {
bIndexs.push(Number(b.index))
} else {
for (const tag of b.tags || []) {
const tagItem = tagMap.get(Number(tag.id))
if (tagItem?.sort != null) {
bIndexs.push(Number(tagItem.sort))
}
}
}
const bIdx = Math.min(...bIndexs)
return aIdx - bIdx
},
webCallback(webItem: IWebProps) {
webItem.id = incrementId(webItem.id)
if (webItem.rId) {
webItem.rId = incrementId(webItem.rId)
}
webItem.tags ||= []
webItem.rate ??= 5
webItem.top ??= false
webItem.ownVisible ??= false
webItem.url ||= ''
webItem.name ||= ''
webItem.desc ||= ''
webItem.icon ||= ''
webItem.icon = replaceJsdelivrCDN(webItem.icon, settings)
if (webItem.img) {
webItem.img = replaceJsdelivrCDN(webItem.img, settings)
}
webItem.url = removeTrailingSlashes(webItem.url.trim())
webItem.name = webItem.name.trim().replace(/|<\/b>/g, '')
webItem.desc = webItem.desc.trim().replace(/|<\/b>/g, '')
// 网站标签和系统标签关联
webItem.tags = webItem.tags.filter((item) => {
return tagMap.has(Number(item.id))
})
delete webItem.__desc__
delete webItem.__name__
delete webItem['extra']
delete webItem['createdAt']
delete webItem.breadcrumb
if (webItem.tags.length === 0) {
delete webItem.tags
}
if (!webItem.top) {
delete webItem.top
delete webItem.topTypes
}
!webItem.ownVisible && delete webItem.ownVisible
webItem.index === '' && delete webItem.index
;(webItem.topTypes ?? []).length === 0 && delete webItem.topTypes
},
})
return navs
}
interface SEOPayload {
settings: ISettings
}
export function writeSEO(navs: INavProps[], payload: SEOPayload): string {
const { settings } = payload
const nowDate = dayjs.tz().format('YYYY-MM-DD HH:mm:ss')
let seoTemplate = `
'
return seoTemplate
}
interface TemplateParams {
html: string
settings: ISettings
seoTemplate: string
}
export function writeTemplate({
html,
settings,
seoTemplate,
}: TemplateParams): string {
const search: ISearchProps = JSON.parse(
fs.readFileSync(PATHS.search, 'utf-8'),
)
function getLoadKey(): string {
const keys = Object.keys(LOAD_MAP)
const rand = Math.floor(Math.random() * keys.length)
const loadingKey =
settings.loading === 'random' ? keys[rand] : settings.loading
return loadingKey
}
const prefetchs: Record[] = [
{
href: getConfig().zorroDark,
as: 'style',
rel: 'prefetch',
},
]
if (settings.logo) {
prefetchs.push({
href: settings.logo,
as: 'image',
rel: 'prefetch',
})
}
if (settings.darkLogo && settings.logo !== settings.darkLogo) {
prefetchs.push({
href: settings.darkLogo,
as: 'image',
rel: 'prefetch',
})
}
if (search.logo) {
prefetchs.push({
href: search.logo,
as: 'image',
rel: 'prefetch',
})
}
if (search.darkLogo && search.logo !== search.darkLogo) {
prefetchs.push({
href: search.darkLogo,
as: 'image',
rel: 'prefetch',
})
}
const prefetchLinks = prefetchs
.map((item) => {
return ` `
})
.join('')
const htmlTemplate = `
${settings.title}
${prefetchLinks}
`.trim()
const pwaContent = `
`.trim()
let t = html
t = t.replace(
/()(.|\s)*?()/i,
`$1${htmlTemplate}$3`,
)
t = t.replace(
/()(.|\s)*?()/i,
`$1${settings.headerContent}$3`,
)
t = t.replace(
/()(.|\s)*?()/i,
`$1${seoTemplate}$3`,
)
t = t.replace(
/()(.|\s)*?()/i,
`$1${pwaContent}$3`,
)
const loadingCode = settings.loadingCode.trim()
t = t.replace(
/()(.|\s)*?()/i,
`$1${loadingCode || LOAD_MAP[getLoadKey()] || ''}$3`,
)
return t
}
function correctURL(url: string): string {
if (url[0] === SELF_SYMBOL) {
return url.slice(1)
}
return url
}
interface SpiderWebResult {
webs: INavProps[]
errorUrlCount: number
time: number
}
interface WebInfoResponse {
status: boolean
errorMsg?: string
iconUrl?: string
title?: string
description?: string
}
function updateItemField(
item: IWebProps,
field: keyof IWebProps,
value: string | undefined,
settingKey: keyof ISettings,
settings: ISettings,
logMessage: string,
): string {
if (settings[settingKey] === 'ALWAYS' && value) {
const message = `更新${logMessage}:${correctURL(item.url)}: "${
item[field]
}" => "${value}"`
console.log(message)
item[field] = value
return message
} else if (settings[settingKey] === 'EMPTY' && !item[field] && value) {
const message = `更新${logMessage}:${correctURL(item.url)}: "${
item[field]
}" => "${value}"`
console.log(message)
item[field] = value
return message
}
return ''
}
export async function spiderWebs(
navs: INavProps[],
settings: ISettings,
props?: {
onOk?: (messages: string[]) => void
},
): Promise {
let errorUrlCount = 0
const { onOk } = props || {}
const items: IWebProps[] = []
navs = dfsNavs({
navs,
webCallback: (item: IWebProps) => {
const firstCode = item.url[0]
if (firstCode !== CODE_SYMBOL && firstCode !== ROUTER_SYMBOL) {
delete item.ok
if (
settings.checkUrl ||
settings.spiderIcon === 'EMPTY' ||
settings.spiderIcon === 'ALWAYS' ||
settings.spiderDescription === 'EMPTY' ||
settings.spiderDescription === 'ALWAYS' ||
settings.spiderTitle === 'EMPTY' ||
settings.spiderTitle === 'ALWAYS'
) {
items.push(item)
}
}
},
})
const max = settings.spiderQty ?? 20
const count = Math.ceil(items.length / max)
let current = 0
const now = Date.now()
if (items.length) {
console.log(
`正在爬取信息... 并发数量:${max} 超时: ${settings.spiderTimeout}秒`,
)
}
while (current < count) {
const requestPromises = items
.slice(current * max, current * max + max)
.map((item) =>
getWebInfo(correctURL(item.url), {
timeout: settings.spiderTimeout * 1000,
}),
)
const promises = await Promise.all(requestPromises)
let messages = []
for (let i = 0; i < promises.length; i++) {
const idx = current * max + i
const item = items[idx]
const res = promises[i] as WebInfoResponse
const message = `${idx}:${
res.status ? '正常' : `疑似异常: ${res.errorMsg}`
} ${correctURL(item.url)}`
console.log(message)
messages.push(message)
if (settings.checkUrl && !res.status) {
errorUrlCount += 1
item.ok = false
}
if (res?.status) {
messages.push(
updateItemField(
item,
'icon',
res.iconUrl,
'spiderIcon',
settings,
'图标',
),
updateItemField(
item,
'name',
res.title,
'spiderTitle',
settings,
'标题',
),
updateItemField(
item,
'desc',
res.description,
'spiderDescription',
settings,
'描述',
),
)
}
console.log('-'.repeat(100))
}
messages = messages.filter(Boolean)
if (messages) {
onOk?.(messages)
}
current += 1
}
const diff = Math.ceil((Date.now() - now) / 1000)
console.log(`OK: Time: ${diff} seconds`)
return {
webs: navs,
errorUrlCount,
time: diff,
}
}
export async function fileWriteStream(path: string, data: object | string) {
const strings = typeof data === 'string' ? data : JSON.stringify(data)
const CHUNK_SIZE = 1024 * 1024
const stream1 = fs.createWriteStream(path)
const stream1Promise = new Promise((resolve, reject) => {
stream1.on('finish', () => resolve(`${path} written`))
stream1.on('error', (err) => reject(err))
})
const writeChunks = (stream: fs.WriteStream, data: string) => {
return new Promise((resolve, reject) => {
const totalLength = data.length
let position = 0
const writeNextChunk = () => {
if (position >= totalLength) {
stream.end()
resolve()
return
}
// 计算当前块的结束位置
const end = Math.min(position + CHUNK_SIZE, totalLength)
// 提取当前块
const chunk = data.slice(position, end)
// 写入当前块
const canContinue = stream.write(chunk, 'utf8')
position = end
// 如果流已满,等待'drain'事件后继续
if (!canContinue) {
stream.once('drain', writeNextChunk)
} else {
// 使用setImmediate避免调用栈溢出
setImmediate(writeNextChunk)
}
}
writeNextChunk()
stream.on('error', (err) => {
reject(err)
})
})
}
try {
await writeChunks(stream1, strings)
const results = await stream1Promise
return results
} catch (err) {
stream1.end()
console.log(`Failed to write files: ${(err as Error).message}`)
return err
}
}
export function fileReadStream(path: string): Promise {
return new Promise((resolve, reject) => {
const stream = fs.createReadStream(path)
let chunks: any[] = []
stream.on('data', (chunk) => {
chunks.push(chunk)
})
stream.on('end', () => {
const fullContent = Buffer.concat(chunks)
const data = fullContent.toString('utf8')
resolve(data)
})
stream.on('error', (err) => {
reject(err)
console.error('Error:', err)
})
})
}
export async function writePWA(settings: ISettings, manifestPath: string) {
try {
if (settings.pwaEnable) {
const manifestFile = JSON.parse(fs.readFileSync(manifestPath, 'utf-8'))
if (settings.pwaName) {
manifestFile.name = settings.pwaName
manifestFile.short_name = settings.pwaName
fs.writeFileSync(manifestPath, JSON.stringify(manifestFile, null, 2))
}
if (settings.pwaIcon) {
let imageBuffer: Buffer | Buffer =
Buffer.from([])
try {
new URL(settings.pwaIcon)
const res = await axios.get(settings.pwaIcon, {
responseType: 'arraybuffer',
})
imageBuffer = res.data
} catch {
const imagePath = path.join(PATHS.uploadImage, '..', settings.pwaIcon)
console.log('PWA icon path', imagePath)
imageBuffer = fs.readFileSync(imagePath) as any
}
const sharpImage = sharp(imageBuffer)
await Promise.all([
sharpImage
.resize({
width: 512,
height: 512,
fit: 'cover',
})
.png()
.toFile(PATHS.manifestIcon512),
sharpImage
.resize({
width: 192,
height: 192,
fit: 'cover',
})
.png()
.toFile(PATHS.manifestIcon192),
])
}
}
} catch (error: any) {
console.log('writePWA error', error.message)
}
}
================================================
FILE: src/api/index.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import config from '../../nav.config.json'
import type { AxiosRequestConfig } from 'axios'
import http, {
httpNav,
getDefaultRequestData,
getAddress,
getImageBaseUrl,
} from '../utils/http'
import qs from 'qs'
import { encode } from 'js-base64'
import { settings, navs, tagList, search, internal, component } from 'src/store'
import { isSelfDevelop } from 'src/utils/utils'
import { isLogin, getImageToken } from 'src/utils/user'
import { DB_PATH } from 'src/constants'
import {
getIsGitee,
getIsGitLab,
removeTrailingSlashes,
} from 'src/utils/pureUtils'
import LZString from 'lz-string'
import event from 'src/utils/mitt'
const { gitRepoUrl, imageRepoUrl } = config
const s = gitRepoUrl.split('?')[0].split('/')
const DEFAULT_BRANCH = config.branch
export const authorName = s.at(-2)
export const repoName = s.at(-1)
export function getImageRepo() {
let owner = authorName
let repo = repoName
let branch = 'image'
let projectId = getLabProjectId()
if (imageRepoUrl) {
const split = imageRepoUrl.split('?')
repo = split[0].split('/').at(-1) || ''
owner = split[0].split('/').at(-2) || ''
const query = qs.parse(split.at(-1) || '')
if (query['branch']) {
branch = query['branch'] as string
}
if (query['projectId']) {
projectId = query['projectId'] as string
}
}
return { owner, repo, branch, projectId } as const
}
export function isStandaloneImage(): boolean {
if (config.imageRepoUrl) {
try {
const { host: imgHost } = new URL(config.imageRepoUrl)
const { host } = new URL(config.gitRepoUrl)
if (imgHost !== host) {
return true
}
} catch (error) {
console.log(error)
}
}
return false
}
function getLabProjectId() {
const { projectId } = qs.parse(config.gitRepoUrl.split('?').at(-1) || '')
return projectId
}
const isGitee = getIsGitee(config.gitRepoUrl)
const isGitLab = getIsGitLab(config.gitRepoUrl)
export function verifyToken(token: string, imageRepoUrl?: string) {
let baseURL
const url = isSelfDevelop ? '/api/users/verify' : `/user`
if (imageRepoUrl) {
baseURL = getImageBaseUrl()
}
return http.get(url, {
baseURL,
headers: {
Authorization: `${isGitLab ? 'Bearer' : 'token'} ${token.trim()}`,
},
})
}
// 获取自有部署内容
export function getContentes() {
return http
.post('/api/contents/get', getDefaultRequestData())
.then((res: any) => {
internal.set(res.data.internal)
navs.set(res.data.webs)
tagList.set(res.data.tags)
settings.set(res.data.settings)
component.set(res.data.component)
search.set(res.data.search)
event.emit('WEB_REFRESH')
return res
})
}
export function spiderWebs(data?: any) {
let baseUrl = removeTrailingSlashes(getAddress())
return fetch(`${baseUrl}/api/spider`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ ...data }),
})
}
export async function createBranch(branch: string) {
if (isSelfDevelop) {
return
}
if (imageRepoUrl) {
return
}
const getUrl = () => {
if (isGitee) {
return `/repos/${authorName}/${repoName}/branches`
} else if (isGitLab) {
return `/projects/${getLabProjectId()}/repository/branches`
} else {
return `/repos/${authorName}/${repoName}/git/refs`
}
}
const params: Record = {}
if (isGitee) {
params['owner'] = `/${authorName}`
params['repo'] = `/${authorName}/${repoName}`
params['refs'] = DEFAULT_BRANCH
params['branch_name'] = branch
} else if (isGitLab) {
params['ref'] = DEFAULT_BRANCH
params['branch'] = branch
} else {
params['sha'] = 'c1fdab3d29df4740bb97a4ae7f24ed0eaa682557'
params['ref'] = `refs/heads/${branch}`
try {
const commitRes = await createEmptyCommit()
params['sha'] = commitRes.data['sha']
} catch {}
}
return http.post(getUrl(), params)
}
export function getFileContent(path: string, branch: string = DEFAULT_BRANCH) {
return http.get(`/repos/${authorName}/${repoName}/contents/${path}`, {
params: {
ref: branch,
},
})
}
type Iupdate = {
message?: string
content: string
path: string
branch?: string
isEncode?: boolean
refresh?: boolean
}
export async function updateFileContent({
message = 'update',
content,
path,
branch = DEFAULT_BRANCH,
isEncode = true,
refresh = true,
}: Iupdate) {
if (isSelfDevelop) {
if (!isLogin) {
return
}
return http
.post('/api/contents/update', {
path,
content,
})
.then((res) => {
refresh && getContentes()
requestActionUrl()
return res
})
}
if (path === DB_PATH) {
content = LZString.compressToBase64(content)
}
const commitMessage = `rebot(CI): ${message}`
const params: Record = {
branch,
content: isEncode ? encode(content) : content,
}
if (isGitLab) {
params['commit_message'] = commitMessage
params['encoding'] = 'base64'
} else {
const fileInfo = await getFileContent(path, branch)
params['message'] = commitMessage
params['sha'] = fileInfo.data.sha
}
const url = isGitLab
? `/projects/${getLabProjectId()}/repository/files/${encodeURIComponent(
path,
)}`
: `/repos/${authorName}/${repoName}/contents/${path}`
return http.put(url, params).then((res) => {
requestActionUrl()
return res
})
}
export function createEmptyCommit() {
return http.post(`/repos/${authorName}/${repoName}/git/commits`, {
message: 'Initial commit',
tree: '4b825dc642cb6eb9a060e54bf8d69288fbee4904',
})
}
export async function createImageFile({
message,
content,
path,
branch = DEFAULT_BRANCH,
isEncode = true,
}: Iupdate) {
if (isSelfDevelop) {
return http
.post('/api/contents/create', {
path,
content,
})
.then((res) => {
requestActionUrl()
return res
})
}
const axiosConfig: AxiosRequestConfig = {}
let _isGitee = isGitee
let _isGItLab = isGitLab
// image api
if (isStandaloneImage()) {
_isGitee = getIsGitee(config.imageRepoUrl)
_isGItLab = getIsGitLab(config.imageRepoUrl)
axiosConfig['baseURL'] = getImageBaseUrl()
axiosConfig['headers'] = {
Authorization: `${
getIsGitLab(config.imageRepoUrl) ? 'Bearer' : 'token'
} ${getImageToken()}`,
}
}
const method = _isGitee || _isGItLab ? http.post : http.put
const url = _isGItLab
? `/projects/${
getImageRepo().projectId
}/repository/files/${encodeURIComponent(path)}`
: `/repos/${getImageRepo().owner}/${getImageRepo().repo}/contents/${path}`
const params: Record = {
branch,
content: isEncode ? encode(content) : content,
}
const commitMessage = `rebot(CI): ${message}`
if (_isGItLab) {
params['commit_message'] = commitMessage
params['encoding'] = 'base64'
} else {
params['message'] = commitMessage
}
return method(url, params, axiosConfig).then((res) => {
requestActionUrl()
return res
})
}
export async function createFile({ content, path }: Iupdate) {
if (isSelfDevelop) {
return http
.post('/api/file/create', {
path,
content,
})
.then((res) => {
requestActionUrl()
return res
})
}
return null
}
export function getUserCollect(data?: Record) {
if (isSelfDevelop) {
return http.post('/api/collect/get', data)
}
return httpNav.post('/api/get', data)
}
export function getUserCollectCount(data: Record = {}) {
data['showError'] = false
if (isSelfDevelop) {
return http.post('/api/collect/get', data)
}
return httpNav.post('/api/collect/count', data)
}
export function saveUserCollect(data?: Record) {
if (isSelfDevelop) {
return http.post('/api/collect/save', data)
}
return httpNav.post('/api/save', data)
}
export function delUserCollect(data?: Record) {
if (isSelfDevelop) {
return http.post('/api/collect/delete', data)
}
return httpNav.post('/api/delete', data)
}
export async function getWebInfo(url: string) {
try {
if (isSelfDevelop) {
const res = await http.post('/api/web/info', { url })
return {
...res.data,
}
}
const res = await httpNav.post('/api/icon', { url })
return {
...res.data,
}
} catch {
return {}
}
}
export function bookmarksExport(data: any) {
return httpNav.post('/api/export', data, {
timeout: 0,
})
}
export function getIconBase64(data: any) {
return httpNav.post('/api/base64', data, { timeout: 20000 })
}
export function getUserInfo(data?: Record) {
return httpNav.post('/api/info/get', data)
}
export function updateUserInfo(data?: Record) {
return httpNav.post('/api/info/update', data)
}
export function getTranslate(data?: Record) {
if (isSelfDevelop) {
return http.post('/api/translate', getDefaultRequestData(data))
}
return httpNav.post('/api/translate', data)
}
export function getScreenshot(data?: Record) {
if (isSelfDevelop) {
return http.post('/api/screenshot', getDefaultRequestData(data), {
timeout: 0,
})
}
return httpNav.post('/api/screenshot', data, {
timeout: 0,
})
}
export function getConfigInfo(data: Record = {}) {
return http.post('/api/config/get', data)
}
export function updateConfigInfo(data: Record = {}) {
return http.post('/api/config/update', data)
}
export function getNews(data: Record = {}) {
data['showError'] = false
data['showLoading'] = false
if (isSelfDevelop) {
return http.post('/api/news', data, {
timeout: 0,
})
}
return httpNav.post('/api/news', data, {
timeout: 0,
})
}
export function getHoliday() {
return httpNav.post('/api/holiday', {
date: Date.now(),
})
}
export function getCDN(path: string) {
let _isGitee = isGitee
let _isGItLab = isGitLab
const branch = getImageRepo().branch
const repo = getImageRepo().repo
const owner = getImageRepo().owner
if (isStandaloneImage()) {
_isGitee = getIsGitee(config.imageRepoUrl)
_isGItLab = getIsGitLab(config.imageRepoUrl)
}
if (_isGitee) {
return `https://gitee.com/${owner}/${repo}/raw/${branch}/${path}`
} else if (_isGItLab) {
return `https://gitlab.com/${owner}/${repo}/-/raw/${branch}/${path}?ref_type=heads`
}
return `https://${settings().gitHubCDN}/gh/${owner}/${repo}@${branch}/${path}`
}
function requestActionUrl() {
const url = settings().actionUrl
if (url) {
const img = document.createElement('img')
img.src = url
document.body.appendChild(img)
function cb() {
img.parentNode?.removeChild(img)
}
img.onload = cb
img.onerror = cb
}
}
================================================
FILE: src/app/app.component.html
================================================
================================================
FILE: src/app/app.component.scss
================================================
.fetchIng {
height: 100vh;
}
================================================
FILE: src/app/app.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component } from '@angular/core'
import { CommonModule } from '@angular/common'
import {
Router,
ActivatedRoute,
NavigationEnd,
RouterOutlet,
} from '@angular/router'
import { queryString, setLocation, isMobile, getDefaultTheme } from '../utils'
import { en_US, NzI18nService, zh_CN } from 'ng-zorro-antd/i18n'
import { getLocale } from 'src/locale'
import { settings } from 'src/store'
import {
verifyToken,
authorName,
getContentes,
getUserCollectCount,
} from 'src/api'
import { getToken, userLogout, isLogin, getPermissions } from 'src/utils/user'
import { NzMessageService } from 'ng-zorro-antd/message'
import { NzNotificationService } from 'ng-zorro-antd/notification'
import { NzSpinModule } from 'ng-zorro-antd/spin'
import { NzModalService } from 'ng-zorro-antd/modal'
import { getNavs } from 'src/utils/web'
import { isSelfDevelop } from 'src/utils/utils'
import { routes } from './app.routes'
import { MoveWebComponent } from 'src/components/move-web/index.component'
import { CreateWebComponent } from 'src/components/create-web/index.component'
import { IconGitComponent } from 'src/components/icon-git/icon-git.component'
import { EditClassComponent } from 'src/components/edit-class/index.component'
import { $t } from 'src/locale'
import { getAuthCode } from 'src/utils/user'
import { DeleteModalComponent } from 'src/components/delete-modal/index.component'
import event from 'src/utils/mitt'
import { SwUpdate, VersionReadyEvent } from '@angular/service-worker'
import { filter } from 'rxjs/operators'
@Component({
standalone: true,
imports: [
EditClassComponent,
NzSpinModule,
IconGitComponent,
RouterOutlet,
CommonModule,
MoveWebComponent,
CreateWebComponent,
DeleteModalComponent,
],
selector: 'app-xiejiahe',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
})
export class AppComponent {
readonly isLogin: boolean = isLogin
fetchIng = true
constructor(
private router: Router,
private activatedRoute: ActivatedRoute,
private i18n: NzI18nService,
private message: NzMessageService,
private notification: NzNotificationService,
private modal: NzModalService,
private swUpdate: SwUpdate,
) {
this.registerEvents()
this.registerKeyboard()
this.router.events.subscribe((event) => {
if (event instanceof NavigationEnd) {
this.updateDocumentTitle()
}
})
this.setupSwUpdate()
}
private setupSwUpdate() {
if (this.swUpdate.isEnabled) {
this.swUpdate.versionUpdates
.pipe(
filter(
(evt): evt is VersionReadyEvent => evt.type === 'VERSION_READY',
),
)
.subscribe((evt) => {
this.swUpdate.activateUpdate()
this.modal.confirm({
nzTitle: `${$t('_avaUpdate')} ${evt.latestVersion.hash.slice(0, 10)}`,
nzContent: $t('_canNewVer'),
nzOkText: $t('_nowUpdate'),
nzCancelText: $t('_later'),
nzOnOk: async () => {
try {
await this.swUpdate.activateUpdate()
window.location.reload()
} catch (error) {
this.message.error(`${$t('_updateFailed')} ${error}`)
}
},
})
})
}
}
private registerEvents() {
event.on('MESSAGE', (props: any) => {
// @ts-ignore
this.message[props.type](props.content)
})
event.on('NOTIFICATION', (props: any) => {
this.notification.create(
props.type,
props.title,
props.content,
props.config,
)
})
event.on('MODAL', (config: any) => {
this.modal.create({ ...config })
})
}
private updateDocumentTitle() {
const url = this.router.url.split('?')[0].slice(1)
const theme = (url === '' ? settings().theme : url).toLowerCase()
const title = settings()[`${theme}DocTitle`]
document.title = title || window.__TITLE__ || settings().title
}
ngOnInit() {
this.goRoute()
this.activatedRoute.queryParams.subscribe(setLocation)
this.setLocale()
this.verifyToken()
this.getNavs()
this.getCollectCount()
}
private getNavs() {
const { href } = location
if (isSelfDevelop) {
getContentes().then(() => {
setTimeout(() => {
const currentRoutes = this.router.config
const defaultTheme = getDefaultTheme().toLowerCase()
const hasDefault = routes.find(
(item: any) => item.path === defaultTheme,
)
const isHome = this.router.url.split('?')[0] === '/'
if (hasDefault) {
this.router.resetConfig([
...currentRoutes,
{
...hasDefault,
path: '**',
},
])
}
if (isHome && !href.includes('/system')) {
this.router.navigate([defaultTheme])
}
this.updateDocumentTitle()
this.fetchIng = false
event.emit('WEB_FINISH')
window.__FINISHED__ = true
}, 100)
})
} else {
getNavs().finally(() => {
this.fetchIng = false
})
}
}
private setLocale() {
if (getLocale() === 'zh-CN') {
this.i18n.setLocale(zh_CN)
} else {
this.i18n.setLocale(en_US)
}
}
private verifyToken() {
const token = getToken()
if (token) {
verifyToken(token)
.then((res) => {
const data = res.data || {}
if (!isSelfDevelop) {
if ((data.login || data.username) !== authorName) {
throw new Error('Bad credentials')
}
if (!settings().email && data.email) {
settings.update((prev) => {
return {
...prev,
email: data.email,
}
})
event.emit('GITHUB_USER_INFO', data)
}
}
})
.catch((e: any) => {
if (e.code !== 'ERR_NETWORK') {
userLogout()
setTimeout(() => {
location.reload()
}, 1000)
}
})
}
}
private getCollectCount() {
if (isLogin && getAuthCode() && getPermissions(settings()).ok) {
getUserCollectCount().then((res) => {
const count = res.data.count
if (count > 0) {
this.notification.info(
$t('_colTitle', { count }),
$t('_collectTip'),
{
nzDuration: 0,
},
)
}
})
}
}
private goRoute() {
// is App
const { appTheme } = settings()
if (appTheme !== 'Current' && isMobile()) {
if (location.href.includes('system')) {
return
}
const url = (this.router.url.split('?')[0] || '').toLowerCase()
const { id, q } = queryString()
const queryParams = { id, q }
const path = '/' + String(appTheme).toLowerCase()
if (!url.includes(path)) {
this.router.navigate([path], { queryParams })
}
}
}
private registerKeyboard() {
document.addEventListener('keyup', (e) => {
const createWebKey = settings().createWebKey.toLowerCase()
if (!createWebKey) {
return
}
const activeElement = document.activeElement
if (activeElement) {
if (
activeElement.nodeName === 'INPUT' ||
activeElement.nodeName === 'TEXTAREA'
) {
return
}
}
const key = e.key.toLowerCase()
if (key === createWebKey) {
event.emit('CREATE_WEB', {
isKeyboard: true,
})
}
})
}
}
================================================
FILE: src/app/app.config.ts
================================================
import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core'
import { registerLocaleData } from '@angular/common'
import zh from '@angular/common/locales/zh'
import { provideRouter, withHashLocation } from '@angular/router'
import { provideNzIcons } from 'ng-zorro-antd/icon'
import { IconDefinition } from '@ant-design/icons-angular'
import { routes } from './app.routes'
import {
CheckOutline,
CopyOutline,
ShareAltOutline,
EllipsisOutline,
LoadingOutline,
UploadOutline,
MinusOutline,
PlusOutline,
StopOutline,
MenuFoldOutline,
MenuUnfoldOutline,
DoubleRightOutline,
DoubleLeftOutline,
} from '@ant-design/icons-angular/icons'
import { provideAnimations } from '@angular/platform-browser/animations'
import { NZ_I18N } from 'ng-zorro-antd/i18n'
import { zh_CN } from 'ng-zorro-antd/i18n'
import config from '../../nav.config.json'
import { provideServiceWorker } from '@angular/service-worker'
import { isMobile } from 'src/utils'
import { unregisterServiceWorkers } from 'src/utils/sw'
registerLocaleData(zh)
const icons: IconDefinition[] = [
CheckOutline,
CopyOutline,
ShareAltOutline,
EllipsisOutline,
LoadingOutline,
UploadOutline,
MinusOutline,
PlusOutline,
StopOutline,
MenuFoldOutline,
MenuUnfoldOutline,
DoubleRightOutline,
DoubleLeftOutline,
]
const isPhone = isMobile()
const isHashMode = window.__HASH_MODE__ ?? config.hashMode
const pwaEnable =
window.__PWA_ENABLE__ && location.protocol === 'https:' ? isPhone : false
if (!pwaEnable && isPhone) {
unregisterServiceWorkers()
}
export const appConfig: ApplicationConfig = {
providers: [
provideNzIcons(icons),
provideZoneChangeDetection({ eventCoalescing: true }),
isHashMode
? provideRouter(routes, withHashLocation())
: provideRouter(routes),
provideAnimations(),
{ provide: NZ_I18N, useValue: zh_CN },
provideServiceWorker('ngsw-worker.js', {
enabled: pwaEnable,
registrationStrategy: 'registerWhenStable:30000',
}),
],
}
================================================
FILE: src/app/app.routes.ts
================================================
import { Routes } from '@angular/router'
import LightComponent from 'src/view/light/index.component'
import SuperComponent from 'src/view/super/index.component'
import SimComponent from 'src/view/sim/index.component'
import SideComponent from 'src/view/side/index.component'
import ShortcutComponent from 'src/view/shortcut/index.component'
import MobileComponent from 'src/view/mobile/index.component'
import { isSelfDevelop } from 'src/utils/utils'
import { getDefaultTheme } from 'src/utils'
export const routes: Routes = [
{
path: 'sim',
component: SimComponent,
data: {},
},
{
path: 'super',
component: SuperComponent,
data: {},
},
{
path: 'side',
component: SideComponent,
data: {},
},
{
path: 'shortcut',
component: ShortcutComponent,
data: {},
},
{
path: 'light',
component: LightComponent,
data: {
data: {},
},
},
{
path: 'app',
component: MobileComponent,
data: {},
},
{
path: 'system',
loadComponent: () => import('src/view/system/index.component'),
children: [
{
path: 'info',
loadComponent: () => import('src/view/system/info/index.component'),
},
{
path: 'bookmark',
loadComponent: () => import('src/view/system/bookmark/index.component'),
},
{
path: 'bookmarkExport',
loadComponent: () =>
import('src/view/system/bookmark-export/index.component'),
},
{
path: 'collect',
loadComponent: () => import('src/view/system/collect/index.component'),
},
{
path: 'auth',
loadComponent: () => import('src/view/system/auth/index.component'),
},
{
path: 'tag',
loadComponent: () => import('src/view/system/tag/index.component'),
},
{
path: 'search',
loadComponent: () => import('src/view/system/search/index.component'),
},
{
path: 'setting',
loadComponent: () => import('src/view/system/setting/index.component'),
},
{
path: 'component',
loadComponent: () =>
import('src/view/system/component/index.component'),
},
{
path: 'web',
loadComponent: () => import('src/view/system/web/index.component'),
},
{
path: 'config',
loadComponent: () => import('src/view/system/config/index.component'),
},
{
path: '**',
redirectTo: '/system/web',
},
],
},
]
// 自有部署异步
if (!isSelfDevelop) {
const defaultTheme = getDefaultTheme().toLowerCase()
const hasDefault = routes.find((item) => item.path === defaultTheme)
if (hasDefault) {
routes.push({
...hasDefault,
path: '**',
})
} else {
routes.push({
path: '**',
redirectTo: '/' + defaultTheme,
})
}
}
================================================
FILE: src/assets/fonts/iconfont.css
================================================
@font-face {
font-family: "iconfont"; /* Project id 2267418 */
src: url('iconfont.woff2?t=1743153395328') format('woff2'),
url('iconfont.woff?t=1743153395328') format('woff'),
url('iconfont.ttf?t=1743153395328') format('truetype');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.iconyinru:before {
content: "\e625";
}
.iconxiaolian:before {
content: "\e64b";
}
.iconxiaolian-02:before {
content: "\e631";
}
.icongengduo:before {
content: "\e641";
}
.iconweibiaoti14:before {
content: "\e620";
}
.iconcopy:before {
content: "\e617";
}
.iconfenxiang:before {
content: "\e606";
}
.iconunlock:before {
content: "\e63d";
}
.iconwinfo-icon-tongbu:before {
content: "\e632";
}
.iconchuangjian:before {
content: "\e635";
}
.iconweibiaoti25:before {
content: "\e62b";
}
.iconjiantouarrow483:before {
content: "\e695";
}
.iconsousuo:before {
content: "\e6b9";
}
.icondark:before {
content: "\e666";
}
.iconA:before {
content: "\e6e5";
}
.iconbi:before {
content: "\e742";
}
================================================
FILE: src/assets/styles/dark.scss
================================================
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
//
.dark-container {
.dark {
&-primary {
color: #58a6ff !important;
font-weight: 600;
}
&-title {
color: #c9d1d9 !important;
font-weight: 600 !important;
}
&-white {
color: #fff !important;
&-700 {
color: rgba(255, 255, 255, 0.7) !important;
}
}
&-shadow {
box-shadow: 0 0 5px rgba(255, 255, 255, 0.1) !important;
}
&-bg {
background-color: #12171e !important;
}
&-bg-gary {
background-color: #21262d !important;
}
&-bg-gary2 {
background-color: rgb(53, 54, 58) !important;
}
&-bg-deep {
background-color: #000 !important;
}
&-text {
color: #969ca4 !important;
}
&-text-active {
color: #c9d1d9 !important;
font-weight: 600;
}
&-border-color {
border-color: #30363d !important;
&:after,
&:before {
border-color: transparent !important;
}
}
&-border-color2 {
border-color: rgba(255, 255, 255, 0.05) !important;
}
&-item-active {
background-color: #21262d !important;
border-color: #21262d !important;
color: #c9d1d9 !important;
font-weight: 600;
}
@media (any-hover: hover) {
&-hover {
&:hover:not(.active) {
background-color: #21262d !important;
}
}
&-hover-text {
&:hover {
color: #fff !important;
}
}
&-hover-bg {
&:hover {
background-color: #30363d !important;
}
}
&-item-hover:hover {
background-color: #30363d !important;
border: 1px solid #8b949e !important;
}
// fix-bar
&-action-hover:hover {
background-color: #c9d1d9 !important;
}
}
}
}
================================================
FILE: src/assets/styles/nprogress.css
================================================
/* NProgress Make clicks pass-through */
#nprogress {
pointer-events: none;
}
#nprogress .bar {
background: #29d;
position: fixed;
z-index: 1031;
top: 0;
left: 0;
width: 100%;
height: 2px;
}
/* Fancy blur effect */
#nprogress .peg {
display: block;
position: absolute;
right: 0px;
width: 100px;
height: 100%;
box-shadow: 0 0 10px #29d, 0 0 5px #29d;
opacity: 1;
-webkit-transform: rotate(3deg) translate(0px, -4px);
-ms-transform: rotate(3deg) translate(0px, -4px);
transform: rotate(3deg) translate(0px, -4px);
}
/* Remove these to get rid of the spinner */
#nprogress .spinner {
display: block;
position: fixed;
z-index: 1031;
top: 25px;
right: 25px;
}
#nprogress .spinner-icon {
width: 18px;
height: 18px;
box-sizing: border-box;
border: solid 2px transparent;
border-top-color: #29d;
border-left-color: #29d;
border-radius: 50%;
animation: nprogress-spinner 400ms linear infinite;
}
.nprogress-custom-parent {
overflow: hidden;
position: relative;
}
.nprogress-custom-parent #nprogress .spinner,
.nprogress-custom-parent #nprogress .bar {
position: absolute;
}
@-webkit-keyframes nprogress-spinner {
0% {
-webkit-transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
}
}
@keyframes nprogress-spinner {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
================================================
FILE: src/assets/styles/tailwind.css
================================================
@import 'tailwindcss';
================================================
FILE: src/components/breadcrumb/index.component.html
================================================
{{ text
}}/
================================================
FILE: src/components/breadcrumb/index.component.scss
================================================
.breadcrumb1 {
font-size: 12px;
color: #666;
.slash {
margin: 0 4px;
}
}
================================================
FILE: src/components/breadcrumb/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, ChangeDetectionStrategy, Input } from '@angular/core'
import { CommonModule } from '@angular/common'
import type { IWebProps } from 'src/types'
import { getClassById } from 'src/utils/index'
import { CommonService } from 'src/services/common'
@Component({
standalone: true,
imports: [CommonModule],
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-breadcrumb',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class BreadcrumbComponent {
@Input() data!: IWebProps
constructor(public commonService: CommonService) {}
handleClick(e: Event) {
e.stopPropagation()
const data = getClassById(this.data.id, void 0, true)
if (data.parentId === -1) {
return
}
this.commonService.handleClickClass(data.parentId)
}
}
================================================
FILE: src/components/calendar/drawer/index.component.html
================================================
{{ $t('_cancel') }}
{{ $t('_submit') }}
================================================
FILE: src/components/calendar/drawer/index.component.scss
================================================
================================================
FILE: src/components/calendar/drawer/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, EventEmitter, Output } from '@angular/core'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { $t } from 'src/locale'
import { FormBuilder, FormGroup } from '@angular/forms'
import { NzDrawerModule } from 'ng-zorro-antd/drawer'
import { NzFormModule } from 'ng-zorro-antd/form'
import { NzButtonModule } from 'ng-zorro-antd/button'
import { NzInputModule } from 'ng-zorro-antd/input'
import { NzColorPickerModule } from 'ng-zorro-antd/color-picker'
@Component({
standalone: true,
imports: [
FormsModule,
ReactiveFormsModule,
NzDrawerModule,
NzFormModule,
NzButtonModule,
NzInputModule,
NzColorPickerModule,
],
selector: 'calendar-drawer',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class CalendarDrawerComponent {
@Output() ok = new EventEmitter()
$t = $t
visible = false
validateForm!: FormGroup
index = 0
constructor(private fb: FormBuilder) {
this.validateForm = this.fb.group({
topColor: [''],
bgColor: [''],
})
}
open(data: any, idx: number) {
this.index = idx
for (const k in data) {
this.validateForm.get(k)?.setValue(data[k])
}
this.visible = true
}
handleClose() {
this.visible = false
}
handleSubmit() {
const values = this.validateForm.value
this.ok.emit({
...values,
index: this.index,
})
this.handleClose()
}
}
================================================
FILE: src/components/calendar/index.component.html
================================================
{{ date }}
{{ day }}
{{ dayOfYear }}
{{ week }}
================================================
FILE: src/components/calendar/index.component.scss
================================================
.calendar {
width: 130px;
height: var(--componentHeight);
max-height: 100%;
border-radius: 12px;
text-align: center;
overflow: hidden;
color: #fff;
box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
display: flex;
flex-direction: column;
.ctop {
font-size: 17px;
height: 40px;
line-height: 0;
display: flex;
align-items: center;
justify-content: center;
font-weight: 500;
}
.box {
flex: 1;
}
.cday {
font-weight: bold;
font-size: 40px;
line-height: 1;
padding: 24px 0 5px 0;
}
.cdate {
color: rgba(255, 255, 255, 0.7);
font-size: 13px;
}
}
================================================
FILE: src/components/calendar/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, Input } from '@angular/core'
import { getDateTime, getDayOfYear } from 'src/utils'
import type { IComponentItemProps } from 'src/types'
import { $t } from 'src/locale'
import { component } from 'src/store'
@Component({
standalone: true,
selector: 'app-calendar',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class CalendarComponent {
@Input() data!: IComponentItemProps
readonly component = component()
date = ''
day = ''
week = ''
dayOfYear = ''
constructor() {
const date = getDateTime()
this.date = $t('_calendarDate', { year: date.year, month: date.month })
this.day = date.zeroDate
this.week = date.dayText
this.dayOfYear = $t('_dayOfYear', { day: getDayOfYear() })
}
}
================================================
FILE: src/components/card/index.component.html
================================================
{{ dataSource.__name__ || dataSource.name }}
{{ dataSource.__desc__ || dataSource.desc }}
================================================
FILE: src/components/card/index.component.scss
================================================
@media (hover: hover) and (pointer: fine) {
.example2,
.original2 {
&:hover {
border: 1px solid #78b7fa;
transform: translateY(-3px);
.title {
color: #007bff;
}
}
}
}
::ng-deep .cdk-overlay-container {
.tag-action {
display: flex !important;
}
}
.card-parent {
position: relative;
width: 100%;
height: 100%;
.stop-icon {
z-index: 3;
color: red;
font-weight: bold;
position: absolute;
top: 12px;
right: 12px;
}
.quote {
z-index: 2;
position: absolute;
top: 0;
right: 5px;
}
}
.card-container {
position: relative;
width: 100%;
height: 100%;
&:hover {
::ng-deep {
.tag-action {
display: flex;
}
}
}
::ng-deep {
img {
max-width: 100%;
object-fit: cover;
}
iframe {
width: 100%;
}
}
.desc {
color: rgba(0, 0, 0, 0.5);
word-break: break-all;
white-space: pre-wrap;
}
.title {
white-space: normal;
word-break: break-all;
color: rgba(0, 0, 0, 0.8);
}
}
.progrcode {
cursor: pointer;
overflow: hidden;
border-radius: 4px;
}
.standard {
$padding: 8px;
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
border-radius: 4px;
border: 1px solid #eee;
display: flex;
flex-direction: column;
padding-top: 5px;
transition: all 0.2s ease-out;
background-color: #fff;
&:hover {
transform: translate(0, -3px);
}
.rate {
padding: 0 $padding;
}
.middle {
flex: 1;
padding: 8px 8px 0;
}
.top {
margin-top: 5px;
display: flex;
align-items: center;
padding: 0 $padding;
.title {
margin-left: $padding;
font-weight: 500;
font-size: 15px;
}
}
.desc {
font-size: 13px;
margin-bottom: 5px;
}
.actionbar {
display: flex;
border-top: 1px solid #eee;
padding: 8px 0;
margin-top: 10px;
.action-item {
justify-content: center;
flex: 1;
font-size: 16px;
color: #999;
cursor: pointer;
&:hover {
color: #1890ff;
}
&:not(:nth-last-child(1)) {
border-right: 1px solid #eee;
}
}
}
}
.example2 {
background-color: #fff;
padding: 8px 8px;
border-radius: 8px;
cursor: pointer;
box-shadow:
0 0px 3px 0 rgba(0, 0, 0, 0.1),
0 1px 2px -1px rgba(0, 0, 0, 0.1);
border: 1px solid transparent;
transition: all 0.15s linear;
color: #000;
display: block;
&.noDesc {
.title {
font-size: 16px;
}
}
.title {
width: 100%;
font-weight: 500;
line-height: 18px;
font-size: 15px;
}
.wrapper {
display: flex;
}
.right-box {
display: flex;
align-items: start;
justify-content: center;
flex-direction: column;
flex: 1;
width: 0;
margin-left: 12px;
}
.desc {
width: 100%;
margin: 0;
font-size: 12px;
}
}
.original2 {
background-color: #fff;
padding: 4px 8px;
border-radius: 4px;
cursor: pointer;
box-shadow:
0 0px 3px 0 rgba(0, 0, 0, 0.1),
0 1px 2px -1px rgba(0, 0, 0, 0.1);
border: 1px solid transparent;
transition: all 0.15s linear;
color: #000;
display: block;
.title {
width: 100%;
font-weight: 500;
font-size: 16px;
}
.wrapper {
display: flex;
}
.right-box {
display: flex;
align-items: start;
justify-content: center;
flex-direction: column;
flex: 1;
width: 0;
margin-left: 8px;
}
}
// 其他主题下卡片不明显
::ng-deep .column-border {
.column2 {
border: 1px solid transparent !important;
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
border-radius: 4px;
}
}
.column2 {
background-color: #fff;
padding: 8px;
border-bottom: 1px solid #eee;
transition: all 0.15s linear;
color: #000;
display: block;
&:hover {
background-color: #f2f3f5;
.action-btn {
display: block;
}
}
.title-bar {
display: flex;
align-items: center;
}
.right-box {
margin-top: 6px;
}
.title {
font-weight: 500;
margin-left: 8px;
font-size: 16px;
}
.desc {
margin: 0;
font-size: 13px;
}
.bottom-bar {
display: flex;
flex-wrap: wrap;
align-items: center;
}
.rate2 {
color: #8a919f;
margin-right: 6px;
}
}
// retro
.retro2 {
background-color: #fff;
border: 1px solid #eee;
border-radius: 4px;
transition: transform 0.1s linear;
&:hover {
transform: translate(0, -3px);
}
.item-list {
z-index: 6;
position: relative;
overflow: hidden;
}
.title {
font-size: 15px;
margin-left: 4px;
font-weight: 500;
}
.desc {
word-break: break-all;
word-wrap: break-word;
white-space: pre-wrap;
font-size: 13px;
margin-bottom: 5px;
}
.top {
padding: 10px;
display: flex;
align-items: center;
border-bottom: 1px solid #eee;
}
.border-transparent {
border-color: transparent;
}
}
// poster
.poster2 {
border-radius: 4px;
cursor: pointer;
background-color: #fff;
padding-bottom: 10px;
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
.poster-box {
position: relative;
overflow: hidden;
height: 170px;
}
.breadcrumb {
position: absolute;
top: 5px;
left: 5px;
right: 0;
::ng-deep {
.breadcrumb1 {
color: #fff;
}
}
}
.poster-img {
width: 100%;
height: 100%;
object-fit: cover;
transition: 0.2s linear;
&:hover {
transform: scale(1.1);
}
}
.title {
font-size: 16px;
margin-top: 5px;
font-weight: 500;
color: #000;
}
.desc {
font-size: 13px;
margin-bottom: 0;
}
.bottom {
padding: 0 5px;
}
.poster-tag {
z-index: 2;
position: absolute;
bottom: 0;
left: 0;
width: 100%;
padding: 10px 10px 5px 10px;
}
}
.icon2 {
cursor: pointer;
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
transition: all 0.2s ease-out;
&:hover {
transform: translate(0, -3px);
}
.name {
margin-top: 2px;
text-align: center;
}
}
================================================
FILE: src/components/card/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, Input, ViewChild, ElementRef } from '@angular/core'
import { FormsModule } from '@angular/forms'
import { CommonModule } from '@angular/common'
import { isLogin, getPermissions } from 'src/utils/user'
import { copyText, getTextContent, randomColor, randomInt } from 'src/utils'
import { parseHtmlWithContent, parseLoadingWithContent } from 'src/utils/utils'
import { setNavs } from 'src/utils/web'
import type { IWebProps, ICardType } from 'src/types'
import { ActionType } from 'src/types'
import { SearchType } from 'src/components/search/types'
import { $t, isZhCN } from 'src/locale'
import { settings, navs } from 'src/store'
import { JumpService } from 'src/services/jump'
import { NzRateModule } from 'ng-zorro-antd/rate'
import { LogoComponent } from 'src/components/logo/logo.component'
import { NzButtonModule } from 'ng-zorro-antd/button'
import { TagListComponent } from 'src/components/tag-list/index.component'
import { NzToolTipModule } from 'ng-zorro-antd/tooltip'
import { NzIconModule } from 'ng-zorro-antd/icon'
import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm'
import { SafeHtmlPipe } from 'src/pipe/safeHtml.pipe'
import { saveUserCollect } from 'src/api'
import { NzMessageService } from 'ng-zorro-antd/message'
import { CommonService } from 'src/services/common'
import { CODE_SYMBOL } from 'src/constants/symbol'
import { BreadcrumbComponent } from 'src/components/breadcrumb/index.component'
import event from 'src/utils/mitt'
@Component({
standalone: true,
imports: [
FormsModule,
CommonModule,
NzRateModule,
LogoComponent,
NzButtonModule,
TagListComponent,
NzToolTipModule,
NzIconModule,
NzPopconfirmModule,
SafeHtmlPipe,
BreadcrumbComponent,
],
selector: 'app-card',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class CardComponent {
@Input() dataSource!: IWebProps
@Input() cardStyle!: ICardType
@Input() iconSize = 60
@ViewChild('root', { static: false }) root!: ElementRef
readonly $t = $t
readonly settings = settings()
readonly isLogin = isLogin
readonly permissions = getPermissions(settings())
copyUrlDone = false
copyPathDone = false
description = ''
isCode = false
isError = false
backgroundColor = ''
constructor(
public commonService: CommonService,
public readonly jumpService: JumpService,
private message: NzMessageService,
) {}
ngOnInit() {
this.isCode = this.dataSource.desc?.[0] === CODE_SYMBOL
this.description = parseLoadingWithContent(this.dataSource.desc)
if (this.cardStyle === 'poster') {
this.generateColor()
}
}
ngAfterViewInit() {
this.parseDescription()
}
private generateColor() {
this.backgroundColor = `linear-gradient(${randomInt(
360,
)}deg, ${randomColor()} 0%, ${randomColor()} 100%)`
}
private parseDescription() {
parseHtmlWithContent(this.root?.nativeElement, this.dataSource.desc)
}
async copyUrl(type: 1 | 2): Promise {
const { id, url } = this.dataSource
let { href } = window.location
href = href.split('?')[0]
if (!href.endsWith('/')) {
href = href + '/'
}
const pathUrl = `${href}?q=${id}&type=${SearchType.Id}`
const isDone = await copyText(type === 1 ? pathUrl : url)
if (isDone) {
if (type === 1) {
this.copyPathDone = isDone
} else {
this.copyUrlDone = isDone
}
}
}
copyMouseout(): void {
this.copyUrlDone = false
this.copyPathDone = false
}
openEditWebMoal(): void {
event.emit('CREATE_WEB', {
detail: this.dataSource,
})
}
onRateChange(rate: number): void {
this.dataSource.rate = rate
setNavs(navs())
}
async confirmDel(): Promise {
const params: IWebProps = {
...(this.dataSource as IWebProps),
name: getTextContent(this.dataSource.name),
desc: getTextContent(this.dataSource.desc),
}
if (isLogin) {
event.emit('DELETE_MODAL', {
ids: [params.id],
data: params,
})
} else {
event.emit('MODAL', {
nzTitle: $t('_confirmDel'),
nzContent: `ID: ${params.id}`,
nzWidth: 350,
nzOkType: 'primary',
nzOkDanger: true,
nzOkText: $t('_del'),
nzOnOk: async () => {
await saveUserCollect({
data: {
...params,
extra: {
type: ActionType.Delete,
},
},
})
this.message.success($t('_waitHandle'))
},
})
}
}
openMoveWebModal(): void {
event.emit('MOVE_WEB', {
data: [this.dataSource],
})
}
get getRate(): string {
if (this.cardStyle !== 'column') {
return ''
}
const rate = Number(this.dataSource.rate ?? 0)
return rate > 0 ? `${rate.toFixed(1)}${isZhCN() ? '分' : ''}` : ''
}
}
================================================
FILE: src/components/carousel/drawer/index.component.html
================================================
{{ $t('_cancel') }}
{{ $t('_submit') }}
================================================
FILE: src/components/carousel/drawer/index.component.scss
================================================
================================================
FILE: src/components/carousel/drawer/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, EventEmitter, Output } from '@angular/core'
import { CommonModule } from '@angular/common'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { $t } from 'src/locale'
import { FormBuilder, FormGroup, FormArray } from '@angular/forms'
import { NzDrawerModule } from 'ng-zorro-antd/drawer'
import { NzFormModule } from 'ng-zorro-antd/form'
import { NzButtonModule } from 'ng-zorro-antd/button'
import { NzInputModule } from 'ng-zorro-antd/input'
import { NzDatePickerModule } from 'ng-zorro-antd/date-picker'
import { UploadImageComponent } from 'src/components/upload-image/index.component'
import { NzSliderModule } from 'ng-zorro-antd/slider'
import { NzSelectModule } from 'ng-zorro-antd/select'
import { CODE_SYMBOL } from 'src/constants/symbol'
@Component({
standalone: true,
imports: [
CommonModule,
FormsModule,
ReactiveFormsModule,
NzDrawerModule,
NzFormModule,
NzButtonModule,
NzInputModule,
NzDatePickerModule,
UploadImageComponent,
NzSliderModule,
NzSelectModule,
],
selector: 'carousel-drawer',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class CarouselDrawerComponent {
@Output() ok = new EventEmitter()
readonly $t = $t
visible = false
validateForm!: FormGroup
index = 0
constructor(private fb: FormBuilder) {
this.validateForm = this.fb.group({
imgs: this.fb.array([]),
width: [200],
fit: ['cover'],
})
}
get imgs(): FormArray {
return this.validateForm.get('imgs') as FormArray
}
onUploadImage(data: any, idx: number) {
const imgGroup = this.imgs.at(idx)
imgGroup.patchValue({
img: data.cdn,
})
}
open(data: any, idx: number) {
this.index = idx
this.validateForm.get('width')?.setValue(data['width'])
this.validateForm.get('fit')?.setValue(data['fit'])
if (data['imgs']) {
data['imgs'].forEach((item: any) => {
;(this.validateForm.get('imgs') as FormArray).push(
this.fb.group({
url: item.url || '',
src: item.src || '',
}),
)
})
}
this.visible = true
}
handleAdd() {
;(this.validateForm.get('imgs') as FormArray).push(
this.fb.group({
url: '',
src: '',
}),
)
}
handleClose() {
this.visible = false
;(this.validateForm.get('imgs') as FormArray).controls = []
}
handleSubmit() {
const values = this.validateForm.value
this.ok.emit({
...values,
imgs: [...values.imgs].filter((item: any) => {
return item.src || item.url[0] === CODE_SYMBOL
}),
index: this.index,
})
this.handleClose()
}
}
================================================
FILE: src/components/carousel/index.component.html
================================================
================================================
FILE: src/components/carousel/index.component.scss
================================================
.ccarousel {
position: relative;
height: var(--componentHeight);
max-height: 100%;
border-radius: 12px;
overflow: hidden;
::ng-deep {
.swiper {
height: var(--componentHeight) !important;
}
}
}
================================================
FILE: src/components/carousel/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, Input } from '@angular/core'
import { CommonModule } from '@angular/common'
import type { IComponentItemProps } from 'src/types'
import { component } from 'src/store'
import { SwiperComponent } from 'src/components/swiper/index.component'
@Component({
standalone: true,
imports: [SwiperComponent, CommonModule],
selector: 'app-carousel',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class CarouselComponent {
@Input() data!: IComponentItemProps
readonly component = component()
constructor() {}
}
================================================
FILE: src/components/class-tabs/index.component.html
================================================
1" class="class-tabs dark-bg-gary2" #parent>
{{ tab.title }}
================================================
FILE: src/components/class-tabs/index.component.scss
================================================
.class-tabs {
--height: 28px;
position: relative;
padding: 4px;
border-radius: 8px;
background-color: #ededee;
display: inline-flex;
font-size: 14px;
overflow: hidden;
overflow-x: auto;
max-width: 100%;
white-space: nowrap;
color: #93959a;
user-select: none;
transform: translateZ(0);
.anchor {
position: absolute;
height: var(--height);
background-color: #1890ff !important;
color: #fff;
transition: left 0.15s linear;
border-radius: 6px;
}
.tab {
z-index: 2;
position: relative;
padding: 0 8px;
height: var(--height);
display: flex;
align-items: center;
justify-content: center;
transition: all 0.1s linear;
cursor: pointer;
border-radius: 6px;
&:hover:not(.active) {
background-color: rgba(0, 0, 0, 0.055);
}
&.active {
color: #fff;
}
}
}
================================================
FILE: src/components/class-tabs/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import {
Component,
Input,
ViewChild,
ElementRef,
ViewChildren,
QueryList,
SimpleChanges,
} from '@angular/core'
import { CommonModule } from '@angular/common'
import type { INavThreeProp } from 'src/types'
import { scrollIntoViewLeft, queryString } from 'src/utils'
import { fromEvent, Subscription } from 'rxjs'
import { debounceTime } from 'rxjs/operators'
@Component({
standalone: true,
imports: [CommonModule],
selector: 'app-class-tabs',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class ClassTabsComponent {
@ViewChild('parent') parentElement!: ElementRef
@ViewChild('anchor') anchorElement!: ElementRef
@ViewChildren('item') items!: QueryList
@Input() data?: INavThreeProp[] = []
@Input() selector: string = ''
activeIndex = 0
private toolbarItems: HTMLElement[] = []
private scrollSubscription: Subscription | null = null
private disableScrollEvent = false
constructor() {}
ngOnChanges(changes: SimpleChanges) {
if (changes['data']) {
const { currentValue = [], previousValue = [] } = changes['data']
const currentIds = currentValue
.map((item: any) => item.rId || item.id)
.join(',')
const previousIds = previousValue
.map((item: any) => item.rId || item.id)
.join(',')
if (currentIds === previousIds) return
const { id } = queryString(false)
const idx = this.data?.findIndex((item) => item.id === Number(id)) || -1
if (idx === -1) {
this.selectTab(0)
} else {
setTimeout(() => {
this.getToolbarItems()
this.selectTab(idx)
}, 100)
}
requestAnimationFrame(() => {
if (idx === -1) {
this.getToolbarItems()
this.setAnchorStyle()
}
if (this.scrollSubscription) {
this.scrollSubscription.unsubscribe()
this.scrollSubscription = null
}
const target = this.getTarget()
this.scrollSubscription = fromEvent(target, 'scroll')
.pipe(debounceTime(100))
.subscribe(() => this.handleScroll())
})
}
}
ngOnDestroy() {
if (this.scrollSubscription) {
this.scrollSubscription.unsubscribe()
this.scrollSubscription = null
}
}
private getTarget() {
return this.selector
? document.querySelector(this.selector) || window
: window
}
private getToolbarItems() {
this.toolbarItems = Array.from(
document.querySelectorAll('.nav-wrapper'),
) as HTMLElement[]
}
private handleScroll() {
if (this.disableScrollEvent) {
this.disableScrollEvent = false
return
}
if (this.toolbarItems.length === 0) {
this.getToolbarItems()
}
const target = this.getTarget()
const scrollY =
target === window ? window.scrollY : (target as Element).scrollTop
const scrollPosition =
scrollY + this.parentElement.nativeElement.offsetHeight
this.toolbarItems.forEach((item, index) => {
const itemTop = item.offsetTop
const itemBottom = itemTop + item.offsetHeight
if (index === 0) {
if (scrollPosition < itemTop) {
this.updateActiveIndex(0)
}
return
}
if (scrollPosition >= itemTop && scrollPosition < itemBottom) {
this.updateActiveIndex(index)
}
})
}
private updateActiveIndex(index: number) {
if (this.activeIndex === index) return
this.activeIndex = index
this.scrollIntoViewTabs()
this.setAnchorStyle()
}
private scrollIntoViewTabs() {
scrollIntoViewLeft(
this.parentElement.nativeElement,
this.items.toArray()[this.activeIndex].nativeElement,
{
behavior: 'smooth',
},
)
}
selectTab(index: number) {
if (this.activeIndex === index && index <= 0) return
this.activeIndex = index
this.scrollIntoViewTabs()
this.setAnchorStyle()
this.disableScrollEvent = true
this.scrollIntoView()
}
private setAnchorStyle() {
const anchorElement = this.anchorElement.nativeElement
if (!anchorElement) return
const el = this.items.toArray()[this.activeIndex]?.nativeElement
if (!el) return
const width = el.offsetWidth
const left = el.offsetLeft
anchorElement.style.width = `${width}px`
anchorElement.style.left = `${left}px`
}
private scrollIntoView() {
const id = this.data?.[this.activeIndex].id
if (!id) return
const el = document.getElementById(`t${id}`)
if (el) {
const offfsetTop = el.offsetTop
const top = offfsetTop - this.parentElement.nativeElement.offsetHeight
const target = this.getTarget()
target.scrollTo({
top,
behavior: 'smooth',
})
}
}
}
================================================
FILE: src/components/component-group/index.component.html
================================================
0"
[class.directionCol]="direction === 'column'"
[class.over]="isOver"
[class.showAll]="isShowAll"
[class.!overflow-x-scroll]="isMobile"
>
================================================
FILE: src/components/component-group/index.component.scss
================================================
@keyframes zoomInDown {
from {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes arrow {
0% {
transform: translateX(0);
}
11% {
transform: translateX(4px);
}
21% {
transform: translateX(-2px);
}
31% {
transform: translateX(4px);
}
41% {
transform: translateX(-2px);
}
51% {
transform: translateX(0);
}
}
.component-group {
position: relative;
padding: 10px;
display: flex;
overflow: hidden;
user-select: none;
gap: 15px;
justify-content: flex-start;
max-width: 100%;
&.over {
padding-bottom: 30px;
margin-bottom: 15px;
}
&.showAll {
flex-wrap: wrap;
.arrow {
transform: translateX(-50%) rotate(-90deg) !important;
}
.arrowicon {
animation: none;
}
}
&.directionCol {
flex-wrap: wrap;
justify-content: center;
overflow-y: auto;
::ng-deep {
> .ng-star-inserted,
.citems {
max-width: 100%;
}
}
}
.arrow {
display: inline-block;
position: absolute;
bottom: 0;
left: 50%;
transform: translate(-50%, 0) rotate(90deg);
cursor: pointer;
transition: all 0.3s;
}
.arrowicon {
font-size: 18px;
animation: arrow 3s ease-in-out infinite;
color: #f38181;
}
::ng-deep {
> .ng-star-inserted {
animation-duration: 0.5s;
animation-fill-mode: both;
animation-name: zoomInDown;
}
@for $i from 2 through 20 {
> .ng-star-inserted:nth-child(#{$i}) {
animation-delay: $i * 0.05s;
}
}
}
}
================================================
FILE: src/components/component-group/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, Input } from '@angular/core'
import { CommonModule } from '@angular/common'
import { settings, component } from 'src/store'
import { ComponentType } from 'src/types'
import type { IComponentItemProps } from 'src/types'
import { CalendarComponent } from 'src/components/calendar/index.component'
import { RuntimeComponent } from 'src/components/runtime/index.component'
import { OffWorkComponent } from 'src/components/off-work/index.component'
import { ImageComponent } from 'src/components/image/index.component'
import { CountdownComponent } from 'src/components/countdown/index.component'
import { HTMLComponent } from 'src/components/html/index.component'
import { HolidayComponent } from 'src/components/holiday/index.component'
import { NewsComponent } from 'src/components/news/index.component'
import { CarouselComponent } from 'src/components/carousel/index.component'
import { fromEvent, Subscription } from 'rxjs'
import { debounceTime } from 'rxjs/operators'
import { NzIconModule } from 'ng-zorro-antd/icon'
import event from 'src/utils/mitt'
import { isMobile } from 'src/utils'
import { STORAGE_KEY_MAP } from 'src/constants'
@Component({
standalone: true,
imports: [
CommonModule,
CalendarComponent,
RuntimeComponent,
OffWorkComponent,
ImageComponent,
CountdownComponent,
HTMLComponent,
HolidayComponent,
NzIconModule,
NewsComponent,
CarouselComponent,
],
selector: 'component-group',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class ComponentGroupComponent {
@Input() direction: 'column' | '' = ''
private scrollSubscription: Subscription | null = null
readonly isMobile = isMobile()
ComponentType = ComponentType
components: IComponentItemProps[] = []
componentsLength: number = settings().components.length
widths: number[] = []
isShowAll = !!Number(
localStorage.getItem(STORAGE_KEY_MAP.COMPONENT_COLLAPSED),
)
isOver = false
constructor() {
if (this.isShowAll) {
this.isOver = true
}
const c: IComponentItemProps[] = []
// 按照系统设置顺序排序显示
component().components.forEach((item) => {
const has = settings().components.find(
(c) => c.type === item.type && c.id === item.id,
)
if (has) {
c.push({
...item,
...has,
})
}
})
this.components = c
event.on('COMPONENT_CHECK_OVER', () => {
this.checkOver()
})
}
get componentList() {
if (this.isShowAll || this.componentsLength >= this.components.length) {
return this.components
}
return this.components.slice(0, this.componentsLength)
}
ngAfterViewInit() {
if (
this.direction !== 'column' &&
!this.isMobile &&
this.components.length
) {
requestAnimationFrame(() => {
this.widths = this.getWidths()
if (!this.isShowAll && !this.isOver) {
this.checkOver()
}
this.scrollSubscription = fromEvent(window, 'resize')
.pipe(debounceTime(100))
.subscribe(() => this.checkOver())
})
}
}
public getWidths(): number[] {
const items = document.querySelectorAll('.component-group .citems')
const widths: number[] = []
items.forEach((item) => {
widths.push((item as HTMLElement).offsetWidth)
})
return widths
}
ngOnDestroy() {
if (this.scrollSubscription) {
this.scrollSubscription.unsubscribe()
}
event.off('COMPONENT_CHECK_OVER')
}
handleExpand() {
this.isShowAll = !this.isShowAll
localStorage.setItem(
STORAGE_KEY_MAP.COMPONENT_COLLAPSED,
String(Number(this.isShowAll)),
)
if (!this.isShowAll) {
this.checkOver()
}
}
private checkOver() {
requestAnimationFrame(() => {
const box = document.querySelector('.component-group') as HTMLElement
if (!box) return
const boxWidth = box.clientWidth
let itemsWidth = 0
for (const [index, width] of this.widths.entries()) {
itemsWidth += width
if (width > 0) {
if (index === 0) {
itemsWidth += 10
} else {
itemsWidth += 15
}
}
if (itemsWidth > boxWidth) {
if (this.componentsLength === index) return
const i = index
this.componentsLength = i
this.isShowAll = false
this.isOver = true
return
}
}
this.isOver = false
this.componentsLength = this.components.length
})
}
trackByItem(i: number, item: any) {
return item.id
}
}
================================================
FILE: src/components/countdown/drawer/index.component.html
================================================
{{ $t('_cancel') }}
{{ $t('_submit') }}
================================================
FILE: src/components/countdown/drawer/index.component.scss
================================================
================================================
FILE: src/components/countdown/drawer/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, EventEmitter, Output } from '@angular/core'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { $t } from 'src/locale'
import { FormBuilder, FormGroup } from '@angular/forms'
import { NzDrawerModule } from 'ng-zorro-antd/drawer'
import { NzFormModule } from 'ng-zorro-antd/form'
import { NzButtonModule } from 'ng-zorro-antd/button'
import { NzInputModule } from 'ng-zorro-antd/input'
import { UploadImageComponent } from 'src/components/upload-image/index.component'
import { NzColorPickerModule } from 'ng-zorro-antd/color-picker'
import { NzDatePickerModule } from 'ng-zorro-antd/date-picker'
import dayjs from 'dayjs'
@Component({
standalone: true,
imports: [
NzDatePickerModule,
FormsModule,
ReactiveFormsModule,
NzDrawerModule,
NzFormModule,
NzButtonModule,
NzInputModule,
UploadImageComponent,
NzColorPickerModule,
],
selector: 'countdown-drawer',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class CountdownDrawerComponent {
@Output() ok = new EventEmitter()
$t = $t
visible = false
validateForm!: FormGroup
index = 0
constructor(private fb: FormBuilder) {
this.validateForm = this.fb.group({
topColor: [''],
bgColor: [''],
title: [''],
url: [''],
dateColor: [''],
dayColor: [''],
date: [null],
})
}
open(data: any, idx: number) {
this.index = idx
for (const k in data) {
this.validateForm.get(k)?.setValue(data[k])
}
this.visible = true
}
onUploadImage(data: any) {
this.validateForm.get('url')!.setValue(data.cdn)
}
handleClose() {
this.visible = false
}
handleSubmit() {
const values = this.validateForm.value
this.ok.emit({
...values,
date: dayjs(values.date).format('YYYY-MM-DD'),
index: this.index,
})
this.handleClose()
}
}
================================================
FILE: src/components/countdown/index.component.html
================================================
{{ data['title'] }}
{{ countdownData['dayStr'] }}
- {{ countdownData['dateStr'] }} -
================================================
FILE: src/components/countdown/index.component.scss
================================================
.holiday {
position: relative;
width: 160px;
height: var(--componentHeight);
max-height: 100%;
border-radius: 12px;
overflow: hidden;
color: #fff;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
display: flex;
flex-direction: column;
text-align: center;
.top {
padding: 6px 10px;
font-weight: 500;
}
.box {
position: relative;
flex: 1;
background-size: cover;
}
.days {
font-weight: bold;
font-size: 50px;
margin-top: 16px;
}
.date {
position: absolute;
bottom: 5px;
left: 0;
width: 100%;
font-weight: 500;
}
}
================================================
FILE: src/components/countdown/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, Input } from '@angular/core'
import type { IComponentItemProps } from 'src/types'
import dayjs from 'dayjs'
import { component } from 'src/store'
interface IProps {
dateStr: string
dayStr: number
}
@Component({
standalone: true,
selector: 'app-countdown',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class CountdownComponent {
@Input() data!: IComponentItemProps
readonly component = component()
countdownData = {} as IProps
constructor() {}
ngOnInit() {
this.init()
}
ngOnChanges() {
this.init()
}
private init() {
const payload = {} as IProps
if (this.data['date']) {
payload.dateStr = dayjs(this.data['date']).format('YYYY.MM.DD')
payload.dayStr = dayjs(
dayjs(this.data['date']).format('YYYY-MM-DD'),
).diff(dayjs().format('YYYY-MM-DD'), 'day')
payload.dayStr = payload.dayStr < 0 ? 0 : payload.dayStr
payload.dayStr = payload.dayStr > 9999 ? 9999 : payload.dayStr
}
this.countdownData = payload
}
}
================================================
FILE: src/components/create-web/index.component.html
================================================
{{ $t('_cancel') }}
{{ $t('_translate') }}
{{ $t('_checkRepeat') }}
{{ $t('_submit') }}
================================================
FILE: src/components/create-web/index.component.scss
================================================
.row {
display: flex;
justify-content: space-around;
}
@media (max-width: 580px) {
::ng-deep .ant-modal {
top: 0;
}
}
================================================
FILE: src/components/create-web/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import {
Component,
ViewChild,
ViewChildren,
QueryList,
ElementRef,
computed,
} from '@angular/core'
import { CommonModule } from '@angular/common'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { getTextContent, getClassById } from 'src/utils'
import { getTempId, isSelfDevelop } from 'src/utils/utils'
import { updateByWeb, pushDataByAny } from 'src/utils/web'
import { FormBuilder, FormGroup, Validators, FormArray } from '@angular/forms'
import type { IWebProps, IWebTag } from 'src/types'
import { TopType, ActionType } from 'src/types'
import { NzMessageService } from 'ng-zorro-antd/message'
import { NzNotificationService } from 'ng-zorro-antd/notification'
import {
saveUserCollect,
getWebInfo,
getTranslate,
getScreenshot,
createImageFile,
getImageRepo,
getCDN,
} from 'src/api'
import { $t } from 'src/locale'
import { settings, navs, tagList, tagMap } from 'src/store'
import { isLogin, getPermissions } from 'src/utils/user'
import { NzModalModule } from 'ng-zorro-antd/modal'
import { NzFormModule } from 'ng-zorro-antd/form'
import { NzInputModule } from 'ng-zorro-antd/input'
import { NzSwitchModule } from 'ng-zorro-antd/switch'
import { NzCheckboxModule } from 'ng-zorro-antd/checkbox'
import { NzRateModule } from 'ng-zorro-antd/rate'
import { LogoComponent } from 'src/components/logo/logo.component'
import { UploadImageComponent } from 'src/components/upload-image/index.component'
import { NzIconModule } from 'ng-zorro-antd/icon'
import { NzButtonModule } from 'ng-zorro-antd/button'
import { NzSelectModule } from 'ng-zorro-antd/select'
import { SELF_SYMBOL, DEFAULT_SORT_INDEX } from 'src/constants/symbol'
import { JumpService } from 'src/services/jump'
import {
removeTrailingSlashes,
transformSafeHTML,
transformUnSafeHTML,
} from 'src/utils/pureUtils'
import event from 'src/utils/mitt'
@Component({
standalone: true,
imports: [
CommonModule,
FormsModule,
ReactiveFormsModule,
NzSelectModule,
NzModalModule,
NzFormModule,
NzInputModule,
NzSwitchModule,
NzCheckboxModule,
NzRateModule,
LogoComponent,
UploadImageComponent,
NzIconModule,
NzButtonModule,
],
selector: 'app-create-web',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class CreateWebComponent {
@ViewChildren('inputs') inputs!: QueryList
@ViewChild('inputUrl', { static: false }) inputUrlRef!: ElementRef
@ViewChild('inputTitle') inputTitleRef!: ElementRef
@ViewChild('inputDesc') inputDescRef!: ElementRef
readonly $t = $t
readonly isLogin: boolean = isLogin
readonly settings = settings()
readonly permissions = getPermissions(settings())
readonly DEFAULT_SORT_INDEX = DEFAULT_SORT_INDEX
readonly validateForm!: FormGroup
readonly tagList = computed(() =>
tagList().filter((item) => !(!isLogin && item.noOpen)),
)
submitting = false
getting = false
translating = false
showModal = false
detail: IWebProps | null | undefined = null
isMove = false // 提交完是否可以移动
parentId: number = -1
callback: Function = () => {}
topOptions = [
{ label: TopType[1], value: TopType.Side },
{ label: TopType[2], value: TopType.Shortcut },
]
breadcrumb: string[] = []
constructor(
public readonly jumpService: JumpService,
private fb: FormBuilder,
private message: NzMessageService,
private notification: NzNotificationService,
) {
event.on('CREATE_WEB', (props: any) => {
this.open(this, props)
})
event.on('SET_CREATE_WEB', (props: any) => {
for (const k in props) {
// @ts-ignore
this[k] = props[k]
}
})
this.validateForm = this.fb.group({
title: ['', [Validators.required]],
url: ['', [Validators.required]],
top: [false],
topTypes: [[]],
ownVisible: [false],
rate: [5],
icon: [''],
desc: [''],
index: [''],
img: [''],
urlArr: this.fb.array([]),
})
}
get modalTitle(): string {
const breadcrumb = (this.detail?.breadcrumb || this.breadcrumb).join(' / ')
return this.detail
? `${$t('_edit')}(${breadcrumb})`
: `${$t('_add')}(${breadcrumb})`
}
get urlArray(): FormArray {
return this.validateForm.get('urlArr') as FormArray
}
get isTop(): boolean {
return this.validateForm.get('top')?.value || false
}
get desc(): string {
return (this.validateForm.get('desc')?.value || '').trim()
}
get iconUrl(): string {
return (this.validateForm.get('icon')?.value || '').trim()
}
get imgUrl(): string {
return (this.validateForm.get('img')?.value || '').trim()
}
get title(): string {
return (this.validateForm.get('title')?.value || '').trim()
}
get url(): string {
return (this.validateForm.get('url')?.value || '').trim()
}
open(
ctx: this,
props?: {
isKeyboard?: boolean
isMove?: boolean
parentId?: number
detail: IWebProps | null | undefined
},
) {
if (props?.isKeyboard && this.showModal) {
return
}
const detail = props?.detail
if (!detail) {
ctx.parentId = props?.parentId || ctx.parentId
if (navs().length === 0) return
if (ctx.parentId === -1) {
const parentId = navs()[0]?.nav?.[0]?.nav?.[0]?.id
if (!parentId) {
return
}
ctx.parentId = parentId
}
}
ctx.detail = detail
ctx.showModal = true
ctx.isMove = !!props?.isMove
if (detail) {
this.validateForm
.get('title')!
.setValue(transformUnSafeHTML(getTextContent(detail?.name)))
this.validateForm
.get('desc')!
.setValue(transformUnSafeHTML(getTextContent(detail?.desc)))
this.validateForm.get('index')!.setValue(detail?.index ?? '')
this.validateForm.get('icon')!.setValue(detail?.icon || '')
this.validateForm.get('url')!.setValue(detail?.url || '')
this.validateForm.get('top')!.setValue(detail?.top ?? false)
this.validateForm.get('topTypes')!.setValue(detail?.topTypes ?? [])
this.validateForm.get('ownVisible')!.setValue(detail?.ownVisible ?? false)
this.validateForm.get('rate')!.setValue(detail?.rate ?? 5)
this.validateForm.get('img')!.setValue(detail?.img ?? '')
if (Array.isArray(detail.tags)) {
detail.tags.forEach((item: IWebTag) => {
;(this.validateForm?.get('urlArr') as FormArray)?.push(
this.fb.group({
id: Number(item.id),
name: tagMap()[item.id].name ?? '',
url: item.url || '',
}),
)
})
}
const { parentId } = getClassById(detail.id, 0, true)
ctx.parentId = parentId
} else {
const { breadcrumb } = getClassById(ctx.parentId)
ctx.breadcrumb = breadcrumb
}
this.focusUrl()
}
private focusUrl() {
setTimeout(() => {
if (this.detail) {
this.inputTitleRef?.nativeElement?.focus()
return
}
this.inputUrlRef?.nativeElement?.focus()
}, 400)
}
onClose() {
// @ts-ignore
this.validateForm.get('urlArr').controls = []
this.validateForm.reset()
this.showModal = false
this.submitting = false
this.callback = Function
}
async onUrlBlur() {
if (!this.settings.openSearch) {
return
}
let url = this.url
if (!url) {
return
}
try {
// test url
if (url[0] === SELF_SYMBOL) {
url = url.slice(1)
}
new URL(url)
const iconVal = this.validateForm.get('icon')?.value
const titleVal = this.validateForm.get('title')?.value
const descVal = this.validateForm.get('desc')?.value
if (iconVal && titleVal && descVal) {
return
}
this.getting = true
const res = await getWebInfo(url)
if (res['url'] != null && !iconVal) {
this.validateForm.get('icon')!.setValue(res['url'])
}
if (res['title'] != null && !titleVal) {
this.validateForm.get('title')!.setValue(res['title'])
}
if (res['description'] != null && !descVal) {
this.validateForm.get('desc')!.setValue(res['description'])
}
this.getting = false
this.inputUrlRef?.nativeElement?.blur()
this.checkRepeat()
} catch {}
}
addMoreUrl() {
;(this.validateForm.get('urlArr') as FormArray).push(
this.fb.group({
id: '',
name: '',
url: '',
}),
)
}
lessMoreUrl(idx: number) {
;(this.validateForm.get('urlArr') as FormArray).removeAt(idx)
}
onChangeFile(data: any, key: string) {
this.validateForm.get(key)!.setValue(data.cdn)
}
onSelectChange(idx: number) {
this.inputs.forEach((item, index) => {
if (idx === index) {
item.nativeElement.focus()
}
})
}
handleTranslate(key = 'desc') {
let content = key === 'desc' ? this.desc : this.title
let transalteBody = content
const el = key === 'desc' ? this.inputDescRef : this.inputTitleRef
const start = el.nativeElement.selectionStart
const end = el.nativeElement.selectionEnd
const isSelected = start !== end
if (isSelected) {
transalteBody = content.slice(start, end)
}
if (!transalteBody) {
return
}
this.translating = true
getTranslate({
content: transalteBody,
})
.then((res) => {
const translateContent = res.data.content
if (translateContent) {
if (isSelected) {
const newContent =
content.slice(0, start) + translateContent + content.slice(end)
this.validateForm.get(key)!.setValue(newContent)
} else {
this.validateForm.get(key)!.setValue(translateContent)
}
}
})
.finally(() => {
this.translating = false
})
}
getScreenshot() {
const url = (this.validateForm.get('url')?.value || '').trim()
this.submitting = true
getScreenshot({ url })
.then((res) => {
const path = `${Date.now()}.png`
createImageFile({
branch: getImageRepo().branch,
message: 'create image',
content: res.data.image,
isEncode: false,
path,
})
.then((res) => {
const value = isSelfDevelop ? res.data.fullImagePath : getCDN(path)
this.validateForm.get('img')!.setValue(value)
})
.finally(() => {
this.submitting = false
})
})
.catch(() => {
this.submitting = false
})
}
checkRepeat() {
try {
const url = removeTrailingSlashes(this.url)
const { oneIndex, twoIndex, threeIndex, breadcrumb } = getClassById(
this.parentId,
)
const w = navs()[oneIndex].nav[twoIndex].nav[threeIndex].nav
const repeatData = w.find((item) => {
if (this.detail && item.id === this.detail.id) {
return false
}
return item.url === url || item.url.includes(url)
})
if (repeatData) {
this.notification.error(
$t('_repeatTip'),
`
${breadcrumb.join(' / ')}
ID: ${repeatData.id}
${$t('_title')}: ${repeatData.name}
URL: ${repeatData.url}
`,
{
nzDuration: 20000,
},
)
} else {
this.message.success($t('_urlNoRepeat'))
}
} catch {}
}
async handleOk() {
for (const i in this.validateForm.controls) {
this.validateForm.controls[i].markAsDirty()
this.validateForm.controls[i].updateValueAndValidity()
}
const tags: IWebTag[] = []
let { top, ownVisible, rate, index, topTypes } = this.validateForm.value
const title = this.title
const url = this.url
if (!title || !url) return
const urlArr = this.urlArray?.value || []
urlArr.forEach((item: any) => {
if (item.id) {
tags.push({
id: item.id,
url: item.url.trim(),
})
}
})
const payload: Record = {
id: this.detail?.id,
name: transformSafeHTML(title),
desc: transformSafeHTML(this.desc),
breadcrumb: this.detail?.breadcrumb ?? [],
rate,
top,
index,
ownVisible,
icon: this.iconUrl,
url,
tags,
topTypes,
img: this.imgUrl || undefined,
}
if (this.detail) {
if (isLogin) {
const ok = updateByWeb(this.detail.id, payload as IWebProps)
if (ok) {
this.message.success($t('_modifySuccess'))
} else {
this.message.error('Update failed')
}
} else if (this.permissions.edit) {
this.submitting = true
const params = {
data: {
...payload,
extra: {
type: ActionType.Edit,
},
},
}
await saveUserCollect(params)
this.message.success($t('_waitHandle'))
}
} else {
payload['id'] = getTempId()
try {
this.submitting = true
payload['breadcrumb'] = this.breadcrumb
if (this.isLogin) {
const ok = pushDataByAny(this.parentId, payload)
if (ok) {
this.message.success($t('_addSuccess'))
if (this.isMove) {
event.emit('MOVE_WEB', {
data: [payload],
})
}
}
} else if (this.permissions.create) {
const params = {
data: {
...payload,
parentId: this.parentId,
extra: {
type: ActionType.Create,
},
},
}
await saveUserCollect(params)
this.message.success($t('_waitHandle'))
}
} catch (error: any) {
this.message.error(error.message)
}
}
this.callback()
this.onClose()
}
}
================================================
FILE: src/components/delete-modal/index.component.html
================================================
ID: {{ ids }}
该项目引用自 ID {{ ids }}
{{
$t('_onlyDelItem')
}}
{{ $t('_cancel') }}
{{ $t('_del') }}
================================================
FILE: src/components/delete-modal/index.component.scss
================================================
================================================
FILE: src/components/delete-modal/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component } from '@angular/core'
import { CommonModule } from '@angular/common'
import { FormsModule } from '@angular/forms'
import type { IWebProps, INavProps } from 'src/types'
import { NzButtonModule } from 'ng-zorro-antd/button'
import { NzModalModule } from 'ng-zorro-antd/modal'
import { NzMessageService } from 'ng-zorro-antd/message'
import event from 'src/utils/mitt'
import { $t } from 'src/locale'
import { NzCheckboxModule } from 'ng-zorro-antd/checkbox'
import { deleteByIds } from 'src/utils/web'
interface Props {
ids: number[]
data?: IWebProps | INavProps
isClass?: boolean
onOk?: () => void
onComplete?: () => void
}
@Component({
standalone: true,
imports: [
CommonModule,
NzModalModule,
NzButtonModule,
NzCheckboxModule,
FormsModule,
],
selector: 'app-delete-modal',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class DeleteModalComponent {
readonly $t = $t
submitting = false
showModal = false
ids: number[] = []
isClass = false
data?: IWebProps | INavProps
isChecked = false
onOk?: () => void
onComplete?: () => void
constructor(private message: NzMessageService) {
event.on('DELETE_MODAL', (props: unknown) => {
const p = props as Props
this.ids = p.ids
this.isClass = p.isClass || false
this.data = p.data
this.showModal = true
this.onOk = p.onOk
this.onComplete = p.onComplete
})
}
handleCancel() {
this.showModal = false
this.isChecked = false
}
async handleOk() {
let isDelRid = false
if (this.data?.rId && this.isChecked) {
isDelRid = true
}
const ok = await deleteByIds(this.ids, isDelRid)
if (ok) {
this.onOk?.()
this.message.success($t('_delSuccess'))
} else {
this.message.error('Delete failed')
}
this.onComplete?.()
this.handleCancel()
}
}
================================================
FILE: src/components/edit-class/index.component.html
================================================
{{
$t('_categoryName')
}}
{{
$t('_onlyOwnVisible')
}}
{{ $t('_iconAddr') }}
================================================
FILE: src/components/edit-class/index.component.scss
================================================
================================================
FILE: src/components/edit-class/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import {
Component,
Output,
EventEmitter,
ViewChild,
ElementRef,
} from '@angular/core'
import { CommonModule } from '@angular/common'
import {
FormsModule,
ReactiveFormsModule,
FormBuilder,
FormGroup,
Validators,
} from '@angular/forms'
import { NzModalModule } from 'ng-zorro-antd/modal'
import { NzFormModule } from 'ng-zorro-antd/form'
import { NzInputModule } from 'ng-zorro-antd/input'
import { NzSwitchModule } from 'ng-zorro-antd/switch'
import { LogoComponent } from 'src/components/logo/logo.component'
import { UploadImageComponent } from 'src/components/upload-image/index.component'
import { $t } from 'src/locale'
import { NzMessageService } from 'ng-zorro-antd/message'
import { navs } from 'src/store'
import { setNavs, updateByClass, pushDataByAny } from 'src/utils/web'
import { getClassById } from 'src/utils/index'
import { getTempId, isSelfDevelop } from 'src/utils/utils'
import event from 'src/utils/mitt'
@Component({
standalone: true,
imports: [
CommonModule,
NzModalModule,
NzFormModule,
NzInputModule,
NzSwitchModule,
LogoComponent,
UploadImageComponent,
FormsModule,
ReactiveFormsModule,
],
selector: 'edit-class',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class EditClassComponent {
@Output() onOk = new EventEmitter()
@ViewChild('input', { static: false }) input!: ElementRef
readonly $t = $t
validateForm!: FormGroup
showModal = false
isEdit = false
submitting = false
constructor(
private fb: FormBuilder,
private message: NzMessageService,
) {
this.validateForm = this.fb.group({
title: ['', [Validators.required]],
icon: [''],
ownVisible: [false],
id: [-1],
})
const handleOpen = (props: any = {}) => {
this.isEdit = !!props['title']
this.validateForm.get('title')!.setValue(props['title'] || '')
this.validateForm.get('icon')!.setValue(props['icon'] || '')
this.validateForm.get('id')!.setValue(props['id'] || getTempId())
this.validateForm.get('ownVisible')!.setValue(!!props['ownVisible'])
this.showModal = true
this.focusUrl()
}
event.on('EDIT_CLASS_OPEN', handleOpen)
}
get iconUrl(): string {
return this.validateForm.get('icon')?.value || ''
}
focusUrl() {
setTimeout(() => {
this.input?.nativeElement?.focus()
}, 400)
}
onChangeFile(data: any) {
this.validateForm.get('icon')!.setValue(data.cdn)
}
onCancel() {
this.validateForm.reset()
this.showModal = false
}
handleOk() {
let { title, icon, ownVisible, id } = this.validateForm.value
title = title.trim()
if (!title) {
this.message.error('Cannot be empty')
return
}
const params: Record = {
id,
title,
icon,
ownVisible,
}
try {
this.submitting = true
if (this.isEdit) {
const ok = updateByClass(id, params)
ok && this.message.success($t('_modifySuccess'))
} else {
params['id'] = getTempId()
params['nav'] = []
const { oneIndex, twoIndex } = getClassById(id, -1)
// 非一级
if (oneIndex !== -1 || twoIndex !== -1) {
const ok = pushDataByAny(id, params)
ok && this.message.success($t('_addSuccess'))
} else {
navs.update((prev) => {
prev.unshift(params as any)
setNavs(prev)
return prev
})
}
}
} catch (error: any) {
this.message.error(error.message)
} finally {
this.submitting = false
}
this.onOk.emit(params)
this.onCancel()
if (!isSelfDevelop) {
event.emit('WEB_REFRESH')
}
}
}
================================================
FILE: src/components/fixbar/index.component.html
================================================
================================================
FILE: src/components/fixbar/index.component.scss
================================================
@media (min-width: 768px) {
.wrapper {
&:hover {
box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
transform: scale(1.2);
}
}
}
@keyframes fadeIn {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.fixbar {
z-index: 30;
position: fixed;
bottom: 20px;
right: 15px;
user-select: none;
&.openFixbar {
.common-show {
visibility: visible !important;
opacity: 1 !important;
}
.scrolltop {
opacity: 1 !important;
visibility: visible !important;
}
}
.wrapper {
width: 40px;
height: 40px;
margin-top: 10px;
transition: 0.1s linear;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
border-radius: 50%;
background-color: #fff;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
transition: all 0.1s linear;
&.common-show {
visibility: hidden;
opacity: 0;
}
}
.scrolltop {
visibility: hidden;
opacity: 0;
&.showTop {
visibility: visible;
animation: fadeIn 0.5s linear forwards;
}
}
img {
width: 25px;
height: 25px;
}
i {
transition: 0.1s linear;
display: inline-block;
font-size: 20px;
color: #999;
}
.arrow {
transform: rotate(180deg);
cursor: pointer;
font-weight: bold;
}
.collapse-icon {
transform: rotate(-270deg);
&.active {
transform: rotate(-360deg);
}
}
}
================================================
FILE: src/components/fixbar/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, Output, EventEmitter, Input } from '@angular/core'
import { CommonModule } from '@angular/common'
import { isDark as isDarkFn } from 'src/utils'
import { NzModalService } from 'ng-zorro-antd/modal'
import { NzMessageService } from 'ng-zorro-antd/message'
import { isLogin } from 'src/utils/user'
import { updateFileContent } from 'src/api'
import { navs, settings } from 'src/store'
import { DB_PATH, STORAGE_KEY_MAP } from 'src/constants'
import { Router } from '@angular/router'
import { $t, getLocale } from 'src/locale'
import { addDark, removeDark, isSelfDevelop } from 'src/utils/utils'
import { NzDropDownModule } from 'ng-zorro-antd/dropdown'
import { NzToolTipModule } from 'ng-zorro-antd/tooltip'
import { cleanWebAttrs } from 'src/utils/pureUtils'
import mitt from 'src/utils/mitt'
import { fromEvent, Subscription } from 'rxjs'
import { debounceTime } from 'rxjs/operators'
import { unregisterServiceWorkers, isPwaMode } from 'src/utils/sw'
@Component({
standalone: true,
imports: [CommonModule, NzDropDownModule, NzToolTipModule],
selector: 'app-fixbar',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
providers: [NzModalService, NzMessageService],
})
export class FixbarComponent {
@Input() showTop: boolean = true
@Input() showCollapse: boolean = true
@Input() collapsed: boolean = false
@Input() selector: string = ''
@Output() onCollapse = new EventEmitter()
readonly $t = $t
readonly settings = settings()
readonly language = getLocale()
readonly isLogin = isLogin
private scrollSubscription: Subscription | null = null
readonly isSelfDevelop = isSelfDevelop
readonly isPwaMode = isPwaMode() && window.__PWA_ENABLE__
isDark: boolean = isDarkFn()
isShowFace = true
isShowTop = false
entering = false
checking = false
open = localStorage.getItem(STORAGE_KEY_MAP.FIXBAR_OPEN) === 'true'
themeList = [
{
name: $t('_switchTo') + ' Super',
url: '/super',
},
{
name: $t('_switchTo') + ' Light',
url: '/light',
},
{
name: $t('_switchTo') + ' Sim',
url: '/sim',
},
{
name: $t('_switchTo') + ' Side',
url: '/side',
},
{
name: $t('_switchTo') + ' Shortcut',
url: '/shortcut',
},
{
name: $t('_switchTo') + ' App',
url: '/app',
},
]
constructor(
private message: NzMessageService,
private modal: NzModalService,
private router: Router,
) {
if (this.isDark) {
addDark()
}
const url = this.router.url.split('?')[0]
const defaultTheme = this.settings.theme?.toLowerCase?.()
this.themeList = this.themeList
.map((item) => {
if (item.url === '/' + defaultTheme) {
item.url = '/'
}
return item
})
.filter((t) => {
if (
url === '/' &&
url + this.settings.theme?.toLowerCase?.() === t.url
) {
return false
}
if (
t.url === '/' &&
url === t.url + this.settings.theme?.toLowerCase?.()
) {
return false
}
return t.url !== url
})
if (!isLogin) {
const isShowFace =
[this.settings.showLanguage, this.settings.showThemeToggle].filter(
Boolean,
).length === 0
if (isShowFace) {
this.open = true
this.isShowFace = false
}
}
}
onScroll(event: any) {
const top = event?.target?.scrollTop || scrollY
this.isShowTop = top > 100
}
ngAfterViewInit() {
const target = this.selector
? (document.querySelector(this.selector) as HTMLElement)
: window
this.onScroll(target)
this.scrollSubscription = fromEvent(target, 'scroll')
.pipe(debounceTime(100))
.subscribe((event) => this.onScroll(event))
}
ngOnDestroy() {
if (this.scrollSubscription) {
this.scrollSubscription.unsubscribe()
this.scrollSubscription = null
}
}
toggleTheme(theme: any) {
this.router.navigate([theme.url], {
queryParams: {
_: Date.now(),
},
queryParamsHandling: 'merge',
})
}
goTop() {
const config: ScrollToOptions = {
top: 0,
behavior: 'smooth',
}
if (this.selector) {
const el = document.querySelector(this.selector)
if (el) {
el.scrollTo(config)
}
return
}
window.scrollTo(config)
}
collapse() {
this.onCollapse.emit()
}
toggleMode() {
this.isDark = !this.isDark
mitt.emit('EVENT_DARK', this.isDark)
window.localStorage.setItem(
STORAGE_KEY_MAP.IS_DARK,
String(Number(this.isDark)),
)
if (this.isDark) {
addDark()
} else {
removeDark()
}
}
goSystemPage() {
this.entering = true
this.router.navigate(['system'])
}
handleOpen() {
if (!this.isShowFace) {
return
}
this.open = !this.open
localStorage.setItem(STORAGE_KEY_MAP.FIXBAR_OPEN, String(this.open))
}
unregisterServiceWorkers() {
this.checking = true
unregisterServiceWorkers()
.then((status) => {
if (status) {
setTimeout(() => {
location.reload()
}, 2000)
} else {
this.checking = false
}
})
.catch(() => {
this.checking = false
})
}
handleSync() {
this.modal.info({
nzTitle: $t('_syncDataOut'),
nzOkText: $t('_confirmSync'),
nzContent: $t('_confirmSyncTip'),
nzOnOk: async () => {
await updateFileContent({
message: 'update db',
content: JSON.stringify(cleanWebAttrs(navs())),
path: DB_PATH,
})
this.message.success($t('_syncSuccessTip'))
},
})
}
toggleLocale() {
this.handleOpen()
const l = this.language === 'en' ? 'zh-CN' : 'en'
localStorage.setItem(STORAGE_KEY_MAP.LANGUAGE, l)
location.reload()
}
}
================================================
FILE: src/components/footer/footer.component.html
================================================
================================================
FILE: src/components/footer/footer.component.scss
================================================
.footer {
text-align: center;
}
================================================
FILE: src/components/footer/footer.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, Input, ChangeDetectionStrategy } from '@angular/core'
import { CommonModule } from '@angular/common'
import { settings } from 'src/store'
import { compilerTemplate } from 'src/utils/utils'
import { SafeHtmlPipe } from 'src/pipe/safeHtml.pipe'
import event from 'src/utils/mitt'
@Component({
standalone: true,
imports: [CommonModule, SafeHtmlPipe],
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-footer',
templateUrl: './footer.component.html',
styleUrls: ['./footer.component.scss'],
})
export class FooterComponent {
@Input() className: string = ''
@Input() content: string = ''
footerContent: string = ''
constructor() {}
ngOnInit() {
this.footerContent = compilerTemplate(
this.content || settings().footerContent,
)
}
ngOnDestroy() {
const applyWebEls = document.querySelectorAll('#app-footer .applyweb')
applyWebEls.forEach((el) => {
el.removeEventListener('click', this.handleApplyWeb)
})
}
handleApplyWeb() {
event.emit('CREATE_WEB', {})
}
ngAfterViewInit() {
const applyWebEls = document.querySelectorAll('#app-footer .applyweb')
applyWebEls.forEach((el) => {
el.addEventListener('click', this.handleApplyWeb)
})
}
}
================================================
FILE: src/components/footer/template.ts
================================================
const t: Record = {
footTemplate1: `
联系方式
问题反馈:xjh22222228@gmail.com
微信授权:xjh22222228
`,
footTemplate2: `
共收录$\{total}个网站
Copyright © 2018-$\{year} $\{hostname}, All Rights Reserved
`,
footTemplate3: `
@ $\{year} $\{hostname}, $\{total}.
`,
}
export default t
================================================
FILE: src/components/holiday/drawer/index.component.html
================================================
{{ $t('_getHoliday') }}
0"
class="!w-full !mb-4"
nzMode="multiple"
nzAllowClear
[nzPlaceHolder]="$t('_addHoliday')"
[nzShowArrow]="true"
[(ngModel)]="holidayValue"
(ngModelChange)="handleHolidayChange($event)"
>
{{ $t('_add') }}
{{ $t('_cancel') }}
{{ $t('_submit') }}
================================================
FILE: src/components/holiday/drawer/index.component.scss
================================================
================================================
FILE: src/components/holiday/drawer/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, EventEmitter, Output } from '@angular/core'
import { CommonModule } from '@angular/common'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { $t } from 'src/locale'
import { FormBuilder, FormGroup, FormArray } from '@angular/forms'
import { NzDrawerModule } from 'ng-zorro-antd/drawer'
import { NzFormModule } from 'ng-zorro-antd/form'
import { NzButtonModule } from 'ng-zorro-antd/button'
import { NzInputModule } from 'ng-zorro-antd/input'
import { NzDatePickerModule } from 'ng-zorro-antd/date-picker'
import { NzSelectModule } from 'ng-zorro-antd/select'
import { getHoliday } from 'src/api'
import dayjs from 'dayjs'
interface IHolidayProps {
date: string
title: string
day: number | string
label?: string
}
@Component({
standalone: true,
imports: [
CommonModule,
FormsModule,
ReactiveFormsModule,
NzDrawerModule,
NzFormModule,
NzButtonModule,
NzInputModule,
NzDatePickerModule,
NzSelectModule,
],
selector: 'holiday-drawer',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class HolidayDrawerComponent {
@Output() ok = new EventEmitter()
readonly $t = $t
visible = false
validateForm!: FormGroup
index = 0
holidays: Required[] = []
holidayValue = []
loading = false
constructor(private fb: FormBuilder) {
this.validateForm = this.fb.group({
items: this.fb.array([]),
})
}
get items(): FormArray {
return this.validateForm.get('items') as FormArray
}
open(data: any, idx: number) {
this.index = idx
if (data['items']) {
data['items'].forEach((item: any) => {
;(this.validateForm.get('items') as FormArray).push(
this.fb.group({
url: item.url || '', // 预留
day: String(item.day),
title: item.title,
date: item.date,
}),
)
})
}
this.visible = true
}
getHoliday() {
this.loading = true
getHoliday()
.then((res) => {
const { data } = res.data
this.holidays = data.map((item: IHolidayProps) => {
item.label = `${item.title} (${item.date})(${item.day})`
return item
})
})
.finally(() => {
this.loading = false
})
}
handleHolidayChange(values: IHolidayProps[]) {
for (const value of values) {
const items = this.items.value as IHolidayProps[]
const existingItem = items.some((item) => item.date === value.date)
if (!existingItem) {
;(this.validateForm.get('items') as FormArray).push(
this.fb.group({
url: '',
day: value.day,
title: value.title,
date: value.date,
}),
)
}
}
}
handleAdd() {
;(this.validateForm.get('items') as FormArray).push(
this.fb.group({
day: '0',
url: '',
title: '',
date: Date.now(),
}),
)
}
handleDel(idx: number) {
;(this.validateForm.get('items') as FormArray).removeAt(idx)
}
handleClose() {
this.visible = false
;(this.validateForm.get('items') as FormArray).controls = []
}
handleSubmit() {
const values = this.validateForm.value
const format = 'YYYY-MM-DD'
const now = dayjs(dayjs().format(format))
this.ok.emit({
...values,
items: [...values.items]
.filter((item: IHolidayProps) => {
const day = parseInt(item.day as string)
item.day = day || 0
item.date = dayjs(item.date).format(format)
let date = dayjs(item.date)
if (item.day > 0) {
date = date.add(item.day - 1, 'day')
}
if (date.isBefore(now)) {
return false
}
return !!item.title.trim()
})
.sort((a, b) => dayjs(a.date).valueOf() - dayjs(b.date).valueOf()),
index: this.index,
})
this.handleClose()
}
}
================================================
FILE: src/components/holiday/index.component.html
================================================
{{
items[0].isToday || items[0].isRest
? $t('_dayIs')
: $t('_distance') + items[0].title
}}
{{ items[0].diffStr }}
0">{{ $t('_rest') }}
{{ items[0].dateStr }}
- {{ items[0].afterDay }}
{{ item.title }} {{ item.dateStr
}} 0">{{ $t('_rest') }}
0">
{{ item.diffDay }}{{ $t('_day') }}
================================================
FILE: src/components/holiday/index.component.scss
================================================
.holiday {
position: relative;
width: 320px;
height: var(--componentHeight);
max-height: 100%;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
display: flex;
background-color: #fff;
color: #666;
.title {
font-weight: 500;
font-size: 16px;
}
.left {
width: 140px;
padding: 12px 0 12px 12px;
display: flex;
flex-direction: column;
.days {
font-size: 46px;
text-align: center;
font-weight: bold;
color: rgba(0, 0, 0, 0.85);
flex: 1;
display: flex;
align-items: center;
justify-content: center;
}
&.today {
.days {
font-size: 30px;
}
}
}
.tag {
background-color: rgb(223, 252, 234);
color: rgb(85, 170, 111);
font-size: 10px;
font-weight: 500;
padding: 1px 2px;
border-radius: 2px;
display: inline-flex;
align-items: center;
justify-content: center;
margin-right: 3px;
margin-left: 2px;
}
.right {
padding: 12px 12px 12px 0;
flex: 1;
padding-left: 12px;
.items {
display: flex;
align-items: center;
justify-content: space-between;
padding: 4px 0;
color: rgba(0, 0, 0, 0.8);
&:not(:nth-last-child(1)) {
margin-bottom: 3px;
border-bottom: 1px solid #eee;
}
}
}
.cleft {
position: relative;
white-space: nowrap;
display: flex;
align-items: center;
.tag {
position: absolute;
top: 50%;
left: -5px;
transform: translate(-100%, -50%);
}
}
.cright {
font-weight: 500;
}
}
================================================
FILE: src/components/holiday/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, Input } from '@angular/core'
import { CommonModule } from '@angular/common'
import type { IComponentItemProps } from 'src/types'
import { $t } from 'src/locale'
import dayjs from 'dayjs'
import { component } from 'src/store'
@Component({
standalone: true,
imports: [CommonModule],
selector: 'app-holiday',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class HolidayComponent {
@Input() data!: IComponentItemProps
items: any[] = []
readonly component = component()
readonly $t = $t
constructor() {}
ngOnChanges() {
this.init()
}
private init() {
let items: any = []
const now = dayjs(dayjs().format('YYYY-MM-DD'))
if (this.data['items']) {
items = [...this.data['items']]
.filter((item: any) => {
item.date = dayjs(item.date).format('YYYY-MM-DD')
let date = dayjs(item.date)
if (item.day > 0) {
date = date.add(item.day - 1, 'day')
}
if (date.isBefore(now)) {
return false
}
return true
})
.slice(0, 4)
.map((item: any) => {
item.dateStr = dayjs(item.date).format('MM.DD')
item.diffDay = dayjs(dayjs(item.date).format('YYYY-MM-DD')).diff(
now,
'day',
)
item.diffDay = item.diffDay < 0 ? 0 : item.diffDay
item.diffDay = item.diffDay > 999 ? 999 : item.diffDay
item.diffStr = item.diffDay
if (item.day > 0) {
item.afterDay = dayjs(item.date)
.add(item.day - 1, 'day')
.format('MM.DD')
if (item.afterDay === item.dateStr) {
item.afterDay = null
}
}
item.isToday = item.dateStr === dayjs().format('MM.DD')
if (item.diffDay <= 0) {
if (item.isToday) {
item.diffStr = item.title
} else {
item.isRest = true
item.diffStr = '休息日'
}
}
return item
})
}
this.items = items
}
}
================================================
FILE: src/components/html/drawer/index.component.html
================================================
HTML
Width
{{ $t('_bgColor') }}
{{ $t('_cancel') }}
{{ $t('_submit') }}
================================================
FILE: src/components/html/drawer/index.component.scss
================================================
================================================
FILE: src/components/html/drawer/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, EventEmitter, Output } from '@angular/core'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { $t } from 'src/locale'
import { FormBuilder, FormGroup } from '@angular/forms'
import { NzDrawerModule } from 'ng-zorro-antd/drawer'
import { NzFormModule } from 'ng-zorro-antd/form'
import { NzButtonModule } from 'ng-zorro-antd/button'
import { NzInputModule } from 'ng-zorro-antd/input'
import { NzSliderModule } from 'ng-zorro-antd/slider'
import { NzColorPickerModule } from 'ng-zorro-antd/color-picker'
@Component({
standalone: true,
imports: [
FormsModule,
ReactiveFormsModule,
NzDrawerModule,
NzFormModule,
NzButtonModule,
NzInputModule,
NzSliderModule,
NzColorPickerModule,
],
selector: 'html-drawer',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class HTMLDrawerComponent {
@Output() ok = new EventEmitter()
readonly $t = $t
visible = false
validateForm!: FormGroup
index = 0
constructor(private fb: FormBuilder) {
this.validateForm = this.fb.group({
html: [''],
width: [0],
bgColor: [''],
})
}
open(data: any, idx: number) {
this.index = idx
for (const k in data) {
this.validateForm.get(k)?.setValue(data[k])
}
this.visible = true
}
handleClose() {
this.visible = false
}
handleSubmit() {
const values = this.validateForm.value
this.ok.emit({
...values,
index: this.index,
})
this.handleClose()
}
}
================================================
FILE: src/components/html/index.component.html
================================================
================================================
FILE: src/components/html/index.component.scss
================================================
.html {
position: relative;
height: var(--componentHeight) !important;
max-height: 100%;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
overflow-wrap: break-word;
}
================================================
FILE: src/components/html/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, Input, ViewChild, ElementRef } from '@angular/core'
import type { IComponentItemProps } from 'src/types'
import { SafeHtmlPipe } from 'src/pipe/safeHtml.pipe'
import { parseHtmlWithContent, parseLoadingWithContent } from 'src/utils/utils'
import { component } from 'src/store'
@Component({
standalone: true,
imports: [SafeHtmlPipe],
selector: 'app-html',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class HTMLComponent {
@Input() data!: IComponentItemProps
@ViewChild('root', { static: false }) root!: ElementRef
private parseDescriptionTimer: any
readonly component = component()
html = ''
constructor() {}
ngOnChanges() {
this.init()
this.parseDescription()
}
ngOnDestroy() {
clearTimeout(this.parseDescriptionTimer)
}
private init() {
this.html = parseLoadingWithContent(`!${this.data['html']}`)
}
private parseDescription() {
clearTimeout(this.parseDescriptionTimer)
this.parseDescriptionTimer = setTimeout(() => {
parseHtmlWithContent(this.root?.nativeElement, `!${this.html}`)
}, 300)
}
}
================================================
FILE: src/components/icon-git/icon-git.component.html
================================================
================================================
FILE: src/components/icon-git/icon-git.component.scss
================================================
@media (max-width: 580px) {
.github-link {
display: none;
}
}
.github-link {
position: fixed;
top: -6px;
right: -6px;
border: 0;
z-index: 10;
}
================================================
FILE: src/components/icon-git/icon-git.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
import config from '../../../nav.config.json'
import { Component, ChangeDetectionStrategy } from '@angular/core'
import { CommonModule } from '@angular/common'
import { settings } from 'src/store'
import { isSelfDevelop } from 'src/utils/utils'
@Component({
standalone: true,
imports: [CommonModule],
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-icon-git',
templateUrl: './icon-git.component.html',
styleUrls: ['./icon-git.component.scss'],
})
export class IconGitComponent {
gitRepoUrl: string = config.gitRepoUrl
showGithub = !isSelfDevelop && settings().showGithub
constructor() {}
}
================================================
FILE: src/components/image/drawer/index.component.html
================================================
{{ $t('_image') }}
{{ $t('_text') }}
URL
{{ $t('_cancel') }}
{{ $t('_submit') }}
================================================
FILE: src/components/image/drawer/index.component.scss
================================================
================================================
FILE: src/components/image/drawer/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, EventEmitter, Output } from '@angular/core'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { $t } from 'src/locale'
import { FormBuilder, FormGroup } from '@angular/forms'
import { NzDrawerModule } from 'ng-zorro-antd/drawer'
import { NzFormModule } from 'ng-zorro-antd/form'
import { NzButtonModule } from 'ng-zorro-antd/button'
import { NzInputModule } from 'ng-zorro-antd/input'
import { UploadImageComponent } from 'src/components/upload-image/index.component'
@Component({
standalone: true,
imports: [
UploadImageComponent,
FormsModule,
ReactiveFormsModule,
NzDrawerModule,
NzFormModule,
NzButtonModule,
NzInputModule,
],
selector: 'image-drawer',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class ImageDrawerComponent {
@Output() ok = new EventEmitter()
readonly $t = $t
visible = false
validateForm!: FormGroup
index = 0
constructor(private fb: FormBuilder) {
this.validateForm = this.fb.group({
url: [''],
text: [''],
go: [''],
})
}
open(data: any, idx: number) {
this.index = idx
for (const k in data) {
this.validateForm.get(k)?.setValue(data[k])
}
this.visible = true
}
onUploadImage(data: any) {
this.validateForm.get('url')!.setValue(data.cdn)
}
handleClose() {
this.visible = false
}
handleSubmit() {
const values = this.validateForm.value
this.ok.emit({
...values,
index: this.index,
})
this.handleClose()
}
}
================================================
FILE: src/components/image/index.component.html
================================================
================================================
FILE: src/components/image/index.component.scss
================================================
.cimage {
position: relative;
width: 170px;
height: var(--componentHeight);
max-height: 100%;
border-radius: 12px;
overflow: hidden;
color: #fff;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
background-size: cover;
.text {
position: absolute;
bottom: 5px;
left: 0;
width: 100%;
font-size: 12px;
text-align: center;
font-weight: 500;
}
}
================================================
FILE: src/components/image/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, Input } from '@angular/core'
import type { IComponentItemProps } from 'src/types'
import { JumpService } from 'src/services/jump'
import { component } from 'src/store'
@Component({
standalone: true,
selector: 'app-image',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class ImageComponent {
@Input() data!: IComponentItemProps
readonly component = component()
constructor(public jumpService: JumpService) {}
}
================================================
FILE: src/components/loading/index.component.html
================================================
================================================
FILE: src/components/loading/index.component.scss
================================================
.cc1 {
z-index: 2;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 15px;
height: 15px;
animation: my-rotatex1 2s linear infinite;
}
.cc2 {
stroke-dasharray: 90, 150;
stroke-dashoffset: 0;
stroke-width: 5;
stroke: #6d8ba7;
stroke-linecap: round;
animation: loading-dashx2 1.5s ease-in-out infinite;
}
================================================
FILE: src/components/loading/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, ChangeDetectionStrategy } from '@angular/core'
@Component({
standalone: true,
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [],
selector: 'app-loading',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class LoadingComponent {
constructor() {}
}
================================================
FILE: src/components/login/login.component.html
================================================
{{ $t('_inputTokenMsg') }}
{{ $t('_getToken')
}}
{{ $t('_readDoc') }}
================================================
FILE: src/components/login/login.component.scss
================================================
.prefix-icon {
width: 20px;
height: 20px;
pointer-events: none;
}
================================================
FILE: src/components/login/login.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import {
Component,
Input,
Output,
EventEmitter,
ViewChild,
ElementRef,
} from '@angular/core'
import { Router } from '@angular/router'
import { CommonModule } from '@angular/common'
import { FormsModule } from '@angular/forms'
import { NzMessageService } from 'ng-zorro-antd/message'
import {
verifyToken,
createBranch,
authorName,
isStandaloneImage,
} from 'src/api'
import {
setToken,
removeToken,
removeWebsite,
setImageToken,
} from 'src/utils/user'
import { $t } from 'src/locale'
import { isSelfDevelop } from 'src/utils/utils'
import { NzModalModule } from 'ng-zorro-antd/modal'
import { NzInputModule } from 'ng-zorro-antd/input'
import config from '../../../nav.config.json'
@Component({
standalone: true,
imports: [CommonModule, FormsModule, NzModalModule, NzInputModule],
selector: 'app-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.scss'],
})
export class LoginComponent {
@Input() visible = false
@Output() onCancel = new EventEmitter()
@ViewChild('input', { static: false }) input!: ElementRef
readonly $t = $t
readonly isSelfDevelop = isSelfDevelop
token = ''
imageToken = ''
submitting = false
showImgToken = false
constructor(
private readonly message: NzMessageService,
private router: Router,
) {
if (!isSelfDevelop) {
this.showImgToken = isStandaloneImage()
}
}
ngAfterViewInit(): void {
this.inputFocus()
}
handleCancel(): void {
this.onCancel.emit()
this.router.navigate(['/'])
}
private inputFocus(): void {
setTimeout(() => {
this.input?.nativeElement?.focus()
}, 500)
}
onKey(event: KeyboardEvent): void {
if (event.code === 'Enter') {
this.login()
}
}
async login(): Promise {
const token = this.token.trim()
if (!token) {
this.message.error($t('_pleaseInputToken'))
return
}
if (this.showImgToken) {
const token = this.imageToken.trim()
if (!token) {
this.message.error('Please enter the image TOKEN')
return
}
try {
this.submitting = true
const authorName = config.imageRepoUrl.split('/').at(-2)
const res = await verifyToken(token, config.imageRepoUrl)
if ((res?.data?.login ?? res?.data?.username) !== authorName) {
this.message.error('Image Bad credentials')
return
}
setImageToken(token)
} catch {
} finally {
this.submitting = false
}
}
this.submitting = true
try {
const res = await verifyToken(token)
if (
!isSelfDevelop &&
(res?.data?.login ?? res?.data?.username) !== authorName
) {
this.message.error('Bad credentials')
throw new Error('Bad credentials')
}
setToken(token)
try {
createBranch('image').finally(() => {
this.message.success($t('_tokenVerSuc'))
removeWebsite().finally(() => {
window.location.reload()
})
})
} catch {
removeToken()
this.submitting = false
}
} catch {
this.submitting = false
}
}
}
================================================
FILE: src/components/logo/logo.component.html
================================================
{{ firstLetter }}
{{ firstLetter }}
================================================
FILE: src/components/logo/logo.component.scss
================================================
.icon {
position: relative;
display: inline-block;
vertical-align: middle;
pointer-events: none;
border-radius: 3px;
object-fit: cover;
transition: all 0.12s linear;
&::after {
content: '' attr(alt);
z-index: 2;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #1890ff;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
}
}
.circle {
color: #fff;
display: flex;
justify-content: center;
align-items: center;
font-size: 18px;
}
.common-icon {
transition: all 0.1s linear;
}
================================================
FILE: src/components/logo/logo.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, Input, ChangeDetectionStrategy } from '@angular/core'
import { CommonModule } from '@angular/common'
import { randomColor, getTextContent } from 'src/utils'
@Component({
standalone: true,
imports: [CommonModule],
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-logo',
templateUrl: './logo.component.html',
styleUrls: ['./logo.component.scss'],
})
export class LogoComponent {
@Input() src: string = ''
@Input() name: string = ''
@Input() size: number = 35
@Input() radius: number = 3
backgroundColor: string = '#1890ff'
firstLetter: string = ''
isError: boolean = false
constructor() {}
ngOnInit() {
if (!this.src) {
this.generateColor()
this.getFirstLetter()
}
}
private generateColor() {
this.backgroundColor = `linear-gradient(45deg, #fff, ${randomColor()} 41%)`
}
private getFirstLetter() {
if (this.name) {
this.firstLetter = getTextContent(this.name)[0].toUpperCase()
}
}
onError() {
this.isError = true
this.generateColor()
this.getFirstLetter()
}
}
================================================
FILE: src/components/move-web/index.component.html
================================================
2"
>
{{ $t('_copy') }}
{{
$t('_same')
}}
================================================
FILE: src/components/move-web/index.component.scss
================================================
.act {
margin-top: 30px;
}
================================================
FILE: src/components/move-web/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component } from '@angular/core'
import { FormsModule } from '@angular/forms'
import { CommonModule } from '@angular/common'
import { $t } from 'src/locale'
import { setNavs } from 'src/utils/web'
import { navs } from '../../store'
import { INavTwoProp, INavThreeProp, IWebProps } from '../../types'
import { NzMessageService } from 'ng-zorro-antd/message'
import { NzModalModule } from 'ng-zorro-antd/modal'
import { NzCheckboxModule } from 'ng-zorro-antd/checkbox'
import { NzSelectModule } from 'ng-zorro-antd/select'
import { deleteByIds } from 'src/utils/web'
import { getClassById } from 'src/utils'
import { getTempId, isSelfDevelop } from 'src/utils/utils'
import event from 'src/utils/mitt'
@Component({
standalone: true,
imports: [
CommonModule,
FormsModule,
NzCheckboxModule,
NzModalModule,
NzSelectModule,
],
selector: 'app-move-web',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class MoveWebComponent {
readonly $t = $t
readonly navs = navs
twoOptions: INavTwoProp[] = []
threeOptions: INavThreeProp[] = []
isCopy = false
isSame = false
oneSelect: number = -1
twoSelect: number = -1
threeSelect: number = -1
moveItems: any[] = []
showModal = false
level = 4
id = -1
constructor(private message: NzMessageService) {
event.on('MOVE_WEB', (props: any) => {
this.open(this, props)
})
}
ngOnInit() {}
open(
ctx: this,
props: {
id?: number
level?: number
data: IWebProps[]
},
) {
ctx.oneSelect = -1
ctx.twoSelect = -1
ctx.threeSelect = -1
ctx.twoOptions = []
ctx.threeOptions = []
ctx.moveItems = props.data
ctx.level = props.level ?? 4
ctx.showModal = true
ctx.id = props.id ?? -1
}
hanldeOneSelect(id: number) {
this.oneSelect = id
const data = this.navs().find((item) => item.id === id)
this.twoOptions = data?.nav || []
this.twoSelect = -1
this.threeSelect = -1
}
hanldeTwoSelect(id: number) {
this.twoSelect = id
const data = this.twoOptions.find((item) => item.id === id)
this.threeOptions = data?.nav || []
this.threeSelect = -1
}
hanldeThreeSelect(id: number) {
this.threeSelect = id
}
handleCancel() {
this.isCopy = false
this.isSame = false
this.showModal = false
}
async hanldeOk(): Promise {
let tempId = getTempId()
try {
const moveItems: INavTwoProp[] & IWebProps[] & INavThreeProp[] =
JSON.parse(JSON.stringify(this.moveItems))
if (this.level === 2) {
if (this.oneSelect == -1) {
return this.message.error($t('_sel1'))
}
const { oneIndex } = getClassById(this.oneSelect)
for (const item of moveItems) {
const id = item.id
const has = this.navs()[oneIndex].nav.some((item) => item.id === id)
if (has) {
this.message.error($t('_sameExists'))
return
}
if (this.isCopy) {
tempId -= 1
if (this.isSame) {
item.rId = tempId
} else {
item.id = tempId
delete item.rId
}
} else {
await deleteByIds([item.rId || id], !!item.rId)
}
this.navs.update((prev) => {
prev[oneIndex].nav.unshift(item)
return prev
})
this.message.success(`"${item.title}" ${$t('_moveSuccess')}`)
}
} else if (this.level === 3) {
if (this.twoSelect == -1) {
return this.message.error($t('_sel2'))
}
const { oneIndex, twoIndex } = getClassById(this.twoSelect)
for (const item of moveItems) {
const id = item.id
const has = this.navs()[oneIndex].nav[twoIndex].nav.some(
(item) => item.id === id,
)
if (has) {
this.message.error($t('_sameExists'))
return
}
if (this.isCopy) {
tempId -= 1
if (this.isSame) {
item.rId = tempId
} else {
item.id = tempId
delete item.rId
}
} else {
await deleteByIds([item.rId || id], !!item.rId)
}
this.navs.update((prev) => {
prev[oneIndex].nav[twoIndex].nav.unshift(item)
return prev
})
this.message.success(`"${item.title}" ${$t('_moveSuccess')}`)
}
} else if (this.level === 4) {
if (this.threeSelect == -1) {
return this.message.error($t('_sel3'))
}
const { oneIndex, twoIndex, threeIndex } = getClassById(
this.threeSelect,
)
for (const item of moveItems) {
const id = item.id
const has = this.navs()[oneIndex].nav[twoIndex].nav[
threeIndex
].nav.some((item) => item.id === id)
if (has) {
this.message.error($t('_sameExists'))
return
}
if (this.isCopy) {
tempId -= 1
if (this.isSame) {
item.rId = tempId
} else {
item.id = tempId
delete item.rId
}
} else {
await deleteByIds([item.rId || id], !!item.rId)
}
this.navs.update((prev) => {
prev[oneIndex].nav[twoIndex].nav[threeIndex].nav.unshift(item)
return prev
})
this.message.success(`"${item.name}" ${$t('_moveSuccess')}`)
}
}
setNavs(this.navs())
this.handleCancel()
if (!isSelfDevelop) {
event.emit('WEB_REFRESH')
}
} catch (error: any) {
this.message.error(error.message)
}
}
}
================================================
FILE: src/components/news/drawer/index.component.html
================================================
Types
{{ $t('_bgColor') }}
Count
{{ $t('_cancel') }}
{{ $t('_submit') }}
================================================
FILE: src/components/news/drawer/index.component.scss
================================================
================================================
FILE: src/components/news/drawer/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, EventEmitter, Output } from '@angular/core'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { $t } from 'src/locale'
import { FormBuilder, FormGroup } from '@angular/forms'
import { NzDrawerModule } from 'ng-zorro-antd/drawer'
import { NzFormModule } from 'ng-zorro-antd/form'
import { NzButtonModule } from 'ng-zorro-antd/button'
import { NzInputModule } from 'ng-zorro-antd/input'
import { NzSliderModule } from 'ng-zorro-antd/slider'
import { NzColorPickerModule } from 'ng-zorro-antd/color-picker'
import { NzCheckboxModule, NzCheckboxOption } from 'ng-zorro-antd/checkbox'
import { newsTypeMap } from '../types'
import { NewsType } from 'src/types'
import { STORAGE_KEY_MAP } from 'src/constants'
@Component({
standalone: true,
imports: [
FormsModule,
ReactiveFormsModule,
NzDrawerModule,
NzFormModule,
NzButtonModule,
NzInputModule,
NzSliderModule,
NzColorPickerModule,
NzCheckboxModule,
],
selector: 'news-drawer',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class NewsDrawerComponent {
@Output() ok = new EventEmitter()
readonly $t = $t
visible = false
validateForm!: FormGroup
index = 0
options: NzCheckboxOption[] = [
{ label: newsTypeMap[NewsType.Baidu], value: NewsType.Baidu },
{ label: newsTypeMap[NewsType.Bilibili], value: NewsType.Bilibili },
{ label: newsTypeMap[NewsType.Douyin], value: NewsType.Douyin },
{ label: newsTypeMap[NewsType.Juejin], value: NewsType.Juejin },
{ label: newsTypeMap[NewsType.V2ex], value: NewsType.V2ex },
{ label: newsTypeMap[NewsType.Weibo], value: NewsType.Weibo },
{ label: newsTypeMap[NewsType.GitHub], value: NewsType.GitHub },
{ label: newsTypeMap[NewsType.Pojie52], value: NewsType.Pojie52 },
{ label: newsTypeMap[NewsType.Xiaohongshu], value: NewsType.Xiaohongshu },
{ label: newsTypeMap[NewsType.Toutiao], value: NewsType.Toutiao },
{ label: newsTypeMap[NewsType.Douban], value: NewsType.Douban },
{ label: newsTypeMap[NewsType.HackerNews], value: NewsType.HackerNews },
{ label: newsTypeMap[NewsType.Zhihu], value: NewsType.Zhihu },
{ label: newsTypeMap[NewsType.ZhihuDaily], value: NewsType.ZhihuDaily },
]
constructor(private fb: FormBuilder) {
this.validateForm = this.fb.group({
types: [[]],
count: [0],
bgColor: [''],
})
}
open(data: any, idx: number) {
this.index = idx
for (const k in data) {
this.validateForm.get(k)?.setValue(data[k])
}
this.visible = true
}
handleClose() {
this.visible = false
}
handleSubmit() {
const values = this.validateForm.value
localStorage.removeItem(STORAGE_KEY_MAP.NEWS_DATE)
this.ok.emit({
...values,
index: this.index,
})
this.handleClose()
}
}
================================================
FILE: src/components/news/index.component.html
================================================
{{ $t('_noNews') }}
{{ i + 1 }} {{ item.text }} {{ item.hot }}
================================================
FILE: src/components/news/index.component.scss
================================================
.news {
position: relative;
width: 310px;
height: var(--componentHeight) !important;
max-height: 100%;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
background: linear-gradient(100deg, #2a2d38, #535a68);
color: #fff;
padding: 10px 10px 0 10px;
font-size: 12px;
display: flex;
flex-direction: column;
.tabs {
display: flex;
column-gap: 4px;
white-space: nowrap;
overflow: hidden;
overflow-x: auto;
}
.tab {
border-radius: 4px;
padding: 2px 4px;
cursor: pointer;
transition: all 0.2s linear;
&.active {
background-color: #fff2;
}
}
.content-box {
position: relative;
flex: 1;
overflow: hidden;
overflow-y: auto;
padding: 10px 0;
color: #f1f1f1;
}
.nodata {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: #aeaeae;
}
.content {
cursor: pointer;
display: flex;
align-items: center;
&:not(:last-child) {
margin-bottom: 4px;
}
&:hover {
opacity: 0.9;
}
&:nth-child(1) .n {
color: #fff;
}
&:nth-child(2) .n {
color: rgba(255, 255, 255, 0.9);
}
&:nth-child(3) .n {
color: rgba(255, 255, 255, 0.8);
}
.mid {
flex: 1;
}
}
.n {
color: #969c9c;
}
}
================================================
FILE: src/components/news/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import {
Component,
Input,
ViewChild,
ElementRef,
ViewChildren,
QueryList,
} from '@angular/core'
import { CommonModule } from '@angular/common'
import type { IComponentItemProps } from 'src/types'
import { newsTypeMap } from './types'
import { getNews } from 'src/api'
import { JumpService } from 'src/services/jump'
import { STORAGE_KEY_MAP } from 'src/constants'
import { $t } from 'src/locale'
import { NewsType } from 'src/types'
import { scrollIntoViewLeft } from 'src/utils'
import { LoadingComponent } from 'src/components/loading/index.component'
import { component } from 'src/store'
interface INewsItem {
text: string
url: string
hot: string
type: NewsType
}
@Component({
standalone: true,
imports: [CommonModule, LoadingComponent],
selector: 'app-news',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class NewsComponent {
@ViewChild('parent') parentElement!: ElementRef
@ViewChild('content') contentRef!: ElementRef
@ViewChildren('item') items!: QueryList
@Input() data!: IComponentItemProps
readonly $t = $t
readonly newsTypeMap = newsTypeMap
readonly component = component()
activeIndex = 0
newsListMap: Record = {}
loading = false
constructor(public readonly jumpService: JumpService) {
const newsListMap = localStorage.getItem(STORAGE_KEY_MAP.NEWS)
if (newsListMap) {
try {
this.newsListMap = JSON.parse(newsListMap)
} catch {}
}
}
get newsList() {
const types = this.data['types'] as NewsType[]
return this.newsListMap[types[this.activeIndex]] || []
}
ngOnChanges() {
this.getNews()
}
onMouseEnter(index: number) {
this.activeIndex = index
this.contentRef.nativeElement.scrollTop = 0
}
scrollIntoViewTabs() {
scrollIntoViewLeft(
this.parentElement.nativeElement,
this.items.toArray()[this.activeIndex].nativeElement,
{
behavior: 'smooth',
},
)
}
private getNews() {
const types = this.data['types'] as NewsType[]
if (!types || types.length <= 0) {
localStorage.removeItem(STORAGE_KEY_MAP.NEWS)
localStorage.removeItem(STORAGE_KEY_MAP.NEWS_DATE)
return
}
const now = Date.now()
const newsDate = Number(localStorage.getItem(STORAGE_KEY_MAP.NEWS_DATE))
// 1小时更新一次
if (newsDate && now - newsDate < 3600000) {
return
}
if (this.newsList.length <= 0) {
this.loading = true
}
getNews({ ...this.data })
.then((res) => {
this.newsListMap = {
...this.newsListMap,
...res.data,
}
localStorage.setItem(
STORAGE_KEY_MAP.NEWS,
JSON.stringify(this.newsListMap),
)
localStorage.setItem(
STORAGE_KEY_MAP.NEWS_DATE,
JSON.stringify(Date.now()),
)
})
.finally(() => {
this.loading = false
})
}
trackByItem(a: any, item: INewsItem) {
return item.text
}
}
================================================
FILE: src/components/news/types.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { $t } from 'src/locale'
import { NewsType } from 'src/types'
export const newsTypeMap = {
[NewsType.Weibo]: $t('_weibo'),
[NewsType.V2ex]: 'V2EX',
[NewsType.Douyin]: $t('_douyin'),
[NewsType.Bilibili]: $t('_bilibili'),
[NewsType.Juejin]: $t('_juejin'),
[NewsType.Baidu]: $t('_baidu'),
[NewsType.GitHub]: 'GitHub',
[NewsType.Pojie52]: $t('_52'),
[NewsType.Xiaohongshu]: $t('_hongshu'),
[NewsType.Toutiao]: $t('_toutiao'),
[NewsType.Douban]: $t('_douban'),
[NewsType.HackerNews]: 'Hacker News',
[NewsType.Zhihu]: $t('_zhihu'),
[NewsType.ZhihuDaily]: $t('_zhihuDaily'),
} as const
================================================
FILE: src/components/no-data/no-data.component.html
================================================
================================================
FILE: src/components/no-data/no-data.component.scss
================================================
.no-result {
padding: 80px 0;
text-align: center;
.back {
margin-top: 30px;
}
}
================================================
FILE: src/components/no-data/no-data.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
import { Component, ChangeDetectionStrategy } from '@angular/core'
import { $t } from 'src/locale'
import { NzButtonModule } from 'ng-zorro-antd/button'
import { NzEmptyModule } from 'ng-zorro-antd/empty'
@Component({
standalone: true,
imports: [NzButtonModule, NzEmptyModule],
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-no-data',
templateUrl: './no-data.component.html',
styleUrls: ['./no-data.component.scss'],
})
export class NoDataComponent {
$t = $t
goBack = () => {
history.go(-1)
}
}
================================================
FILE: src/components/off-work/drawer/index.component.html
================================================
{{ $t('_workTitle') }}
{{ $t('_restTitle') }}
{{ $t('_workHours') }}
{{ $t('_breakTime') }}
{{ $t('_cancel') }}
{{ $t('_submit') }}
================================================
FILE: src/components/off-work/drawer/index.component.scss
================================================
================================================
FILE: src/components/off-work/drawer/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, EventEmitter, Output } from '@angular/core'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { $t } from 'src/locale'
import { FormBuilder, FormGroup } from '@angular/forms'
import { NzMessageService } from 'ng-zorro-antd/message'
import { NzDrawerModule } from 'ng-zorro-antd/drawer'
import { NzFormModule } from 'ng-zorro-antd/form'
import { NzButtonModule } from 'ng-zorro-antd/button'
import { NzInputModule } from 'ng-zorro-antd/input'
import { NzTimePickerModule } from 'ng-zorro-antd/time-picker'
@Component({
standalone: true,
imports: [
NzTimePickerModule,
FormsModule,
ReactiveFormsModule,
NzDrawerModule,
NzFormModule,
NzButtonModule,
NzInputModule,
],
selector: 'offwork-drawer',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class OffWorkDrawerComponent {
@Output() ok = new EventEmitter()
$t = $t
visible = false
validateForm!: FormGroup
index = 0
constructor(
private fb: FormBuilder,
private message: NzMessageService,
) {
this.validateForm = this.fb.group({
workTitle: [''],
restTitle: [''],
startDate: [null],
date: [null],
})
}
open(data: any, idx: number) {
this.index = idx
for (const k in data) {
this.validateForm.get(k)?.setValue(data[k])
}
this.visible = true
}
handleClose() {
this.visible = false
}
handleSubmit(): any {
const values = this.validateForm.value
const startDate = new Date(values.startDate).getTime()
const date = new Date(values.date).getTime()
if (startDate >= date) {
return this.message.error('休息时间需要比工作时间大')
}
this.ok.emit({
...values,
startDate,
date,
index: this.index,
})
this.handleClose()
}
}
================================================
FILE: src/components/off-work/index.component.html
================================================
{{ isRest ? data['restTitle'] : data['workTitle'] }}
{{ countdownStr }}
================================================
FILE: src/components/off-work/index.component.scss
================================================
.offwork {
pointer-events: none;
position: relative;
width: 170px;
height: var(--componentHeight);
max-height: 100%;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
display: flex;
align-items: center;
flex-direction: column;
font-weight: bold;
background-color: #fff;
&.rest {
.title {
font-size: 22px;
color: #666;
}
}
.title {
margin-top: 20px;
z-index: 2;
position: relative;
font-size: 14px;
color: gray;
text-align: center;
}
.img {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
}
.coutdown {
z-index: 2;
position: relative;
font-size: 24px;
color: #666;
}
}
================================================
FILE: src/components/off-work/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, Input } from '@angular/core'
import { CommonModule } from '@angular/common'
import type { IComponentItemProps } from 'src/types'
import { $t } from 'src/locale'
import { component } from 'src/store'
@Component({
standalone: true,
imports: [CommonModule],
selector: 'app-offwork',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class OffWorkComponent {
@Input() data!: IComponentItemProps
readonly component = component()
private timer: any
countdownStr = ''
isRest = false
constructor() {
document.addEventListener(
'visibilitychange',
this.visibilitychange.bind(this),
)
}
ngOnChanges() {
clearTimeout(this.timer)
this.init()
}
ngOnDestroy() {
clearTimeout(this.timer)
document.removeEventListener('visibilitychange', this.visibilitychange)
}
private visibilitychange(e: any) {
if (e.target.hidden) {
clearTimeout(this.timer)
} else {
this.init()
}
}
private init() {
if (this.data) {
const now = new Date()
const nowTime = now.getTime()
const startDate = new Date(this.data['startDate'] as number)
startDate.setFullYear(now.getFullYear())
startDate.setMonth(now.getMonth())
startDate.setDate(now.getDate())
const startTime = startDate.getTime()
const date = new Date(this.data['date'] as number)
date.setFullYear(now.getFullYear())
date.setMonth(now.getMonth())
date.setDate(now.getDate())
const dateTime = date.getTime()
const diffTime = (dateTime - nowTime) / 1000
const hours = diffTime / (60 * 60)
const decimal = Math.floor((hours % 1) * 10) / 10
const minutes = Math.floor((diffTime / 60) % 60)
const seconds = Math.floor(diffTime % 60)
const hoursDecimal = Math.floor(hours) + decimal
if (nowTime >= startTime && nowTime <= dateTime) {
if (hoursDecimal >= 1) {
this.countdownStr = $t('_hours', { num: hoursDecimal })
} else if (minutes > 0) {
this.countdownStr = $t('_minutes', { num: minutes })
} else if (seconds >= 0) {
this.countdownStr = $t('_seconds', { num: seconds })
}
} else {
this.isRest = true
return clearTimeout(this.timer)
}
this.isRest = false
}
this.timer = setTimeout(() => this.init(), 1000)
}
}
================================================
FILE: src/components/phone-class/index.component.html
================================================
================================================
FILE: src/components/phone-class/index.component.scss
================================================
.phone-nav {
display: flex;
align-items: center;
background-color: #e1e1e1;
border-radius: 50px;
padding: 4px;
overflow: hidden;
overflow-x: auto;
white-space: nowrap;
.nav-item {
padding: 4px 12px;
cursor: pointer;
border-radius: 50px;
color: #666;
&.active {
background-color: #1e80ff !important;
color: #fff !important;
}
&:hover {
background: rgba(0, 0, 0, 0.03);
}
}
}
================================================
FILE: src/components/phone-class/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import {
Component,
ViewChild,
ElementRef,
ViewChildren,
QueryList,
} from '@angular/core'
import { CommonModule } from '@angular/common'
import { CommonService } from 'src/services/common'
import type { INavTwoProp } from 'src/types'
import { scrollIntoViewLeft } from 'src/utils'
@Component({
standalone: true,
imports: [CommonModule],
selector: 'app-phone-class',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class PhoneClassComponent {
@ViewChild('parent') parentRef!: ElementRef
@ViewChildren('item') itemsRef!: QueryList
constructor(public commonService: CommonService) {}
ngAfterViewInit() {
if (!this.parentRef) {
return
}
scrollIntoViewLeft(
this.parentRef.nativeElement,
this.itemsRef.toArray()[this.commonService.twoIndex].nativeElement,
{ behavior: 'auto' },
)
}
handleClickTwo(e: any, data: INavTwoProp) {
this.commonService.handleClickClass(data.id)
scrollIntoViewLeft(this.parentRef.nativeElement, e.target)
}
}
================================================
FILE: src/components/runtime/drawer/index.component.html
================================================
{{ $t('_runtimeTitle') }}
{{ $t('_cancel') }}
{{ $t('_submit') }}
================================================
FILE: src/components/runtime/drawer/index.component.scss
================================================
================================================
FILE: src/components/runtime/drawer/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, EventEmitter, Output } from '@angular/core'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { $t } from 'src/locale'
import { FormBuilder, FormGroup } from '@angular/forms'
import { NzDrawerModule } from 'ng-zorro-antd/drawer'
import { NzFormModule } from 'ng-zorro-antd/form'
import { NzButtonModule } from 'ng-zorro-antd/button'
import { NzInputModule } from 'ng-zorro-antd/input'
@Component({
standalone: true,
imports: [
FormsModule,
ReactiveFormsModule,
NzDrawerModule,
NzFormModule,
NzButtonModule,
NzInputModule,
],
selector: 'runtime-drawer',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class RuntimeDrawerComponent {
@Output() ok = new EventEmitter()
$t = $t
visible = false
validateForm!: FormGroup
index = 0
constructor(private fb: FormBuilder) {
this.validateForm = this.fb.group({
title: [''],
})
}
open(data: any, idx: number) {
this.index = idx
for (const k in data) {
this.validateForm.get(k)?.setValue(data[k])
}
this.visible = true
}
handleClose() {
this.visible = false
}
handleSubmit() {
const values = this.validateForm.value
this.ok.emit({
...values,
index: this.index,
})
this.handleClose()
}
}
================================================
FILE: src/components/runtime/index.component.html
================================================
{{ data['title'] }}
{{ runDays }}
{{ unit }}
================================================
FILE: src/components/runtime/index.component.scss
================================================
.runtime {
pointer-events: none;
position: relative;
width: 230px;
height: var(--componentHeight);
max-height: 100%;
border-radius: 12px;
overflow: hidden;
color: #fff;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
display: flex;
justify-content: center;
padding: 30px 30px;
flex-direction: column;
background: linear-gradient(135deg, #8bc6ec 0%, #9599e2 100%);
font-weight: bold;
.title {
z-index: 2;
position: relative;
font-size: 18px;
color: #f9f6f6;
}
.days {
z-index: 2;
position: relative;
margin-top: 10px;
font-size: 48px;
line-height: 1;
color: #d67272;
}
.day {
vertical-align: text-bottom;
}
.unit {
font-size: 15px;
margin-left: 2px;
margin-bottom: 2px;
font-weight: 500;
}
.img {
position: absolute;
bottom: 30px;
right: 30px;
width: 70px;
}
}
================================================
FILE: src/components/runtime/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, Input } from '@angular/core'
import { settings } from 'src/store'
import type { IComponentItemProps } from 'src/types'
import { $t } from 'src/locale'
import { component } from 'src/store'
@Component({
standalone: true,
selector: 'app-runtime',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class RuntimeComponent {
@Input() data!: IComponentItemProps
readonly component = component()
runDays = 0
unit = ''
constructor() {
let now = Date.now() - settings().runtime
now = now < 0 ? 0 : now
const diffYear = Math.floor(now / (1000 * 60 * 60 * 24 * 365))
if (diffYear > 0) {
this.runDays = diffYear
this.unit = $t('_year')
} else {
this.runDays = Math.floor(now / (1000 * 60 * 60 * 24))
this.unit = $t('_day')
}
}
}
================================================
FILE: src/components/search/index.component.html
================================================
0"
>
================================================
FILE: src/components/search/index.component.scss
================================================
.search-engine {
position: relative;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
padding: 10px 0;
.input-wrapper {
position: relative;
width: 650px;
max-width: 95%;
background: #fff;
border-radius: 5px;
overflow: hidden;
input {
padding-left: 10px;
padding-right: 10px;
&:-webkit-autofill-selected {
background-color: transparent !important;
box-shadow: inset 0 0 0 500px transparent !important;
}
}
.left-icon {
position: relative;
width: 20px;
height: 20px;
background-repeat: no-repeat;
background-size: 20px 20px;
cursor: pointer;
}
.search-icon {
cursor: pointer;
}
}
::ng-deep .removeAddon .ant-input-group-addon {
display: none !important;
}
}
::ng-deep.engine-main {
border-radius: 5px;
display: flex;
flex-wrap: wrap;
gap: 10px;
max-width: 631px;
.item {
width: 200px;
padding: 6px;
display: flex;
background: #f6f6f6;
cursor: pointer;
border-radius: 4px;
transition: 0.1s linear;
box-sizing: border-box;
border: 1px solid transparent;
&:hover {
background-color: #eee;
}
.name2 {
margin-left: 10px;
font-size: 15px;
align-self: center;
}
}
}
================================================
FILE: src/components/search/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
import { Component, Input, ViewChild, ElementRef } from '@angular/core'
import { CommonModule } from '@angular/common'
import { FormsModule } from '@angular/forms'
import {
getDefaultSearchEngine,
setDefaultSearchEngine,
queryString,
isDark,
isMobile,
} from 'src/utils'
import { Router, ActivatedRoute } from '@angular/router'
import { search } from 'src/store'
import type { ISearchItemProps } from 'src/types'
import { SearchType } from './types'
import { $t } from 'src/locale'
import { NzInputModule } from 'ng-zorro-antd/input'
import { NzPopoverModule } from 'ng-zorro-antd/popover'
import { NzSelectModule } from 'ng-zorro-antd/select'
import { LogoComponent } from 'src/components/logo/logo.component'
import { isLogin } from 'src/utils/user'
import event from 'src/utils/mitt'
@Component({
standalone: true,
imports: [
FormsModule,
CommonModule,
NzInputModule,
NzPopoverModule,
LogoComponent,
NzSelectModule,
],
selector: 'app-search',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class SearchComponent {
@ViewChild('input', { static: false }) input!: ElementRef
@Input() size: 'small' | 'default' | 'large' = 'large'
@Input() showLogo = true
readonly $t = $t
readonly isLogin = isLogin
readonly SearchType = SearchType
readonly searchEngineList: ISearchItemProps[] = search().list.filter(
(item) => !item.blocked,
)
readonly search = search()
readonly isMobile = isMobile()
isDark = isDark()
currentEngine: ISearchItemProps = getDefaultSearchEngine()
searchTypeValue = Number(queryString()['type']) || SearchType.All
keyword = queryString().q
constructor(
private router: Router,
private activatedRoute: ActivatedRoute,
) {
event.on('SEARCH_FOCUS', () => {
if (!this.isMobile) {
this.inputFocus()
}
})
if (!this.isLogin && this.searchTypeValue === SearchType.Id) {
this.searchTypeValue = SearchType.All
}
event.on('EVENT_DARK', (isDark: unknown) => {
this.isDark = isDark as boolean
})
}
get logoImage() {
const { darkLogo, logo } = search()
return this.isDark ? darkLogo || logo : logo || darkLogo
}
private inputFocus() {
setTimeout(() => {
this.input?.nativeElement?.focus()
}, 100)
}
ngAfterViewInit() {
if (!this.isMobile) {
this.inputFocus()
}
}
onSelectChange() {
this.inputFocus()
}
clickEngineItem(index: number) {
document.body.click()
this.currentEngine = this.searchEngineList[index]
this.inputFocus()
setDefaultSearchEngine(this.currentEngine)
}
triggerSearch() {
if (this.currentEngine.url) {
if (this.currentEngine.url.includes('${q}')) {
window.open(this.currentEngine.url.replaceAll('${q}', this.keyword))
} else {
window.open(this.currentEngine.url + this.keyword)
}
return
}
const { id, ...params } = queryString()
this.router.navigate([], {
relativeTo: this.activatedRoute,
queryParams: {
...params,
q: this.keyword,
type: this.searchTypeValue,
_: Date.now(),
},
})
if (this.isMobile) {
this.input?.nativeElement?.blur()
}
}
onKey(event: KeyboardEvent) {
if (event.code === 'Enter') {
this.triggerSearch()
}
}
}
================================================
FILE: src/components/search/types.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
export enum SearchType {
All = 1,
Title,
Desc,
Url,
Current,
Quick,
Id,
Tag,
Class,
}
================================================
FILE: src/components/side-images/image/index.component.html
================================================
================================================
FILE: src/components/side-images/image/index.component.scss
================================================
.adsimg {
display: block;
width: 100%;
border-radius: 4px;
}
================================================
FILE: src/components/side-images/image/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, Input, ViewChild, ElementRef } from '@angular/core'
import { CommonModule } from '@angular/common'
import type { ImageProps } from 'src/types'
import { parseHtmlWithContent, parseLoadingWithContent } from 'src/utils/utils'
import { SafeHtmlPipe } from 'src/pipe/safeHtml.pipe'
import { CODE_SYMBOL } from 'src/constants/symbol'
@Component({
standalone: true,
imports: [CommonModule, SafeHtmlPipe],
selector: 'app-side-image',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class SideImageComponent {
@Input() data: ImageProps = {} as ImageProps
@ViewChild('root', { static: false }) root!: ElementRef
isCode = false
html = ''
constructor() {}
ngOnInit() {
this.isCode = this.data.url[0] === CODE_SYMBOL
if (this.isCode) {
this.html = parseLoadingWithContent(this.data.url)
}
}
ngAfterViewInit() {
this.parseDescription()
}
private parseDescription() {
if (this.isCode) {
parseHtmlWithContent(this.root?.nativeElement, this.data.url)
}
}
}
================================================
FILE: src/components/side-images/index.component.html
================================================
================================================
FILE: src/components/side-images/index.component.scss
================================================
.sideimg {
max-width: 100%;
width: 230px;
max-height: calc(100vh - 50px);
overflow: hidden;
overflow-y: auto;
.adsimg {
display: block;
width: 100%;
border-radius: 4px;
}
.aditem {
position: relative;
margin-bottom: 20px;
border-radius: 4px;
overflow: hidden;
}
}
================================================
FILE: src/components/side-images/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, Input } from '@angular/core'
import { CommonModule } from '@angular/common'
import type { ImageProps } from 'src/types'
import { JumpService } from 'src/services/jump'
import { SideImageComponent } from './image/index.component'
@Component({
standalone: true,
imports: [CommonModule, SideImageComponent],
selector: 'app-side-images',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class SideImagesComponent {
@Input() data: ImageProps[] = []
constructor(public jumpService: JumpService) {}
}
================================================
FILE: src/components/sidebar/index.component.html
================================================
{{
commonService.settings().sideTitle || commonService.title()
}}
================================================
FILE: src/components/sidebar/index.component.scss
================================================
@media (max-width: 768px) {
.sider-compnent {
position: fixed !important;
top: 0 !important;
left: 0 !important;
transform: translateX(-100%);
width: 220px !important;
max-width: 220px !important;
}
}
:host {
position: sticky;
top: 0;
left: 0;
height: 100dvh;
z-index: 32;
}
.sider-compnent {
height: 100dvh;
background-color: #fff;
width: 200px;
display: block;
&.showSidebar {
transform: translateX(0);
}
.mask {
z-index: -1;
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
backdrop-filter: blur(3px);
}
::ng-deep {
.ant-layout-sider-children {
display: flex;
flex-direction: column;
}
.ant-menu.ant-menu-inline-collapsed {
& > .ant-menu-submenu {
> .ant-menu-submenu-title {
padding: 0 !important;
text-align: center;
}
}
.sideicon {
margin-right: 0;
}
}
}
.collapse-wrapper {
position: absolute;
right: 0;
top: 0;
padding: 0 15px;
.collapseIcon {
display: block;
transform: rotate(-270deg);
&.active {
transform: rotate(-360deg);
}
}
}
.ant-menu-item {
padding-right: 40px;
padding-left: 38px !important;
}
.mobile-collapse {
position: absolute;
top: 50px;
right: -40px;
width: 40px;
height: 40px;
box-shadow: 2px 0 8px #00000026;
background-color: #fff;
border-radius: 0 4px 4px 0;
justify-content: center;
align-items: center;
cursor: pointer;
}
.menu-title {
max-width: 130px;
}
.logo {
z-index: 11;
width: 100%;
background-color: #fff;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
cursor: pointer;
user-select: none;
text-align: center;
line-height: 70px;
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
img {
max-height: 50px;
}
.logo-img {
width: 50px;
height: 50px;
pointer-events: none;
}
.web-title {
font-weight: bold;
font-size: 20px;
margin-left: 8px;
vertical-align: middle;
}
}
.sider {
height: 100%;
overflow: hidden;
overflow-y: auto;
flex: 1;
padding-bottom: 30px;
}
}
::ng-deep {
.ant-menu-title-content {
display: inline-flex;
align-items: center;
}
}
================================================
FILE: src/components/sidebar/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, Input } from '@angular/core'
import type { INavProps, INavTwoProp } from 'src/types'
import { CommonModule } from '@angular/common'
import { NzMenuModule } from 'ng-zorro-antd/menu'
import { CommonService } from 'src/services/common'
import { navs } from 'src/store'
import { settings } from 'src/store'
import { STORAGE_KEY_MAP } from 'src/constants'
import { isMobile, isDark } from 'src/utils'
import { NzIconModule } from 'ng-zorro-antd/icon'
import { LogoComponent } from 'src/components/logo/logo.component'
import { NzLayoutModule } from 'ng-zorro-antd/layout'
import event from 'src/utils/mitt'
function getDefaultCollapsed(): boolean {
if (isMobile()) {
return false
}
const localCollapsed = localStorage.getItem(STORAGE_KEY_MAP.SIDE_COLLAPSED)
if (localCollapsed) {
return localCollapsed === 'true'
}
return settings().sideCollapsed
}
@Component({
standalone: true,
imports: [
CommonModule,
NzIconModule,
LogoComponent,
NzMenuModule,
NzLayoutModule,
],
selector: 'app-sidebar',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
providers: [],
})
export class SidebarComponent {
@Input() showTop: boolean = true
navs: INavProps[] = navs()
isDark = isDark()
isCollapsed = getDefaultCollapsed()
openSidebar = false
menuOpenId = 0
constructor(public commonService: CommonService) {
this.menuOpenId = this.navs[commonService.oneIndex]?.id || 0
event.on('EVENT_DARK', (isDark: unknown) => {
this.isDark = isDark as boolean
})
}
get logoImage() {
return this.isDark
? this.commonService.settings().darkLogo ||
this.commonService.settings().logo
: this.commonService.settings().logo ||
this.commonService.settings().darkLogo
}
openMenu(item: INavProps) {
this.menuOpenId = item.id
}
toggleSidebar(openSidebar?: boolean) {
this.openSidebar = openSidebar ?? !this.openSidebar
if (this.openSidebar) {
document.body.classList.add('overflow-hidden')
} else {
document.body.classList.remove('overflow-hidden')
}
}
handleCollapsed() {
this.isCollapsed = !this.isCollapsed
localStorage.setItem(
STORAGE_KEY_MAP.SIDE_COLLAPSED,
String(this.isCollapsed),
)
setTimeout(() => {
event.emit('COMPONENT_CHECK_OVER')
}, 300)
}
onClickNav(item: INavTwoProp) {
this.commonService.handleClickClass(item.id)
this.toggleSidebar(false)
}
}
================================================
FILE: src/components/swiper/index.component.html
================================================
================================================
FILE: src/components/swiper/index.component.scss
================================================
.swiper {
user-select: none;
overflow: hidden;
::ng-deep {
.slick-slide,
.slick-track,
.slick-list {
height: auto !important;
}
}
}
================================================
FILE: src/components/swiper/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, Input } from '@angular/core'
import { CommonModule } from '@angular/common'
import { JumpService } from 'src/services/jump'
import { NzCarouselModule } from 'ng-zorro-antd/carousel'
import type { ImageProps } from 'src/types'
import { SwiperItemComponent } from './swiper-item/index.component'
@Component({
standalone: true,
imports: [NzCarouselModule, CommonModule, SwiperItemComponent],
selector: 'app-swiper',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class SwiperComponent {
@Input() images?: ImageProps[] = []
@Input() fit?: string = 'cover'
@Input() autoplay = true
@Input() height = 300
autoPlay: boolean = false
constructor(public jumpService: JumpService) {}
ngAfterViewInit(): void {
setTimeout(() => {
if (this.autoplay) {
this.autoPlay = true
document.addEventListener(
'visibilitychange',
this.handleVisibilityChange.bind(this),
)
}
}, 0)
}
ngOnDestroy(): void {
document.removeEventListener(
'visibilitychange',
this.handleVisibilityChange,
)
}
handleVisibilityChange(): void {
if (document.visibilityState === 'hidden') {
this.autoPlay = false
} else {
this.autoPlay = true
}
}
}
================================================
FILE: src/components/swiper/swiper-item/index.component.html
================================================
================================================
FILE: src/components/swiper/swiper-item/index.component.scss
================================================
.bgimg {
width: 100%;
}
================================================
FILE: src/components/swiper/swiper-item/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, Input, ViewChild, ElementRef } from '@angular/core'
import { CommonModule } from '@angular/common'
import type { ImageProps } from 'src/types'
import { parseHtmlWithContent, parseLoadingWithContent } from 'src/utils/utils'
import { SafeHtmlPipe } from 'src/pipe/safeHtml.pipe'
import { CODE_SYMBOL } from 'src/constants/symbol'
@Component({
standalone: true,
imports: [CommonModule, SafeHtmlPipe],
selector: 'app-swiper-item',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class SwiperItemComponent {
@Input() data: ImageProps = {} as ImageProps
@Input() height!: number
@Input() fit?: string = 'cover'
@ViewChild('root', { static: false }) root!: ElementRef
isCode = false
html = ''
constructor() {}
ngOnInit() {
this.isCode = this.data.url[0] === CODE_SYMBOL
if (this.isCode) {
this.html = parseLoadingWithContent(this.data.url)
}
}
ngAfterViewInit() {
this.parseDescription()
}
private parseDescription() {
if (this.isCode) {
parseHtmlWithContent(this.root?.nativeElement, this.data.url)
}
}
}
================================================
FILE: src/components/tag-list/index.component.html
================================================
{{ tagMap[item.id] && tagMap[item.id].name }}
================================================
FILE: src/components/tag-list/index.component.scss
================================================
.tagbox {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.tag-item {
padding: 0 6px;
border-radius: 2px;
font-size: 12px;
display: flex;
align-items: center;
transition: all 0.1s linear;
color: #fff;
min-height: 15px;
&:hover {
opacity: 0.8;
}
}
.tag-action {
display: none;
}
================================================
FILE: src/components/tag-list/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, Input, EventEmitter, Output } from '@angular/core'
import { CommonModule } from '@angular/common'
import type { IWebTag } from 'src/types'
import { tagMap, settings } from 'src/store'
import { JumpService } from 'src/services/jump'
import { isLogin, getPermissions } from 'src/utils/user'
import { NzIconModule } from 'ng-zorro-antd/icon'
import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm'
import { $t } from 'src/locale'
@Component({
standalone: true,
imports: [CommonModule, NzIconModule, NzPopconfirmModule],
selector: 'tag-list',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class TagListComponent {
@Input() data?: IWebTag[] | undefined = []
@Input() action: boolean = false
@Output() onDelete = new EventEmitter()
@Output() onMove = new EventEmitter()
@Output() onEdit = new EventEmitter()
readonly $t = $t
readonly isLogin = isLogin
readonly tagMap = tagMap()
readonly permissions = getPermissions(settings())
constructor(public jumpService: JumpService) {}
private handleClick(e: any) {
e.stopPropagation()
e.preventDefault()
}
openEditWebMoal(e: any) {
this.handleClick(e)
this.onEdit.emit()
}
confirmDel(e: any) {
this.handleClick(e)
this.onDelete.emit()
}
openMoveWebModal(e: any) {
this.handleClick(e)
this.onMove.emit()
}
}
================================================
FILE: src/components/toolbar-title/index.component.html
================================================
================================================
FILE: src/components/toolbar-title/index.component.scss
================================================
.title {
position: relative;
font-size: 16px;
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
padding: 10px 0;
padding-left: 5px;
color: #3f51b5;
font-weight: 500;
display: flex;
justify-content: space-between;
margin-bottom: 15px;
user-select: none;
margin-top: 10px;
.edit-icon {
display: none;
vertical-align: middle;
margin: 0 5px;
}
&:hover {
.edit-icon {
display: inline-block;
}
}
.add-icon {
position: relative;
z-index: 6;
cursor: pointer;
color: #666;
right: 10px;
}
}
================================================
FILE: src/components/toolbar-title/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, Input, Output, EventEmitter } from '@angular/core'
import { CommonModule } from '@angular/common'
import type { INavThreeProp, INavProps } from 'src/types'
import { isLogin, getPermissions } from 'src/utils/user'
import { navs, settings } from 'src/store'
import { NzIconModule } from 'ng-zorro-antd/icon'
import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm'
import { $t } from 'src/locale'
import { isSelfDevelop } from 'src/utils/utils'
import { CommonService } from 'src/services/common'
import event from 'src/utils/mitt'
@Component({
standalone: true,
imports: [CommonModule, NzIconModule, NzPopconfirmModule],
selector: 'app-toolbar-title',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class ToolbarTitleWebComponent {
@Input() dataSource!: INavThreeProp
@Output() onCollapse = new EventEmitter()
readonly $t = $t
readonly isLogin = isLogin
readonly navs: INavProps[] = navs()
readonly permissions = getPermissions(settings())
constructor(public commonService: CommonService) {}
openCreateWebModal() {
event.emit('CREATE_WEB', {
parentId: this.dataSource.id,
})
}
openMoveModal(e: Event, data: INavThreeProp) {
this.stopPropagation(e)
event.emit('MOVE_WEB', {
id: data.id,
data: [data],
level: 3,
})
}
async handleDelete(e: Event, id: number) {
this.stopPropagation(e)
event.emit('DELETE_MODAL', {
isClass: true,
ids: [id],
data: this.dataSource,
onOk: () => {
if (!isSelfDevelop) {
event.emit('WEB_REFRESH')
}
},
})
}
stopPropagation(e: Event) {
e.stopPropagation()
e.preventDefault()
}
handleEditName(e: Event, data: INavThreeProp) {
this.stopPropagation(e)
event.emit('EDIT_CLASS_OPEN', { ...data })
}
}
================================================
FILE: src/components/upload-file/index.component.html
================================================
================================================
FILE: src/components/upload-file/index.component.scss
================================================
================================================
FILE: src/components/upload-file/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, EventEmitter, Output } from '@angular/core'
import { CommonModule } from '@angular/common'
import { $t } from 'src/locale'
import { NzMessageService } from 'ng-zorro-antd/message'
import { createFile } from 'src/api'
import { NzIconModule } from 'ng-zorro-antd/icon'
@Component({
standalone: true,
imports: [CommonModule, NzIconModule],
selector: 'app-upload-file',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class UploadFileComponent {
@Output() onChange = new EventEmitter()
readonly $t = $t
uploading: boolean = false
// @ts-ignore
id = `f${Date.now()}${parseInt(Math.random() * 1000000)}`
constructor(private message: NzMessageService) {}
onChangeFile(e: any): any {
if (this.uploading) {
return
}
const { files } = e.target
if (files.length <= 0) return
const file = files[0]
this.onUpload(file).finally(() => {
e.target.value = ''
})
}
onUpload(file: File) {
const that = this
return new Promise((resolve, reject) => {
const fileReader = new FileReader()
fileReader.readAsDataURL(file)
fileReader.onerror = reject
fileReader.onload = function () {
that.uploading = true
const iconUrl = this.result as string
const url = iconUrl.split(',')[1]
const path = file.name
createFile({
message: `create ${path}`,
content: url,
path,
})
.then((res) => {
const params = {
cdn: res?.data.filePath,
}
window.open(params.cdn)
that.onChange.emit(params)
that.message.success($t('_uploadSuccess'))
resolve(params)
})
.catch(reject)
.finally(() => {
that.uploading = false
})
}
})
}
}
================================================
FILE: src/components/upload-image/index.component.html
================================================
================================================
FILE: src/components/upload-image/index.component.scss
================================================
================================================
FILE: src/components/upload-image/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, EventEmitter, Output, Input } from '@angular/core'
import { CommonModule } from '@angular/common'
import { $t } from 'src/locale'
import { NzMessageService } from 'ng-zorro-antd/message'
import { createImageFile, getCDN, getImageRepo } from 'src/api'
import { NzIconModule } from 'ng-zorro-antd/icon'
import { isSelfDevelop } from 'src/utils/utils'
@Component({
standalone: true,
imports: [CommonModule, NzIconModule],
selector: 'app-upload-image',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class UploadImageComponent {
@Input() accept = 'image/*'
@Output() onChange = new EventEmitter()
readonly $t = $t
uploading: boolean = false
// @ts-ignore
id = `f${Date.now()}${parseInt(Math.random() * 1000000)}`
constructor(private message: NzMessageService) {}
onChangeFile(e: any): any {
if (this.uploading) {
return
}
const { files } = e.target
if (files.length <= 0) return
const file = files[0]
if (!file.type.startsWith('image')) {
return this.message.error($t('_notUpload'))
}
this.onUpload(file).finally(() => {
e.target.value = ''
})
}
onUpload(file: File) {
const that = this
return new Promise((resolve, reject) => {
const fileReader = new FileReader()
fileReader.readAsDataURL(file)
fileReader.onerror = reject
fileReader.onload = function () {
that.uploading = true
const iconUrl = this.result as string
const url = iconUrl.split(',')[1]
const mime = `.${file.name.split('.').at(-1) || 'png'}`
const path = `${Date.now()}${mime}`
createImageFile({
branch: getImageRepo().branch,
message: 'create image',
content: url,
isEncode: false,
path,
})
.then((res) => {
const params = {
cdn: isSelfDevelop ? res?.data?.fullImagePath : getCDN(path),
}
that.onChange.emit(params)
that.message.success($t('_uploadSuccess'))
resolve(params)
})
.catch(reject)
.finally(() => {
that.uploading = false
})
}
})
}
}
================================================
FILE: src/components/web-list/index.component.html
================================================
================================================
FILE: src/components/web-list/index.component.scss
================================================
@media (max-width: 768px) {
.web-list {
&.overflowScroll .wrapper {
padding: 0;
flex-wrap: nowrap;
overflow: hidden;
overflow-x: auto;
}
}
}
.web-list {
margin-top: 15px;
margin-bottom: 15px;
display: flex;
padding: 0 10px;
flex-wrap: wrap;
.wrapper {
display: flex;
flex-wrap: wrap;
}
}
================================================
FILE: src/components/web-list/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, Input } from '@angular/core'
import { CommonModule } from '@angular/common'
import { navs } from 'src/store'
import type { IWebProps } from 'src/types'
import { TopType } from 'src/types'
import { queryString, fuzzySearch, isMobile, getDefaultTheme } from 'src/utils'
import { isNumber } from 'src/utils/pureUtils'
import { isLogin } from 'src/utils/user'
import { ActivatedRoute, Router } from '@angular/router'
import { CommonService } from 'src/services/common'
import { JumpService } from 'src/services/jump'
import { NzToolTipModule } from 'ng-zorro-antd/tooltip'
import { DEFAULT_SORT_INDEX } from 'src/constants/symbol'
import { CardComponent } from 'src/components/card/index.component'
import event from 'src/utils/mitt'
let DEFAULT_WEBSITE: Array = []
@Component({
standalone: true,
imports: [CommonModule, NzToolTipModule, CardComponent],
selector: 'app-web-list',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class WebListComponent {
@Input() type: 'dock' | '' = ''
@Input() dockCount = 4
@Input() iconSize = 70
@Input() max: number = 110
@Input() search = true
@Input() overflow = false
dataList: IWebProps[] = []
constructor(
private router: Router,
public jumpService: JumpService,
private activatedRoute: ActivatedRoute,
public commonService: CommonService,
) {}
ngOnInit() {
const init = () => {
this.getTopWeb()
this.activatedRoute.queryParams.subscribe(() => {
const { q } = queryString()
if (this.search && q.trim()) {
const result = fuzzySearch(navs(), q)
if (result.length === 0) {
this.dataList = []
} else {
this.dataList = result[0].nav.slice(0, this.max)
}
} else {
this.dataList = DEFAULT_WEBSITE
}
})
}
if (window.__FINISHED__) {
init()
} else {
event.on('WEB_FINISH', () => {
init()
})
}
}
// 获取置顶WEB
getTopWeb() {
let path = this.router.url.split('?')[0].replace('/', '')
if (!path) {
path = getDefaultTheme()
}
path = path[0].toUpperCase() + path.slice(1)
const dataList: IWebProps[] = []
const max = this.max
let dockList: IWebProps[] = []
function r(nav: any) {
if (!Array.isArray(nav)) return
for (let i = 0; i < nav.length; i++) {
if (dataList.length > max) {
break
}
const item = nav[i]
if (item.url) {
if (item.top && (isLogin || !item.ownVisible)) {
const isMatch = (item.topTypes || []).some(
(v: number) => path === TopType[v],
)
if (isMatch) {
dataList.push(item)
}
}
} else {
r(item.nav)
}
}
}
r(navs())
// @ts-ignore
this.dataList = dataList.sort((a: any, b: any) => {
const aIdx = isNumber(a.index) ? Number(a.index) : DEFAULT_SORT_INDEX
const bIdx = isNumber(b.index) ? Number(b.index) : DEFAULT_SORT_INDEX
return aIdx - bIdx
})
if (this.type === 'dock') {
const dockCount = isMobile() ? 5 : this.dockCount
dockList = this.dataList.slice(0, dockCount)
event.emit('DOCK_LIST', dockList)
this.dataList = this.dataList.slice(dockCount)
}
DEFAULT_WEBSITE = this.dataList
}
}
================================================
FILE: src/components/web-more-menu/index.component.html
================================================
================================================
FILE: src/components/web-more-menu/index.component.scss
================================================
.over-item {
cursor: pointer;
margin: 0;
padding: 7px 16px;
text-align: center;
&.moreActive {
font-weight: bold !important;
color: #08c;
}
}
.more-btn {
z-index: 11; // 比Github多1
position: relative;
cursor: pointer;
}
================================================
FILE: src/components/web-more-menu/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, Input, Output, EventEmitter } from '@angular/core'
import { CommonModule } from '@angular/common'
import type { INavProps } from 'src/types'
import { NzDropDownModule } from 'ng-zorro-antd/dropdown'
@Component({
standalone: true,
imports: [CommonModule, NzDropDownModule],
selector: 'app-web-more-menu',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export class WebMoreMenuComponent {
@Input() index = 0
@Input() data: INavProps[] = []
@Input() page = 0
@Output() onClick = new EventEmitter()
ngOnInit() {}
handleCilck(id: number) {
this.onClick?.emit?.(id)
}
}
================================================
FILE: src/constants/index.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import navConfig from '../../nav.config.json'
export const DB_PATH = 'data/db.json'
export const TAG_PATH = 'data/tag.json'
export const SETTING_PATH = 'data/settings.json'
export const SEARCH_PATH = 'data/search.json'
export const COMPONENT_PATH = 'data/component.json'
export const VERSION = navConfig.version
export const STORAGE_KEY_MAP = {
TOKEN: 'token',
LOCATION: 'location',
DATE_TIME: 's_url',
IS_DARK: 'isDark',
WEBSITE: 'WEBSITE_DB',
SEARCH_ENGINE: 'engine',
LANGUAGE: 'language',
AUTH_CODE: 'AUTH_CODE',
SIDE_COLLAPSED: 'SIDE_COLLAPSED',
FIXBAR_OPEN: 'FIXBAR_OPEN',
SYSTEM_COLLAPSED: 'SYSTEM_COLLAPSED',
NEWS: 'NEWS',
NEWS_DATE: 'NEWS_DATE',
COMPONENT_COLLAPSED: 'COMPONENT_COLLAPSED',
IMAGE_TOKEN: 'IMAGE_TOKEN',
}
================================================
FILE: src/constants/symbol.ts
================================================
export const CODE_SYMBOL = '!'
export const SELF_SYMBOL = '^'
export const ROUTER_SYMBOL = '@'
export const DEFAULT_SORT_INDEX = 100000
================================================
FILE: src/environments/environment.prod.ts
================================================
export const environment = {
production: true,
}
================================================
FILE: src/environments/environment.ts
================================================
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
export const environment = {
production: false,
}
/*
* For easier debugging in development mode, you can import the following file
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
*
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
================================================
FILE: src/locale/english.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { isSelfDevelop } from 'src/utils/utils'
const english: Record = {
_loading: 'Loading...',
_uncategorized: 'Unclassified',
_modifySuccess: 'Modification succeeded!',
_copySuccess: 'Copy succeeded!',
_copyUrl: 'Copy Link',
_shareWeb: 'Share site',
_edit: 'Edit',
_sort: 'Sort',
_refresh: 'Refresh',
_add: 'Add',
_del: 'Delete',
_apply: 'Apply',
_batchDel: 'Delete',
_confirmDel: 'Are you sure you want to delete?',
_default: 'Default',
_title: 'Title',
_defaultTitle: 'Default website title',
_desc: 'Description',
_link: 'Link',
_current: 'Current',
_empty: `Sorry, we didn't find the result you want~`,
_goBack: 'Go Back',
_viewInfo: 'View Info',
_syncData: 'Sync Data',
_addData: 'Add Data',
_collapse: 'Open',
_put: 'Fold',
_closeDark: 'Close Dark',
_openDark: 'Open Dark',
_switchTo: 'Switch To',
_infoTip: 'Only you can view the following information, please rest assured!',
_know: 'Know',
_devBranch: 'Deploy branch',
_curVer: 'Current Version',
_newVer: 'Latest Version',
_prevDevTime: 'Last build time',
_unknow: 'Unknow',
_repeatOper: 'Please do not operate frequently',
_syncDataOut: isSelfDevelop
? 'Are you sure to save'
: 'Synchronize data to remote',
_confirmSync: 'OK',
_confirmSyncTip: isSelfDevelop
? ''
: 'Are you sure to synchronize all data to the remote end?',
_syncSuccessTip: isSelfDevelop
? 'OK'
: 'Synchronization successful, currently building...',
_error: 'Error',
_syncFailTip: 'Synchronization failed, please try again',
_inputToken: 'Please enter token',
_inputTokenMsg: isSelfDevelop
? 'Please input a password'
: 'Please enter your token below for login verification',
_getToken: `I don't know how to get the token?`,
_readDoc: 'Please read our guide first',
_authLogin: 'Please authorize login',
_pleaseInputToken: 'Please fill in the correct token',
_tokenVerSuc: 'Authorization succeeded!',
_tokenVerFail: 'Token validation failed',
_repeatAdd: 'Please do not add repeatedly',
_addSuccess: 'Successfully added!',
_delSuccess: 'Delete succeeded!',
_saveSuccess: 'Saved successfully!',
_errorBookTip: 'Error: bookmark resolution failed',
_importSuccess: 'Import succeeded!',
_acceptPng: 'Only PNG format is supported',
_updateLogoSuccess:
'The replacement was successful. It needs to be updated the next day due to CDN cache problems',
_updateLogoFail: 'Failed to replace logo, please try again!',
_resetInitData: 'Undo all actions',
_confirmReset: 'OK reset',
_warnReset: 'All current operations will revert to the last build state',
_resetSuccess: 'The data has been reset back to its initial state',
_sel3: 'Please select Level 3 category',
_sel2: 'Please select Level 2 category',
_sel1: 'Please select Level 1 category',
_reserveOne: 'At least one item is reserved. Please add it first!',
_icon: 'ICON',
_backHome: 'GO Home',
_syncRemote: 'Sync to remote',
_uploading: 'Uploading...',
_addTag: 'Add category',
_addWeb: 'Add site',
_clickEdit: 'Click Edit',
_allContentMsg1:
'1. After setting all data, click "synchronize to remote end" and drag the table to sort',
_allContentMsg2: '2. Website category needs to be maintained manually,',
_updateLogo: 'Replace logo',
_tagName: 'Category name',
_onlyOwnVisible: 'Only Self',
_createAt: 'Create At',
_action: 'Action',
_delWarn:
'This will delete all data under the category. Are you sure you want to delete it?',
_mgr1: 'Management level 1 category',
_mgr2: 'Management level 2 category',
_mgr3: 'Management level 3 category',
_mgrWeb: 'Management website',
_webName: 'Name',
_webTag: 'Website category',
_webDesc: 'Description',
_webLink: 'Link',
_requiredName: 'Please enter a name',
_requiredLink: 'Please enter the website link',
_uploadSuccess: 'Uploaded successfully',
_uploadFail: 'Upload failed, please try again!',
_notUpload: 'Please do not upload illegal pictures',
_shortcut: 'Shortcut',
_score: 'Score',
_iconAddr: 'Icon Link',
_copyUpload: 'Support to paste screenshots or copy pictures here to upload',
_upload: 'Upload',
_continueAdd: 'Continue adding associated links or tags',
_moveTo: 'Move to',
_move: 'Move',
_copy: 'Copy',
_moveSuccess: 'Moved successfully',
_save: 'Save',
_color: 'Color',
_remark: 'Description/Remark',
_about: 'About',
_webInfo: 'Web info',
_systemSet: 'Settings',
_searchEngines: 'Search',
_userCollect: 'Collect',
_bookmarkImport: 'Book Import',
_bookmarkExport: 'Book Export',
_vipAuth: 'Bind domain',
_tagSettings: 'Tag',
_websiteMang: 'Website',
_addRow: 'Add',
_engineName: 'Engine name',
_status: 'Status',
_isDisable: 'Disable',
_webLogo: 'LOGO',
_defLanguage: 'Default Language',
_pageLoad: 'Page Loading',
_random: 'Random',
_noSet: 'No set',
_showGithub: 'Show Github',
_defTheme: 'Default Theme',
_appTheme: 'App Theme',
_keywords: 'Keywords',
_footHtml: 'Foot HTML',
_headHtml: 'Head HTML',
_showWeather: 'Show weather',
_weatherTip: 'Currently only the "Shortcut" theme is supported',
_theme: 'Theme',
_backgroundImage: 'Picture',
_engineUrl: 'Engine URL',
_actionSuccess: 'Succeeded',
_jumpAddr: 'Jump address',
_backup: 'Backup',
_bannerHeight: 'Banner height',
_autoPlay: 'Auto play',
_importBackup: 'Import backup',
_importBackupTip:
'After importing, all current data will be cleared and imported',
_showLanguage: 'Display switch language',
_showRate: 'Show rate',
_showCopy: 'Display Card Copy',
_showShare: 'Show card sharing',
_angleMark: 'Angle Mark',
_logout: 'Logout Account',
_cardStyle: 'Card style',
_tagPlaceholder: 'Can be empty as a regular label',
_dragSort: 'Drag to sort',
_checkWeb:
'Last time, {count} website links were detected to be invalid. Please refer to the management website for details. If you need to check the status again, simply click Save to trigger the event.',
_enableSEO: 'Enable SEO (loading slightly slower)',
_allowUser: 'Allow users to submit',
_collectMenuView: `Please refer to the user's inclusion menu for specific details`,
_displaySwitchTheme: 'Display Switch Theme',
_requestAddress: 'Request Address',
_requestTip:
'when the save button is clicked, a GET request is sent to fill in the address',
_followPage: 'Follow Page',
_bannerTip:
'When the height is 0, the width and height of the image will be adaptive, and it is important to ensure that each image has the same size',
_checkStatus:
'Check website link status(For any of the above updates, it is recommended to enable this, as it takes the same amount of time.)',
_standard: 'Standard',
_column: 'Column',
_simplicity: 'Simplicity',
_original: 'Original',
_navOver: 'First level navigation beyond display',
_scrollBar: 'Scroll bar',
_ellipsis: 'Ellipsis',
_sidebarImg: 'Sidebar image',
_sidebarTitle: 'Sidebar title',
_defTitle4: 'Default website title, recommended to be within 4 words',
_inputAuthCode: 'Please enter the authorization code',
_waitHandle: 'Submitted successfully, waiting for webmaster review',
_collect: 'Get',
_confirmCollect: 'Are you sure?',
_pendingGet: 'Getting...',
_logoutAuthCode: 'Exit',
_spiderRule: 'Spider rule',
_spiderIcon: 'Spider icon',
_spiderDesc: 'Spider description',
_spiderImg: 'Spider Picture',
_notSpider: 'Not updating',
_spiderTitle: 'Spider title',
_spiderAlways: 'Always update',
_spiderEmpty: 'Update for empty time',
_spiderStatus: 'Spider Status',
_spiderTip:
'Crawling rules will be triggered every time saving, affecting the construction speed. Crawling and updating information may be necessary when necessary',
_spiderQty: 'Concurrent quantity',
_spiderQtyTip: '',
_spiderNetTip:
'Due to network factors, some websites may not be accessible and can be skipped directly. For reference only',
_spiderBuildTip:
'After the construction is completed, the data is correct. Please go to the website management and click save once, otherwise the data will not be permanently stored',
_associatedLabels: 'Labels',
_menuCollapse: 'Menu Collapse',
_retro: 'Retro',
_accessTimeout: 'Access timeout (seconds)',
_accessTimeoutTip:
'Crawl the website for a specified number of seconds with no response, skip, The larger the number, the higher the success rate, but the slower it is',
_imageCDN: 'Image CDN',
_docTitle: 'Document title',
_importEnter: `Enter in browser chrome://bookmarks/ Find the export bookmark, export the HTML file, click import below`,
_buildSuccess: 'Build succeed',
_bindDomain: `Bind domain names, multiple separated by commas, without including protocols such as "example.com,xjh22222228.github.io"`,
_clickExport: 'Click on me to export',
_exportIcons: 'Simultaneously exporting website icons takes a long time',
_errorIcons: 'The following icons cannot be processed properly:',
_processing: 'Processing',
_weeks: [
'Sunday',
'Monday',
'Tuesday',
'Wednesday',
'Thursday',
'Friday',
'Saturday',
],
_shortMonth: ' / ',
_shortDay: '',
_classNoMatch: 'Classification mismatch, using the default first category',
_openSearch: 'Enter link to allow searching',
_moveUp: 'Up',
_moveDown: 'Down',
_footTemplate: 'Template',
_footTemplateDesc:
'All bottom HTML is universal, copy the obtained template code to the desired theme or global setting, existing variable: ${total} = Number of websites; ${hostname} = Domain name; ${year} = This year; class="applyweb" = Add web',
_builtTailwind: `System is already built-in https://play.tailwindcss.com You don't need to write`,
_quick: 'Quick',
_components: 'Components',
_calendar: 'Calendar',
_submit: 'Submit',
_cancel: 'Cancel',
_topColor: 'Top background color',
_bgColor: 'Background color',
_runtime: 'Running time',
_runtimeTitle: 'Title',
_offWork: 'Off work',
_workTitle: 'Work title',
_restTitle: 'Rest title',
_image: 'Image',
_text: 'Text',
_countdown: 'Count down',
_dateColor: 'Date color',
_timeColor: 'Time color',
_date: 'Date',
_time: 'Time',
_workHours: 'Work hours',
_breakTime: 'Break time',
_holiday: 'Holiday',
_year: 'Year',
_day: 'Day',
_calendarDate: '{year}.{month}',
_dayOfYear: 'Day {day}',
_errCountTip:
"Last time, {count} website links were detected to be invalid. Please refer to the management website for details. If you need to check the status again, simply click on 'Save' to trigger the event.",
_getErrorWeb: 'Get error web',
_categoryName: 'Name',
_dayIs: 'Today is',
_rest: 'R',
_distance: 'Distance',
_collectTip: 'If a user applies for inclusion, please handle it',
_colTitle: 'Collection processing ({count})',
_type: 'Type',
_handle: 'Handle',
_headCode:
'You can insert styles, scripts, statistics, etc. here',
_hours: '{num} hr',
_minutes: '{num} min',
_seconds: '{num} s',
_same: 'Same',
_sameExists: 'Already exists',
_checkRepeat: 'Check URL',
_repeatTip: 'There may be duplicate URLs in this category"',
_tag: 'Tag',
_translate: 'Translate',
_searchRes: 'Search result',
_class: 'Classify',
_quote: 'Quote',
_poster: 'Poster',
_screenshot: 'Screenshot',
_imgPlaceholder: 'Applied to poster cards',
_urlNoRepeat: 'No duplicate links were found in this category',
_confInfo: 'Config info',
_submitNotice: 'Submit notice',
_password: 'Password',
_address: 'Address',
_apiPass: '讯飞大模型密钥',
_createWebKey: 'Press to create website',
_onlyDelItem: 'Only delete this item',
_news: 'News',
_baidu: 'Baidu',
_douyin: 'Douyin',
_bilibili: 'Bilibili',
_weibo: 'Weibo',
_juejin: 'Juejin',
_noNews: 'No news',
_52: '52Pojie',
_hongshu: 'Xiaohongshu',
_toutiao: 'Toutiao',
_douban: 'Douban',
_zhihu: 'Zhihu',
_zhihuDaily: 'Zhihu Daily',
_logoImg: 'Logo Picture',
_logoDarkImg: 'Logo Dark Picture',
_errLogo: 'The logo image cannot be accessed',
_logoMaxHeight: 'Max height',
_noPublic: 'No open',
_noUpdate: 'No updates available',
_updating: 'updating...',
_canNewVer:
'Is there a new version available? Refresh to update the application?',
_nowUpdate: 'Immediate Updating',
_later: 'Later',
_avaUpdate: 'Application updates available',
_updateFailed: 'UpdateFailed',
_carousel: 'Carousel',
_addHoliday: 'Select the festival to add',
_getHoliday: 'Get holiday',
}
export default english
================================================
FILE: src/locale/index.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
import english from './english'
import zh_CN from './zh_CN'
import { STORAGE_KEY_MAP } from 'src/constants'
import { settings } from 'src/store'
const o = {
en: english,
cn: zh_CN,
}
export function getLocale(): string {
return localStorage.getItem(STORAGE_KEY_MAP.LANGUAGE) || settings().language
}
const l = getLocale()
export function $t(s: string, map?: Record): string {
function replaceStr(s: string, map?: Record) {
if (map) {
for (const k in map) {
s = s.replaceAll(`{${k}}`, map[k])
}
}
return s
}
if (l === 'zh-CN') {
return replaceStr(o.cn[s], map)
}
return replaceStr(o.en[s] ?? o.cn[s], map)
}
export function isZhCN(): boolean {
return l === 'zh-CN'
}
export default o
================================================
FILE: src/locale/zh_CN.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { isSelfDevelop } from 'src/utils/utils'
const zhCN: Record = {
_loading: '加载中...',
_uncategorized: '未分类',
_modifySuccess: '修改成功!',
_copySuccess: '复制成功',
_copyUrl: '复制链接',
_shareWeb: '分享网站',
_edit: '编辑',
_sort: '排序',
_refresh: '刷新',
_add: '新增',
_del: '删除',
_apply: '申请收录',
_batchDel: '批量删除',
_confirmDel: '您确定要删除吗?',
_default: '综合',
_title: '标题',
_defaultTitle: '默认网站标题',
_desc: '描述',
_link: '链接',
_current: '当前',
_empty: '对不起,没有找到您想要的结果~',
_goBack: '返回上一层',
_viewInfo: '查看信息',
_syncData: '同步数据',
_addData: '新增数据',
_collapse: '展开',
_put: '折叠',
_closeDark: '关闭暗黑',
_openDark: '开启暗黑',
_switchTo: '切换到',
_infoTip: '以下信息只有您能查看,请放心!',
_know: '知道了',
_devBranch: '部署分支',
_curVer: '当前版本',
_newVer: '最新版本',
_prevDevTime: '上次构建时间',
_unknow: '未知',
_repeatOper: '请不要频繁操作',
_syncDataOut: isSelfDevelop ? '确定保存吗?' : '同步数据到远端',
_confirmSync: '确定',
_confirmSyncTip: isSelfDevelop
? ''
: '确定将所有数据同步到远端吗?(每次保存需要等待构建完成再进行下一次操作)',
_syncSuccessTip: isSelfDevelop ? '保存成功' : '同步成功, 正在构建...',
_error: '错误',
_syncFailTip: '同步失败, 请重试',
_inputToken: '请输入TOKEN',
_inputTokenMsg: isSelfDevelop
? '请输入密码'
: '请在下方输入您的TOKEN进行登录校验',
_getToken: '不知道Token如何获取?',
_readDoc: '请先阅读我们的指南',
_authLogin: '请授权登录',
_pleaseInputToken: '请填写正确的Token',
_tokenVerSuc: '授权成功!',
_tokenVerFail: 'Token 验证失败',
_repeatAdd: '请不要重复添加',
_addSuccess: '新增成功!',
_delSuccess: '删除成功!',
_saveSuccess: '保存成功!',
_errorBookTip: '错误: 书签解析失败',
_importSuccess: '导入成功!',
_acceptPng: '仅支持 PNG 格式',
_updateLogoSuccess: '更换成功, 由于CDN缓存问题需要次日更新',
_updateLogoFail: '更换LOGO失败,请重试!',
_resetInitData: '撤销本次所有操作',
_confirmReset: '确定重置',
_warnReset: '当前所有操作将还原到上次构建状态',
_resetSuccess: '数据已重置回初始状态',
_sel3: '请选择三级分类',
_sel2: '请选择二级分类',
_sel1: '请选择一级分类',
_reserveOne: '至少保留一项,请先添加!',
_icon: '图标',
_backHome: '返回主页',
_syncRemote: '同步到远端',
_uploading: '上传中...',
_addTag: '添加分类',
_addWeb: '添加网站',
_clickEdit: '点击编辑',
_allContentMsg1: '1、所有数据设置完毕后点击 “同步到远端”,拖拽表格进行排序',
_allContentMsg2: '2、网站分类需手动维护,',
_updateLogo: '更换LOGO',
_tagName: '标签名称',
_onlyOwnVisible: '自己可见',
_createAt: '创建时间',
_action: '操作',
_delWarn: '这会删除分类下的所有数据,您确定要删除吗?',
_mgr1: '管理一级分类',
_mgr2: '管理二级分类',
_mgr3: '管理三级分类',
_mgrWeb: '管理网站',
_webName: '网站名称',
_webTag: '网站分类',
_webDesc: '网站描述',
_webLink: '网站链接',
_requiredName: '请输入名称',
_requiredLink: '请输入网站链接',
_uploadSuccess: '上传成功',
_uploadFail: '上传失败,请重试!',
_notUpload: '请不要上传非法图片',
_shortcut: '快捷方式',
_score: '评分系数',
_iconAddr: '图标地址',
_copyUpload: '支持将截图或复制图片粘贴此处上传',
_upload: '上传',
_continueAdd: '继续添加关联链接或标签',
_moveTo: '移动到',
_move: '移动',
_copy: '复制',
_moveSuccess: '移动成功',
_save: '保 存',
_color: '颜色',
_remark: '描述/备注',
_about: '关于本站',
_webInfo: '网站信息',
_systemSet: '系统设置',
_searchEngines: '搜索引擎',
_userCollect: '用户收录',
_bookmarkImport: '书签导入',
_bookmarkExport: '书签导出',
_vipAuth: '绑定域名',
_tagSettings: '标签设置',
_websiteMang: '网站管理',
_addRow: '新增一条',
_engineName: '引擎名称',
_status: '状态',
_isDisable: '是否禁用',
_webLogo: '网站LOGO',
_defLanguage: '默认语言',
_pageLoad: '页面Loading',
_random: '随机',
_noSet: '不设置',
_showGithub: '显示Github',
_defTheme: '默认主题',
_appTheme: 'App主题',
_keywords: '网站关键字',
_footHtml: '底部HTML',
_headHtml: '头部HTML',
_showWeather: '显示天气',
_weatherTip: '目前只支持 "Shortcut" 主题',
_theme: '主题',
_backgroundImage: '图片',
_engineUrl: '引擎地址',
_actionSuccess: '操作成功',
_jumpAddr: '跳转地址',
_backup: '下载备份',
_bannerHeight: 'Banner高度',
_autoPlay: '自动轮播',
_importBackup: '导入备份',
_importBackupTip: '导入后会将当前所有数据清空并导入',
_showLanguage: '显示切换语言',
_showRate: '显示卡片评分',
_showCopy: '显示卡片复制',
_showShare: '显示卡片分享',
_angleMark: '角标设置',
_logout: '登出账号',
_cardStyle: '卡片风格',
_tagPlaceholder: '可以为空当作一个普通标签',
_dragSort: '拖动可排序',
_checkWeb:
'上次检测出 {count} 个网站链接失效,具体到管理网站查看,如需再次检测状态直接点保存触发事件即可。',
_enableSEO: '开启SEO(加载稍慢)',
_allowUser: '允许用户提交',
_collectMenuView: `具体到用户收录菜单查看`,
_displaySwitchTheme: '显示切换主题',
_requestAddress: '请求地址',
_requestTip: '当点击保存按钮时会发出GET请求填写的地址',
_followPage: '跟随页面',
_bannerTip: '当高度为0时,图片宽高会自适应,务必保证每张图片尺寸一致',
_checkStatus: '检查网站链接状态(上述任一项更新,建议此开启,耗时相同)',
_standard: '标准',
_column: '栏目',
_simplicity: '简约',
_original: '原始',
_navOver: '一级导航超出显示',
_scrollBar: '滚动条',
_ellipsis: '三点式',
_sidebarImg: '侧栏图片板块',
_sidebarTitle: '侧栏标题',
_defTitle4: '默认网站标题, 建议4字以内',
_inputAuthCode: '请输入授权码',
_waitHandle: '提交成功,等待站长审核',
_collect: '收录',
_confirmCollect: '您确定要收录吗?',
_pendingGet: '正在获取...',
_logoutAuthCode: '退出',
_spiderRule: '爬取规则',
_spiderTitle: '更新标题',
_spiderIcon: '更新图标',
_spiderDesc: '更新描述',
_spiderImg: '更新图片',
_notSpider: '不更新',
_spiderAlways: '总是更新',
_spiderEmpty: '为空时更新',
_spiderStatus: '爬取状态',
_spiderTip:
'每次保存时会触发爬取规则,影响构建速度,在必要时进行爬取更新信息',
_spiderQty: '并发数量',
_spiderQtyTip: '',
_spiderNetTip: '由于网络因素,部分网站可能无法访问直接跳过,仅供参考',
_spiderBuildTip:
'构建完成后对数据无误,请到网站管理点击一次保存,否则数据不会永久存储',
_associatedLabels: '关联标签',
_menuCollapse: '菜单默认收起',
_retro: '复古',
_accessTimeout: '爬取超时(秒)',
_accessTimeoutTip: '爬取网站指定秒数无响应跳过,数字越大成功率越高,但是越慢',
_imageCDN: '图片CDN',
_docTitle: '文档标题',
_importEnter: `在浏览器输入 chrome://bookmarks/ 找到导出书签,导出 HTML 文件点击下面导入`,
_buildSuccess: '构建成功',
_bindDomain:
'绑定域名,多个以逗号分隔,不要带协议如:example.com,xjh22222228.github.io',
_clickExport: '点我导出',
_exportIcons: '同时导出网站图标,耗时较久',
_errorIcons: '以下图标无法被正常处理:',
_processing: '正在处理',
_weeks: [
'星期日',
'星期一',
'星期二',
'星期三',
'星期四',
'星期五',
'星期六',
],
_shortMonth: '月',
_shortDay: '日',
_classNoMatch: '分类不匹配,采用默认第一个分类',
_openSearch: '输入链接允许查找',
_moveUp: '上移',
_moveDown: '下移',
_footTemplate: '模版',
_footTemplateDesc:
'所有底部HTML通用,将获取的模版代码拷贝到需要设置的主题或全局,现有变量:${total} = 网站数量; ${hostname} = 域名;${year} = 今年年份;class="applyweb" = 申请收录',
_builtTailwind:
'系统已内置 https://play.tailwindcss.com ,您无需书写样式',
_quick: '快捷',
_components: '小组件',
_calendar: '日历',
_submit: '提交',
_cancel: '取消',
_topColor: '顶部背景色',
_bgColor: '背景色',
_runtime: '运行时长',
_runtimeTitle: '标题',
_offWork: '下班',
_workTitle: '工作标题',
_restTitle: '休息标题',
_image: '图片',
_text: '文本',
_countdown: '倒数',
_dateColor: '日期颜色',
_timeColor: '时间颜色',
_date: '日期',
_time: '时间',
_workHours: '工作时间',
_breakTime: '休息时间',
_holiday: '节假日',
_year: '年',
_day: '天',
_calendarDate: '{year}年{month}月',
_dayOfYear: '第{day}天',
_errCountTip:
'上次检测出 {count} 个网站链接失效,具体到管理网站查看,如需再次检测状态直接点保存触发事件即可。',
_getErrorWeb: '检索异常网站',
_categoryName: '分类名称',
_dayIs: '今天是',
_rest: '休',
_distance: '距离',
_collectTip: '有用户申请收录请去处理',
_colTitle: '收录处理({count})',
_type: '类型',
_handle: '处理',
_headCode: '可以在这里插入样式、脚本、统计等',
_hours: '{num}小时',
_minutes: '{num}分钟',
_seconds: '{num}秒',
_same: '引用',
_sameExists: '已存在',
_checkRepeat: '检重URL',
_repeatTip: '该分类下可能存在重复URL',
_tag: '标签',
_translate: '翻译',
_searchRes: '搜索结果',
_class: '分类',
_quote: '引用',
_poster: '海报',
_screenshot: '截图',
_imgPlaceholder: '应用在海报卡片',
_urlNoRepeat: '该分类下链接未查出重复',
_confInfo: '配置信息',
_submitNotice: '收录通知',
_password: '密码',
_address: '地址',
_apiPass: '讯飞大模型密钥',
_createWebKey: '按下创建网站',
_onlyDelItem: '只删除该项目',
_news: '资讯',
_baidu: '百度',
_douyin: '抖音',
_bilibili: '哔哩哔哩',
_weibo: '微博',
_juejin: '掘金',
_noNews: '暂无资讯',
_52: '52破解',
_hongshu: '小红书',
_toutiao: '今日头条',
_douban: '豆瓣',
_zhihu: '知乎',
_zhihuDaily: '知乎日报',
_logoImg: 'Logo图',
_logoDarkImg: 'Logo暗黑图',
_errLogo: '该LOGO图无法访问',
_logoMaxHeight: 'Logo最大高度',
_noPublic: '不公开',
_noUpdate: '没有可用更新',
_updating: '正在更新...',
_canNewVer: '有新版本可用,是否刷新以更新应用?',
_nowUpdate: '立即更新',
_later: '稍后',
_avaUpdate: '应用更新可用',
_updateFailed: '更新失败',
_carousel: '走马灯',
_addHoliday: '选择要添加的节日',
_getHoliday: '获取节日',
}
export default zhCN
================================================
FILE: src/main.html
================================================
================================================
FILE: src/main.ts
================================================
import { bootstrapApplication } from '@angular/platform-browser'
import { appConfig } from './app/app.config'
import { AppComponent } from './app/app.component'
bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err))
================================================
FILE: src/pipe/safeHtml.pipe.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Pipe, PipeTransform } from '@angular/core'
import { DomSanitizer } from '@angular/platform-browser'
@Pipe({
standalone: true,
name: 'safeHtml',
})
export class SafeHtmlPipe implements PipeTransform {
constructor(private sanitized: DomSanitizer) {}
transform(value: string): any {
return this.sanitized.bypassSecurityTrustHtml(value)
}
}
================================================
FILE: src/services/common.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Injectable, computed } from '@angular/core'
import { Router, ActivatedRoute } from '@angular/router'
import { navs, settings } from 'src/store'
import {
queryString,
fuzzySearch,
matchCurrentList,
getOverIndex,
getClassById,
} from 'src/utils'
import { setNavs, toggleCollapseAll } from 'src/utils/web'
import type { INavThreeProp } from 'src/types'
import { isLogin, getPermissions } from 'src/utils/user'
import { isSelfDevelop } from 'src/utils/utils'
import event from 'src/utils/mitt'
@Injectable({
providedIn: 'root',
})
export class CommonService {
readonly isLogin = isLogin
readonly settings = settings
readonly permissions = getPermissions(settings())
readonly title = computed(() => settings().title.trim().split(/\s/)[0])
readonly navs = navs
currentList: INavThreeProp[] = []
twoIndex = 0
oneIndex = 0
sliceMax = 0
selectedThreeIndex = 0 // 第三级菜单选中
searchKeyword = ''
overIndex = Number.MAX_SAFE_INTEGER
constructor(
private router: Router,
private activatedRoute: ActivatedRoute,
) {
const getData = () => {
const { id, q } = queryString()
const { oneIndex, twoIndex, threeIndex } = getClassById(id)
this.oneIndex = oneIndex
this.twoIndex = twoIndex
this.selectedThreeIndex = threeIndex
this.searchKeyword = q
if (q) {
this.currentList = fuzzySearch(this.navs(), q)
} else {
this.currentList = matchCurrentList()
}
}
const init = () => {
this.activatedRoute.queryParams.subscribe(() => {
this.sliceMax = 0
getData()
setTimeout(() => {
this.sliceMax = Number.MAX_SAFE_INTEGER
}, 100)
})
}
if (window.__FINISHED__) {
init()
} else {
event.on('WEB_FINISH', () => {
init()
})
}
event.on('WEB_REFRESH', () => {
getData()
})
}
handleClickClass(id: number) {
this.router.navigate([], {
relativeTo: this.activatedRoute,
queryParams: {
id,
_: Date.now(),
},
})
event.emit('SEARCH_FOCUS')
}
onCollapseAll = (e?: Event) => {
e?.stopPropagation()
toggleCollapseAll(this.navs())
}
trackByItem(a: any, item: any) {
return item.title
}
trackByItemWeb(a: any, item: any) {
return item.id
}
get collapsed() {
try {
return !!this.navs()[this.oneIndex].nav[this.twoIndex].collapsed
} catch {
return false
}
}
onCollapse = (item: INavThreeProp) => {
item.collapsed = !item.collapsed
if (!isSelfDevelop) {
setNavs(this.navs())
}
}
getOverIndex(selector: string) {
queueMicrotask(() => {
const overIndex = getOverIndex(selector)
if (this.overIndex === overIndex) {
return
}
this.overIndex = overIndex
})
}
setOverIndex() {
this.overIndex = Number.MAX_SAFE_INTEGER
}
}
================================================
FILE: src/services/jump.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Injectable } from '@angular/core'
import { Router } from '@angular/router'
import { CODE_SYMBOL, SELF_SYMBOL, ROUTER_SYMBOL } from 'src/constants/symbol'
import event from 'src/utils/mitt'
@Injectable({
providedIn: 'root',
})
export class JumpService {
constructor(private router: Router) {}
goUrl(e: any, url: string | null | undefined) {
e?.stopPropagation?.()
e?.preventDefault?.()
if (typeof url !== 'string' || !url) {
return
}
const firstSymbol = url[0]
// Code
if (firstSymbol === CODE_SYMBOL) {
return
}
if (url === '@apply') {
event.emit('CREATE_WEB')
return
}
if (firstSymbol === ROUTER_SYMBOL) {
this.router.navigate([url.slice(1)])
return
}
const self = firstSymbol === SELF_SYMBOL
if (self) {
window.open(url.slice(1), '_self')
} else {
window.open(url)
}
}
}
================================================
FILE: src/store/index.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { signal, computed } from '@angular/core'
import dbJson from '../../data/db.json'
import searchJson from '../../data/search.json'
import settingsJson from '../../data/settings.json'
import tagJson from '../../data/tag.json'
import internalJson from '../../data/internal.json'
import componentJson from '../../data/component.json'
import type {
ISettings,
ISearchProps,
ITagProp,
InternalProps,
ITagPropValues,
INavProps,
IComponentProps,
} from 'src/types'
import { isSelfDevelop } from 'src/utils/utils'
export const settings = signal(settingsJson as ISettings)
export const search = signal(
isSelfDevelop ? ({} as ISearchProps) : searchJson,
)
export const tagList = signal>(
isSelfDevelop ? [] : tagJson,
)
export const tagMap = computed(() => {
const map: ITagProp = {}
tagList().forEach((item) => {
if (item.id) {
map[item.id] = {
...item,
}
}
})
return map
})
export const internal = signal(internalJson)
export const navs = signal(
isSelfDevelop ? [] : (dbJson as INavProps[]),
)
export const component = signal(
isSelfDevelop ? { zoom: 1, components: [] } : componentJson,
)
================================================
FILE: src/styles.scss
================================================
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
@use './assets/styles/dark.scss' as *;
@use './assets/styles/nprogress.css' as *;
@use './assets/fonts/iconfont.css' as *;
@use '../node_modules/ng-zorro-antd/ng-zorro-antd.css' as *;
@use './assets/styles/tailwind.css' as *;
@font-face {
font-family: 'text';
// https://www.100font.com/thread-583.htm
src: url('./assets/fonts/Amiko-Regular.ttf') format('truetype'),
url('data:font/woff;base64,d09GRk9UVE8AAAVkAAsAAAAAB1wAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABDRkYgAAABCAAAAi4AAAK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iYARCFjAG8RgABHYAN3icY2BmYmCcwMDKwMHow5jGwMDgDqW/MkgytDAwMDGwcjKAQQMDAyOQUmCAgoA01xQGB4ZExUmMD/4/YNBjvP3/NgNEDQPjbbBKBQZGADfLDgsAAHicY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQzMCQqKClOUJz0/z9YHRLv/+L7D+8V3cuHmgAHjGwM6ELUByxUMIOZCmbgAAA5LQ8XeJxjYGRgYABiO68w73h+m68M3EwMIHC+sKIeTqsyqDLeZrwN5HIwgKUB/aYJUgAAeJxjYGRgYLzNwMCgx8QAAkA2IwMqYAIAMGIB7QIAAAACAAAlACUAJQAlAAAAAFAAAAUAAHicbY49asNAEIU/2ZJDfkiRIvXapUFCEqpcptABUrg3ZhEiQoKVfY9UqVLlGDlADpAT5e16IUWysMz3hjfzBrjjjQT/EjKpCy+4YhN5yZoxcirPe+SMWz4jr6S+5UzSa3VuwpTnBfc8RF7yxDZyKs9r5IxHPiKv1P9iZqDnyAvMQ39UecbScVb/gJO03Xk4CFom3XYK1clhMdQUlKo7/d9NF13RkIdfy+MV7TSe2sl11tRFaXYmJKpWTd7kdVnJ8veevZKc+n3I93t9Jnvr5n4aTVWU/0z9AI2qMkV4nGNgZkAGjAxoAAAAjgAF')
format('woff');
font-display: swap;
}
.family {
font-family: text, ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji',
'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
}
:root {
--componentHeight: 155px;
}
html {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
body {
min-height: 100vh;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-overflow-scrolling: touch;
font-size: 14px;
}
footer,
header,
nav,
section {
display: block;
}
ol,
ul,
li {
list-style: none;
}
a {
color: #1890ff;
}
a,
a:link {
text-decoration: none;
}
h2 {
font-size: 16px;
}
img,
iframe {
border: none;
max-width: 100%;
}
img {
display: inline-block;
}
button,
input,
textarea {
font-size: 100%;
}
input[type='text'],
button {
-webkit-appearance: none;
outline: none;
border: 1px solid #e1e1e1;
}
i,
em {
font-style: normal;
}
.position-center {
z-index: 9;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.touch-active:active {
background: rgba(0, 0, 0, 0.2) !important;
}
.remove {
position: fixed !important;
top: -10000px !important;
left: -10000px !important;
}
/* 搜索高亮关键字 */
b {
color: #f50 !important;
}
// 折叠箭头
.down-arrow {
display: inline-block;
align-self: center;
margin-left: 5px;
cursor: pointer;
transition: 0.1s linear;
color: #666;
vertical-align: middle;
&.active {
transform: rotate(-90deg);
}
}
.rotate {
animation: quickRotate 1s linear infinite;
transform-origin: center;
}
.rotate10s {
animation: quickRotate 10s linear infinite;
transform-origin: center;
}
@keyframes quickRotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
textarea.ant-input {
word-break: break-all;
}
.ellipsis {
white-space: nowrap !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
}
.ellipsis2 {
word-break: break-all;
overflow: hidden !important;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.ellipsis3 {
word-break: break-all;
overflow: hidden !important;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
.flex-center {
display: flex;
align-items: center;
justify-content: center;
}
@media screen and (max-width: 768px) {
.max768none {
display: none !important;
}
}
.hidden-scrollbar {
scrollbar-width: none;
&::-webkit-scrollbar {
display: none;
}
}
.auto-scrollbar {
&::-webkit-scrollbar {
display: none;
}
&:hover {
&::-webkit-scrollbar {
display: block;
}
}
}
::-webkit-scrollbar-thumb:hover {
background-color: rgb(124, 124, 124);
}
::-webkit-scrollbar-thumb {
background-color: #82828280;
border-radius: 4px;
}
::-webkit-scrollbar-corner {
background: #000;
border-radius: 0 0 8px 0;
}
::-webkit-scrollbar {
width: 5px;
height: 5px;
}
// loading start
@keyframes my-rotatex1 {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@keyframes loading-dashx2 {
0% {
stroke-dasharray: 1, 200;
stroke-dashoffset: 0;
}
50% {
stroke-dasharray: 90, 150;
stroke-dashoffset: -40px;
}
100% {
stroke-dasharray: 90, 150;
stroke-dashoffset: -120px;
}
}
.x31 {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #fff;
display: flex;
justify-content: center;
align-items: center;
}
.x21 {
width: 30px;
height: 30px;
animation: my-rotatex1 2s linear infinite;
.path {
stroke-dasharray: 90, 150;
stroke-dashoffset: 0;
stroke-width: 5;
stroke: #409eff;
stroke-linecap: round;
animation: loading-dashx2 1.5s ease-in-out infinite;
}
}
// loading end
// Google ad
app-card:has(ins.adsbygoogle[data-ad-status='unfilled']),
app-html:has(ins.adsbygoogle[data-ad-status='unfilled']),
.aditem:has(ins.adsbygoogle[data-ad-status='unfilled']) {
display: none;
}
.adsbygoogle,
ins[data-ad-client] {
display: block;
z-index: 1;
position: relative;
}
================================================
FILE: src/types/index.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
export type ThemeType = 'Light' | 'Sim' | 'Side' | 'App' | 'Shortcut' | 'Super'
export enum TopType {
Side = 1,
Shortcut,
}
export enum ComponentType {
Calendar = 1,
OffWork = 2,
Runtime = 3,
Image = 4,
Countdown = 5,
HTML = 6,
Holiday = 7,
News = 8,
Carousel = 9,
}
export enum ActionType {
Create = 1,
Edit = 2,
Delete = 3,
}
export enum NewsType {
Weibo = 1,
V2ex = 2,
Douyin = 3,
Bilibili = 4,
Juejin = 5,
Baidu = 6,
GitHub = 7,
Pojie52 = 8,
Xiaohongshu = 9,
Toutiao = 10,
Douban = 11,
HackerNews = 12,
Zhihu = 13,
ZhihuDaily = 14,
}
export interface INewsProps {
types: NewsType[]
count: number
bgColor: string
}
export interface ICalendarProps {
topColor: string
bgColor: string
}
export interface IOffWorkProps {
workTitle: string
restTitle: string
startDate: number
date: number | string
}
export interface ICarouselProps {
imgs: ImageProps[]
width: number
fit: string
}
export interface IImageProps {
url: string
go: string
text: string
}
export interface ICountdownProps {
topColor: string
bgColor: string
url: string
title: string
dateColor: string
dayColor: string
date: string
}
export interface IRuntimeProps {
title: string
}
export interface IHtmlProps {
html: string
width: number
bgColor: string
}
export interface IHolidayProps {
items: any[]
}
export interface IComponentItemProps
extends Partial>,
Partial,
Partial,
Partial,
Partial>,
Partial,
Partial,
Partial> {
id: number
type: number
[key: string]: any
}
export interface IComponentProps {
zoom: number
components: IComponentItemProps[]
}
export type ICardType =
| 'standard'
| 'column'
| 'example'
| 'retro'
| 'original'
| 'poster'
| 'icon'
type OverType = 'overflow' | 'ellipsis'
type Spider = 'NO' | 'EMPTY' | 'ALWAYS'
export interface ITagPropValues {
id: number
name: string
color: string
desc: string
isInner: boolean
noOpen?: boolean
sort?: number | string
[key: string]: any
}
export interface ITagProp {
[tagName: string]: ITagPropValues
}
export interface IWebTag {
id: number | string
url: string
}
export interface BaseNavItem {
id: number
title: string
icon: string
collapsed?: boolean
ownVisible?: boolean
}
export interface IWebProps {
id: number
name: string
desc: string
url: string
icon: string
breadcrumb?: string[]
tags?: IWebTag[]
img?: string
rId?: number
__name__?: string // 搜索原name值
__desc__?: string
rate?: number // 0-5
top?: boolean
topTypes?: number[]
index?: number | string // sort
ownVisible?: boolean
ok?: boolean
[key: string]: any
}
export interface INavThreeProp extends BaseNavItem {
nav: IWebProps[]
rId?: number
[key: string]: any
}
export interface INavTwoProp extends BaseNavItem {
nav: INavThreeProp[]
rId?: number
[key: string]: any
}
export interface INavProps extends BaseNavItem {
nav: INavTwoProp[]
[key: string]: any
}
export interface ISearchItemProps {
name: string
icon: string
blocked: boolean
isInner: boolean
url?: string
placeholder?: string
}
export interface ISearchProps {
logo: string
darkLogo: string
height: number
list: ISearchItemProps[]
}
export interface ImageProps {
url: string
src: string
}
export interface IClassProps {
id: number
title: string
icon: string
ownVisible?: boolean
}
export interface ISettings {
favicon: string
language: 'zh-CN' | 'en'
loading: string
title: string
description: string
keywords: string
theme: ThemeType
openSEO: boolean
appTheme: ThemeType | 'Current'
footerContent: string
headerContent: string
showGithub: boolean
showLanguage: boolean
showCopy?: boolean
showShare?: boolean
showThemeToggle: boolean
actionUrl: string | null
checkUrl: boolean
errorUrlCount?: number
createWebKey: string
logo: string
darkLogo: string
appCardStyle: ICardType
appDocTitle: string
lightCardStyle: ICardType
lightOverType: OverType
lightImages: ImageProps[]
lightFooterHTML: string
lightDocTitle: string
simThemeImages: ImageProps[]
simThemeDesc: string
simThemeHeight: number
simThemeAutoplay: boolean
simCardStyle: ICardType
simTitle: string
simOverType: OverType
simFooterHTML: string
simDocTitle: string
sideThemeImages: ImageProps[]
sideThemeHeight: number
sideThemeAutoplay: boolean
sideCardStyle: ICardType
sideTitle: string
sideFooterHTML: string
sideCollapsed: boolean
sideDocTitle: string
shortcutThemeImages: ImageProps[]
shortcutThemeShowWeather: boolean
shortcutTitle: string
shortcutDockCount: number
shortcutDocTitle: string
superTitle: string
superOverType: OverType
superCardStyle: ICardType
superImages: ImageProps[]
superFooterHTML: string
superDocTitle: string
showRate: boolean
userActions: ActionType[]
email: string
spiderIcon: Spider
spiderDescription: Spider
spiderTitle: Spider
spiderImg: Spider
spiderQty: number
spiderTimeout: number
loadingCode: string
openSearch: boolean
gitHubCDN: string
components: IComponentItemProps[]
runtime: number
pwaEnable: boolean
pwaName: string
pwaIcon: string
[key: string]: any
}
export type InternalProps = {
loginViewCount: number
userViewCount: number
}
================================================
FILE: src/types/type.d.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
export {}
declare global {
const Swiper: any
var __HASH_MODE__: boolean | undefined
var __ADDRESS__: string | undefined
var __FINISHED__: boolean // 记录已取 web 数据
var __TITLE__: string = undefined
var __PWA_ENABLE__: boolean | undefined
}
================================================
FILE: src/utils/bookmark.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xie.jiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import type { INavProps, IWebProps, INavTwoProp, INavThreeProp } from '../types'
import { navs } from '../store'
import { $t } from '../locale'
import { getTempId } from './utils'
import { removeTrailingSlashes } from './pureUtils'
let id = getTempId()
const getTitle = (node: Element): string => (node.textContent || '').trim()
const getUrl = (node: Element): string =>
(node.getAttribute('href') || '').trim()
const getIcon = (node: Element): string =>
(node.getAttribute('icon') || '').trim()
function findUnclassifiedData(roolDL: Element): IWebProps[] {
const data: IWebProps[] = []
Array.from(roolDL.children).forEach((iItem) => {
if (iItem.nodeName === 'DT') {
const a = iItem.firstElementChild
if (a?.nodeName === 'A') {
data.push({
name: getTitle(a),
icon: getIcon(a),
url: getUrl(a),
tags: [],
desc: '',
rate: 5,
id: (id += 1),
breadcrumb: [],
})
}
}
})
return data
}
interface BookmarkParseResult {
message?: string
data?: INavProps[]
}
export function parseBookmark(
htmlStr: string,
): BookmarkParseResult | INavProps[] {
const copyWebList = JSON.parse(JSON.stringify(navs()))
const data: INavProps[] = []
const parser = new DOMParser()
const doc = parser.parseFromString(htmlStr, 'text/html')
const querySelector = htmlStr.includes('PERSONAL_TOOLBAR_FOLDER="true"')
? 'body dl dl'
: 'body dl'
const roolDL = doc.querySelector(querySelector)
if (!roolDL) {
return {
message: '未找到dl dl节点',
}
}
try {
function processWebsiteLevel(DL3: Element, parentData: INavThreeProp) {
Array.from(DL3.children).forEach((wItem) => {
if (wItem.nodeName === 'DT') {
const titleEl = wItem.querySelector('a')
if (titleEl) {
parentData.nav.push({
name: getTitle(titleEl),
url: getUrl(titleEl),
desc: '',
tags: [],
rate: 5,
top: false,
icon: getIcon(titleEl),
id: (id += 1),
breadcrumb: [],
})
}
}
})
}
function processThreeLevel(DL3: Element, parentNav: INavTwoProp) {
Array.from(DL3.children).forEach((kItem, index) => {
if (kItem.nodeName === 'DT') {
const titleEl = kItem.querySelector('h3')
if (titleEl) {
let title = getTitle(titleEl)
const has = parentNav.nav.some((e) => e.title === title)
if (has) {
title = title + index
}
const threeLevel: INavThreeProp = {
id: (id += 1),
title,
nav: [],
icon: '',
}
parentNav.nav.push(threeLevel)
const websiteDL = kItem.querySelector('dl')
if (websiteDL) {
processWebsiteLevel(websiteDL, threeLevel)
}
}
}
})
}
function processTwoLevel(DL: Element, parentData: INavProps) {
Array.from(DL.children).forEach((jItem, index) => {
if (jItem.nodeName === 'DT') {
const titleEl = jItem.querySelector('h3')
if (titleEl) {
let title = getTitle(titleEl)
const has = parentData.nav.some((e) => e.title === title)
if (has) {
title = title + index
}
const twoLevel: INavTwoProp = {
id: (id += 1),
title,
icon: getIcon(titleEl),
nav: [],
}
parentData.nav.push(twoLevel)
const DL3 = jItem.querySelector('dl')
if (DL3) {
const unclassifiedData = findUnclassifiedData(DL3)
if (unclassifiedData.length > 0) {
twoLevel.nav.push({
id: (id += 1),
title,
icon: '',
nav: unclassifiedData,
})
}
processThreeLevel(DL3, twoLevel)
}
}
}
})
}
// Process One Level
Array.from(roolDL.children).forEach((iItem, index) => {
if (iItem.nodeName === 'DT') {
const titleEl = iItem.querySelector('h3')
if (titleEl) {
let title = getTitle(titleEl)
const has = data.some((e) => e.title === title)
if (has) {
title = title + index
}
const oneLevel: INavProps = {
id: (id += 1),
title,
icon: getIcon(titleEl),
nav: [],
}
data.push(oneLevel)
const DL = iItem.querySelector('dl')
if (DL) {
const unclassifiedData = findUnclassifiedData(DL)
if (unclassifiedData.length > 0) {
oneLevel.nav.push({
id: (id += 1),
title,
icon: '',
nav: [
{
id: (id += 1),
title,
icon: '',
nav: unclassifiedData,
},
],
})
}
processTwoLevel(DL, oneLevel)
}
}
}
})
const unclassifiedData = findUnclassifiedData(roolDL)
if (unclassifiedData.length > 0) {
data.push({
id: (id += 1),
title: $t('_uncategorized'),
icon: '',
nav: [
{
id: (id += 1),
title: $t('_uncategorized'),
icon: '',
nav: [
{
id: (id += 1),
title: $t('_uncategorized'),
icon: '',
nav: unclassifiedData,
},
],
},
],
})
}
} catch (error) {
console.log(error)
throw error
}
// 增量导入
function r(data: any[], list: any[]) {
for (let i = 0; i < data.length; i++) {
const item = data[i] as any
const title = (item.title || removeTrailingSlashes(item.url)).trim()
const idx = list.findIndex(
(item) =>
(item.title || removeTrailingSlashes(item.url)).trim() === title,
)
if (idx !== -1) {
if (Array.isArray(item.nav)) {
r(item.nav, list[idx].nav)
}
} else {
const url = removeTrailingSlashes((item.url || '').trim())
if (item.url) {
const has = list.some(
(e) => removeTrailingSlashes(e.url).trim() === url,
)
if (!has) {
list.push(item)
}
}
const title = (item.title || '').trim()
if (item.title) {
const has = list.some((e) => e.title?.trim() === title)
if (!has) {
list.push(item)
}
}
}
}
}
r(data, copyWebList)
return copyWebList
}
================================================
FILE: src/utils/http.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import axios from 'axios'
import NProgress from 'nprogress'
import config from '../../nav.config.json'
import event from './mitt'
import { settings } from 'src/store'
import { getToken, getAuthCode, removeAuthCode } from '../utils/user'
import { isLogin } from 'src/utils/user'
import { getIsGitee, getIsGitLab } from 'src/utils/pureUtils'
export function getAddress(): string {
return globalThis.__ADDRESS__ || config.address || ''
}
const isGitLab = getIsGitLab(config.gitRepoUrl)
const gitLabBaseURL = 'https://gitlab.com/api/v4'
const giteeBaseURL = 'https://gitee.com/api/v5'
const gitHubBaseURL = 'https://api.github.com'
function getBaseUrl() {
const address = getAddress()
if (address) {
return address
}
if (isGitLab) {
return gitLabBaseURL
} else if (getIsGitee(config.gitRepoUrl)) {
return giteeBaseURL
}
return gitHubBaseURL
}
export function getImageBaseUrl() {
if (getIsGitLab(config.imageRepoUrl)) {
return gitLabBaseURL
} else if (getIsGitee(config.imageRepoUrl)) {
return giteeBaseURL
}
return gitHubBaseURL
}
const httpInstance = axios.create({
timeout: 60000 * 3,
baseURL: getBaseUrl(),
})
function startLoad() {
NProgress.start()
}
function stopLoad() {
NProgress.done()
}
httpInstance.interceptors.request.use(
function (config) {
const token = getToken()
if (token) {
config.headers['Authorization'] ||= `${
isGitLab ? 'Bearer' : 'token'
} ${token}`
}
startLoad()
return config
},
function (error) {
stopLoad()
return Promise.reject(error)
},
)
httpInstance.interceptors.response.use(
function (res) {
stopLoad()
return res
},
function (error) {
const status =
error.status || error.response?.data?.status || error.code || ''
const errorMsg = error.response?.data?.message || error.message || ''
event.emit('NOTIFICATION', {
type: 'error',
title: 'Error:' + status,
content: errorMsg,
config: {
nzDuration: document.hidden ? 0 : 5000,
},
})
stopLoad()
return Promise.reject(error)
},
)
export const HTTP_BASE_URL = 'https://api.nav3.cn'
const httpNavInstance = axios.create({
timeout: 15000,
baseURL: HTTP_BASE_URL,
})
export function getDefaultRequestData(data?: any) {
const code = getAuthCode()
const { email, language } = settings()
return {
code,
hostname: location.hostname,
host: location.host,
href: location.href,
isLogin,
...config,
...data,
email,
language,
} as const
}
httpNavInstance.interceptors.request.use(
function (conf) {
const data = getDefaultRequestData()
if (data.code) {
conf.headers['Authorization'] = data.code
}
conf.data = getDefaultRequestData(conf.data)
if (conf.data['showLoading'] !== false) {
startLoad()
}
return conf
},
function (error) {
stopLoad()
return Promise.reject(error)
},
)
httpNavInstance.interceptors.response.use(
function (res) {
stopLoad()
return res
},
function (error) {
if (error.response?.data?.statusCode === 401) {
removeAuthCode()
location.reload()
}
let showError = true
const status =
error.status || error.response?.data?.status || error.code || ''
const errorMsg = error.response?.data?.message || error.message || ''
try {
if (JSON.parse(error.config.data).showError === false) {
showError = false
}
} catch {}
if (showError) {
event.emit('NOTIFICATION', {
type: 'error',
title: 'Error:' + status,
content: errorMsg,
config: {
nzDuration: document.hidden ? 0 : 5000,
},
})
}
stopLoad()
return Promise.reject(error)
},
)
export const httpNav = httpNavInstance
export default httpInstance
================================================
FILE: src/utils/index.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import qs from 'qs'
import {
IWebProps,
INavThreeProp,
INavProps,
ISearchItemProps,
IWebTag,
} from '../types'
import { STORAGE_KEY_MAP } from 'src/constants'
import { CODE_SYMBOL } from 'src/constants/symbol'
import { isLogin } from './user'
import { SearchType } from 'src/components/search/types'
import { navs, search, settings, tagMap } from 'src/store'
import { $t } from 'src/locale'
import event from 'src/utils/mitt'
export function randomInt(max: number) {
return Math.floor(Math.random() * max)
}
export function fuzzySearch(
navList: INavProps[],
keyword: string,
): INavThreeProp[] {
if (!keyword.trim()) {
return []
}
keyword = keyword.toLowerCase()
const { type, id } = queryString()
const { oneIndex, twoIndex } = getClassById(id)
const sType = Number(type) || SearchType.All
const navData: IWebProps[] = []
let resultList: INavThreeProp[] = [
{ nav: navData, id: -1, title: $t('_searchRes'), icon: '' },
]
const urlRecordMap = new Map()
if (sType === SearchType.Class) {
resultList = []
}
function f(arr?: any[]) {
arr = arr || navList
outerLoop: for (let i = 0; i < arr.length; i++) {
const item = arr[i]
if (sType === SearchType.Class) {
if (item.title) {
if (
(item.title.toLowerCase().includes(keyword) ||
item.id == keyword) &&
item.nav?.[0]?.name
) {
resultList.push(item)
}
}
if (Array.isArray(item.nav)) {
f(item.nav)
}
continue
}
if (Array.isArray(item.nav)) {
f(item.nav)
}
if (item.name) {
item.name = getTextContent(item.name)
item.desc = getTextContent(item.desc)
const name = item.name.toLowerCase()
const desc = item.desc.toLowerCase()
const url = item.url.toLowerCase()
const isCode = desc[0] === CODE_SYMBOL
if (isCode) {
continue
}
const searchTitle = (): boolean => {
if (name.includes(keyword)) {
let result = item
const regex = new RegExp(`(${keyword})`, 'i')
result.__name__ = result.name
result.name = result.name.replace(regex, '$1 ')
if (!urlRecordMap.has(result.id)) {
urlRecordMap.set(result.id, true)
navData.push(result)
return true
}
}
return false
}
const searchUrl = (): any => {
if (url.includes(keyword)) {
if (!urlRecordMap.has(item.id)) {
urlRecordMap.set(item.id, true)
navData.push(item)
return true
}
}
const find = item.tags.some((item: IWebTag) =>
item.url?.includes(keyword),
)
if (find) {
if (!urlRecordMap.has(item.id)) {
urlRecordMap.set(item.id, true)
navData.push(item)
return true
}
}
}
const searchDesc = (): boolean => {
if (desc.includes(keyword)) {
let result = item
const regex = new RegExp(`(${keyword})`, 'i')
result.__desc__ = result.desc
result.desc = result.desc.replace(regex, '$1 ')
if (!urlRecordMap.has(result.id)) {
urlRecordMap.set(result.id, true)
navData.push(result)
return true
}
}
return false
}
const searchQuick = (): boolean => {
if (item.top && name.includes(keyword)) {
let result = item
const regex = new RegExp(`(${keyword})`, 'i')
result.__name__ = result.name
result.name = result.name.replace(regex, '$1 ')
if (!urlRecordMap.has(result.id)) {
urlRecordMap.set(result.id, true)
navData.push(result)
return true
}
}
return false
}
const searchTags = () => {
return item.tags.forEach((tag: IWebTag) => {
if (tagMap()[tag.id]?.name?.toLowerCase() === keyword) {
if (!urlRecordMap.has(item.id)) {
urlRecordMap.set(item.id, true)
navData.push(item)
}
}
})
}
const searchId = (): boolean => {
if (item.id == keyword) {
navData.push(item)
return true
}
return false
}
try {
switch (sType) {
case SearchType.Url:
searchUrl()
break
case SearchType.Title:
searchTitle()
break
case SearchType.Desc:
searchDesc()
break
case SearchType.Quick:
searchQuick()
break
case SearchType.Tag:
searchTags()
break
case SearchType.Id:
if (searchId()) {
break outerLoop
}
break
default:
searchTitle()
searchDesc()
searchUrl()
}
} catch (error) {
console.error(error)
}
}
}
}
if (sType === SearchType.Current) {
f(navList[oneIndex].nav[twoIndex].nav)
} else {
f()
}
if (sType !== SearchType.Class && navData.length <= 0) {
return []
}
return resultList
}
export function randomColor(): string {
const randomValue = Math.floor(Math.random() * 0xffffff)
const hexColor = randomValue.toString(16).padStart(6, '0')
return `#${hexColor}`
}
let randomTimer: any
export function randomBgImg(): void {
if (randomTimer) {
clearInterval(randomTimer)
}
const id = 'random-light-bg'
const el = document.getElementById(id) || document.createElement('div')
const deg = randomInt(360)
el.id = id
el.className = 'dark-bg'
el.style.cssText = `
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: -3;
transition: 1s linear;
`
el.style.backgroundImage = `linear-gradient(${deg}deg, ${randomColor()} 0%, ${randomColor()} 100%)`
document.body.appendChild(el)
const transition = (): void => {
const randomBg = `linear-gradient(${deg}deg, ${randomColor()} 0%, ${randomColor()} 100%)`
el.style.opacity = '0.3'
setTimeout(() => {
el.style.backgroundImage = randomBg
el.style.opacity = '1'
}, 1000)
}
randomTimer = setInterval(transition, 10000)
}
export function removeBgImg(): void {
if (randomTimer) {
clearInterval(randomTimer)
randomTimer = null
}
const el = document.getElementById('random-light-bg')
if (el) {
el.parentNode?.removeChild(el)
}
}
export function queryString(cached: boolean = true) {
const { href } = location
const search = href.split('?')[1] || ''
const parseQs = qs.parse(search)
let id = parseQs['id']
if (cached && parseQs['id'] == null) {
try {
const location = localStorage.getItem(STORAGE_KEY_MAP.LOCATION)
if (location) {
const localLocation = JSON.parse(location)
id = localLocation.id
}
} catch {}
}
return {
...parseQs,
type: parseQs['type'],
q: (parseQs['q'] || '') as string,
id,
} as const
}
export function setLocation() {
const { id } = queryString()
window.localStorage.setItem(
STORAGE_KEY_MAP.LOCATION,
JSON.stringify({
id,
}),
)
}
export function getDefaultSearchEngine(): ISearchItemProps {
let DEFAULT = (search().list[0] || {}) as ISearchItemProps
try {
const engine = window.localStorage.getItem(STORAGE_KEY_MAP.SEARCH_ENGINE)
if (engine) {
const local = JSON.parse(engine)
const findItem = search().list.find((item) => item.name === local.name)
if (findItem) {
DEFAULT = findItem
}
}
} catch {}
return DEFAULT
}
export function setDefaultSearchEngine(engine: ISearchItemProps) {
window.localStorage.setItem(
STORAGE_KEY_MAP.SEARCH_ENGINE,
JSON.stringify(engine),
)
}
export function isDark(): boolean {
const storageVal = window.localStorage.getItem(STORAGE_KEY_MAP.IS_DARK)
const darkMode = window?.matchMedia?.('(prefers-color-scheme: dark)')?.matches
if (!storageVal && darkMode) {
return darkMode
}
return Boolean(Number(storageVal))
}
export async function copyText(text: string): Promise {
try {
await navigator.clipboard.writeText(text)
return true
} catch (error: any) {
event.emit('MESSAGE', {
type: 'error',
message: error.message,
})
return false
}
}
export async function isValidImg(
url: string,
): Promise<{ valid: boolean; url: string }> {
const payload = {
valid: false,
url,
}
if (!url) return payload
if (url === 'null' || url === 'undefined') return payload
const { protocol } = window.location
if (protocol === 'https:' && url.startsWith('http:')) return payload
return new Promise((resolve) => {
const img = document.createElement('img')
img.src = url
img.style.display = 'none'
img.onload = () => {
img.parentNode?.removeChild(img)
payload.valid = true
resolve(payload)
}
img.onerror = () => {
img.parentNode?.removeChild(img)
resolve(payload)
}
document.body.append(img)
})
}
// value 可能含有标签元素,用于过滤掉标签获取纯文字
export function getTextContent(value: string = ''): string {
if (!value) return ''
return value.replace(/|<\/b>/g, '')
}
export function matchCurrentList(): INavThreeProp[] {
const { id } = queryString()
const { oneIndex, twoIndex } = getClassById(id)
let data: INavThreeProp[] = []
const navsData = navs()
try {
if (
navsData[oneIndex] &&
navsData[oneIndex]?.nav?.length > 0 &&
(isLogin || !navsData[oneIndex].nav[twoIndex].ownVisible)
) {
data = navsData[oneIndex].nav[twoIndex].nav
} else {
data = []
}
} catch {
data = []
}
return data
}
export function addZero(n: number): string {
return String(n).padStart(2, '0')
}
// 获取第几个元素超出父节点宽度
export function getOverIndex(selector: string): number {
const els = document.querySelectorAll(selector)
let overIndex = Number.MAX_SAFE_INTEGER
if (els.length <= 0) {
return overIndex
}
const parentEl = els[0].parentNode as HTMLElement
const parentWidth = parentEl!.clientWidth as number
let scrollWidth = 0
for (let i = 0; i < els.length; i++) {
const el = els[i]
scrollWidth += el.clientWidth
if (scrollWidth > parentWidth) {
overIndex = i - 1
break
}
}
return overIndex
}
export function isMobile() {
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
navigator.userAgent,
)
}
// 今年第几天
export function getDayOfYear() {
const now = new Date()
const startOfYear = new Date(now.getFullYear(), 0, 0)
// @ts-ignore
const diff = now - startOfYear
const oneDay = 1000 * 60 * 60 * 24
return Math.floor(diff / oneDay)
}
export function getDateTime() {
const weeks = $t('_weeks')
const now = new Date()
const year = now.getFullYear()
const hours = addZero(now.getHours())
const minutes = addZero(now.getMinutes())
const seconds = addZero(now.getSeconds())
const month = now.getMonth() + 1
const date = now.getDate()
const day = now.getDay()
const zeroDate = addZero(date)
return {
year,
hours,
minutes,
seconds,
month,
date,
zeroDate,
dayText: weeks[day],
} as const
}
export function getDefaultTheme() {
const { theme, appTheme } = settings()
const t = isMobile() ? appTheme : theme
if (t === 'Current') {
return theme
}
return t
}
export function getClassById(id: unknown, initValue = 0, isWebId = false) {
id = Number(id)
let oneIndex = initValue
let twoIndex = initValue
let threeIndex = initValue
let parentId = -1
const breadcrumb: string[] = []
const navsData = navs()
outerLoop: for (let i = 0; i < navsData.length; i++) {
const item = navsData[i]
if (item.id === id) {
oneIndex = i
breadcrumb.push(item.title)
break
}
if (Array.isArray(item.nav)) {
for (let j = 0; j < item.nav.length; j++) {
const twoItem = item.nav[j]
if (twoItem.id === id) {
parentId = item.id
oneIndex = i
twoIndex = j
breadcrumb.push(item.title, twoItem.title)
break outerLoop
}
if (Array.isArray(twoItem.nav)) {
for (let k = 0; k < twoItem.nav.length; k++) {
const threeItem = twoItem.nav[k]
if (threeItem.id === id) {
parentId = twoItem.id
oneIndex = i
twoIndex = j
threeIndex = k
breadcrumb.push(item.title, twoItem.title, threeItem.title)
break outerLoop
}
if (isWebId) {
if (Array.isArray(threeItem.nav)) {
for (let l = 0; l < threeItem.nav.length; l++) {
const web = threeItem.nav[l]
if (web.id === id) {
parentId = threeItem.id
oneIndex = i
twoIndex = j
threeIndex = k
breadcrumb.push(item.title, twoItem.title, threeItem.title)
break outerLoop
}
}
}
}
}
}
}
}
}
return { parentId, oneIndex, twoIndex, threeIndex, breadcrumb } as const
}
export function scrollIntoViewLeft(
parentElement: HTMLElement,
target: HTMLElement,
config?: ScrollToOptions,
) {
if (!parentElement || !target) {
return
}
const containerWidth = parentElement.offsetWidth
const categoryWidth = target.offsetWidth
const categoryLeft = target.offsetLeft
const scrollPosition = categoryLeft - (containerWidth - categoryWidth) / 2
parentElement.scrollTo({
left: scrollPosition,
behavior: 'smooth',
...config,
})
}
export function imageErrorHidden(el: Event) {
// @ts-ignore
el.target.style.display = 'none'
}
================================================
FILE: src/utils/mitt.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import mitt from 'mitt'
export default mitt()
================================================
FILE: src/utils/pureUtils.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import type { ISettings, IWebProps, INavProps } from '../types'
import { CODE_SYMBOL } from 'src/constants/symbol'
export function replaceJsdelivrCDN(
url: string = '',
settings: ISettings,
): string {
const cdn = settings?.gitHubCDN
if (!cdn) {
return url
}
url = url.replace('cdn.jsdelivr.net', cdn)
url = url.replace('testingcf.jsdelivr.net', cdn)
url = url.replace('img.jsdmirror.com', cdn)
url = url.replace('gcore.jsdelivr.net', cdn)
return url
}
export function getIsGitee(gitRepoUrl: string): boolean {
return gitRepoUrl.includes('gitee.com')
}
export function getIsGitLab(gitRepoUrl: string): boolean {
return gitRepoUrl.includes('gitlab.c')
}
export function removeTrailingSlashes(url: string | null | undefined): string {
if (!url) {
return ''
}
return url.replace(/\/+$/, '')
}
type WebProps = {
breadcrumb?: string[]
}
type DFSProps = {
navs: T
breadcrumb?: boolean
sort?: (a: any, b: any) => number
filter?: (data: F) => boolean
callback?: (data: C) => boolean | void
webCallback?: (data: C2, props: WebProps) => boolean | void
}
export function dfsNavs<
T extends any[],
F extends INavProps & IWebProps,
C extends INavProps = INavProps,
C2 extends IWebProps = IWebProps,
>(props: DFSProps): T {
let cloneNavs = JSON.parse(JSON.stringify(props.navs)) as T
if (props.filter) {
cloneNavs = cloneNavs.filter(props.filter) as T
}
const breadcrumbMap = new Map()
if (props.breadcrumb) {
cloneNavs.forEach((item: any) => {
breadcrumbMap.set(item, [item.title])
})
}
let stack = [...cloneNavs] as T
while (stack.length > 0) {
const item = stack.pop()
if (item) {
if (item.nav && Array.isArray(item.nav)) {
if (props.filter) {
item.nav = item.nav.filter(props.filter)
}
if (props.sort) {
item.nav.sort(props.sort)
}
if (props.breadcrumb) {
item.nav.forEach((navItem: any) => {
const currentBreadcrumb = breadcrumbMap.get(item) || []
const newBreadcrumb = [...currentBreadcrumb]
if (navItem.title) {
newBreadcrumb.push(navItem.title)
}
breadcrumbMap.set(navItem, newBreadcrumb)
})
}
stack.push(...item.nav)
}
if (item.title) {
const isBreak = props.callback?.(item)
if (isBreak) {
break
}
} else if (item.url) {
const breadcrumb = breadcrumbMap.get(item)
const isBreak = props.webCallback?.(item, { breadcrumb })
if (isBreak) {
break
}
}
}
}
return cloneNavs
}
export function filterLoginData(navs: any[], isLogin: boolean): INavProps[] {
function filterOwn(item: INavProps) {
if (item.ownVisible && !isLogin) {
return false
}
return true
}
return dfsNavs({
navs,
breadcrumb: true,
filter: filterOwn,
webCallback(web: IWebProps, props: WebProps) {
web.tags ||= []
web.breadcrumb = props.breadcrumb
},
})
}
export function cleanWebAttrs(navs: any) {
return dfsNavs({
navs,
webCallback(web: IWebProps) {
for (const k in web) {
const removeKeys = ['breadcrumb', '__name__', '__desc__']
if (removeKeys.includes(k)) {
delete web[k]
}
}
if (web.tags?.length === 0) {
delete web.tags
}
},
})
}
export function isNumber(v: any): boolean {
if (v === '' || v == null) {
return false
}
if (isNaN(v)) {
return false
}
return true
}
export function transformSafeHTML(str: string) {
if (!str || str[0] === CODE_SYMBOL) {
return str
}
const entity: any = {
'<': '<',
'>': '>',
}
return str.replace(/[<>]/g, (char) => entity[char])
}
export function transformUnSafeHTML(str: string) {
const entity: any = {
'<': '<',
'>': '>',
}
return str.replace(/(<|>)/g, (char) => entity[char])
}
================================================
FILE: src/utils/sw.ts
================================================
export async function unregisterServiceWorkers(): Promise {
try {
// 卸载所有Service Worker
if ('serviceWorker' in navigator) {
const registrations = await navigator.serviceWorker.getRegistrations()
console.log(`找到 ${registrations.length} 个Service Worker注册`)
for (const registration of registrations) {
await registration.unregister()
console.log('成功卸载Service Worker:', registration.scope)
}
}
// 清理所有缓存
if ('caches' in window) {
const cacheNames = await caches.keys()
console.log(`找到 ${cacheNames.length} 个缓存`)
for (const cacheName of cacheNames) {
await caches.delete(cacheName)
console.log('成功删除缓存:', cacheName)
}
}
return true
} catch (error) {
console.error('清理Service Worker失败:', error)
return false
}
}
export function isPwaMode(): boolean {
const isStandalone = window.matchMedia('(display-mode: standalone)').matches
const isFullscreen = window.matchMedia('(display-mode: fullscreen)').matches
const isMinimalUI = window.matchMedia('(display-mode: minimal-ui)').matches
const isIOSStandalone =
'standalone' in navigator && (navigator.standalone as boolean)
return isStandalone || isFullscreen || isMinimalUI || isIOSStandalone
}
================================================
FILE: src/utils/user.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import localforage from 'localforage'
import { STORAGE_KEY_MAP } from 'src/constants'
import { ActionType } from 'src/types'
import type { ISettings } from 'src/types'
export function getToken() {
return globalThis.localStorage?.getItem(STORAGE_KEY_MAP.TOKEN) || ''
}
export function getAuthCode() {
return globalThis.localStorage.getItem(STORAGE_KEY_MAP.AUTH_CODE) || ''
}
export function removeAuthCode() {
return globalThis.localStorage.removeItem(STORAGE_KEY_MAP.AUTH_CODE)
}
export function setAuthCode(c: string) {
return globalThis.localStorage.setItem(STORAGE_KEY_MAP.AUTH_CODE, c.trim())
}
export function setToken(token: string) {
return globalThis.localStorage.setItem(STORAGE_KEY_MAP.TOKEN, token)
}
export function removeToken() {
return globalThis.localStorage.removeItem(STORAGE_KEY_MAP.TOKEN)
}
export function getImageToken() {
return globalThis.localStorage?.getItem(STORAGE_KEY_MAP.IMAGE_TOKEN) || ''
}
export function setImageToken(token: string) {
return globalThis.localStorage.setItem(STORAGE_KEY_MAP.IMAGE_TOKEN, token)
}
export function removeWebsite() {
return localforage.removeItem(STORAGE_KEY_MAP.WEBSITE)
}
export function userLogout() {
const removeKeys = [
STORAGE_KEY_MAP.TOKEN,
STORAGE_KEY_MAP.IMAGE_TOKEN,
STORAGE_KEY_MAP.WEBSITE,
]
localforage.clear()
Array.from({ length: globalThis.localStorage.length }, (_, i) => {
return globalThis.localStorage.key(i)
}).forEach((key) => {
if (key && removeKeys.includes(key)) {
globalThis.localStorage.removeItem(key)
}
})
Array.from({ length: globalThis.sessionStorage.length }, (_, i) => {
return globalThis.sessionStorage.key(i)
}).forEach((key) => {
if (key && removeKeys.includes(key)) {
globalThis.sessionStorage.removeItem(key)
}
})
}
export const isLogin: boolean = !!getToken()
let create: null | boolean = null
let edit: null | boolean = null
let del: null | boolean = null
export function getPermissions(settings: ISettings) {
if (create == null) {
create = settings.userActions.includes(ActionType.Create)
edit = settings.userActions.includes(ActionType.Edit)
del = settings.userActions.includes(ActionType.Delete)
}
const c = create || false
const e = edit || false
const d = del || false
return {
create: c,
edit: e,
del: d,
ok: c || e || d,
} as const
}
================================================
FILE: src/utils/utils.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import navConfig from '../../nav.config.json'
import { internal } from 'src/store'
import { isLogin } from 'src/utils/user'
import { CODE_SYMBOL } from 'src/constants/symbol'
export const isSelfDevelop = !!navConfig.address
interface TemplateData {
total: number
hostname: string
year: number
}
export function compilerTemplate(str: string): string {
const { loginViewCount, userViewCount } = internal()
const data: TemplateData = {
total: isLogin ? loginViewCount : userViewCount,
hostname: window.location.hostname,
year: new Date().getFullYear(),
}
return Object.entries(data).reduce(
(result, [key, value]) => result.replaceAll(`\${${key}}`, String(value)),
str,
)
}
const DARK_THEME = {
cssUrl: navConfig.zorroDark,
cssId: 'dark-css',
classes: ['dark-container', 'dark'],
} as const
export function addDark(): void {
const darkNode = document.getElementById(DARK_THEME.cssId)
if (darkNode) return
const link = document.createElement('link')
link.rel = 'stylesheet'
link.href = DARK_THEME.cssUrl
link.id = DARK_THEME.cssId
document.body.appendChild(link)
document.documentElement.classList.add(...DARK_THEME.classes)
}
export function removeDark(): void {
const darkNode = document.getElementById(DARK_THEME.cssId)
document.documentElement.classList.remove(...DARK_THEME.classes)
darkNode?.parentNode?.removeChild(darkNode)
}
export function parseHtmlWithContent(node: HTMLElement, str: string) {
if (!str || !node) {
return
}
if (str[0] === CODE_SYMBOL) {
if (!node) return
const s = node.querySelectorAll('script')
s.forEach((script) => {
script.parentNode?.removeChild(script)
})
const parser = new DOMParser()
const doc = parser.parseFromString(str, 'text/html')
const scripts = doc.querySelectorAll('script')
scripts.forEach((script) => {
const newScript: any = document.createElement('script')
const text = script.textContent?.trim() || ''
const attributes = script.attributes
for (let i = 0; i < attributes.length; i++) {
const attr = attributes[i]
newScript[attr.name] = attr.value
}
if (text) {
newScript.textContent = `{${text}}`
}
node.appendChild(newScript)
})
}
}
export function parseLoadingWithContent(str: string): string {
if (!str) {
return ''
}
if (str[0] !== '!') {
return str
}
const loadingHtml = `
`
str = str.slice(1)
if (str.includes('#loadingx1')) {
return str.replaceAll('#loadingx1', '') + loadingHtml
}
return str
}
export function getTempId() {
return -Date.now()
}
================================================
FILE: src/utils/web.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import event from 'src/utils/mitt'
import localforage from 'localforage'
import navConfig from '../../nav.config.json'
import { updateFileContent } from 'src/api'
import { isLogin } from './user'
import { IWebProps, INavProps } from '../types'
import { navs } from 'src/store'
import { STORAGE_KEY_MAP, DB_PATH } from 'src/constants'
import { isSelfDevelop } from './utils'
import { queryString, getClassById } from './index'
import { $t } from 'src/locale'
import { filterLoginData, dfsNavs } from './pureUtils'
export async function getNavs() {
if (isSelfDevelop) {
return
}
function finish(navsData: INavProps[]) {
navs.set(navsData)
event.emit('WEB_FINISH')
window.__FINISHED__ = true
}
const data = filterLoginData(navs(), isLogin)
if (!isLogin) {
return finish(data)
}
const storageDate = window.localStorage.getItem(STORAGE_KEY_MAP.DATE_TIME)
// 检测到网站更新,清除缓存本地保存记录失效
if (storageDate !== navConfig.datetime) {
const removeKeys = [STORAGE_KEY_MAP.WEBSITE, STORAGE_KEY_MAP.DATE_TIME]
Array.from({ length: globalThis.localStorage.length }, (_, i) => {
return globalThis.localStorage.key(i)
}).forEach((key) => {
if (key && removeKeys.includes(key)) {
globalThis.localStorage.removeItem(key)
}
})
globalThis.localStorage.setItem(
STORAGE_KEY_MAP.DATE_TIME,
navConfig.datetime,
)
localforage.removeItem(STORAGE_KEY_MAP.WEBSITE)
finish(data)
if (isLogin) {
setTimeout(() => {
event.emit('NOTIFICATION', {
type: 'success',
title: $t('_buildSuccess'),
content: navConfig.datetime,
config: {
nzDuration: 0,
},
})
}, 1000)
}
return
}
try {
const navsData: any =
(await localforage.getItem(STORAGE_KEY_MAP.WEBSITE)) || data
finish(navsData)
} catch {
finish(data)
}
}
export function setNavs(navs: INavProps[]): Promise {
if (isSelfDevelop) {
return updateFileContent({
content: JSON.stringify(navs),
path: DB_PATH,
})
}
return localforage.setItem(STORAGE_KEY_MAP.WEBSITE, navs)
}
export function toggleCollapseAll(navs: INavProps[]): boolean {
const { id } = queryString()
const { oneIndex, twoIndex } = getClassById(id)
const collapsed = !navs[oneIndex].nav[twoIndex].collapsed
navs[oneIndex].nav[twoIndex].collapsed = collapsed
navs[oneIndex].nav[twoIndex].nav.map((item) => {
item.collapsed = collapsed
return item
})
if (!isSelfDevelop) {
setNavs(navs)
}
return collapsed
}
export async function deleteByIds(
ids: number[],
isDelRid = false,
): Promise {
let hasDelete = false
const navsData = dfsNavs({
navs: navs(),
filter: (w) => {
if (ids.includes(isDelRid ? (w.rId as number) : w.id)) {
hasDelete = true
return false
}
return true
},
})
if (hasDelete) {
await setNavs(navsData)
if (!isSelfDevelop) {
navs.set(navsData)
event.emit('WEB_REFRESH')
}
}
return hasDelete
}
export function updateByWeb(oldId: number, newData: IWebProps) {
const keys = Object.keys(newData)
let ok = false
const navsData = dfsNavs({
navs: navs(),
webCallback: (item) => {
if (item.id === oldId) {
ok = true
for (let k of keys) {
item[k] = newData[k]
}
}
return ok
},
})
navs.set(navsData)
setNavs(navsData)
if (!isSelfDevelop) {
event.emit('WEB_REFRESH')
}
return ok
}
export function getWebById(id: number): IWebProps | null {
let web: IWebProps | null = null
dfsNavs({
navs: navs(),
webCallback: (item) => {
if (item.id === id) {
web = item
return true
}
return false
},
})
return web
}
export function updateByClass(oldId: number, newData: any) {
const keys = Object.keys(newData)
let ok = false
const navsData = dfsNavs({
navs: navs(),
callback: (item) => {
if (item.id === oldId) {
ok = true
for (let k of keys) {
item[k] = newData[k]
}
}
return ok
},
})
navs.set(navsData)
setNavs(navsData)
return ok
}
export function pushDataByAny(parentId: number, data: any): boolean {
let ok = false
const navsData = dfsNavs({
navs: navs(),
callback: (item) => {
if (item.id === parentId) {
ok = true
item.nav.unshift(data)
}
},
})
navs.set(navsData)
setNavs(navsData)
if (!isSelfDevelop) {
event.emit('WEB_REFRESH')
}
return ok
}
================================================
FILE: src/view/light/index.component.html
================================================
================================================
FILE: src/view/light/index.component.scss
================================================
.index-wrapper {
display: flex;
flex-direction: column;
height: 100vh;
padding-top: 0;
overflow: hidden;
.light-box {
display: flex;
justify-content: center;
height: 100%;
margin: 0 auto;
column-gap: 20px;
overflow: hidden;
}
.component-box {
max-width: 320px;
overflow: hidden;
overflow-y: auto;
}
}
.homepage {
height: 100%;
position: relative;
background: #f9f9f9;
border-radius: 5px;
overflow: hidden;
transition: 0.1s linear;
border: 1px solid transparent;
display: flex;
flex-direction: column;
.top-nav {
padding: 10px 0;
overflow: none;
overflow-x: auto;
white-space: nowrap;
border-bottom: 1px solid #eee;
text-align: center;
user-select: none;
::ng-deep .more-btn,
.ripple-btn {
height: 40px;
position: relative;
padding: 0 15px;
color: #000;
cursor: pointer;
border-radius: 5px;
overflow: hidden;
display: inline-flex;
align-items: center;
&.active::after {
content: '';
position: absolute;
bottom: 0;
left: 20%;
right: 20%;
height: 3px;
border-radius: 2px;
background-color: rgb(16, 142, 233);
}
}
}
}
.index-section {
position: relative;
overflow: hidden;
display: flex;
flex: 1;
// 侧边栏分类
$sidebarWidth: 80px;
.sidebar {
position: relative;
width: $sidebarWidth;
min-width: $sidebarWidth;
height: 98%;
text-align: center;
border-right: 1px solid #eee;
overflow: hidden;
overflow-y: auto;
.tag {
position: relative;
cursor: pointer;
padding: 11px 1px;
overflow-wrap: break-word;
&.active {
color: #1890ff;
&::after,
&::before {
content: '';
position: absolute;
left: 0;
width: 100%;
}
&:after {
top: 0;
border-top: 1px dashed #ccc;
}
&:before {
content: '';
bottom: 0;
border-bottom: 1px dashed #ccc;
}
}
}
}
.main {
flex: 1;
padding-bottom: 50px;
overflow: hidden;
overflow-y: auto;
}
}
================================================
FILE: src/view/light/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import {
Component,
ViewChild,
ElementRef,
ViewChildren,
QueryList,
} from '@angular/core'
import { CommonModule } from '@angular/common'
import { randomBgImg, removeBgImg, scrollIntoViewLeft } from 'src/utils'
import { CommonService } from 'src/services/common'
import { ComponentGroupComponent } from 'src/components/component-group/index.component'
import { WebMoreMenuComponent } from 'src/components/web-more-menu/index.component'
import { SearchComponent } from 'src/components/search/index.component'
import { NzSpinModule } from 'ng-zorro-antd/spin'
import { NzToolTipModule } from 'ng-zorro-antd/tooltip'
import { CardComponent } from 'src/components/card/index.component'
import { NoDataComponent } from 'src/components/no-data/no-data.component'
import { FooterComponent } from 'src/components/footer/footer.component'
import { FixbarComponent } from 'src/components/fixbar/index.component'
import { ToolbarTitleWebComponent } from 'src/components/toolbar-title/index.component'
import { SideImagesComponent } from 'src/components/side-images/index.component'
import { ClassTabsComponent } from 'src/components/class-tabs/index.component'
import type { INavProps } from 'src/types'
import { SidebarComponent } from 'src/components/sidebar/index.component'
@Component({
standalone: true,
imports: [
CommonModule,
ToolbarTitleWebComponent,
ComponentGroupComponent,
WebMoreMenuComponent,
SearchComponent,
NzSpinModule,
NzToolTipModule,
CardComponent,
NoDataComponent,
FooterComponent,
FixbarComponent,
SideImagesComponent,
ClassTabsComponent,
SidebarComponent,
],
selector: 'app-light',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export default class LightComponent {
@ViewChild('parent') parentElement!: ElementRef
@ViewChild(ComponentGroupComponent) componentChild!: ComponentGroupComponent
@ViewChildren('item') items!: QueryList
componentMaxWidth = ''
constructor(public commonService: CommonService) {}
get isEllipsis() {
return this.commonService.settings().lightOverType === 'ellipsis'
}
ngOnInit() {
randomBgImg()
}
ngOnDestroy() {
this.commonService.setOverIndex()
removeBgImg()
}
ngAfterViewInit() {
if (this.isEllipsis) {
this.commonService.getOverIndex('.top-nav .over-item')
} else {
scrollIntoViewLeft(
this.parentElement.nativeElement,
this.items.toArray()[this.commonService.oneIndex].nativeElement,
{
behavior: 'auto',
},
)
}
if (this.componentChild) {
setTimeout(() => {
this.componentMaxWidth =
Math.max(...this.componentChild.getWidths()) + 'px'
})
}
}
handleClickTop(e: any, data: INavProps) {
this.commonService.handleClickClass(data.id)
if (!this.isEllipsis) {
scrollIntoViewLeft(this.parentElement.nativeElement, e.target)
}
}
}
================================================
FILE: src/view/mobile/index.component.html
================================================
================================================
FILE: src/view/mobile/index.component.scss
================================================
$bg-color: #fbfbfb;
.app-page {
padding: 45px 0 0 0;
min-height: 100vh;
background: #f6f6f6;
overflow: hidden;
.header {
z-index: 999;
position: fixed;
top: 0;
left: 0;
right: 0;
text-align: center;
background-color: $bg-color;
box-shadow: 0 0 3px #ccc;
.header-top {
position: relative;
border-bottom: 1px solid #eee;
display: flex;
align-items: center;
justify-content: center;
padding: 5px 0;
.logo {
display: inline-block;
width: 40px;
height: 40px;
pointer-events: none;
}
}
.open {
position: absolute;
top: 50%;
left: 15px;
transform: translateY(-50%);
cursor: pointer;
i {
display: block;
margin-top: 6px;
height: 2px;
width: 25px;
background: #999;
transform-origin: right center;
transition: 0.1s linear;
}
&.active {
i:nth-child(1) {
transform: rotate(-45deg);
}
i:nth-child(2) {
opacity: 0;
}
i:nth-child(3) {
transform: translateY(2px) rotate(45deg);
}
}
}
.nav-open {
display: none;
box-shadow: 1px 1px 5px #ccc;
overflow: hidden;
background: $bg-color;
transition: 0.1s linear;
&.active {
display: block;
}
}
.nav-title {
display: inline-block;
width: 50%;
font-size: 16px;
padding: 8px 0;
color: #666;
cursor: pointer;
&:hover {
background: rgba(0, 0, 0, 0.05);
}
&:active,
&.active {
background: rgba(0, 0, 0, 0.05);
}
}
}
.wrapper {
margin: 0 0 60px 0;
.children-nav {
background: $bg-color;
margin: 0 0 15px 0;
padding: 10px 10px 5px;
white-space: nowrap;
overflow: auto;
box-shadow: 0 0 3px #ccc;
.tag {
position: relative;
display: inline-block;
font-size: 14px;
padding: 3px 5px;
margin: 0 3px 5px 0;
transition: background 0.1s linear;
color: #333;
}
.active::after {
content: '';
position: absolute;
bottom: 5px;
left: 50%;
width: 50%;
transform: translateX(-50%);
height: 3px;
border-radius: 2px;
background: #20a0ff;
}
}
}
}
================================================
FILE: src/view/mobile/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component } from '@angular/core'
import { CommonModule } from '@angular/common'
import { CommonService } from 'src/services/common'
import { SearchComponent } from 'src/components/search/index.component'
import { CardComponent } from 'src/components/card/index.component'
import { FooterComponent } from 'src/components/footer/footer.component'
import { ToolbarTitleWebComponent } from 'src/components/toolbar-title/index.component'
import { FixbarComponent } from 'src/components/fixbar/index.component'
@Component({
standalone: true,
imports: [
CommonModule,
SearchComponent,
CardComponent,
FooterComponent,
ToolbarTitleWebComponent,
FixbarComponent,
],
selector: 'app-mobile',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export default class MobileComponent {
open: boolean = false
constructor(public commonService: CommonService) {}
handleCilckNav(id: number) {
this.commonService.handleClickClass(id)
this.handleToggleOpen()
}
handleToggleOpen() {
this.open = !this.open
}
}
================================================
FILE: src/view/shortcut/index.component.html
================================================
{{ settings.shortcutTitle }}
{{ hours }}:{{ minutes }}:{{ seconds }}
{{ month }}{{ $t('_shortMonth') }}{{ date }}{{ $t('_shortDay') }}
{{ dayText }}
================================================
FILE: src/view/shortcut/index.component.scss
================================================
@media (max-width: 1280px) {
.shortcut {
--padding: 100px;
}
}
@media (max-width: 968px) {
.shortcut {
--padding: 70px;
}
}
@media (max-width: 768px) {
.shortcut {
--padding: 0;
--iconWidth: 45px;
--dockHeight: 61px;
.datetime {
font-size: 40px !important;
}
.title {
font-size: 22px !important;
}
.days {
font-size: 16px !important;
}
::ng-deep {
.web-list {
.common-icon {
width: 50px !important;
height: 50px !important;
min-width: 50px !important;
min-height: 50px !important;
}
.name {
width: 75px !important;
}
}
}
}
}
.shortcut {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: center;
padding-top: 20px;
text-align: center;
background-color: rgba(0, 0, 0, 0.02);
background-repeat: no-repeat;
background-size: cover;
background-position: center;
user-select: none;
transition: all 0.1s linear;
&.hasComponent {
padding-top: 80px;
}
.box2 {
width: 100%;
display: flex;
flex-direction: column;
}
.flex1 {
flex: 1;
padding: 0 var(--padding, 200px);
margin-bottom: 20px;
overflow: hidden;
overflow-y: auto;
&::-webkit-scrollbar {
display: none;
}
}
.dock {
padding-bottom: 10px;
.dock-box {
background-color: rgba(255, 255, 255, 0.4);
border-radius: 16px;
height: var(--dockHeight, 66px);
padding: 0 8px;
padding-bottom: 8px;
box-shadow: rgba(0, 0, 0, 0.25) 0px 0px 12px 0px;
display: inline-flex;
justify-content: center;
align-items: flex-end;
gap: 16px;
max-width: 100%;
&::-webkit-scrollbar {
display: none;
}
}
.dock-item {
cursor: pointer;
}
::ng-deep {
.icon {
background-color: transparent;
}
.common-icon {
width: var(--iconWidth, 50px);
height: var(--iconWidth, 50px);
}
}
}
.title {
font-size: 30px;
font-weight: bold;
}
::ng-deep {
.name {
color: #fff !important;
}
}
.datetime {
font-size: 60px;
color: #fff;
line-height: 1;
font-family: text;
font-weight: bold;
}
.days {
font-size: 20px;
font-weight: bold;
color: rgba(249, 250, 251, 0.85);
margin-bottom: 15px;
margin-top: 5px;
font-family: text;
}
.margin {
margin: 0 10px;
}
}
.tianqi {
position: fixed;
top: 0;
right: 100px;
}
================================================
FILE: src/view/shortcut/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
import { Component } from '@angular/core'
import { CommonModule } from '@angular/common'
import { NgStyle } from '@angular/common'
import { isDark as isDarkFn, getDateTime, isMobile } from 'src/utils'
import { settings } from 'src/store'
import type { IWebProps } from 'src/types'
import { JumpService } from 'src/services/jump'
import { $t } from 'src/locale'
import { SearchComponent } from 'src/components/search/index.component'
import { NzToolTipModule } from 'ng-zorro-antd/tooltip'
import { FixbarComponent } from 'src/components/fixbar/index.component'
import { WebListComponent } from 'src/components/web-list/index.component'
import { LogoComponent } from 'src/components/logo/logo.component'
import event from 'src/utils/mitt'
@Component({
standalone: true,
imports: [
CommonModule,
NgStyle,
SearchComponent,
NzToolTipModule,
FixbarComponent,
WebListComponent,
LogoComponent,
],
selector: 'app-shortcut',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export default class ShortcutComponent {
readonly $t = $t
readonly settings = settings()
readonly isMobile = isMobile()
readonly shortcutThemeImage = settings().shortcutThemeImages?.[0]?.['src']
isDark: boolean = isDarkFn()
timer: any = null
month = 0
date = 0
hours = ''
minutes = ''
seconds = ''
dayText = ''
dockList: IWebProps[] = []
iconSize: number = 0
frameLoad = false
constructor(public jumpService: JumpService) {
event.on('EVENT_DARK', (isDark: any) => {
this.isDark = isDark
})
event.on('DOCK_LIST', (dockList: any) => {
this.dockList = dockList
})
this.getDateTime()
}
ngOnInit() {
document.addEventListener('visibilitychange', (e: any) => {
const hide = e.target.hidden
if (hide) {
clearTimeout(this.timer)
} else {
this.getDateTime()
}
})
}
handleMouseLeave(e: any) {
const imgs = e.currentTarget.querySelectorAll('.common-icon')
if (this.iconSize !== 0) {
imgs.forEach((el: HTMLImageElement) => {
el.style.width = `${this.iconSize}px`
el.style.height = `${this.iconSize}px`
})
}
}
handleMouseOver(e: any) {
if (this.isMobile) {
return
}
try {
const imgs = e.currentTarget.querySelectorAll('.common-icon')
if (!imgs.length) {
return
}
const nodeName = e.target.nodeName
if (nodeName === 'APP-LOGO' || nodeName === 'DIV') {
if (this.iconSize === 0) {
this.iconSize = imgs[0].clientWidth
}
let index = Number(e.target.dataset.index)
if (Number.isNaN(index)) {
index = Number(e.target.parentNode.dataset.index)
}
imgs.forEach((el: HTMLImageElement) => {
el.style.width = `${this.iconSize}px`
el.style.height = `${this.iconSize}px`
})
const largeSize = this.iconSize * 1.4
imgs[index].style.width = `${largeSize}px`
imgs[index].style.height = `${largeSize}px`
const middleSize = this.iconSize * 1.2
const smallSize = this.iconSize * 1.04
if (imgs[index - 1]) {
imgs[index - 1].style.width = `${middleSize}px`
imgs[index - 1].style.height = `${middleSize}px`
}
if (imgs[index - 2]) {
imgs[index - 2].style.width = `${smallSize}px`
imgs[index - 2].style.height = `${smallSize}px`
}
if (imgs[index + 1]) {
imgs[index + 1].style.width = `${middleSize}px`
imgs[index + 1].style.height = `${middleSize}px`
}
if (imgs[index + 2]) {
imgs[index + 2].style.width = `${smallSize}px`
imgs[index + 2].style.height = `${smallSize}px`
}
}
} catch (error) {
console.log(error)
}
}
getDateTime() {
this.timer = setTimeout(() => {
this.getDateTime()
}, 1000)
const { hours, minutes, seconds, month, date, dayText } = getDateTime()
this.hours = hours
this.minutes = minutes
this.seconds = seconds
this.month = month
this.date = date
this.dayText = dayText
}
ngOnDestroy() {
clearTimeout(this.timer)
}
trackByItemWeb(a: any, item: any) {
return item.id
}
iframeLoad() {
this.frameLoad = true
}
}
================================================
FILE: src/view/side/index.component.html
================================================
0"
[images]="commonService.settings().sideThemeImages"
[autoplay]="commonService.settings().sideThemeAutoplay"
[height]="commonService.settings().sideThemeHeight"
/>
================================================
FILE: src/view/side/index.component.scss
================================================
@media (max-width: 768px) {
.content {
padding-right: 12px !important;
padding-left: 10px !important;
}
}
.main {
min-height: 100vh;
background-color: #f0f2f5;
display: flex;
.inner-layout {
flex: 1;
width: 0;
display: flex;
flex-direction: column;
.content {
flex: 1;
margin-bottom: 2rem;
padding: 10px 70px 0 15px;
display: flex;
flex-direction: column;
}
}
.box {
flex: 1;
transition: 0.1s linear;
}
::ng-deep {
.web-list {
padding: 0;
.name {
font-size: 13px;
}
.common-icon {
border-radius: 2px !important;
}
}
}
}
================================================
FILE: src/view/side/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component } from '@angular/core'
import { CommonModule } from '@angular/common'
import { $t } from 'src/locale'
import { CommonService } from 'src/services/common'
import { ComponentGroupComponent } from 'src/components/component-group/index.component'
import { SearchComponent } from 'src/components/search/index.component'
import { NzSpinModule } from 'ng-zorro-antd/spin'
import { CardComponent } from 'src/components/card/index.component'
import { NoDataComponent } from 'src/components/no-data/no-data.component'
import { FooterComponent } from 'src/components/footer/footer.component'
import { FixbarComponent } from 'src/components/fixbar/index.component'
import { SwiperComponent } from 'src/components/swiper/index.component'
import { ToolbarTitleWebComponent } from 'src/components/toolbar-title/index.component'
import { WebListComponent } from 'src/components/web-list/index.component'
import { ClassTabsComponent } from 'src/components/class-tabs/index.component'
import { SidebarComponent } from 'src/components/sidebar/index.component'
@Component({
standalone: true,
imports: [
CommonModule,
WebListComponent,
ToolbarTitleWebComponent,
ComponentGroupComponent,
SearchComponent,
NzSpinModule,
CardComponent,
NoDataComponent,
FooterComponent,
FixbarComponent,
SwiperComponent,
ClassTabsComponent,
SidebarComponent,
],
selector: 'app-side',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export default class SideComponent {
readonly $t = $t
constructor(public commonService: CommonService) {}
}
================================================
FILE: src/view/sim/index.component.html
================================================
0"
[class.bootstrap]="commonService.settings().simThemeHeight < 260"
>
{{ commonService.settings().simTitle }}
================================================
FILE: src/view/sim/index.component.scss
================================================
@media (max-width: 1280px) {
.sim {
--width: 1000px !important;
}
}
@media (max-width: 1080px) {
.sim {
--width: 900px !important;
}
}
@media (max-width: 980px) {
.sim {
--width: 768px !important;
}
}
@media (max-width: 768px) {
.wrapper {
flex-direction: column;
}
.sidebar {
position: relative !important;
top: 0 !important;
width: 100% !important;
}
.sim {
--width: 100% !important;
}
.site-box {
max-width: 100% !important;
}
}
@media (max-width: 768px) {
.search-sm {
display: block;
}
}
.sim-bg {
z-index: -1;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #f0f2f5;
}
.top-nav {
position: relative;
max-width: var(--width);
width: 100%;
margin: 10px auto;
padding: 0 10px;
overflow: none;
overflow-x: auto;
white-space: nowrap;
border-bottom: 1px solid #eee;
text-align: center;
::ng-deep .more-btn,
.over-item {
position: relative;
display: inline-block;
padding: 10px 15px;
cursor: pointer;
overflow: hidden;
&.active {
font-weight: 500;
color: #000;
&::after {
content: '';
position: absolute;
bottom: 0;
left: 20%;
right: 20%;
height: 3px;
border-radius: 2px;
background-color: rgb(16, 142, 233);
}
}
}
.over-item {
&:hover {
font-weight: 500;
color: #000;
}
}
}
.sim {
--width: 1200px;
display: flex;
flex-direction: column;
min-height: 100vh;
.wallpaper {
position: relative;
background-color: #fff;
}
.bar {
text-align: center;
margin-top: 10px;
user-select: none;
font-weight: 600;
.title {
background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
background-clip: text;
color: transparent;
display: inline-block;
margin-bottom: 0;
}
.description {
white-space: pre-wrap;
}
}
.sim-component {
min-width: var(--width);
max-width: 100%;
margin: 0 auto;
}
.wrapper {
flex: 1;
width: var(--width);
padding-bottom: 50px;
margin: 0 auto;
display: flex;
gap: 20px;
.sidebar {
position: sticky;
top: 20px;
left: 0;
width: 180px;
min-width: 180px;
height: min-content;
padding: 10px 0;
text-align: center;
background-color: #fff;
box-shadow: 0 0 1px #ccc;
max-height: calc(100vh - 50px);
overflow-y: auto;
border-radius: 4px;
.ripple-btn {
padding: 14px 0;
cursor: pointer;
border-radius: 5px;
transition: 0.1s linear;
user-select: none;
font-weight: 500;
&:hover {
background-color: rgba(0, 0, 0, 0.03);
}
&.active {
color: #409eff;
background-color: rgb(231, 241, 253);
}
}
}
.site-box {
flex: 1;
background-color: #f9f9f9;
padding: 5px 5px 15px 5px;
border-radius: 4px;
}
}
}
================================================
FILE: src/view/sim/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import {
Component,
ViewChild,
ElementRef,
ViewChildren,
QueryList,
} from '@angular/core'
import { CommonModule } from '@angular/common'
import { settings } from 'src/store'
import { compilerTemplate } from 'src/utils/utils'
import { scrollIntoViewLeft } from 'src/utils'
import { CommonService } from 'src/services/common'
import { ComponentGroupComponent } from 'src/components/component-group/index.component'
import { WebMoreMenuComponent } from 'src/components/web-more-menu/index.component'
import { SearchComponent } from 'src/components/search/index.component'
import { NzSpinModule } from 'ng-zorro-antd/spin'
import { NzToolTipModule } from 'ng-zorro-antd/tooltip'
import { CardComponent } from 'src/components/card/index.component'
import { NoDataComponent } from 'src/components/no-data/no-data.component'
import { FooterComponent } from 'src/components/footer/footer.component'
import { FixbarComponent } from 'src/components/fixbar/index.component'
import { SwiperComponent } from 'src/components/swiper/index.component'
import { SafeHtmlPipe } from 'src/pipe/safeHtml.pipe'
import { ToolbarTitleWebComponent } from 'src/components/toolbar-title/index.component'
import { ClassTabsComponent } from 'src/components/class-tabs/index.component'
import type { INavProps } from 'src/types'
import { SidebarComponent } from 'src/components/sidebar/index.component'
@Component({
standalone: true,
imports: [
CommonModule,
ToolbarTitleWebComponent,
ComponentGroupComponent,
WebMoreMenuComponent,
SearchComponent,
NzSpinModule,
NzToolTipModule,
CardComponent,
NoDataComponent,
FooterComponent,
FixbarComponent,
SwiperComponent,
SafeHtmlPipe,
ClassTabsComponent,
SidebarComponent,
],
selector: 'app-sim',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export default class SimComponent {
@ViewChild('parent') parentRef!: ElementRef
@ViewChildren('item') itemsRef!: QueryList
readonly description: string = compilerTemplate(settings().simThemeDesc)
constructor(public commonService: CommonService) {}
ngOnDestroy() {
this.commonService.setOverIndex()
}
get isEllipsis() {
return this.commonService.settings().simOverType === 'ellipsis'
}
ngAfterViewInit() {
if (this.isEllipsis) {
this.commonService.getOverIndex('.top-nav .over-item')
} else {
scrollIntoViewLeft(
this.parentRef.nativeElement,
this.itemsRef.toArray()[this.commonService.oneIndex].nativeElement,
{
behavior: 'auto',
},
)
}
}
handleClickTop(e: any, data: INavProps) {
this.commonService.handleClickClass(data.id)
if (!this.isEllipsis) {
scrollIntoViewLeft(this.parentRef.nativeElement, e.target)
}
}
}
================================================
FILE: src/view/super/index.component.html
================================================
1
"
>
{{ item.title }}
{{
commonService.isLogin ? $t('_add') : $t('_apply')
}}
0"
/>
================================================
FILE: src/view/super/index.component.scss
================================================
@media (max-width: 1200px) {
.super-xjh {
--width: 960px;
--leftWidth: 180px;
}
}
@media (max-width: 998px) {
.super-xjh {
--width: 100%;
--leftWidth: 150px;
}
}
@media (max-width: 768px) {
.super-xjh {
--width: 100%;
--leftWidth: 100%;
}
.main-box {
flex-direction: column;
row-gap: 20px;
}
.sheader {
z-index: 3;
position: sticky;
top: 0;
left: 0;
.headerbox {
flex-direction: column;
justify-content: center;
align-items: center;
}
}
::ng-deep {
.sideimg {
position: initial !important;
padding: 20px 20px 0 20px;
background-color: #fff;
max-height: initial !important;
}
}
}
@media (min-width: 1200px) {
.super-xjh {
--width: 1150px;
--leftWidth: 180px;
}
}
.super-xjh {
--stickyTop: 20px;
background-color: #f2f3f5;
min-height: 100vh;
display: flex;
flex-direction: column;
.sheader {
display: flex;
align-items: center;
background-color: #fff;
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.09);
.headerbox {
width: var(--width);
overflow: hidden;
overflow-x: auto;
margin: 0 auto;
display: flex;
}
.logo {
width: 40px;
height: 40px;
}
.title {
color: #000;
margin-left: 4px;
user-select: none;
margin-right: 8px;
}
.hitem {
display: flex;
align-items: center;
font-weight: bold;
font-size: 18px;
margin-left: 10px;
white-space: nowrap;
&:hover {
color: #000;
}
}
::ng-deep .more-btn,
.over-item {
color: #515767;
font-weight: normal;
font-size: 14px;
margin-left: 0;
padding: 0 10px;
cursor: pointer;
&.active {
font-weight: bold;
color: #1e80ff;
}
}
.topnav {
width: 100%;
position: relative;
flex: 1;
overflow: hidden;
overflow-x: auto;
padding: 15px 0;
}
}
.component-box {
min-width: var(--width);
max-width: 100%;
margin: 10px auto -10px;
}
.main-box {
width: var(--width);
margin: 10px auto 40px;
display: flex;
flex: 1;
column-gap: 20px;
.left {
position: sticky;
top: var(--stickyTop);
width: var(--leftWidth);
min-width: var(--leftWidth);
max-height: calc(100vh - 110px);
text-align: left;
background-color: #fff;
padding: 8px;
font-size: 16px;
border-radius: 4px;
overflow: hidden;
overflow-y: auto;
border: 1px solid transparent;
display: none;
.bar-item {
padding: 10px 17px;
cursor: pointer;
border-radius: 4px;
display: flex;
align-items: center;
color: #515767;
&:hover {
background-color: #f7f8fa;
}
&.active {
font-weight: bold;
color: #1e80ff;
background-color: #eaf2ff;
}
}
.sideicon {
width: 20px;
height: 20px;
margin-right: 12px;
}
}
.middle {
position: relative;
background: #fff;
flex: 1;
border-radius: 4px;
overflow: hidden;
&.noads {
width: initial;
}
.search-t {
border-bottom: 1px solid #eee;
margin-bottom: 12px;
}
.bar {
margin-top: 10px;
display: flex;
overflow: hidden;
overflow-x: auto;
padding-bottom: 8px;
}
.bar-item {
position: relative;
padding: 0 10px;
white-space: nowrap;
cursor: pointer;
color: #515767;
&:hover {
color: #1e80ff;
}
&.active {
font-weight: bold;
&::after {
content: '';
display: block;
position: absolute;
bottom: -5px;
left: 50%;
transform: translateX(-50%);
width: 40%;
height: 3px;
background-color: #1e80ff;
border-radius: 2px;
}
}
&.none {
display: none;
}
}
.apply {
text-align: center;
padding: 20px 0;
}
.appbtn {
cursor: pointer;
color: #1890ff;
user-select: none;
font-size: 12px;
}
}
}
::ng-deep {
.sideimg {
position: sticky;
width: 100%;
top: var(--stickyTop);
max-height: calc(100vh - 110px);
}
.standard {
margin: 0 0 15px 0px;
}
.retro2,
.example2,
.original2 {
margin: 12px 0;
}
}
}
================================================
FILE: src/view/super/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import {
Component,
ViewChild,
ElementRef,
ViewChildren,
QueryList,
} from '@angular/core'
import { CommonModule } from '@angular/common'
import { $t } from 'src/locale'
import { CommonService } from 'src/services/common'
import { ComponentGroupComponent } from 'src/components/component-group/index.component'
import { WebMoreMenuComponent } from 'src/components/web-more-menu/index.component'
import { SearchComponent } from 'src/components/search/index.component'
import { NzSpinModule } from 'ng-zorro-antd/spin'
import { NzToolTipModule } from 'ng-zorro-antd/tooltip'
import { CardComponent } from 'src/components/card/index.component'
import { NoDataComponent } from 'src/components/no-data/no-data.component'
import { FooterComponent } from 'src/components/footer/footer.component'
import { FixbarComponent } from 'src/components/fixbar/index.component'
import { SideImagesComponent } from 'src/components/side-images/index.component'
import { queryString, scrollIntoViewLeft } from 'src/utils'
import { SidebarComponent } from 'src/components/sidebar/index.component'
import type { INavThreeProp, INavProps } from 'src/types'
import event from 'src/utils/mitt'
@Component({
standalone: true,
imports: [
CommonModule,
ComponentGroupComponent,
WebMoreMenuComponent,
SearchComponent,
NzSpinModule,
NzToolTipModule,
CardComponent,
NoDataComponent,
FooterComponent,
FixbarComponent,
SideImagesComponent,
SidebarComponent,
],
selector: 'app-side',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export default class SideComponent {
@ViewChild('parentThree') parentThreeElement!: ElementRef
@ViewChild('parent') parentElement!: ElementRef
@ViewChildren('item') items!: QueryList
@ViewChildren('itemThree') itemsThree!: QueryList
readonly $t = $t
constructor(public commonService: CommonService) {}
get isEllipsis() {
return this.commonService.settings().superOverType === 'ellipsis'
}
ngAfterViewInit() {
if (this.isEllipsis) {
this.commonService.getOverIndex('.topnav .over-item')
} else {
scrollIntoViewLeft(
this.parentElement.nativeElement,
this.items.toArray()[this.commonService.oneIndex].nativeElement,
{
behavior: 'auto',
},
)
}
scrollIntoViewLeft(
this.parentThreeElement.nativeElement,
this.itemsThree.toArray()[this.commonService.selectedThreeIndex]
.nativeElement,
{ behavior: 'auto' },
)
}
ngOnDestroy() {
this.commonService.setOverIndex()
}
openCreateWebModal() {
const { id } = queryString()
event.emit('CREATE_WEB', {
parentId: Number.parseInt(id as string),
})
}
handleClickTop(e: any, data: INavProps) {
if (!this.isEllipsis) {
scrollIntoViewLeft(this.parentElement.nativeElement, e.target)
}
queueMicrotask(() => {
this.commonService.handleClickClass(data.id)
})
}
handleClickThree(e: any, data: INavThreeProp) {
this.commonService.handleClickClass(data.id)
scrollIntoViewLeft(this.parentThreeElement.nativeElement, e.target)
}
}
================================================
FILE: src/view/system/auth/index.component.html
================================================
================================================
FILE: src/view/system/auth/index.component.scss
================================================
.add-btn {
margin-bottom: 20px;
margin-right: 20px;
}
.poster {
width: 1000px;
max-width: 100%;
border-radius: 12px;
}
.desc {
width: 300px;
white-space: pre-wrap;
}
.ant-table-wrapper {
overflow: auto;
}
================================================
FILE: src/view/system/auth/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component } from '@angular/core'
import { FormsModule } from '@angular/forms'
import { CommonModule } from '@angular/common'
import { $t } from 'src/locale'
import { NzMessageService } from 'ng-zorro-antd/message'
import { setAuthCode, getAuthCode, removeAuthCode } from 'src/utils/user'
import { getUserInfo, updateUserInfo } from 'src/api'
import { NzInputModule } from 'ng-zorro-antd/input'
import { NzButtonModule } from 'ng-zorro-antd/button'
import { NzSpinModule } from 'ng-zorro-antd/spin'
@Component({
standalone: true,
imports: [
CommonModule,
FormsModule,
NzInputModule,
NzButtonModule,
NzSpinModule,
],
selector: 'auth',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export default class AuthComponent {
readonly $t = $t
submitting: boolean = false
isPermission = !!getAuthCode()
authCode = ''
url = ''
constructor(private message: NzMessageService) {}
ngOnInit() {
if (this.isPermission) {
this.getUserInfo()
}
}
private async getUserInfo(params?: any) {
this.submitting = true
return getUserInfo(params)
.then((res: any) => {
if (typeof res.data?.data?.url === 'string') {
this.isPermission = true
this.url = res.data.data.url
}
return res
})
.finally(() => {
this.submitting = false
})
}
handleSubmitAuthCode() {
if (this.submitting || !this.authCode) {
return
}
this.getUserInfo({ code: this.authCode }).then(() => {
setAuthCode(this.authCode)
window.location.reload()
})
}
handleSave() {
this.submitting = true
updateUserInfo({
url: this.url,
})
.then(() => {
this.getUserInfo()
this.message.success(this.$t('_saveSuccess'))
})
.finally(() => {
this.submitting = false
})
}
logoutAuthCode() {
removeAuthCode()
window.location.reload()
}
}
================================================
FILE: src/view/system/bookmark/index.component.html
================================================
================================================
FILE: src/view/system/bookmark/index.component.scss
================================================
================================================
FILE: src/view/system/bookmark/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, ViewChild, ElementRef } from '@angular/core'
import { $t } from 'src/locale'
import { NzNotificationService } from 'ng-zorro-antd/notification'
import { NzMessageService } from 'ng-zorro-antd/message'
import { NzButtonModule } from 'ng-zorro-antd/button'
import { setNavs } from 'src/utils/web'
import { parseBookmark } from 'src/utils/bookmark'
import { NzInputModule } from 'ng-zorro-antd/input'
@Component({
standalone: true,
imports: [NzInputModule, NzButtonModule],
selector: 'system-bookmark',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export default class SystemBookmarkComponent {
@ViewChild('file', { static: false }) file!: ElementRef
readonly $t = $t
constructor(
private message: NzMessageService,
private notification: NzNotificationService,
) {}
ngOnInit() {}
onClickFile() {
this.file.nativeElement.click()
}
onBookChange(e: any) {
const that = this
const { files } = e.target
if (files.length <= 0) return
const file = files[0]
const fileReader = new FileReader()
fileReader.readAsText(file)
fileReader.onload = function () {
const html = this.result as string
try {
const result = parseBookmark(html)
if (!Array.isArray(result)) {
that.notification.error(
$t('_errorBookTip'),
`${result?.message ?? ''}`,
)
} else {
that.message.success($t('_importSuccess'))
setNavs(result)
setTimeout(() => window.location.reload(), 2000)
}
} catch (error: any) {
that.notification.error($t('_errorBookTip'), `${error.message}`)
}
e.target.value = ''
}
}
}
================================================
FILE: src/view/system/bookmark-export/index.component.html
================================================
{{ $t('_clickExport') }}
================================================
FILE: src/view/system/bookmark-export/index.component.scss
================================================
================================================
FILE: src/view/system/bookmark-export/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component } from '@angular/core'
import { CommonModule } from '@angular/common'
import { FormsModule } from '@angular/forms'
import { $t } from 'src/locale'
import { NzNotificationService } from 'ng-zorro-antd/notification'
import { NzButtonModule } from 'ng-zorro-antd/button'
import type { INavProps, IWebProps } from 'src/types'
import { navs } from 'src/store'
import { bookmarksExport } from 'src/api'
import { saveAs } from 'file-saver'
import { getAuthCode } from 'src/utils/user'
import { NzSwitchModule } from 'ng-zorro-antd/switch'
import { NzSpinModule } from 'ng-zorro-antd/spin'
import { dfsNavs } from 'src/utils/pureUtils'
import LZString from 'lz-string'
@Component({
standalone: true,
imports: [
CommonModule,
NzSwitchModule,
NzSpinModule,
FormsModule,
NzButtonModule,
],
selector: 'system-bookmark-export',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export default class SystemBookmarkExportComponent {
readonly $t = $t
submitting = false
constructor(private notification: NzNotificationService) {}
async bookmarksExport(): Promise {
if (!getAuthCode()) {
return this.notification.error('Error', 'Bad credentials')
}
if (this.submitting) {
return
}
const navsData = dfsNavs({
navs: navs(),
callback: (data: INavProps) => {
for (const k in data) {
const keys = ['title', 'nav', 'icon']
if (!keys.includes(k)) {
delete data[k]
}
}
},
webCallback: (data: IWebProps) => {
for (const k in data) {
const keys = ['url', 'icon', 'name']
if (!keys.includes(k)) {
delete data[k]
}
}
},
})
this.submitting = true
bookmarksExport({ data: LZString.compress(JSON.stringify(navsData)) })
.then((res) => {
const fileName = 'bookmarks.html'
const blob = new Blob([res.data.data], {
type: 'text/html;charset=utf-8',
})
saveAs(blob, fileName)
this.notification.success('OK', fileName, {
nzDuration: 0,
})
})
.finally(() => {
this.submitting = false
})
}
}
================================================
FILE: src/view/system/collect/index.component.html
================================================
{{ $t('_save') }}
{{ $t('_refresh') }}
{{ $t('_del') }}
处理完成所有数据后需要点击一次保存方可生效
{{ $t('_action') }}
{{ $t('_type') }}
ID
{{ $t('_icon') }}
{{ $t('_webName') }}
{{ $t('_associatedLabels') }}
{{ $t('_webDesc') }}
{{ $t('_webTag') }}
{{ $t('_createAt') }}
{{ $t('_handle') }}
{{ typeMap[data.extra.type] }}
{{ data.id }}
↓
{{
data.oldData.name
}}
↓
↓
{{ data.oldData.desc }}
↓
{{ data.breadcrumb }}
{{ data.createdAt }}
================================================
FILE: src/view/system/collect/index.component.scss
================================================
.add-btn {
margin-bottom: 20px;
margin-right: 20px;
}
.desc {
width: 300px;
white-space: pre-wrap;
}
.ant-table-wrapper {
overflow: auto;
}
================================================
FILE: src/view/system/collect/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component } from '@angular/core'
import { CommonModule } from '@angular/common'
import { $t } from 'src/locale'
import { NzMessageService } from 'ng-zorro-antd/message'
import { NzModalService } from 'ng-zorro-antd/modal'
import { navs } from 'src/store'
import { setAuthCode, getAuthCode } from 'src/utils/user'
import { getUserCollect, delUserCollect, updateFileContent } from 'src/api'
import { DB_PATH } from 'src/constants'
import { isSelfDevelop } from 'src/utils/utils'
import { NzSpinModule } from 'ng-zorro-antd/spin'
import { NzButtonModule } from 'ng-zorro-antd/button'
import { NzTableModule } from 'ng-zorro-antd/table'
import { LogoComponent } from 'src/components/logo/logo.component'
import { TagListComponent } from 'src/components/tag-list/index.component'
import { ActionType } from 'src/types'
import { deleteByIds, getWebById } from 'src/utils/web'
import { JumpService } from 'src/services/jump'
import event from 'src/utils/mitt'
@Component({
standalone: true,
imports: [
CommonModule,
NzSpinModule,
NzButtonModule,
NzTableModule,
LogoComponent,
TagListComponent,
],
providers: [NzMessageService, NzModalService],
selector: 'user-collect',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export default class CollectComponent {
readonly $t = $t
readonly isSelfDevelop = isSelfDevelop
isPermission = !!getAuthCode()
submitting: boolean = false
dataList: Array = []
authCode = ''
typeMap: Record = {
[ActionType.Create]: $t('_add'),
[ActionType.Edit]: $t('_edit'),
[ActionType.Delete]: $t('_del'),
}
setOfCheckedId = new Set()
checked = false
constructor(
private message: NzMessageService,
private modal: NzModalService,
public readonly jumpService: JumpService,
) {}
ngOnInit() {
this.getUserCollect()
}
onAllChecked(checked: boolean) {
this.checked = checked
this.dataList.forEach((item) => {
if (checked) {
this.setOfCheckedId.add(item.extra.uuid)
} else {
this.setOfCheckedId.delete(item.extra.uuid)
}
})
}
onItemChecked(id: number, checked: boolean): void {
if (checked) {
this.setOfCheckedId.add(id)
} else {
this.setOfCheckedId.delete(id)
}
}
batchDelete() {
if (this.submitting || !this.setOfCheckedId.size) {
return
}
this.modal.confirm({
nzTitle: $t('_confirmDel'),
nzOkDanger: true,
nzWidth: 350,
nzOkText: $t('_del'),
nzOnOk: () => {
this.submitting = true
delUserCollect({
data: this.dataList.filter((item) =>
this.setOfCheckedId.has(item.extra.uuid),
),
})
.then((res) => {
this.checked = false
this.setOfCheckedId.clear()
this.dataList = res.data?.data || []
})
.finally(() => {
this.submitting = false
})
},
})
}
handleDelete(idx: number) {
this.submitting = true
delUserCollect({
data: [this.dataList[idx]],
})
.then((res) => {
this.dataList = res.data?.data || []
})
.finally(() => {
this.submitting = false
})
}
highlightDifferences(original: string, modified: string): string {
function getLCS(str1: string, str2: string) {
let m = str1.length,
n = str2.length
let dp = Array.from({ length: m + 1 }, () => Array(n + 1).fill(''))
for (let i = 1; i <= m; i++) {
for (let j = 1; j <= n; j++) {
if (str1[i - 1] === str2[j - 1]) {
dp[i][j] = dp[i - 1][j - 1] + str1[i - 1]
} else {
dp[i][j] =
dp[i - 1][j].length > dp[i][j - 1].length
? dp[i - 1][j]
: dp[i][j - 1]
}
}
}
return dp[m][n]
}
const lcs = getLCS(original, modified)
let result = ''
let i = 0,
j = 0
for (let char of lcs) {
while (i < original.length && original[i] !== char) {
i++ // 跳过删除的字符
}
while (j < modified.length && modified[j] !== char) {
result += `${modified[j]} ` // 新增的字符
j++
}
result += char // 相同的字符
i++
j++
}
// 处理 modified 剩余部分(如果有)
while (j < modified.length) {
result += `${modified[j]} `
j++
}
return result
}
getUserCollect() {
this.submitting = true
getUserCollect()
.then((res: any) => {
this.isPermission = true
this.dataList = (res.data?.data || []).map((item: any) => {
if (item.extra.type === ActionType.Edit) {
item.oldData = getWebById(item.id)
if (item.oldData) {
item.name = this.highlightDifferences(
item.oldData.name,
item.name,
)
item.desc = this.highlightDifferences(
item.oldData.desc,
item.desc,
)
}
}
return item
})
})
.finally(() => {
this.submitting = false
})
}
handleSubmitAuthCode() {
if (this.submitting || !this.authCode) {
return
}
setAuthCode(this.authCode)
this.getUserCollect()
}
handleCreate(data: any, idx: number) {
const that = this
event.emit('CREATE_WEB', {
parentId: data.parentId,
detail: data,
isMove: true,
})
event.emit('SET_CREATE_WEB', {
parentId: data.parentId,
breadcrumb: data.breadcrumb,
detail: null,
callback() {
that.handleDelete(idx)
},
})
}
handleDeleteWeb(data: any, idx: number) {
this.modal.info({
nzTitle: $t('_confirmDel'),
nzOnOk: async () => {
if (await deleteByIds([data.id])) {
this.message.success($t('_delSuccess'))
} else {
this.message.error('Delete failed')
}
this.handleDelete(idx)
},
})
}
handleUpdateWeb(data: any, idx: number) {
const that = this
event.emit('CREATE_WEB', {
detail: data,
})
event.emit('SET_CREATE_WEB', {
callback() {
that.handleDelete(idx)
},
})
}
handleClick(data: any, idx: number) {
if (data.extra.type === ActionType.Create) {
this.handleCreate(data, idx)
} else if (data.extra.type === ActionType.Delete) {
this.handleDeleteWeb(data, idx)
} else if (data.extra.type === ActionType.Edit) {
this.handleUpdateWeb(data, idx)
}
}
handleSubmit() {
if (this.submitting) {
return
}
this.modal.info({
nzTitle: $t('_syncDataOut'),
nzOkText: $t('_confirmSync'),
nzContent: $t('_confirmSyncTip'),
nzOnOk: () => {
this.submitting = true
updateFileContent({
message: 'update db',
content: JSON.stringify(navs()),
path: DB_PATH,
})
.then(() => {
this.message.success($t('_syncSuccessTip'))
})
.finally(() => {
this.submitting = false
})
},
})
}
trackByItem(i: number, item: any) {
return item.id
}
}
================================================
FILE: src/view/system/component/index.component.html
================================================
{{ $t('_save') }}
================================================
FILE: src/view/system/component/index.component.scss
================================================
================================================
FILE: src/view/system/component/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component, ViewChild } from '@angular/core'
import { CommonModule } from '@angular/common'
import { FormsModule } from '@angular/forms'
import { NgSwitch, NgSwitchCase } from '@angular/common'
import { $t } from 'src/locale'
import { NzMessageService } from 'ng-zorro-antd/message'
import { NzModalService } from 'ng-zorro-antd/modal'
import { updateFileContent } from 'src/api'
import { COMPONENT_PATH } from 'src/constants'
import { component } from 'src/store'
import { ComponentType } from 'src/types'
import type { IComponentItemProps, IComponentProps } from 'src/types'
import { CalendarDrawerComponent } from 'src/components/calendar/drawer/index.component'
import { RuntimeDrawerComponent } from 'src/components/runtime/drawer/index.component'
import { OffWorkDrawerComponent } from 'src/components/off-work/drawer/index.component'
import { ImageDrawerComponent } from 'src/components/image/drawer/index.component'
import { CountdownDrawerComponent } from 'src/components/countdown/drawer/index.component'
import { HTMLDrawerComponent } from 'src/components/html/drawer/index.component'
import { HolidayDrawerComponent } from 'src/components/holiday/drawer/index.component'
import { NewsDrawerComponent } from 'src/components/news/drawer/index.component'
import { componentTitleMap } from './types'
import { NzButtonModule } from 'ng-zorro-antd/button'
import { NzSliderModule } from 'ng-zorro-antd/slider'
import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm'
import { CalendarComponent } from 'src/components/calendar/index.component'
import { RuntimeComponent } from 'src/components/runtime/index.component'
import { OffWorkComponent } from 'src/components/off-work/index.component'
import { ImageComponent } from 'src/components/image/index.component'
import { CountdownComponent } from 'src/components/countdown/index.component'
import { HTMLComponent } from 'src/components/html/index.component'
import { HolidayComponent } from 'src/components/holiday/index.component'
import { NewsComponent } from 'src/components/news/index.component'
import { CarouselComponent } from 'src/components/carousel/index.component'
import { CarouselDrawerComponent } from 'src/components/carousel/drawer/index.component'
import event from 'src/utils/mitt'
@Component({
standalone: true,
imports: [
CommonModule,
NgSwitch,
NgSwitchCase,
FormsModule,
NzButtonModule,
NzSliderModule,
CalendarComponent,
RuntimeComponent,
OffWorkComponent,
ImageComponent,
CountdownComponent,
HTMLComponent,
HolidayComponent,
NzPopconfirmModule,
CalendarDrawerComponent,
RuntimeDrawerComponent,
OffWorkDrawerComponent,
ImageDrawerComponent,
CountdownDrawerComponent,
HTMLDrawerComponent,
HolidayDrawerComponent,
NewsDrawerComponent,
NewsComponent,
CarouselComponent,
CarouselDrawerComponent,
],
providers: [NzMessageService, NzModalService],
selector: 'system-component',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export default class SystemComponentComponent {
@ViewChild('calendar') calendarChild!: CalendarDrawerComponent
@ViewChild('runtime') runtimeChild!: RuntimeDrawerComponent
@ViewChild('offwork') offworkChild!: OffWorkDrawerComponent
@ViewChild('image') imageChild!: ImageDrawerComponent
@ViewChild('countdown') countdownChild!: CountdownDrawerComponent
@ViewChild('html') htmlChild!: HTMLDrawerComponent
@ViewChild('holiday') holidayChild!: HolidayDrawerComponent
@ViewChild('news') newsChild!: HolidayDrawerComponent
@ViewChild('carousel') carouselChild!: CarouselDrawerComponent
readonly $t = $t
readonly componentTitleMap = componentTitleMap
readonly ComponentType = ComponentType
components = component().components
compoentZoom = component().zoom
submitting: boolean = false
constructor(
private message: NzMessageService,
private modal: NzModalService,
) {}
ngOnInit() {}
// 上移
moveUp(index: number): void {
if (index === 0) {
return
}
const current = this.components[index]
const prevData = this.components[index - 1]
this.components[index - 1] = current
this.components[index] = prevData
}
// 下移
moveDown(index: number): void {
if (index === this.components.length - 1) {
return
}
const current = this.components[index]
const next = this.components[index + 1]
this.components[index + 1] = current
this.components[index] = next
}
handleEdit(data: any, idx: number) {
const type = data.type
const types: Record = {
[ComponentType.Calendar]: this.calendarChild,
[ComponentType.OffWork]: this.offworkChild,
[ComponentType.Runtime]: this.runtimeChild,
[ComponentType.Image]: this.imageChild,
[ComponentType.Countdown]: this.countdownChild,
[ComponentType.HTML]: this.htmlChild,
[ComponentType.Holiday]: this.holidayChild,
[ComponentType.News]: this.newsChild,
[ComponentType.Carousel]: this.carouselChild,
}
types[type]?.open(data, idx)
}
onAdd(data: IComponentItemProps) {
let max = Math.max(...this.components.map((item) => item.id))
max = max <= 0 ? 1 : max + 1
this.components.push({
...data,
id: max,
})
}
onDelete(idx: number) {
this.components.splice(idx, 1)
}
handleZoomChange(value: number) {
component.update((prev) => {
prev.zoom = value
return prev
})
}
handleOk(data: any) {
const { index, ...values } = data
this.components[index] = {
...this.components[index],
...values,
}
event.emit('COMPONENT_OK')
}
handleSubmit() {
if (this.submitting) {
return
}
this.modal.info({
nzTitle: $t('_syncDataOut'),
nzOkText: $t('_confirmSync'),
nzContent: $t('_confirmSyncTip'),
nzOnOk: () => {
const params: IComponentProps = {
zoom: this.compoentZoom,
components: this.components,
}
this.submitting = true
updateFileContent({
message: 'update component',
content: JSON.stringify(params),
path: COMPONENT_PATH,
})
.then(() => {
this.message.success($t('_saveSuccess'))
})
.finally(() => {
this.submitting = false
})
},
})
}
trackByItem(i: number, item: any) {
return item.id
}
}
================================================
FILE: src/view/system/component/types.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { ComponentType } from 'src/types'
import { $t } from 'src/locale'
export const componentTitleMap: Record = {
[ComponentType.Calendar]: $t('_calendar'),
[ComponentType.OffWork]: $t('_offWork'),
[ComponentType.Runtime]: $t('_runtime'),
[ComponentType.Image]: $t('_image'),
[ComponentType.Countdown]: $t('_countdown'),
[ComponentType.HTML]: 'HTML',
[ComponentType.Holiday]: $t('_holiday'),
[ComponentType.News]: $t('_news'),
[ComponentType.Carousel]: $t('_carousel'),
}
================================================
FILE: src/view/system/config/index.component.html
================================================
{{ $t('_address') }}
{{ $t('_password') }}
Hash Mode
{{ $t('_apiPass') }}
Email
{{ $t('_save') }}
================================================
FILE: src/view/system/config/index.component.scss
================================================
================================================
FILE: src/view/system/config/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component } from '@angular/core'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { CommonModule } from '@angular/common'
import { $t } from 'src/locale'
import { FormBuilder, FormGroup } from '@angular/forms'
import { NzButtonModule } from 'ng-zorro-antd/button'
import { NzFormModule } from 'ng-zorro-antd/form'
import { NzSliderModule } from 'ng-zorro-antd/slider'
import { NzInputModule } from 'ng-zorro-antd/input'
import { NzSwitchModule } from 'ng-zorro-antd/switch'
import { NzTableModule } from 'ng-zorro-antd/table'
import { NzRadioModule } from 'ng-zorro-antd/radio'
import { NzCheckboxModule } from 'ng-zorro-antd/checkbox'
import { NzTabsModule } from 'ng-zorro-antd/tabs'
import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm'
import { NzPopoverModule } from 'ng-zorro-antd/popover'
import { NzSelectModule } from 'ng-zorro-antd/select'
import { getConfigInfo, updateConfigInfo } from 'src/api'
import { NzNotificationService } from 'ng-zorro-antd/notification'
import { NzMessageService } from 'ng-zorro-antd/message'
@Component({
standalone: true,
imports: [
FormsModule,
ReactiveFormsModule,
CommonModule,
NzSelectModule,
NzPopoverModule,
NzTabsModule,
NzButtonModule,
NzFormModule,
NzSliderModule,
NzInputModule,
NzSwitchModule,
NzTableModule,
NzRadioModule,
NzCheckboxModule,
NzPopconfirmModule,
],
selector: 'system-config',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export default class SystemConfigComponent {
readonly $t = $t
readonly textareaSize = { minRows: 5, maxRows: 20 }
validateForm!: FormGroup
submitting: boolean = false
constructor(
private fb: FormBuilder,
private notification: NzNotificationService,
private message: NzMessageService,
) {
this.validateForm = this.fb.group({
password: [''],
address: [''],
XFAPIPassword: [''],
mailConfig: [''],
hashMode: [false],
})
}
ngOnInit() {
this.getConfigInfo()
}
private getConfigInfo() {
this.submitting = true
getConfigInfo()
.then((res) => {
const { data } = res
this.validateForm.get('password')!.setValue(data.password || '')
this.validateForm.get('address')!.setValue(data.address || '')
this.validateForm
.get('mailConfig')!
.setValue(JSON.stringify(data.mailConfig, null, 2) || '')
this.validateForm
.get('XFAPIPassword')!
.setValue(data.XFAPIPassword || '')
this.validateForm.get('hashMode')!.setValue(data.hashMode || false)
})
.finally(() => {
this.submitting = false
})
}
async handleSubmit() {
if (this.submitting) {
return
}
try {
this.submitting = true
const params = {
...this.validateForm.value,
mailConfig: JSON.parse(
this.validateForm.get('mailConfig')?.value || '{}',
),
}
await updateConfigInfo(params)
this.message.success($t('_saveSuccess'))
setTimeout(() => {
location.reload()
}, 2000)
} catch (error) {
this.notification.error('Error', (error as Error).message)
} finally {
this.submitting = false
}
}
}
================================================
FILE: src/view/system/index.component.html
================================================
{{ $t('_backHome') }}
{{ $t('_logout') }}
{{ date }}
================================================
FILE: src/view/system/index.component.scss
================================================
.system-layout {
min-height: 100vh;
.topbar {
z-index: 3;
position: sticky;
background-color: #fff;
top: 0;
margin-bottom: 10px;
padding: 15px 15px 0;
box-shadow: 0 5px 5px rgba(0, 0, 0, 0.05);
}
.content {
padding: 0 15px 15px;
background-color: #fff;
height: 100vh;
overflow: hidden;
overflow-y: auto;
::ng-deep.ant-table-content {
overflow: auto;
}
}
.sidebar {
position: sticky;
top: 0;
background-color: #fff;
&.hide {
width: 0 !important;
min-width: 0 !important;
flex: 0 !important;
}
}
.inner-layout {
margin-left: 15px;
}
.fixed-center {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 10;
}
}
================================================
FILE: src/view/system/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component } from '@angular/core'
import { CommonModule } from '@angular/common'
import {
RouterOutlet,
Router,
NavigationStart,
NavigationEnd,
NavigationCancel,
NavigationError,
} from '@angular/router'
import { $t } from 'src/locale'
import { isLogin, userLogout, getAuthCode } from 'src/utils/user'
import { VERSION } from 'src/constants'
import { isSelfDevelop, removeDark } from 'src/utils/utils'
import { NzLayoutModule } from 'ng-zorro-antd/layout'
import { NzMenuModule } from 'ng-zorro-antd/menu'
import { NzButtonModule } from 'ng-zorro-antd/button'
import { NzSpinModule } from 'ng-zorro-antd/spin'
import { NzIconModule } from 'ng-zorro-antd/icon'
import { LoginComponent } from 'src/components/login/login.component'
import { STORAGE_KEY_MAP } from 'src/constants'
import { imageErrorHidden } from 'src/utils'
import navConfig from '../../../nav.config.json'
@Component({
standalone: true,
imports: [
CommonModule,
NzLayoutModule,
NzMenuModule,
NzButtonModule,
LoginComponent,
RouterOutlet,
NzSpinModule,
NzIconModule,
],
selector: 'app-system',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export default class SystemComponent {
readonly isSelfDevelop = isSelfDevelop
readonly $t = $t
readonly isLogin: boolean = isLogin
readonly currentVersionSrc = `https://img.shields.io/badge/current-v${VERSION}-red.svg?longCache=true&style=flat-square`
readonly date = navConfig.datetime
readonly imageErrorHidden = imageErrorHidden
showLoginModal: boolean = !isLogin
currentMenu: string = ''
isAuthz = !!getAuthCode()
pageLoading = false
isCollapsed = !!Number(localStorage.getItem(STORAGE_KEY_MAP.SYSTEM_COLLAPSED))
constructor(private router: Router) {
// 解决暗黑模式部分样式不正确问题,后台没有暗黑
removeDark()
this.router.events.subscribe((event: any) => {
if (event instanceof NavigationStart) {
this.pageLoading = true
} else if (
event instanceof NavigationEnd ||
event instanceof NavigationCancel ||
event instanceof NavigationError
) {
this.pageLoading = false
}
})
}
ngOnInit() {
const u = window.location.href.split('/')
this.currentMenu = u.at(-1) || ''
}
toggleCollapsed() {
this.isCollapsed = !this.isCollapsed
localStorage.setItem(
STORAGE_KEY_MAP.SYSTEM_COLLAPSED,
String(Number(this.isCollapsed)),
)
}
goBack() {
this.router.navigate(['/'], {
queryParams: {
_: Date.now(),
},
})
}
goRoute(to: string, disabled = false) {
if (disabled) {
return
}
this.router.navigate([to])
}
logout() {
userLogout()
this.router.navigate(['/'])
setTimeout(() => {
location.reload()
}, 26)
}
}
================================================
FILE: src/view/system/info/index.component.html
================================================
TOKEN: {{ token }}
{{ $t('_devBranch') }}: {{ config.branch }}
{{ $t('_prevDevTime') }}: {{ date }}
{{ $t('_curVer') }}:
{{ $t('_newVer') }}:
================================================
FILE: src/view/system/info/index.component.scss
================================================
p {
margin-bottom: 10px;
}
================================================
FILE: src/view/system/info/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component } from '@angular/core'
import { CommonModule } from '@angular/common'
import { $t } from 'src/locale'
import { getToken } from 'src/utils/user'
import { VERSION } from 'src/constants'
import { isSelfDevelop } from 'src/utils/utils'
import config from '../../../../nav.config.json'
@Component({
standalone: true,
imports: [CommonModule],
selector: 'system-info',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export default class SystemInfoComponent {
readonly $t = $t
readonly isSelfDevelop = isSelfDevelop
readonly token = getToken()
readonly config = config
readonly date = config.datetime
readonly currentVersionSrc = `https://img.shields.io/badge/current-v${VERSION}-red.svg?longCache=true&style=flat-square`
constructor() {}
}
================================================
FILE: src/view/system/search/index.component.html
================================================
{{ $t('_addRow') }}
{{ $t('_save') }}
{{ $t('_logoImg') }}
{{ $t('_logoDarkImg') }}
{{ $t('_logoMaxHeight') }}
e.g. https://example.com/search?q=${q}
{{ $t('_engineName') }}
{{ $t('_engineUrl') }}
{{ $t('_icon') }}
{{ $t('_desc') }}
{{ $t('_isDisable') }}
{{ $t('_action') }}
{{
$t('_moveUp')
}}
{{ $t('_moveDown') }}
{{ $t('_del') }}
================================================
FILE: src/view/system/search/index.component.scss
================================================
.add-btn {
margin-bottom: 20px;
margin-right: 20px;
}
.icon {
width: 30px;
height: 30px;
margin-right: 10px;
object-fit: cover;
}
::ng-deep #file {
vertical-align: middle;
margin-left: 10px;
.anticon {
font-size: 20px;
}
}
================================================
FILE: src/view/system/search/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component } from '@angular/core'
import {
FormsModule,
ReactiveFormsModule,
FormBuilder,
FormGroup,
} from '@angular/forms'
import { CommonModule } from '@angular/common'
import { $t } from 'src/locale'
import { NzMessageService } from 'ng-zorro-antd/message'
import type { ISearchItemProps, ISearchProps } from 'src/types'
import { updateFileContent } from 'src/api'
import { NzModalService } from 'ng-zorro-antd/modal'
import { SEARCH_PATH } from 'src/constants'
import { search } from 'src/store'
import { NzButtonModule } from 'ng-zorro-antd/button'
import { NzTableModule } from 'ng-zorro-antd/table'
import { NzInputModule } from 'ng-zorro-antd/input'
import { NzSwitchModule } from 'ng-zorro-antd/switch'
import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm'
import { UploadImageComponent } from 'src/components/upload-image/index.component'
import { NzFormModule } from 'ng-zorro-antd/form'
import { NzSliderModule } from 'ng-zorro-antd/slider'
import { isValidImg } from 'src/utils'
@Component({
standalone: true,
imports: [
FormsModule,
ReactiveFormsModule,
CommonModule,
NzButtonModule,
NzTableModule,
NzInputModule,
UploadImageComponent,
NzSwitchModule,
NzPopconfirmModule,
NzFormModule,
NzSliderModule,
],
providers: [NzModalService, NzMessageService],
selector: 'system-tag',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export default class SystemSearchComponent {
readonly $t = $t
searchList: ISearchItemProps[] = search().list
submitting: boolean = false
validateForm!: FormGroup
constructor(
private fb: FormBuilder,
private message: NzMessageService,
private modal: NzModalService,
) {
const group: any = {
...search(),
list: null,
}
const groupPayload: any = {}
for (const k in group) {
if (group[k] != null) {
groupPayload[k] = [group[k]]
}
}
this.validateForm = this.fb.group(groupPayload)
}
onLogoChange(data: any, key: string) {
this.validateForm.get(key)?.setValue(data.cdn || '')
}
handleAdd() {
const isEmpty = this.searchList.some((item) => !item.name.trim())
if (isEmpty) {
return
}
this.searchList.unshift({
name: '',
url: '',
icon: '',
placeholder: '',
blocked: false,
isInner: false,
})
}
handleDelete(idx: number) {
this.searchList.splice(idx, 1)
}
// 上移
moveUp(index: number): void {
if (index === 0) {
return
}
const current = this.searchList[index]
const prev = this.searchList[index - 1]
this.searchList[index - 1] = current
this.searchList[index] = prev
}
// 下移
moveDown(index: number): void {
if (index === this.searchList.length - 1) {
return
}
const current = this.searchList[index]
const next = this.searchList[index + 1]
this.searchList[index + 1] = current
this.searchList[index] = next
}
async handleSubmit() {
if (this.submitting) {
return
}
this.submitting = true
const values = this.validateForm.value
const promises = []
if (values.logo) {
promises.push(isValidImg(values.logo))
}
if (values.darkLogo) {
promises.push(isValidImg(values.darkLogo))
}
const imgValues = await Promise.all(promises)
for (const item of imgValues) {
if (!item.valid) {
this.message.error(`${$t('_errLogo')}: "${item.url}"`)
this.submitting = false
return
}
}
this.submitting = false
this.modal.info({
nzTitle: $t('_syncDataOut'),
nzOkText: $t('_confirmSync'),
nzContent: $t('_confirmSyncTip'),
nzOnOk: () => {
this.submitting = true
const params: ISearchProps = {
...values,
list: this.searchList.filter((item) => item.name.trim()),
}
updateFileContent({
message: 'update search',
content: JSON.stringify(params),
path: SEARCH_PATH,
})
.then(() => {
this.message.success($t('_syncSuccessTip'))
})
.finally(() => {
this.submitting = false
})
},
})
}
onChangeUpload(path: any, idx: number) {
this.searchList[idx].icon = path.cdn
}
}
================================================
FILE: src/view/system/setting/index.component.html
================================================
{{ $t('_webLogo') }}
{{ $t('_updateLogo') }}
{{ $t('_title') }}
{{ $t('_webDesc') }}
{{ $t('_keywords') }}
{{ $t('_defLanguage') }}
{{ $t('_imageCDN') }}
Email
{{ $t('_pageLoad') }}
{{ $t('_random') }}
{{ $t('_noSet') }}
loading1
loading2
loading3
loading4
DIY Loading code
{{
$t('_allowUser')
}}
{{
$t('_enableSEO')
}}
{{
$t('_showGithub')
}}
{{
$t('_showLanguage')
}}
{{
$t('_showRate')
}}
{{
$t('_displaySwitchTheme')
}}
{{
$t('_openSearch')
}}
{{
$t('_defTheme')
}}
Light
Super
Sim
Side
App
Shortcut
{{
$t('_appTheme')
}}
{{ $t('_followPage') }}
App
Light
Sim
Side
Shortcut
{{ $t('_createWebKey') }}
{{ $t('_headHtml') }}
{{ $t('_footHtml') }}
{{ $t('_footTemplateDesc') }}
{{ $t('_footTemplate') }}1
{{ $t('_footTemplate') }}2
{{ $t('_footTemplate') }}3
{{ $t('_requestAddress') }}
{{ $t('_components') }}
PWA Enable
PWA Name
PWA Icon
{{ $t('_docTitle') }}
{{ $t('_cardStyle') }}
{{ $t('_standard') }}
{{ $t('_poster') }}
{{ $t('_column') }}
{{ $t('_simplicity') }}
{{ $t('_retro') }}
{{ $t('_original') }}
{{ $t('_icon') }}
{{ $t('_navOver') }}
{{ $t('_scrollBar') }}
{{ $t('_ellipsis') }}
{{ $t('_sidebarImg') }}
{{ $t('_backgroundImage') }}
{{ $t('_jumpAddr') }}
{{ $t('_action') }}
{{
$t('_moveUp')
}}
{{ $t('_moveDown') }}
{{ $t('_del') }}
{{
$t('_add')
}}
{{ $t('_footHtml') }}
{{ $t('_docTitle') }}
{{ $t('_title') }}
{{ $t('_cardStyle') }}
{{ $t('_standard') }}
{{ $t('_poster') }}
{{ $t('_column') }}
{{ $t('_simplicity') }}
{{ $t('_retro') }}
{{ $t('_original') }}
{{ $t('_icon') }}
{{ $t('_navOver') }}
{{ $t('_scrollBar') }}
{{ $t('_ellipsis') }}
{{ $t('_sidebarImg') }}
{{ $t('_backgroundImage') }}
{{ $t('_jumpAddr') }}
{{ $t('_action') }}
{{
$t('_moveUp')
}}
{{ $t('_moveDown') }}
{{ $t('_del') }}
{{
$t('_add')
}}
{{ $t('_footHtml') }}
{{ $t('_docTitle') }}
{{ $t('_title') }}
{{ $t('_cardStyle') }}
{{ $t('_standard') }}
{{ $t('_poster') }}
{{ $t('_column') }}
{{ $t('_simplicity') }}
{{ $t('_retro') }}
{{ $t('_original') }}
{{ $t('_icon') }}
{{ $t('_navOver') }}
{{ $t('_scrollBar') }}
{{ $t('_ellipsis') }}
Banner
{{ $t('_backgroundImage') }}
{{ $t('_jumpAddr') }}
{{ $t('_action') }}
{{
$t('_moveUp')
}}
{{ $t('_moveDown') }}
{{ $t('_del') }}
{{
$t('_add')
}}
{{ $t('_autoPlay') }}
{{ $t('_bannerHeight') }}
{{ $t('_bannerTip') }}
{{ $t('_desc') }}
{{ $t('_footHtml') }}
{{ $t('_docTitle') }}
{{ $t('_sidebarTitle') }}
{{ $t('_logoImg') }}
{{ $t('_logoDarkImg') }}
{{ $t('_cardStyle') }}
{{ $t('_standard') }}
{{ $t('_poster') }}
{{ $t('_column') }}
{{ $t('_simplicity') }}
{{ $t('_retro') }}
{{ $t('_original') }}
{{ $t('_icon') }}
{{
$t('_menuCollapse')
}}
Banner
{{ $t('_backgroundImage') }}
{{ $t('_jumpAddr') }}
{{ $t('_action') }}
{{
$t('_moveUp')
}}
{{ $t('_moveDown') }}
{{ $t('_del') }}
{{
$t('_add')
}}
{{ $t('_autoPlay') }}
{{ $t('_bannerHeight') }}
{{ $t('_bannerTip') }}
{{ $t('_footHtml') }}
{{ $t('_docTitle') }}
{{ $t('_title') }}
Dock
{{
$t('_showWeather')
}}
{{ $t('_backgroundImage') }}
{{ $t('_docTitle') }}
{{ $t('_cardStyle') }}
{{ $t('_standard') }}
{{ $t('_poster') }}
{{ $t('_column') }}
{{ $t('_simplicity') }}
{{ $t('_retro') }}
{{ $t('_original') }}
{{ $t('_icon') }}
{{ $t('_spiderRule') }}
{{ $t('_spiderTip') }}
{{ $t('_spiderNetTip') }}
{{ $t('_spiderBuildTip') }}
{{
$t('_spiderTitle')
}}
{{ $t('_notSpider') }}
{{ $t('_spiderEmpty') }}
{{ $t('_spiderAlways') }}
{{
$t('_spiderIcon')
}}
{{ $t('_notSpider') }}
{{ $t('_spiderEmpty') }}
{{ $t('_spiderAlways') }}
{{
$t('_spiderDesc')
}}
{{ $t('_notSpider') }}
{{ $t('_spiderEmpty') }}
{{ $t('_spiderAlways') }}
{{
$t('_spiderStatus')
}}
{{
$t('_checkStatus')
}}
{{ $t('_spiderQty') }}
{{ $t('_spiderQtyTip') }}
{{ $t('_accessTimeout') }}
{{ $t('_accessTimeoutTip') }}
现在爬取
{{ $t('_save') }}
================================================
FILE: src/view/system/setting/index.component.scss
================================================
#file {
cursor: pointer;
input {
display: none;
}
}
.preview {
width: 300px;
}
.save-tip {
margin-top: 10px;
color: #f50;
font-weight: bold;
}
.divider {
height: 1px;
width: 100%;
margin: 20px 0;
background-color: #eee;
}
.title {
margin-bottom: 20px;
}
.sim-ban {
img {
display: inline-block;
width: 100%;
object-fit: cover;
}
::ng-deep .anticon {
font-size: 30px;
}
}
.logo-input {
display: block !important;
margin-top: 5px;
}
.bottom-bar {
z-index: 3;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
padding: 10px 0 10px 200px;
background-color: #fff;
box-shadow: 0 0 10px #ccc;
margin-top: 80px;
border-radius: 8px;
display: flex;
align-items: center;
}
================================================
FILE: src/view/system/setting/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component } from '@angular/core'
import {
FormsModule,
ReactiveFormsModule,
FormBuilder,
FormGroup,
} from '@angular/forms'
import { CommonModule } from '@angular/common'
import { $t } from 'src/locale'
import { NzMessageService } from 'ng-zorro-antd/message'
import { NzNotificationService } from 'ng-zorro-antd/notification'
import { SETTING_PATH } from 'src/constants'
import { CODE_SYMBOL } from 'src/constants/symbol'
import { updateFileContent, spiderWebs } from 'src/api'
import { settings, component } from 'src/store'
import { isSelfDevelop, compilerTemplate } from 'src/utils/utils'
import { componentTitleMap } from '../component/types'
import { SafeHtmlPipe } from 'src/pipe/safeHtml.pipe'
import { NzButtonModule } from 'ng-zorro-antd/button'
import { NzFormModule } from 'ng-zorro-antd/form'
import { NzSliderModule } from 'ng-zorro-antd/slider'
import { NzInputModule } from 'ng-zorro-antd/input'
import { NzSwitchModule } from 'ng-zorro-antd/switch'
import { NzTableModule } from 'ng-zorro-antd/table'
import { NzRadioModule } from 'ng-zorro-antd/radio'
import { NzCheckboxModule } from 'ng-zorro-antd/checkbox'
import { NzTabsModule } from 'ng-zorro-antd/tabs'
import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm'
import { NzPopoverModule } from 'ng-zorro-antd/popover'
import { NzSelectModule } from 'ng-zorro-antd/select'
import { UploadImageComponent } from 'src/components/upload-image/index.component'
import { UploadFileComponent } from 'src/components/upload-file/index.component'
import { CardComponent } from 'src/components/card/index.component'
import { ActionType } from 'src/types'
import type { IComponentItemProps, IWebProps, ThemeType } from 'src/types'
import event from 'src/utils/mitt'
import footTemplate from 'src/components/footer/template'
import { replaceJsdelivrCDN } from 'src/utils/pureUtils'
// 额外添加的字段,但不添加到配置中
const extraForm: Record = {
footTemplate: '',
componentOptions: [],
}
@Component({
standalone: true,
imports: [
FormsModule,
ReactiveFormsModule,
CommonModule,
NzSelectModule,
NzPopoverModule,
NzTabsModule,
SafeHtmlPipe,
NzButtonModule,
NzFormModule,
NzSliderModule,
NzInputModule,
NzSwitchModule,
NzTableModule,
NzRadioModule,
NzCheckboxModule,
NzPopconfirmModule,
UploadImageComponent,
UploadFileComponent,
CardComponent,
],
selector: 'system-setting',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export default class SystemSettingComponent {
readonly $t = $t
readonly isSelfDevelop = isSelfDevelop
readonly textareaSize = { minRows: 3, maxRows: 20 }
validateForm!: FormGroup
submitting: boolean = false
settings = settings()
tabActive = 0
componentOptions: any[] = []
actionOptions = [
{
label: $t('_add'),
value: ActionType.Create,
},
{
label: $t('_edit'),
value: ActionType.Edit,
},
{
label: $t('_del'),
value: ActionType.Delete,
},
]
webDemoData: IWebProps = {
id: -1,
name: '发现导航',
desc: '发现导航是一个轻量级免费且强大的导航网站',
url: 'https://nav3.cn',
icon: replaceJsdelivrCDN(
'https://gcore.jsdelivr.net/gh/xjh22222228/nav-image@image/logo.svg',
settings(),
),
img: replaceJsdelivrCDN(
'https://gcore.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/4.png',
settings(),
),
tags: [],
breadcrumb: [],
rate: 5,
}
constructor(
private fb: FormBuilder,
private notification: NzNotificationService,
private message: NzMessageService,
) {
const themeMap: Record = {
Light: 0,
Super: 1,
Sim: 2,
Side: 3,
Shortcut: 4,
App: 5,
}
this.tabActive = themeMap[this.settings.theme] || 0
this.componentOptions = component().components.map((item) => {
const data = this.settings.components.find(
(c) => item.type === c.type && item.id === c.id,
)
if (data) {
extraForm['componentOptions'].push(data.id)
}
return {
label: componentTitleMap[item.type],
value: item.id,
type: item.type,
id: item.id,
}
})
const group: any = {
...extraForm,
...this.settings,
}
const groupPayload: any = {}
for (const k in group) {
groupPayload[k] = [group[k]]
}
this.validateForm = this.fb.group(groupPayload)
event.on('GITHUB_USER_INFO', (data: any) => {
if (!this.validateForm.get('email')?.value) {
this.validateForm.get('email')!.setValue(data.email)
}
})
}
get cdnUrl(): string {
return this.validateForm.get('gitHubCDN')?.value
}
get footTemplate(): string {
return compilerTemplate(this.validateForm.get('footerContent')?.value || '')
}
onFootTemplateChange(v: any) {
this.validateForm
.get('footerContent')!
.setValue(footTemplate[v]?.trim?.() || '')
}
onLogoChange(data: any, key: string) {
this.settings[key] = data.cdn || ''
this.validateForm.get(key)?.setValue(this.settings[key])
}
onBannerChange(data: any, key: string, idx: number) {
this.settings[key][idx]['src'] = data.cdn
}
onChangeBannerUrl(e: any, key: string, idx: number) {
const value = e.target.value.trim()
this.settings[key][idx]['src'] = value
}
onChangeJumpUrl(e: any, key: string, idx: number) {
const value = e.target.value.trim()
this.settings[key][idx]['url'] = value
}
onDeleteBanner(key: string, idx: number) {
this.settings[key].splice(idx, 1)
}
onAddBanner(key: string) {
this.settings[key].push({
src: '',
url: '',
})
}
onShortcutImgChange(e: any) {
let url = e?.target?.value?.trim() || e.cdn || ''
this.settings.shortcutThemeImages[0]['src'] = url
}
handleMoveUp(key: string, idx: number) {
if (idx === 0) {
return
}
const data = this.settings[key][idx]
this.settings[key][idx] = this.settings[key][idx - 1]
this.settings[key][idx - 1] = data
}
handleMoveDown(key: string, idx: number) {
if (idx === this.settings[key].length - 1) {
return
}
const data = this.settings[key][idx]
this.settings[key][idx] = this.settings[key][idx + 1]
this.settings[key][idx + 1] = data
}
async handleSpider() {
await this.handleSubmit()
this.submitting = true
try {
const res = await spiderWebs()
if (!res.ok) {
const data = await res.json()
throw new Error(data.message)
}
const reader = res.body?.getReader()
const decoder = new TextDecoder()
if (reader) {
while (true) {
const { done, value } = await reader.read()
if (done) {
break
}
const chunk = JSON.parse(decoder.decode(value))
if (Array.isArray(chunk)) {
this.notification.info('Result', chunk.join('
'))
} else {
this.notification.success(`${chunk.time} s`, $t('_saveSuccess'), {
nzDuration: 0,
})
}
}
}
} catch (err: any) {
this.notification.error('Error', err.message)
}
this.submitting = false
}
async handleSubmit() {
if (this.submitting) {
return
}
return new Promise((resolve, reject) => {
function filterImage(item: Record) {
return item['src'] || item['url'][0] === CODE_SYMBOL
}
const formValues = this.validateForm.value
const values = {
...formValues,
favicon: this.settings.favicon,
simThemeImages: this.settings.simThemeImages.filter(filterImage),
shortcutThemeImages:
this.settings.shortcutThemeImages.filter(filterImage),
sideThemeImages: this.settings.sideThemeImages.filter(filterImage),
superImages: this.settings.superImages.filter(filterImage),
lightImages: this.settings.lightImages.filter(filterImage),
components: formValues.componentOptions
.map((id: number) => {
const data = component().components.find(
(item: IComponentItemProps) => item.id === id,
)
return {
id: data?.id,
type: data?.type,
}
})
.filter((item: any) => item.type),
}
for (const k in extraForm) {
delete values[k]
}
this.submitting = true
updateFileContent({
message: 'update settings',
content: JSON.stringify(values),
path: SETTING_PATH,
})
.finally(() => {
this.submitting = false
})
.then(() => {
if (!isSelfDevelop) {
settings.set(values)
}
this.message.success($t('_syncSuccessTip'))
resolve(null)
})
.catch(reject)
})
}
}
================================================
FILE: src/view/system/tag/index.component.html
================================================
{{ $t('_addRow') }}
{{ $t('_save') }}
{{ $t('_noPublic') }}
{{ $t('_tagName') }}
{{ $t('_color') }}
{{ $t('_sort') }}
{{ $t('_remark') }}
{{ $t('_action') }}
- {{ data.color }}
{{ data.desc }}
{{
$t('_moveUp')
}}
{{ $t('_moveDown') }}
{{ $t('_del') }}
================================================
FILE: src/view/system/tag/index.component.scss
================================================
.add-btn {
margin-bottom: 20px;
margin-right: 20px;
}
================================================
FILE: src/view/system/tag/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component } from '@angular/core'
import { FormsModule } from '@angular/forms'
import { CommonModule } from '@angular/common'
import { $t } from 'src/locale'
import { NzMessageService } from 'ng-zorro-antd/message'
import { NzModalService } from 'ng-zorro-antd/modal'
import type { ITagPropValues } from 'src/types'
import { updateFileContent } from 'src/api'
import { TAG_PATH } from 'src/constants'
import { tagList } from 'src/store'
import { NzButtonModule } from 'ng-zorro-antd/button'
import { NzInputModule } from 'ng-zorro-antd/input'
import { NzTableModule } from 'ng-zorro-antd/table'
import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm'
import { NzSwitchModule } from 'ng-zorro-antd/switch'
@Component({
standalone: true,
imports: [
FormsModule,
CommonModule,
NzButtonModule,
NzInputModule,
NzTableModule,
NzPopconfirmModule,
NzSwitchModule,
],
providers: [NzModalService, NzMessageService],
selector: 'system-tag',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export default class SystemTagComponent {
readonly $t = $t
tagList: ITagPropValues[] = tagList()
submitting: boolean = false
incrementId = Math.max(...tagList().map((item) => Number(item.id))) + 1
constructor(
private message: NzMessageService,
private modal: NzModalService,
) {}
ngOnInit() {}
// 上移
moveUp(index: number): void {
if (index === 0) {
return
}
const current = this.tagList[index]
const prev = this.tagList[index - 1]
this.tagList[index - 1] = current
this.tagList[index] = prev
}
// 下移
moveDown(index: number): void {
if (index === this.tagList.length - 1) {
return
}
const current = this.tagList[index]
const next = this.tagList[index + 1]
this.tagList[index + 1] = current
this.tagList[index] = next
}
onColorChange(e: any, idx: number) {
const color = e.target.value
this.tagList[idx].color = color
}
handleAdd() {
const isEmpty = this.tagList.some((item) => !item.name.trim())
if (isEmpty) {
return
}
this.incrementId += 1
this.tagList.unshift({
id: this.incrementId,
name: '',
color: '#f50000',
desc: '',
isInner: false,
})
}
handleDelete(idx: number) {
this.tagList.splice(idx, 1)
}
handleSubmit() {
if (this.submitting) {
return
}
// 去重
const o: Record = {}
this.tagList.forEach((item: ITagPropValues) => {
if (item.name?.trim?.()) {
o[item.name] = {
...item,
name: undefined,
}
}
})
if (Object.keys(o).length !== this.tagList.length) {
this.message.error($t('_repeatAdd'))
return
}
const tagList = [...this.tagList].map((item) => {
item.sort ||= ''
if (typeof item.sort === 'string') {
item.sort = item.sort.trim()
}
if (item.sort === '') {
delete item.sort
}
if (Number.isNaN(Number(item.sort))) {
delete item.sort
}
if (item.sort != null) {
item.sort = Number(item.sort)
}
return {
...item,
}
})
this.modal.info({
nzTitle: $t('_syncDataOut'),
nzOkText: $t('_confirmSync'),
nzContent: $t('_confirmSyncTip'),
nzOnOk: () => {
this.submitting = true
updateFileContent({
message: 'update tag',
content: JSON.stringify(tagList),
path: TAG_PATH,
})
.then(() => {
this.message.success($t('_syncSuccessTip'))
})
.finally(() => {
this.submitting = false
})
},
})
}
trackByItem(i: number, item: any) {
return item.id
}
}
================================================
FILE: src/view/system/web/index.component.html
================================================
================================================
FILE: src/view/system/web/index.component.scss
================================================
.desc {
width: 300px;
white-space: pre-wrap;
word-break: break-all;
}
.file-upload {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
cursor: pointer;
}
.tip2 {
color: #f50;
font-weight: bold;
margin-top: 10px;
}
.admin {
::ng-deep .ant-table {
max-height: 600px;
overflow: auto;
}
}
================================================
FILE: src/view/system/web/index.component.ts
================================================
// 开源项目,未经作者同意,不得以抄袭/复制代码/修改源代码版权信息。
// Copyright @ 2018-present xiejiahe. All rights reserved.
// See https://github.com/xjh22222228/nav
import { Component } from '@angular/core'
import { CommonModule } from '@angular/common'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import type { INavTwoProp, INavThreeProp, IWebProps } from 'src/types'
import { navs, settings, search, tagList, internal, component } from 'src/store'
import { isLogin, removeWebsite } from 'src/utils/user'
import { NzMessageService } from 'ng-zorro-antd/message'
import { NzModalService } from 'ng-zorro-antd/modal'
import { NzNotificationService } from 'ng-zorro-antd/notification'
import { setNavs } from 'src/utils/web'
import { updateFileContent } from 'src/api'
import {
DB_PATH,
TAG_PATH,
SETTING_PATH,
SEARCH_PATH,
COMPONENT_PATH,
STORAGE_KEY_MAP,
} from 'src/constants'
import { $t } from 'src/locale'
import { saveAs } from 'file-saver'
import { isSelfDevelop } from 'src/utils/utils'
import { NzInputModule } from 'ng-zorro-antd/input'
import { NzButtonModule } from 'ng-zorro-antd/button'
import { NzSpinModule } from 'ng-zorro-antd/spin'
import { NzTableModule } from 'ng-zorro-antd/table'
import { NzTabsModule } from 'ng-zorro-antd/tabs'
import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm'
import { NzSelectModule } from 'ng-zorro-antd/select'
import { NzIconModule } from 'ng-zorro-antd/icon'
import { NzModalModule } from 'ng-zorro-antd/modal'
import { NzFormModule } from 'ng-zorro-antd/form'
import { NzSwitchModule } from 'ng-zorro-antd/switch'
import { NzTooltipModule } from 'ng-zorro-antd/tooltip'
import { LogoComponent } from 'src/components/logo/logo.component'
import { TagListComponent } from 'src/components/tag-list/index.component'
import { CommonService } from 'src/services/common'
import event from 'src/utils/mitt'
import config from '../../../../nav.config.json'
import { cleanWebAttrs } from 'src/utils/pureUtils'
@Component({
standalone: true,
imports: [
CommonModule,
NzTooltipModule,
FormsModule,
ReactiveFormsModule,
NzInputModule,
NzButtonModule,
NzSpinModule,
NzTableModule,
NzTabsModule,
NzPopconfirmModule,
NzSelectModule,
LogoComponent,
NzIconModule,
NzModalModule,
NzFormModule,
NzSwitchModule,
TagListComponent,
],
selector: 'app-web',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss'],
})
export default class WebpComponent {
readonly $t = $t
readonly isSelfDevelop = isSelfDevelop
readonly internal = internal()
readonly settings = settings()
readonly gitRepoUrl = config.gitRepoUrl
readonly isLogin = isLogin
navs = navs
showCreateModal = false
syncLoading = false
uploading = false
tabActive = 0
oneSelect = -1
twoSelect = -1
threeSelect = -1
checkedAll = false
setOfCheckedId = new Set()
errorWebs: IWebProps[] = []
constructor(
private modal: NzModalService,
private notification: NzNotificationService,
private message: NzMessageService,
public commonService: CommonService,
) {}
ngOnInit() {}
get oneIndex() {
return this.navs().findIndex((item) => item.id === this.oneSelect)
}
get twoIndex() {
try {
return this.twoTableData.findIndex((item) => item.id === this.twoSelect)
} catch {
return -1
}
}
get threeIndex() {
try {
return this.threeTableData.findIndex(
(item) => item.id === this.threeSelect,
)
} catch {
return -1
}
}
get twoTableData(): INavTwoProp[] {
try {
return this.navs().find((item) => item.id === this.oneSelect)?.nav || []
} catch {
return []
}
}
get threeTableData(): INavThreeProp[] {
try {
return (
this.twoTableData.find((item) => item.id === this.twoSelect)?.nav || []
)
} catch {
return []
}
}
get websiteTableData(): IWebProps[] {
try {
const data = this.threeTableData.find(
(item) => item.id === this.threeSelect,
)
if (data) {
return data.nav
}
return this.errorWebs
} catch {
return this.errorWebs
}
}
getErrorWebs() {
this.oneSelect = -1
this.twoSelect = -1
this.threeSelect = -1
this.onTabChange()
const errorWebs: IWebProps[] = []
function r(nav: any) {
if (!Array.isArray(nav)) return
for (let i = 0; i < nav.length; i++) {
const item = nav[i]
if (item.url && item.ok === false) {
errorWebs.push(item)
} else {
r(item.nav)
}
}
}
r(this.navs())
this.errorWebs = errorWebs
if (errorWebs.length <= 0) {
this.message.success('No error!')
} else {
this.message.warning(`检测出 ${errorWebs.length} 个网站疑似异常`)
}
}
onCheckAll(checked: boolean) {
this.setOfCheckedId.clear()
this.checkedAll = checked
const data = [
this.navs(),
this.twoTableData,
this.threeTableData,
this.websiteTableData,
]
data[this.tabActive].forEach((item) => {
if (checked) {
this.setOfCheckedId.add(item.id)
} else {
this.setOfCheckedId.delete(item.id)
}
})
}
onItemChecked(id: number, checked: boolean) {
if (checked) {
this.setOfCheckedId.add(id)
} else {
this.setOfCheckedId.delete(id)
}
}
async onBatchDelete() {
switch (this.tabActive) {
case 0:
case 1:
case 2:
event.emit('DELETE_MODAL', {
ids: [...this.setOfCheckedId],
isClass: true,
onComplete: () => {
this.onTabChange()
},
})
break
case 3:
event.emit('DELETE_MODAL', {
ids: [...this.setOfCheckedId],
ok: () => {
if (this.errorWebs.length) {
this.getErrorWebs()
}
},
onComplete: () => {
this.onTabChange()
},
})
break
}
}
handleRestoreData() {
this.modal.info({
nzTitle: $t('_resetInitData'),
nzContent: $t('_warnReset'),
nzOnOk: () => {
this.message.success($t('_actionSuccess'))
window.localStorage.removeItem(STORAGE_KEY_MAP.DATE_TIME)
removeWebsite().finally(() => {
window.location.reload()
})
},
})
}
handleDownloadBackup() {
const params: any = {
db: this.navs(),
settings: settings(),
tag: tagList(),
search: search(),
component: component(),
}
saveAs(
new Blob([JSON.stringify(params)], {
type: 'text/plain;charset=utf-8',
}),
'nav.json',
)
}
handleUploadBackup(e: any) {
const that = this
const files = e.target.files
if (files.length <= 0) {
return
}
const file = files[0]
const fileReader = new FileReader()
fileReader.readAsText(file)
fileReader.onload = async function (file) {
try {
const { result } = file.target as any
const data = JSON.parse(result)
try {
await updateFileContent({
message: 'import db',
content: JSON.stringify(data.db),
path: DB_PATH,
refresh: false,
})
that.notification.success('OK', 'DB import successful')
} catch {
that.notification.error('Error', 'DB import failed', {
nzDuration: 0,
})
}
try {
await updateFileContent({
message: 'import settings',
content: JSON.stringify({
...settings,
...data.settings,
}),
path: SETTING_PATH,
refresh: false,
})
that.notification.success('OK', 'settings import successful')
} catch {
that.notification.error('Error', 'settings import failed', {
nzDuration: 0,
})
}
try {
await updateFileContent({
message: 'import tag',
content: JSON.stringify(data.tag),
path: TAG_PATH,
refresh: false,
})
that.notification.success('OK', 'tag import successful')
} catch {
that.notification.error('Error', 'tag import failed', {
nzDuration: 0,
})
}
try {
await updateFileContent({
message: 'import search',
content: JSON.stringify({
...search(),
...data.search,
}),
path: SEARCH_PATH,
refresh: false,
})
that.notification.success('OK', 'search import successful')
} catch {
that.notification.error('Error', 'search import failed', {
nzDuration: 0,
})
}
try {
await updateFileContent({
message: 'import component',
content: JSON.stringify({
...component,
...data.component,
}),
path: COMPONENT_PATH,
refresh: false,
})
that.notification.success('OK', 'component import successful')
} catch {
that.notification.error('Error', 'component import failed', {
nzDuration: 0,
})
}
if (isSelfDevelop) {
setTimeout(() => {
location.reload()
}, 2000)
} else {
that.message.success($t('_syncSuccessTip'))
}
} catch (error: any) {
that.notification.error($t('_error'), error.message)
} finally {
e.target.value = ''
}
}
}
goBack() {
history.go(-1)
}
openMoveWebModal(data: any, level?: number) {
event.emit('MOVE_WEB', {
id: data.id,
data: [data],
level,
})
}
openCreateWebModal(): any {
if (this.tabActive === 3 && this.threeSelect === -1) {
return this.message.error($t('_sel3'))
}
event.emit('CREATE_WEB', {
parentId: this.threeSelect,
})
}
openEditWebModal(detail: IWebProps) {
event.emit('CREATE_WEB', {
detail,
})
}
onTabChange(index?: number) {
this.errorWebs = []
this.tabActive = index ?? this.tabActive
this.setOfCheckedId.clear()
this.checkedAll = false
}
// 上移一级
moveOneUp(index: number): void {
if (index === 0) {
return
}
const current = this.navs()[index]
const prevData = this.navs()[index - 1]
this.navs.update((prev) => {
prev[index - 1] = current
prev[index] = prevData
setNavs(prev)
return prev
})
}
// 下移一级
moveOneDown(index: number): void {
if (index === this.navs.length - 1) {
return
}
const current = this.navs()[index]
const next = this.navs()[index + 1]
this.navs.update((prev) => {
prev[index + 1] = current
prev[index] = next
setNavs(prev)
return prev
})
}
// 上移二级
moveTwoUp(index: number): void {
try {
if (index === 0) {
return
}
const current = this.navs()[this.oneIndex].nav[index]
const prevData = this.navs()[this.oneIndex].nav[index - 1]
this.navs.update((prev) => {
prev[this.oneIndex].nav[index - 1] = current
prev[this.oneIndex].nav[index] = prevData
setNavs(prev)
return prev
})
} catch (error: any) {
this.notification.error($t('_error'), error.message)
}
}
// 下移二级
moveTwoDown(index: number): void {
try {
if (index === this.navs()[this.oneIndex].nav.length - 1) {
return
}
const current = this.navs()[this.oneIndex].nav[index]
const next = this.navs()[this.oneIndex].nav[index + 1]
this.navs.update((prev) => {
prev[this.oneIndex].nav[index + 1] = current
prev[this.oneIndex].nav[index] = next
setNavs(prev)
return prev
})
} catch (error: any) {
this.notification.error($t('_error'), error.message)
}
}
// 上移三级
moveThreeUp(index: number): void {
try {
if (index === 0) {
return
}
const current = this.navs()[this.oneIndex].nav[this.twoIndex].nav[index]
const prevData =
this.navs()[this.oneIndex].nav[this.twoIndex].nav[index - 1]
this.navs.update((prev) => {
prev[this.oneIndex].nav[this.twoIndex].nav[index - 1] = current
prev[this.oneIndex].nav[this.twoIndex].nav[index] = prevData
setNavs(prev)
return prev
})
} catch (error: any) {
this.notification.error($t('_error'), error.message)
}
}
// 下移三级
moveThreeDown(index: number): void {
try {
if (
index ===
this.navs()[this.oneIndex].nav[this.twoIndex].nav.length - 1
) {
return
}
const current = this.navs()[this.oneIndex].nav[this.twoIndex].nav[index]
const next = this.navs()[this.oneIndex].nav[this.twoIndex].nav[index + 1]
this.navs.update((prev) => {
prev[this.oneIndex].nav[this.twoIndex].nav[index + 1] = current
prev[this.oneIndex].nav[this.twoIndex].nav[index] = next
setNavs(prev)
return prev
})
} catch (error: any) {
this.notification.error($t('_error'), error.message)
}
}
// 上移网站
moveWebUp(index: number): void {
try {
if (index === 0) {
return
}
const current =
this.navs()[this.oneIndex].nav[this.twoIndex].nav[this.threeIndex].nav[
index
]
const prevData =
this.navs()[this.oneIndex].nav[this.twoIndex].nav[this.threeIndex].nav[
index - 1
]
this.navs.update((prev) => {
prev[this.oneIndex].nav[this.twoIndex].nav[this.threeIndex].nav[
index - 1
] = current
prev[this.oneIndex].nav[this.twoIndex].nav[this.threeIndex].nav[index] =
prevData
setNavs(prev)
return prev
})
} catch (error: any) {
this.notification.error($t('_error'), error.message)
}
}
// 下移网站
moveWebDown(index: number): void {
try {
if (
index ===
this.navs()[this.oneIndex].nav[this.twoIndex].nav[this.threeIndex].nav
.length -
1
) {
return
}
const current =
this.navs()[this.oneIndex].nav[this.twoIndex].nav[this.threeIndex].nav[
index
]
const next =
this.navs()[this.oneIndex].nav[this.twoIndex].nav[this.threeIndex].nav[
index + 1
]
this.navs.update((prev) => {
prev[this.oneIndex].nav[this.twoIndex].nav[this.threeIndex].nav[
index + 1
] = current
prev[this.oneIndex].nav[this.twoIndex].nav[this.threeIndex].nav[index] =
next
setNavs(prev)
return prev
})
} catch (error: any) {
this.notification.error($t('_error'), error.message)
}
}
hanldeOneSelect(id: number) {
this.oneSelect = id
this.twoSelect = -1
this.threeSelect = -1
this.onTabChange()
}
hanldeTwoSelect(id: number) {
this.twoSelect = id
this.threeSelect = -1
this.onTabChange()
}
hanldeThreeSelect(id: number) {
this.threeSelect = id
this.onTabChange()
}
openCreateClass(): any {
if (this.tabActive === 0) {
event.emit('EDIT_CLASS_OPEN')
}
// 检测是否有选择
if (this.tabActive === 1 && this.oneSelect === -1) {
return this.message.error($t('_sel1'))
}
if (this.tabActive === 2 && this.twoSelect === -1) {
return this.message.error($t('_sel2'))
}
const ids = [-1, this.oneSelect, this.twoSelect]
event.emit('EDIT_CLASS_OPEN', {
id: ids[this.tabActive],
})
}
openEditClass(data: any) {
event.emit('EDIT_CLASS_OPEN', {
...data,
})
}
handleSync() {
this.modal.info({
nzTitle: $t('_syncDataOut'),
nzOkText: $t('_confirmSync'),
nzContent: $t('_confirmSyncTip'),
nzOnOk: () => {
this.syncLoading = true
updateFileContent({
message: 'update db',
content: JSON.stringify(cleanWebAttrs(this.navs())),
path: DB_PATH,
})
.then(() => {
this.message.success($t('_syncSuccessTip'))
})
.finally(() => {
this.syncLoading = false
})
},
})
}
}
================================================
FILE: tailwind.config.js
================================================
/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: 'class',
content: ['./data/**/*.{js,ts,tsx,json}', './src/**/*.{js,ts,tsx,html}'],
theme: {
extend: {
colors: {
background: 'var(--background)',
foreground: 'var(--foreground)',
},
},
},
plugins: [],
}
================================================
FILE: tsconfig.app.json
================================================
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": []
},
"files": [
"src/main.ts"
],
"include": [
"src/**/*.d.ts"
]
}
================================================
FILE: tsconfig.json
================================================
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
{
"compileOnSave": false,
"exclude": ["**/*.component.html"],
"compilerOptions": {
"baseUrl": "./",
"paths": {
"src/*": ["src/*"]
},
"outDir": "./dist/out-tsc",
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"skipLibCheck": true,
"isolatedModules": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"moduleResolution": "bundler",
"importHelpers": true,
"target": "ES2022",
"module": "ES2022"
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
}
}
================================================
FILE: vercel.json
================================================
{
"headers": [
{
"source": "/manifest.webmanifest",
"headers": [
{
"key": "Content-Type",
"value": "application/manifest+json"
}
]
}
],
"rewrites": [
{
"source": "/:path*",
"destination": "/index.html"
}
],
"builds": [
{
"src": "package.json",
"use": "@vercel/static-build",
"config": {
"distDir": "dist/browser"
}
}
],
"outputDirectory": "dist/browser"
}