Compare commits
118 Commits
master
...
FatttSnake
| Author | SHA1 | Date | |
|---|---|---|---|
|
d6fec531b2
|
|||
|
f491268c62
|
|||
|
a33a405a07
|
|||
|
e2fe240877
|
|||
|
b3e1b67515
|
|||
|
1a529e4139
|
|||
|
9d1d5b10d6
|
|||
|
51dc1ed377
|
|||
|
7fdd2b2465
|
|||
|
23be95d533
|
|||
|
eaba5aa372
|
|||
|
46b6e9f969
|
|||
|
4d5dc38d27
|
|||
|
bfc5f81cfb
|
|||
|
a2dcf45f84
|
|||
|
e97b932cf5
|
|||
|
635cda3821
|
|||
|
735928d53e
|
|||
|
a067cc9ea0
|
|||
|
19e3d881cf
|
|||
|
1936ecb34f
|
|||
|
2e37202d09
|
|||
|
13e2cebe04
|
|||
|
a48187bb4e
|
|||
|
ba3082c88c
|
|||
|
4a9a627c75
|
|||
|
030ba1c9bb
|
|||
|
d340a427a8
|
|||
|
0c13d028f9
|
|||
|
b212d57706
|
|||
|
eef396f04b
|
|||
|
bc1d242a01
|
|||
|
419222aba7
|
|||
|
581d414c13
|
|||
|
bab85382d4
|
|||
|
bb1895762e
|
|||
|
8bde570d01
|
|||
|
757c27823a
|
|||
|
f3a6f87dff
|
|||
|
b2a3476872
|
|||
|
7608502d65
|
|||
|
9dff8897f1
|
|||
|
887e8089c1
|
|||
|
f6c292ff25
|
|||
|
5e44b3ed96
|
|||
|
5cb4dd7337
|
|||
|
395c547e85
|
|||
|
43779227c2
|
|||
|
69e572ae23
|
|||
|
df98339838
|
|||
|
7d3ec39da3
|
|||
|
32686848d2
|
|||
|
1df704f65e
|
|||
|
c5637d5e7f
|
|||
|
a7577373ef
|
|||
|
3dc434a6ac
|
|||
|
898075cf6e
|
|||
|
58bb5eb262
|
|||
|
31a458416d
|
|||
|
2b1bd719ad
|
|||
|
606064b1fb
|
|||
|
19113a56af
|
|||
|
6dd1f51c89
|
|||
|
22e2e15db8
|
|||
|
4f55364f65
|
|||
|
d0ddb276c0
|
|||
|
8f22084d10
|
|||
|
30ec21a71e
|
|||
|
513f66418a
|
|||
|
580249a85c
|
|||
|
1ef2db5f47
|
|||
|
d677aeed07
|
|||
|
361a5c923d
|
|||
|
c87e697ea6
|
|||
|
058984ad85
|
|||
|
3ddd4c88e0
|
|||
|
c64777e759
|
|||
|
d918e527a0
|
|||
|
b51fdb11f2
|
|||
|
6e2012cd7a
|
|||
|
cab0c9d879
|
|||
|
a5ca0be53c
|
|||
|
e5bc568d23
|
|||
|
2176c0ce2a
|
|||
|
ac2e3c8e6e
|
|||
|
63c76440a6
|
|||
|
7f034db314
|
|||
|
d326c8b8e5
|
|||
|
ea68945df1
|
|||
|
59eef73895
|
|||
|
2f9c01981b
|
|||
|
5250b662f5
|
|||
|
77166831bf
|
|||
|
9152ec8dfb
|
|||
|
cfddc85302
|
|||
|
76470d741f
|
|||
|
62a70f92ae
|
|||
|
5a12020d69
|
|||
|
71faca682e
|
|||
|
cd1802b5d6
|
|||
|
0aad1ac966
|
|||
|
e209bea2f3
|
|||
|
c65c548ecc
|
|||
|
9b96c7dd62
|
|||
|
a2d0afb38c
|
|||
|
48c9ec148a
|
|||
|
07602bebc8
|
|||
|
5c2a77db30
|
|||
|
7d5265ecda
|
|||
|
058746702d
|
|||
|
84d2e6c3f8
|
|||
|
61d3bb21ad
|
|||
|
8730513340
|
|||
|
6f53a867c3
|
|||
|
c098368a79
|
|||
|
de3d1831d0
|
|||
|
715806b85d
|
|||
|
0b314e4ea9
|
@@ -1,9 +0,0 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
@@ -1,3 +1,7 @@
|
||||
VITE_API_URL=http://localhost:8080
|
||||
VITE_PLATFORM=DESKTOP
|
||||
VITE_DESKTOP_PROTOCOL=dev-oxygen-desktop
|
||||
VITE_APP_PROTOCOL=dev-oxygen-app
|
||||
VITE_UI_URL=${DEV_UI_URL}
|
||||
VITE_API_URL=${DEV_API_URL}
|
||||
VITE_API_TOKEN_URL=${VITE_API_URL}/token
|
||||
VITE_TURNSTILE_SITE_KEY=${TURNSTILE_SITE_KEY}
|
||||
VITE_TURNSTILE_SITE_KEY=${TURNSTILE_SITE_KEY}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
VITE_PLATFORM=DESKTOP
|
||||
VITE_DESKTOP_PROTOCOL=oxygen-desktop
|
||||
VITE_APP_PROTOCOL=oxygen-app
|
||||
VITE_UI_URL=${PRODUCT_UI_URL}
|
||||
VITE_API_URL=${PRODUCT_API_URL}
|
||||
VITE_API_TOKEN_URL=${VITE_API_URL}/token
|
||||
VITE_TURNSTILE_SITE_KEY=${TURNSTILE_SITE_KEY}
|
||||
VITE_TURNSTILE_SITE_KEY=${TURNSTILE_SITE_KEY}
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
NODE_ENV=development
|
||||
VITE_PLATFORM=DESKTOP
|
||||
VITE_DESKTOP_PROTOCOL=test-oxygen-desktop
|
||||
VITE_APP_PROTOCOL=test-oxygen-app
|
||||
VITE_UI_URL=${TEST_UI_URL}
|
||||
VITE_API_URL=${TEST_API_URL}
|
||||
VITE_API_TOKEN_URL=${VITE_API_URL}/token
|
||||
VITE_TURNSTILE_SITE_KEY=${TURNSTILE_SITE_KEY}
|
||||
VITE_TURNSTILE_SITE_KEY=${TURNSTILE_SITE_KEY}
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
/* eslint-env node */
|
||||
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: { browser: true, es2020: true },
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
||||
'plugin:react-hooks/recommended',
|
||||
'plugin:prettier/recommended',
|
||||
'./.eslintrc-auto-import.json'
|
||||
],
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module',
|
||||
project: './tsconfig*.json',
|
||||
tsconfigRootDir: __dirname,
|
||||
},
|
||||
plugins: [
|
||||
'react-refresh',
|
||||
'prettier'],
|
||||
rules: {
|
||||
'no-cond-assign': 'error',
|
||||
'eqeqeq': 'error',
|
||||
'prettier/prettier': [
|
||||
'error',
|
||||
{
|
||||
endOfLine: 'auto',
|
||||
}
|
||||
],
|
||||
'react-refresh/only-export-components': [
|
||||
'warn',
|
||||
{ allowConstantExport: true }
|
||||
],
|
||||
'@typescript-eslint/no-non-null-assertion': 'off'
|
||||
}
|
||||
}
|
||||
674
LICENSE
Normal file
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU 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.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
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:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
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
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
55
README.md
@@ -1,34 +1,37 @@
|
||||
# oxygen-desktop
|
||||
<div align="center">
|
||||
<h1>
|
||||
<img alt="Logo" src="doc/logo.svg" width="128">
|
||||
<br>
|
||||
<span>Desktop of Oxygen Toolbox</span>
|
||||
</h1>
|
||||
</div>
|
||||
<div align="center">
|
||||
<a href="https://github.com/FatttSnake/oxygen-desktop/actions/workflows/build.yml">
|
||||
<img alt="Build" src="https://img.shields.io/github/actions/workflow/status/FatttSnake/oxygen-desktop/build.yml
|
||||
">
|
||||
</a>
|
||||
<a href="https://github.com/FatttSnake/oxygen-desktop/releases/latest">
|
||||
<img alt="Release" src="https://img.shields.io/github/v/release/FatttSnake/oxygen-desktop">
|
||||
</a>
|
||||
<a href="LICENSE">
|
||||
<img alt="LICENSE" src="https://img.shields.io/github/license/FatttSnake/oxygen-desktop">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
An Electron application with React and TypeScript
|
||||
# Overview ([ZH](README_zh.md), EN)
|
||||
|
||||
## Recommended IDE Setup
|
||||
This project is a desktop application of Oxygen Toolbox. Supports local installation of tools and supports native api.
|
||||
|
||||
- [VSCode](https://code.visualstudio.com/) + [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) + [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
|
||||
# Requires (One of)
|
||||
|
||||
## Project Setup
|
||||
- Linux
|
||||
- Windows
|
||||
- MacOS
|
||||
|
||||
### Install
|
||||
# Related projects
|
||||
|
||||
```bash
|
||||
$ npm install
|
||||
```
|
||||
[Web UI of Oxygen Toolbox](https://github.com/FatttSnake/oxygen-ui)
|
||||
|
||||
### Development
|
||||
[API of Oxygen Toolbox](https://github.com/FatttSnake/oxygen-api)
|
||||
|
||||
```bash
|
||||
$ npm run dev
|
||||
```
|
||||
|
||||
### Build
|
||||
|
||||
```bash
|
||||
# For windows
|
||||
$ npm run build:win
|
||||
|
||||
# For macOS
|
||||
$ npm run build:mac
|
||||
|
||||
# For Linux
|
||||
$ npm run build:linux
|
||||
```
|
||||
[Android Client of Oxygen Toolbox](https://github.com/FatttSnake/oxygen-android)
|
||||
|
||||
37
README_zh.md
Normal file
@@ -0,0 +1,37 @@
|
||||
<div align="center">
|
||||
<h1>
|
||||
<img alt="Logo" src="doc/logo.svg" width="128">
|
||||
<br>
|
||||
<span>Desktop of Oxygen Toolbox</span>
|
||||
</h1>
|
||||
</div>
|
||||
<div align="center">
|
||||
<a href="https://github.com/FatttSnake/oxygen-desktop/actions/workflows/build.yml">
|
||||
<img alt="Build" src="https://img.shields.io/github/actions/workflow/status/FatttSnake/oxygen-desktop/build.yml
|
||||
">
|
||||
</a>
|
||||
<a href="https://github.com/FatttSnake/oxygen-desktop/releases/latest">
|
||||
<img alt="Release" src="https://img.shields.io/github/v/release/FatttSnake/oxygen-desktop">
|
||||
</a>
|
||||
<a href="LICENSE">
|
||||
<img alt="LICENSE" src="https://img.shields.io/github/license/FatttSnake/oxygen-desktop">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
# 概述 (ZH, [EN](README.md))
|
||||
|
||||
本项目是 Oxygen Toolbox 的桌面应用程序。支持工具本地安装,支持原生api。
|
||||
|
||||
# 要求 (其中一个)
|
||||
|
||||
- Linux
|
||||
- Windows
|
||||
- MacOS
|
||||
|
||||
# 关联项目
|
||||
|
||||
[Web UI of Oxygen Toolbox](https://github.com/FatttSnake/oxygen-ui)
|
||||
|
||||
[API of Oxygen Toolbox](https://github.com/FatttSnake/oxygen-api)
|
||||
|
||||
[Android Client of Oxygen Toolbox](https://github.com/FatttSnake/oxygen-android)
|
||||
BIN
build/icon.icns
BIN
build/icon.ico
|
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 47 KiB |
BIN
build/icon.png
|
Before Width: | Height: | Size: 35 KiB |
1
build/icon.svg
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
@@ -35,18 +35,17 @@ interface IMatcher {
|
||||
|
||||
const matchComponents: IMatcher[] = [
|
||||
{
|
||||
pattern: /^Avatar/,
|
||||
styleDir: 'avatar'
|
||||
pattern: /^Anchor/,
|
||||
styleDir: 'anchor'
|
||||
},
|
||||
{
|
||||
pattern: /^AutoComplete/,
|
||||
styleDir: 'auto-complete'
|
||||
},
|
||||
{
|
||||
pattern: /^Anchor/,
|
||||
styleDir: 'anchor'
|
||||
pattern: /^Avatar/,
|
||||
styleDir: 'avatar'
|
||||
},
|
||||
|
||||
{
|
||||
pattern: /^Badge/,
|
||||
styleDir: 'badge'
|
||||
@@ -59,14 +58,18 @@ const matchComponents: IMatcher[] = [
|
||||
pattern: /^Button/,
|
||||
styleDir: 'button'
|
||||
},
|
||||
{
|
||||
pattern: /^Checkbox/,
|
||||
styleDir: 'checkbox'
|
||||
},
|
||||
{
|
||||
pattern: /^Card/,
|
||||
styleDir: 'card'
|
||||
},
|
||||
{
|
||||
pattern: /^CheckableTag/,
|
||||
styleDir: 'tag'
|
||||
},
|
||||
{
|
||||
pattern: /^Checkbox/,
|
||||
styleDir: 'checkbox'
|
||||
},
|
||||
{
|
||||
pattern: /^Collapse/,
|
||||
styleDir: 'collapse'
|
||||
@@ -75,113 +78,105 @@ const matchComponents: IMatcher[] = [
|
||||
pattern: /^Descriptions/,
|
||||
styleDir: 'descriptions'
|
||||
},
|
||||
{
|
||||
pattern: /^RangePicker|^WeekPicker|^MonthPicker/,
|
||||
styleDir: 'date-picker'
|
||||
},
|
||||
{
|
||||
pattern: /^Dropdown/,
|
||||
styleDir: 'dropdown'
|
||||
},
|
||||
|
||||
{
|
||||
pattern: /^Form/,
|
||||
styleDir: 'form'
|
||||
},
|
||||
{
|
||||
pattern: /^Image/,
|
||||
styleDir: 'image'
|
||||
},
|
||||
{
|
||||
pattern: /^InputNumber/,
|
||||
styleDir: 'input-number'
|
||||
},
|
||||
|
||||
{
|
||||
pattern: /^Input|^Textarea/,
|
||||
styleDir: 'input'
|
||||
},
|
||||
{
|
||||
pattern: /^Statistic/,
|
||||
styleDir: 'statistic'
|
||||
},
|
||||
{
|
||||
pattern: /^CheckableTag/,
|
||||
styleDir: 'tag'
|
||||
},
|
||||
{
|
||||
pattern: /^TimeRangePicker/,
|
||||
styleDir: 'time-picker'
|
||||
},
|
||||
{
|
||||
pattern: /^Layout/,
|
||||
styleDir: 'layout'
|
||||
},
|
||||
{
|
||||
pattern: /^Menu|^SubMenu/,
|
||||
styleDir: 'menu'
|
||||
},
|
||||
|
||||
{
|
||||
pattern: /^Table/,
|
||||
styleDir: 'table'
|
||||
},
|
||||
{
|
||||
pattern: /^TimePicker|^TimeRangePicker/,
|
||||
styleDir: 'time-picker'
|
||||
},
|
||||
{
|
||||
pattern: /^Radio/,
|
||||
styleDir: 'radio'
|
||||
},
|
||||
|
||||
{
|
||||
pattern: /^Image/,
|
||||
styleDir: 'image'
|
||||
},
|
||||
|
||||
{
|
||||
pattern: /^List/,
|
||||
styleDir: 'list'
|
||||
},
|
||||
|
||||
{
|
||||
pattern: /^Tab/,
|
||||
styleDir: 'tabs'
|
||||
},
|
||||
{
|
||||
pattern: /^Mentions/,
|
||||
styleDir: 'mentions'
|
||||
},
|
||||
|
||||
{
|
||||
pattern: /^Step/,
|
||||
styleDir: 'steps'
|
||||
pattern: /^QRCode/,
|
||||
styleDir: 'qr-code'
|
||||
},
|
||||
{
|
||||
pattern: /^Skeleton/,
|
||||
styleDir: 'skeleton'
|
||||
pattern: /^Radio/,
|
||||
styleDir: 'radio'
|
||||
},
|
||||
|
||||
{
|
||||
pattern: /^Select/,
|
||||
styleDir: 'select'
|
||||
},
|
||||
{
|
||||
pattern: /^TreeSelect/,
|
||||
styleDir: 'tree-select'
|
||||
pattern: /^Skeleton/,
|
||||
styleDir: 'skeleton'
|
||||
},
|
||||
{
|
||||
pattern: /^Tree|^DirectoryTree/,
|
||||
styleDir: 'tree'
|
||||
pattern: /^Statistic/,
|
||||
styleDir: 'statistic'
|
||||
},
|
||||
{
|
||||
pattern: /^Typography/,
|
||||
styleDir: 'typography'
|
||||
pattern: /^Step/,
|
||||
styleDir: 'steps'
|
||||
},
|
||||
{
|
||||
pattern: /^Tab/,
|
||||
styleDir: 'tabs'
|
||||
},
|
||||
{
|
||||
pattern: /^Table/,
|
||||
styleDir: 'table'
|
||||
},
|
||||
{
|
||||
pattern: /^Timeline/,
|
||||
styleDir: 'timeline'
|
||||
},
|
||||
{
|
||||
pattern: /^TimeRangePicker/,
|
||||
styleDir: 'time-picker'
|
||||
},
|
||||
{
|
||||
pattern: /^Typography/,
|
||||
styleDir: 'typography'
|
||||
},
|
||||
{
|
||||
pattern: /^TreeSelect/,
|
||||
styleDir: 'tree-select'
|
||||
},
|
||||
{
|
||||
pattern: /^Upload/,
|
||||
styleDir: 'upload'
|
||||
},
|
||||
{
|
||||
pattern: /^Input|^Textarea/,
|
||||
styleDir: 'input'
|
||||
},
|
||||
{
|
||||
pattern: /^Menu|^SubMenu/,
|
||||
styleDir: 'menu'
|
||||
},
|
||||
{
|
||||
pattern: /^Tree|^DirectoryTree/,
|
||||
styleDir: 'tree'
|
||||
},
|
||||
{
|
||||
pattern: /^MonthPicker|^RangePicker|^WeekPicker/,
|
||||
styleDir: 'date-picker'
|
||||
},
|
||||
{
|
||||
pattern: /^TimePicker|^TimeRangePicker/,
|
||||
styleDir: 'time-picker'
|
||||
}
|
||||
]
|
||||
|
||||
@@ -254,12 +249,12 @@ const getSideEffects = (compName: string, options: AntDesignResolverOptions): Si
|
||||
|
||||
const primitiveNames = [
|
||||
'Affix',
|
||||
'Alert',
|
||||
'Anchor',
|
||||
'AnchorLink',
|
||||
'AutoComplete',
|
||||
'AutoCompleteOptGroup',
|
||||
'AutoCompleteOption',
|
||||
'Alert',
|
||||
'Avatar',
|
||||
'AvatarGroup',
|
||||
'BackTop',
|
||||
@@ -274,104 +269,106 @@ const primitiveNames = [
|
||||
'Card',
|
||||
'CardGrid',
|
||||
'CardMeta',
|
||||
'Collapse',
|
||||
'CollapsePanel',
|
||||
'Carousel',
|
||||
'Cascader',
|
||||
'CheckableTag',
|
||||
'Checkbox',
|
||||
'CheckboxGroup',
|
||||
'Col',
|
||||
'Collapse',
|
||||
'CollapsePanel',
|
||||
'Comment',
|
||||
'ConfigProvider',
|
||||
'DatePicker',
|
||||
'MonthPicker',
|
||||
'WeekPicker',
|
||||
'RangePicker',
|
||||
'QuarterPicker',
|
||||
'Descriptions',
|
||||
'DescriptionsItem',
|
||||
'DirectoryTree',
|
||||
'Divider',
|
||||
'Drawer',
|
||||
'Dropdown',
|
||||
'DropdownButton',
|
||||
'Drawer',
|
||||
'Empty',
|
||||
'FloatButton',
|
||||
'Form',
|
||||
'FormItem',
|
||||
'FormItemRest',
|
||||
'Grid',
|
||||
'Input',
|
||||
'InputGroup',
|
||||
'InputPassword',
|
||||
'InputSearch',
|
||||
'Textarea',
|
||||
'Image',
|
||||
'ImagePreviewGroup',
|
||||
'Input',
|
||||
'InputGroup',
|
||||
'InputNumber',
|
||||
'InputPassword',
|
||||
'InputSearch',
|
||||
'Layout',
|
||||
'LayoutContent',
|
||||
'LayoutFooter',
|
||||
'LayoutHeader',
|
||||
'LayoutSider',
|
||||
'LayoutFooter',
|
||||
'LayoutContent',
|
||||
'List',
|
||||
'ListItem',
|
||||
'ListItemMeta',
|
||||
'LocaleProvider',
|
||||
'Mentions',
|
||||
'MentionsOption',
|
||||
'Menu',
|
||||
'MenuDivider',
|
||||
'MenuItem',
|
||||
'MenuItemGroup',
|
||||
'SubMenu',
|
||||
'Mentions',
|
||||
'MentionsOption',
|
||||
'Modal',
|
||||
'Statistic',
|
||||
'StatisticCountdown',
|
||||
'MonthPicker',
|
||||
'PageHeader',
|
||||
'Pagination',
|
||||
'Popconfirm',
|
||||
'Popover',
|
||||
'Progress',
|
||||
'QRCode',
|
||||
'QuarterPicker',
|
||||
'Radio',
|
||||
'RadioButton',
|
||||
'RadioGroup',
|
||||
'RangePicker',
|
||||
'Rate',
|
||||
'Result',
|
||||
'Row',
|
||||
'Segmented',
|
||||
'Select',
|
||||
'SelectOptGroup',
|
||||
'SelectOption',
|
||||
'Skeleton',
|
||||
'SkeletonButton',
|
||||
'SkeletonAvatar',
|
||||
'SkeletonInput',
|
||||
'SkeletonButton',
|
||||
'SkeletonImage',
|
||||
'SkeletonInput',
|
||||
'Slider',
|
||||
'Space',
|
||||
'Spin',
|
||||
'Steps',
|
||||
'Statistic',
|
||||
'StatisticCountdown',
|
||||
'Step',
|
||||
'Steps',
|
||||
'SubMenu',
|
||||
'Switch',
|
||||
'Table',
|
||||
'TableColumn',
|
||||
'TableColumnGroup',
|
||||
'TableSummary',
|
||||
'TableSummaryRow',
|
||||
'TableSummaryCell',
|
||||
'TableSummaryRow',
|
||||
'TabPane',
|
||||
'Tabs',
|
||||
'Tag',
|
||||
'Textarea',
|
||||
'Timeline',
|
||||
'TimelineItem',
|
||||
'TimePicker',
|
||||
'TimeRangePicker',
|
||||
'Tooltip',
|
||||
'Transfer',
|
||||
'Tree',
|
||||
'TreeNode',
|
||||
'DirectoryTree',
|
||||
'TreeSelect',
|
||||
'TreeSelectNode',
|
||||
'Tabs',
|
||||
'TabPane',
|
||||
'Tag',
|
||||
'CheckableTag',
|
||||
'TimePicker',
|
||||
'TimeRangePicker',
|
||||
'Timeline',
|
||||
'TimelineItem',
|
||||
'Tooltip',
|
||||
'Typography',
|
||||
'TypographyLink',
|
||||
'TypographyParagraph',
|
||||
@@ -379,7 +376,7 @@ const primitiveNames = [
|
||||
'TypographyTitle',
|
||||
'Upload',
|
||||
'UploadDragger',
|
||||
'LocaleProvider'
|
||||
'WeekPicker'
|
||||
]
|
||||
|
||||
const prefix = 'Antd'
|
||||
@@ -417,7 +414,6 @@ export const AntDesignResolver = (options: AntDesignResolverOptions = {}): Compo
|
||||
sideEffects: getSideEffects(importName, options)
|
||||
}
|
||||
}
|
||||
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
1
doc/logo.svg
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
@@ -1,42 +1,91 @@
|
||||
appId: com.electron.app
|
||||
productName: oxygen-desktop
|
||||
productName: OxygenDesktop
|
||||
copyright: Copyright © 2017-2024 FatWeb. All rights reserved.
|
||||
appId: top.fatweb.oxygen.desktop
|
||||
artifactName: ${name}-${version}-${os}-${arch}.${ext}
|
||||
directories:
|
||||
buildResources: build
|
||||
files:
|
||||
- '!**/.vscode/*'
|
||||
- '!src/*'
|
||||
- '!doc/*'
|
||||
- '!resources/*'
|
||||
- '!electron.vite.config.{js,ts,mjs,cjs}'
|
||||
- '!{.eslintignore,.eslintrc.cjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}'
|
||||
- '!{.eslintignore,.eslint.config.mjs,.prettierignore,.prettierrc.json,dev-app-update.yml,README.md,README_zh.md}'
|
||||
- '!.eslintrc-auto-import.json'
|
||||
- '!src/renderer/auto-import'
|
||||
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml}'
|
||||
- '!{tsconfig.json,tsconfig.node.json,tsconfig.web.json}'
|
||||
- '!{tsconfig.json,tsconfig.node.json}'
|
||||
asarUnpack:
|
||||
- resources/**
|
||||
win:
|
||||
executableName: oxygen-desktop
|
||||
target:
|
||||
- target: nsis
|
||||
arch:
|
||||
- x64
|
||||
- ia32
|
||||
- arm64
|
||||
- target: msi
|
||||
arch:
|
||||
- x64
|
||||
- ia32
|
||||
- arm64
|
||||
- target: zip
|
||||
arch:
|
||||
- x64
|
||||
- ia32
|
||||
- arm64
|
||||
nsis:
|
||||
artifactName: ${name}-${version}-setup.${ext}
|
||||
shortcutName: ${productName}
|
||||
uninstallDisplayName: ${productName}
|
||||
createDesktopShortcut: always
|
||||
oneClick: false
|
||||
allowToChangeInstallationDirectory: true
|
||||
artifactName: ${name}-${version}-${os}-${arch}-setup.${ext}
|
||||
shortcutName: Oxygen Desktop
|
||||
createDesktopShortcut: true
|
||||
msi:
|
||||
oneClick: false
|
||||
shortcutName: Oxygen Desktop
|
||||
mac:
|
||||
category: public.app-category.productivity
|
||||
target:
|
||||
- default
|
||||
entitlementsInherit: build/entitlements.mac.plist
|
||||
darkModeSupport: true
|
||||
extendInfo:
|
||||
- NSCameraUsageDescription: Application requests access to the device's camera.
|
||||
- NSMicrophoneUsageDescription: Application requests access to the device's microphone.
|
||||
- NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder.
|
||||
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder.
|
||||
NSCameraUsageDescription: Application requests access to the device's camera.
|
||||
NSMicrophoneUsageDescription: Application requests access to the device's microphone.
|
||||
NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder.
|
||||
NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder.
|
||||
notarize: false
|
||||
dmg:
|
||||
artifactName: ${name}-${version}.${ext}
|
||||
linux:
|
||||
target:
|
||||
- AppImage
|
||||
- snap
|
||||
- deb
|
||||
maintainer: electronjs.org
|
||||
- target: AppImage
|
||||
arch:
|
||||
- x64
|
||||
- arm64
|
||||
- armv7l
|
||||
- target: deb
|
||||
arch:
|
||||
- x64
|
||||
- arm64
|
||||
- armv7l
|
||||
- target: rpm
|
||||
arch:
|
||||
- x64
|
||||
- arm64
|
||||
- armv7l
|
||||
- target: pacman
|
||||
arch:
|
||||
- x64
|
||||
- arm64
|
||||
- armv7l
|
||||
- target: tar.gz
|
||||
arch:
|
||||
- x64
|
||||
- arm64
|
||||
- armv7l
|
||||
category: Utility
|
||||
appImage:
|
||||
artifactName: ${name}-${version}.${ext}
|
||||
desktop:
|
||||
Name: Oxygen Desktop
|
||||
Comment: Oxygen Toolbox multi-platform desktop version
|
||||
npmRebuild: false
|
||||
publish:
|
||||
provider: generic
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { resolve } from 'path'
|
||||
import { fileURLToPath, URL } from 'node:url'
|
||||
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
import AutoImport from 'unplugin-auto-import/vite'
|
||||
@@ -10,7 +10,7 @@ import { FileSystemIconLoader } from 'unplugin-icons/loaders'
|
||||
|
||||
export default defineConfig({
|
||||
main: {
|
||||
plugins: [externalizeDepsPlugin()]
|
||||
plugins: [externalizeDepsPlugin({ exclude: ['electron-store'] })]
|
||||
},
|
||||
preload: {
|
||||
plugins: [externalizeDepsPlugin()]
|
||||
@@ -82,7 +82,7 @@ export default defineConfig({
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': resolve('src/renderer/src')
|
||||
'@': fileURLToPath(new URL('./src/renderer/src', import.meta.url))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
30
eslint.config.mjs
Normal file
@@ -0,0 +1,30 @@
|
||||
import globals from 'globals'
|
||||
import eslintJs from '@eslint/js'
|
||||
import tsEslint from 'typescript-eslint'
|
||||
|
||||
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
|
||||
|
||||
const config = {
|
||||
name: 'Global config',
|
||||
files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'],
|
||||
rules: {
|
||||
'@typescript-eslint/no-unused-expressions': [
|
||||
'error',
|
||||
{
|
||||
allowShortCircuit: true,
|
||||
allowTernary: true,
|
||||
allowTaggedTemplates: true
|
||||
}
|
||||
],
|
||||
'@typescript-eslint/no-unused-vars': 'off'
|
||||
}
|
||||
}
|
||||
|
||||
export default [
|
||||
{ files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'] },
|
||||
{ languageOptions: { globals: globals.browser } },
|
||||
eslintJs.configs.recommended,
|
||||
eslintPluginPrettierRecommended,
|
||||
...tsEslint.configs.recommended,
|
||||
config
|
||||
]
|
||||
9798
package-lock.json
generated
120
package.json
@@ -1,87 +1,97 @@
|
||||
{
|
||||
"name": "oxygen-desktop",
|
||||
"version": "1.0.0",
|
||||
"description": "An Electron application with React and TypeScript",
|
||||
"private": true,
|
||||
"version": "1.0.0-SNAPSHOT",
|
||||
"description": "Oxygen Toolbox multi-platform desktop version",
|
||||
"main": "./out/main/index.js",
|
||||
"author": "example.com",
|
||||
"homepage": "https://electron-vite.org",
|
||||
"author": {
|
||||
"name": "FatttSnake",
|
||||
"email": "fatttsnake@fatweb.top",
|
||||
"url": "https://fatweb.top"
|
||||
},
|
||||
"homepage": "https://tool.fatweb.top",
|
||||
"scripts": {
|
||||
"dev": "electron-vite dev",
|
||||
"dev": "electron-vite dev --sourcemap --remote-debugging-port=9000",
|
||||
"format": "prettier --write .",
|
||||
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix",
|
||||
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false",
|
||||
"typecheck:web": "tsc --noEmit -p tsconfig.web.json --composite false",
|
||||
"typecheck": "npm run typecheck:node && npm run typecheck:web",
|
||||
"typecheck": "tsc",
|
||||
"clean": "rimraf out dist .eslintrc-auto-import.json src/renderer/auto-imports.d.ts",
|
||||
"start": "electron-vite preview",
|
||||
"build": "electron-vite build && npm run typecheck",
|
||||
"build-test": "electron-vite build --mode testing && npm run typecheck",
|
||||
"postinstall": "electron-builder install-app-deps",
|
||||
"build:unpack": "npm run build && electron-builder --dir",
|
||||
"build-test:unpack": "npm run build-test && electron-builder --dir",
|
||||
"build:win": "npm run build && electron-builder --win",
|
||||
"build:mac": "electron-vite build && electron-builder --mac",
|
||||
"build:linux": "electron-vite build && electron-builder --linux"
|
||||
"build-test:win": "npm run build-test && electron-builder --win",
|
||||
"build:mac": "npm run build && electron-builder --mac",
|
||||
"build-test:mac": "npm run build-test && electron-builder --mac",
|
||||
"build:linux": "npm run build && electron-builder --linux",
|
||||
"build-test:linux": "npm run build-test && electron-builder --linux"
|
||||
},
|
||||
"dependencies": {
|
||||
"@electron-toolkit/preload": "^3.0.0",
|
||||
"@electron-toolkit/preload": "^3.0.1",
|
||||
"@electron-toolkit/utils": "^3.0.0",
|
||||
"electron-updater": "^6.1.7"
|
||||
"electron-store": "^10.0.0",
|
||||
"electron-updater": "^6.3.9"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ant-design/icons": "^5.3.1",
|
||||
"@electron-toolkit/eslint-config-prettier": "^2.0.0",
|
||||
"@electron-toolkit/eslint-config-ts": "^1.0.1",
|
||||
"@ant-design/icons": "^5.5.1",
|
||||
"@dnd-kit/core": "^6.1.0",
|
||||
"@dnd-kit/sortable": "^8.0.0",
|
||||
"@dnd-kit/utilities": "^3.2.2",
|
||||
"@electron-toolkit/tsconfig": "^1.0.1",
|
||||
"@marsidev/react-turnstile": "^0.5.3",
|
||||
"@eslint/js": "^9.13.0",
|
||||
"@marsidev/react-turnstile": "^1.0.2",
|
||||
"@monaco-editor/react": "^4.6.0",
|
||||
"@shikijs/monaco": "^1.22.2",
|
||||
"@svgr/core": "^8.1.0",
|
||||
"@svgr/plugin-jsx": "^8.1.0",
|
||||
"@types/jsdom": "^21.1.6",
|
||||
"@types/lodash": "^4.17.0",
|
||||
"@types/node": "^18.19.9",
|
||||
"@types/react": "^18.2.48",
|
||||
"@types/react-dom": "^18.2.18",
|
||||
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
||||
"@typescript-eslint/parser": "^6.21.0",
|
||||
"@typescript/ata": "^0.9.4",
|
||||
"@vitejs/plugin-react": "^4.2.1",
|
||||
"antd": "^5.15.2",
|
||||
"axios": "^1.6.7",
|
||||
"dayjs": "^1.11.10",
|
||||
"echarts": "^5.5.0",
|
||||
"electron": "^28.2.0",
|
||||
"electron-builder": "^24.9.1",
|
||||
"electron-vite": "^2.0.0",
|
||||
"esbuild-wasm": "^0.20.1",
|
||||
"eslint": "^8.56.0",
|
||||
"@types/jsdom": "^21.1.7",
|
||||
"@types/lodash": "^4.17.12",
|
||||
"@types/node": "^22.8.2",
|
||||
"@types/react": "^18.3.12",
|
||||
"@types/react-dom": "^18.3.1",
|
||||
"@typescript/ata": "^0.9.7",
|
||||
"@vitejs/plugin-react": "^4.3.3",
|
||||
"@xyflow/react": "^12.3.2",
|
||||
"antd": "^5.21.6",
|
||||
"antd-style": "^3.7.1",
|
||||
"axios": "^1.7.7",
|
||||
"custom-protocol-check": "^1.4.0",
|
||||
"dayjs": "^1.11.13",
|
||||
"echarts": "^5.5.1",
|
||||
"electron": "^33.0.2",
|
||||
"electron-builder": "^25.1.8",
|
||||
"electron-vite": "^2.3.0",
|
||||
"esbuild-wasm": "^0.24.0",
|
||||
"eslint": "^9.13.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-config-standard-with-typescript": "^43.0.1",
|
||||
"eslint-plugin-import": "^2.29.1",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.5",
|
||||
"eslint-plugin-prettier": "^5.2.1",
|
||||
"eslint-plugin-react-refresh": "^0.4.14",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"fflate": "^0.8.2",
|
||||
"jsdom": "^24.0.0",
|
||||
"globals": "^15.11.0",
|
||||
"jsdom": "^25.0.1",
|
||||
"jwt-decode": "^4.0.0",
|
||||
"localforage": "^1.10.0",
|
||||
"lodash": "^4.17.21",
|
||||
"match-sorter": "^6.3.4",
|
||||
"match-sorter": "^7.0.0",
|
||||
"moment": "^2.30.1",
|
||||
"monaco-editor": "^0.47.0",
|
||||
"monaco-jsx-syntax-highlight": "^1.2.0",
|
||||
"prettier": "^3.2.4",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"monaco-editor": "^0.52.0",
|
||||
"prettier": "^3.3.3",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-draggable": "^4.4.6",
|
||||
"react-router": "^6.22.3",
|
||||
"react-router-dom": "^6.22.3",
|
||||
"sass": "^1.71.1",
|
||||
"react-router": "^6.27.0",
|
||||
"react-router-dom": "^6.27.0",
|
||||
"shiki": "^1.22.2",
|
||||
"size-sensor": "^1.0.2",
|
||||
"stylelint-config-prettier": "^9.0.5",
|
||||
"typescript": "^5.3.3",
|
||||
"unplugin-auto-import": "^0.17.5",
|
||||
"unplugin-icons": "^0.18.5",
|
||||
"typescript": "^5.6.3",
|
||||
"typescript-eslint": "^8.12.1",
|
||||
"unplugin-auto-import": "^0.18.3",
|
||||
"unplugin-icons": "^0.19.3",
|
||||
"vanilla-tilt": "^1.8.1",
|
||||
"vite": "^5.0.12"
|
||||
"vite": "^5.4.10"
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 260 KiB |
|
Before Width: | Height: | Size: 43 KiB |
@@ -1 +0,0 @@
|
||||
<svg id="logo" xmlns="http://www.w3.org/2000/svg" width="911.75" height="898.91" viewBox="0 0 911.75 898.91"><defs><linearGradient id="FillColor" x1="0" x2="50%" y1="50%" y2="0"><stop offset="0%" stop-color="#2af598"/><stop offset="100%" stop-color="#009efd"/></linearGradient></defs><path fill="url(#FillColor)" d="M828.52,831.72c-216,259.7-774.46,115.85-765.17-319.5-19-292.76,370.82-602.09,704.81-367.11,44.53,48.2,81.39,32.52,121.28,46.67,28.28,14.3,21.36,42.61,52.36,142.6,31.6,101.09,60.92,133.92-17.45,182.4-28,11.34-46.6-2.34-117.82-25.31-92-29.65-109-22.33-132.66-48-27.26-29.62-14.42-50.13-41.31-80.13C507.2,259.81,336.39,351,290.74,489.72c-7,26.59-20.37,92.15,8.72,162.38,25.72,62.11,71.11,95.23,99.93,115.7C554.85,878.2,781.33,840.41,828.52,831.72Zm50.11-584.95c-15.4,5.93.73,47,16,40.82C910.07,281.66,893.94,240.63,878.63,246.77Zm-152,180.06c-4.34,15.92,35.73,26.64,39.92,10.68C770.9,421.58,730.83,410.86,726.63,426.83Z" transform="translate(-62.68 -62.16)"/></svg>
|
||||
|
Before Width: | Height: | Size: 978 B |
21
src/main/dataProcess.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import Store, { Schema } from 'electron-store'
|
||||
import { ipcMain } from 'electron'
|
||||
|
||||
const schema: Schema<StoreSchema> = {
|
||||
installedTools: {
|
||||
default: []
|
||||
}
|
||||
}
|
||||
|
||||
const store = new Store<StoreSchema>({ schema })
|
||||
|
||||
ipcMain.handle('store:installTool', (_, value: Record<string, Record<Platform, ToolVo>>) => {
|
||||
const installedTools = store.get('installedTools')
|
||||
|
||||
store.set('installedTools', { ...installedTools, ...value })
|
||||
return store.get('installedTools')
|
||||
})
|
||||
|
||||
ipcMain.handle('store:getInstalledTool', () => {
|
||||
return store.get('installedTools')
|
||||
})
|
||||
93
src/main/global.d.ts
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
type Platform = 'WEB' | 'DESKTOP' | 'ANDROID'
|
||||
|
||||
interface ImportMetaEnv {
|
||||
readonly VITE_PLATFORM: Platform
|
||||
readonly VITE_DESKTOP_PROTOCOL: string
|
||||
readonly VITE_APP_PROTOCOL: string
|
||||
readonly VITE_UI_URL: string
|
||||
readonly VITE_API_URL: string
|
||||
readonly VITE_API_TOKEN_URL: string
|
||||
readonly VITE_TURNSTILE_SITE_KEY: string
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: ImportMetaEnv
|
||||
}
|
||||
|
||||
interface StoreSchema {
|
||||
installedTools: Record<string, Record<Platform, ToolVo>>
|
||||
}
|
||||
|
||||
interface ToolVo {
|
||||
id: string
|
||||
name: string
|
||||
toolId: string
|
||||
icon: string
|
||||
platform: Platform
|
||||
description: string
|
||||
base: ToolBaseVo
|
||||
author: UserWithInfoVo
|
||||
ver: string
|
||||
keywords: string[]
|
||||
categories: ToolCategoryVo[]
|
||||
source: ToolDataVo
|
||||
dist: ToolDataVo
|
||||
entryPoint: string
|
||||
publish: string
|
||||
review: 'NONE' | 'PROCESSING' | 'PASS' | 'REJECT'
|
||||
createTime: string
|
||||
updateTime: string
|
||||
favorite: boolean
|
||||
}
|
||||
|
||||
interface ToolBaseVo {
|
||||
id: string
|
||||
name: string
|
||||
source: ToolDataVo
|
||||
dist: ToolDataVo
|
||||
platform: Platform
|
||||
compiled: boolean
|
||||
createTime: string
|
||||
updateTime: string
|
||||
}
|
||||
|
||||
interface ToolDataVo {
|
||||
id: string
|
||||
data?: string
|
||||
createTime?: string
|
||||
updateTime?: string
|
||||
}
|
||||
|
||||
interface UserWithInfoVo {
|
||||
id: string
|
||||
username: string
|
||||
twoFactor: boolean
|
||||
verified: boolean
|
||||
locking: boolean
|
||||
expiration: string
|
||||
credentialsExpiration: string
|
||||
enable: boolean
|
||||
currentLoginTime: string
|
||||
currentLoginIp: string
|
||||
lastLoginTime: string
|
||||
lastLoginIp: string
|
||||
createTime: string
|
||||
updateTime: string
|
||||
userInfo: UserInfoVo
|
||||
}
|
||||
|
||||
interface UserInfoVo {
|
||||
id: string
|
||||
userId: string
|
||||
nickname: string
|
||||
avatar: string
|
||||
email: string
|
||||
}
|
||||
|
||||
interface ToolCategoryVo {
|
||||
id: string
|
||||
name: string
|
||||
enable: boolean
|
||||
createTime: string
|
||||
updateTime: string
|
||||
}
|
||||
@@ -1,11 +1,71 @@
|
||||
import { app, shell, BrowserWindow, ipcMain } from 'electron'
|
||||
import { app, shell, BrowserWindow, ipcMain, protocol, net } from 'electron'
|
||||
import { join } from 'path'
|
||||
import { electronApp, optimizer, is } from '@electron-toolkit/utils'
|
||||
import icon from '../../resources/logo.ico?asset'
|
||||
import icon from '../../build/icon.ico?asset'
|
||||
import path from 'node:path'
|
||||
import url from 'node:url'
|
||||
import fs from 'fs'
|
||||
|
||||
function createWindow(): void {
|
||||
let mainWindow: BrowserWindow
|
||||
|
||||
// Application singleton execution
|
||||
if (!app.requestSingleInstanceLock()) {
|
||||
app.quit()
|
||||
}
|
||||
|
||||
// Register protocol client
|
||||
const args: string[] = []
|
||||
if (!app.isPackaged) {
|
||||
args.push(path.resolve(process.argv[1]))
|
||||
}
|
||||
args.push('--')
|
||||
app.setAsDefaultProtocolClient(import.meta.env.VITE_DESKTOP_PROTOCOL, process.execPath, args)
|
||||
// app.removeAsDefaultProtocolClient(import.meta.env.VITE_DESKTOP_PROTOCOL, process.execPath, args)
|
||||
|
||||
const handleArgv = (argv: string[]) => {
|
||||
const prefix = `${import.meta.env.VITE_DESKTOP_PROTOCOL}:`
|
||||
const offset = app.isPackaged ? 1 : 2
|
||||
const url = argv.find((arg, index) => index >= offset && arg.startsWith(prefix))
|
||||
if (url) {
|
||||
handleUrl(url)
|
||||
}
|
||||
}
|
||||
|
||||
const handleUrl = (url: string) => {
|
||||
const { hostname, pathname } = new URL(url)
|
||||
if (hostname === 'openurl' && mainWindow) {
|
||||
mainWindow.webContents.send('open-url', pathname)
|
||||
mainWindow.show()
|
||||
}
|
||||
}
|
||||
|
||||
// Windows
|
||||
handleArgv(process.argv)
|
||||
app.on('second-instance', (_, argv) => {
|
||||
if (process.platform === 'win32') {
|
||||
handleArgv(argv)
|
||||
}
|
||||
})
|
||||
|
||||
// macOS
|
||||
app.on('open-url', (_, argv) => {
|
||||
handleUrl(argv)
|
||||
})
|
||||
|
||||
protocol.registerSchemesAsPrivileged([
|
||||
{
|
||||
scheme: 'local',
|
||||
privileges: {
|
||||
standard: true,
|
||||
secure: true,
|
||||
supportFetchAPI: true
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
const createWindow = () => {
|
||||
// Create the browser window.
|
||||
const mainWindow = new BrowserWindow({
|
||||
mainWindow = new BrowserWindow({
|
||||
width: 900,
|
||||
height: 670,
|
||||
show: false,
|
||||
@@ -32,7 +92,10 @@ function createWindow(): void {
|
||||
if (is.dev && process.env['ELECTRON_RENDERER_URL']) {
|
||||
void mainWindow.loadURL(process.env['ELECTRON_RENDERER_URL'])
|
||||
} else {
|
||||
void mainWindow.loadFile(join(__dirname, '../renderer/index.html'))
|
||||
// void mainWindow.loadFile(join(__dirname, '../renderer/index.html'))
|
||||
void mainWindow.loadURL(
|
||||
`local://oxygen.fatweb.top/${join(__dirname, '../renderer/index.html')}`
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +103,28 @@ function createWindow(): void {
|
||||
// initialization and is ready to create browser windows.
|
||||
// Some APIs can only be used after this event occurs.
|
||||
void app.whenReady().then(() => {
|
||||
protocol.handle('local', (request) => {
|
||||
const { host } = new URL(request.url)
|
||||
if (host === 'oxygen.fatweb.top') {
|
||||
let filePath = request.url.slice('local://oxygen.fatweb.top/'.length)
|
||||
if (fs.existsSync(filePath)) {
|
||||
return net.fetch(url.pathToFileURL(filePath).toString())
|
||||
}
|
||||
|
||||
filePath = join(join(__dirname, '../renderer'), filePath)
|
||||
if (fs.existsSync(filePath)) {
|
||||
return net.fetch(url.pathToFileURL(filePath).toString())
|
||||
}
|
||||
|
||||
return net.fetch(
|
||||
url.pathToFileURL(join(__dirname, '../renderer/index.html')).toString()
|
||||
)
|
||||
} else {
|
||||
const filePath = request.url.slice('local://'.length)
|
||||
return net.fetch(url.pathToFileURL(filePath).toString())
|
||||
}
|
||||
})
|
||||
|
||||
// Set app user model id for windows
|
||||
electronApp.setAppUserModelId('top.fatweb')
|
||||
|
||||
@@ -73,3 +158,4 @@ app.on('window-all-closed', () => {
|
||||
|
||||
// In this file you can include the rest of your app's specific main process
|
||||
// code. You can also put them in separate files and require them here.
|
||||
import './dataProcess'
|
||||
|
||||
@@ -1,23 +1,27 @@
|
||||
import { contextBridge, Notification } from 'electron'
|
||||
import { contextBridge, Notification, ipcRenderer } from 'electron'
|
||||
import { electronAPI } from '@electron-toolkit/preload'
|
||||
|
||||
// Custom APIs for renderer
|
||||
const api = {}
|
||||
const api = {
|
||||
installTool: (newTools: Record<string, Record<Platform, ToolVo>>) =>
|
||||
ipcRenderer.invoke('store:installTool', newTools),
|
||||
getInstalledTool: () => ipcRenderer.invoke('store:getInstalledTool')
|
||||
}
|
||||
|
||||
// Use `contextBridge` APIs to expose Electron APIs to
|
||||
// renderer only if context isolation is enabled, otherwise
|
||||
// just add to the DOM global.
|
||||
if (process.contextIsolated) {
|
||||
try {
|
||||
contextBridge.exposeInMainWorld('electron', electronAPI)
|
||||
contextBridge.exposeInMainWorld('electronAPI', electronAPI)
|
||||
contextBridge.exposeInMainWorld('api', api)
|
||||
contextBridge.exposeInMainWorld('notification', Notification)
|
||||
contextBridge.exposeInMainWorld('Notification', Notification)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
} else {
|
||||
// @ts-expect-error (define in dts)
|
||||
window.electron = electronAPI
|
||||
window.electronAPI = electronAPI
|
||||
// @ts-expect-error (define in dts)
|
||||
window.api = api
|
||||
// @ts-expect-error (define in dts)
|
||||
|
||||
@@ -1,27 +1,97 @@
|
||||
import { theme } from 'antd'
|
||||
import zh_CN from 'antd/locale/zh_CN'
|
||||
import BaseStyles from '@/assets/css/base.style'
|
||||
import CommonStyles from '@/assets/css/common.style'
|
||||
import {
|
||||
COLOR_PRODUCTION,
|
||||
THEME_DARK,
|
||||
THEME_FOLLOW_SYSTEM,
|
||||
THEME_LIGHT
|
||||
} from '@/constants/common.constants'
|
||||
import { getRouter } from '@/router'
|
||||
import { getThemeMode, init } from '@/util/common'
|
||||
import FullscreenLoadingMask from '@/components/common/FullscreenLoadingMask'
|
||||
|
||||
export const AppContext = createContext<{ refreshRouter: () => void }>({
|
||||
refreshRouter: () => undefined
|
||||
export const AppContext = createContext({
|
||||
refreshRouter: () => {},
|
||||
isDarkMode: false
|
||||
})
|
||||
|
||||
const App = () => {
|
||||
const [messageInstance, messageHolder] = message.useMessage()
|
||||
const [notificationInstance, notificationHolder] = notification.useNotification()
|
||||
const [modalInstance, modalHolder] = AntdModal.useModal()
|
||||
const [routerState, setRouterState] = useState(getRouter)
|
||||
const [themeMode, setThemeMode] = useState(getThemeMode())
|
||||
const [isSystemDarkMode, setIsSystemDarkMode] = useState(false)
|
||||
|
||||
const getIsDark = () => {
|
||||
switch (themeMode) {
|
||||
case THEME_FOLLOW_SYSTEM:
|
||||
return isSystemDarkMode
|
||||
case THEME_LIGHT:
|
||||
return false
|
||||
case THEME_DARK:
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
init(messageInstance, notificationInstance, modalInstance)
|
||||
|
||||
const darkThemeMq = window.matchMedia('(prefers-color-scheme: dark)')
|
||||
setIsSystemDarkMode(darkThemeMq.matches)
|
||||
const darkThemeMqChangeListener = (ev: MediaQueryListEvent) => {
|
||||
setIsSystemDarkMode(ev.matches)
|
||||
}
|
||||
darkThemeMq.addEventListener('change', darkThemeMqChangeListener)
|
||||
|
||||
const themeModeChangeListener = () => {
|
||||
setThemeMode(getThemeMode())
|
||||
}
|
||||
window.addEventListener('localStorageChange', themeModeChangeListener)
|
||||
|
||||
return () => {
|
||||
darkThemeMq.removeEventListener('change', darkThemeMqChangeListener)
|
||||
window.removeEventListener('localStorageChange', themeModeChangeListener)
|
||||
}
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<>
|
||||
<AntdConfigProvider
|
||||
theme={{
|
||||
cssVar: true,
|
||||
algorithm: getIsDark() ? theme.darkAlgorithm : theme.defaultAlgorithm,
|
||||
token: {
|
||||
colorPrimary: COLOR_PRODUCTION,
|
||||
colorLinkHover: COLOR_PRODUCTION
|
||||
},
|
||||
components: {
|
||||
Tree: {
|
||||
colorBgContainer: 'transparent'
|
||||
}
|
||||
}
|
||||
}}
|
||||
locale={zh_CN}
|
||||
>
|
||||
<BaseStyles />
|
||||
<CommonStyles />
|
||||
<AppContext.Provider
|
||||
value={{
|
||||
refreshRouter: () => {
|
||||
setRouterState(getRouter())
|
||||
}
|
||||
},
|
||||
isDarkMode: getIsDark()
|
||||
}}
|
||||
>
|
||||
<Suspense fallback={<FullscreenLoadingMask />}>
|
||||
<RouterProvider router={routerState} />
|
||||
</Suspense>
|
||||
</AppContext.Provider>
|
||||
</>
|
||||
{messageHolder}
|
||||
{notificationHolder}
|
||||
{modalHolder}
|
||||
</AntdConfigProvider>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import { getRedirectUrl } from '@/util/route'
|
||||
import { getLoginStatus, getVerifyStatus_async } from '@/util/auth'
|
||||
|
||||
const AuthRoute = () => {
|
||||
const navigate = useNavigate()
|
||||
const [searchParams] = useSearchParams()
|
||||
const matches = useMatches()
|
||||
const lastMatch = matches.reduce((_, second) => second)
|
||||
@@ -12,6 +13,12 @@ const AuthRoute = () => {
|
||||
const isLogin = getLoginStatus()
|
||||
const isVerify = getVerifyStatus_async()
|
||||
|
||||
useEffect(() => {
|
||||
window.electronAPI.ipcRenderer.on('open-url', (_, url: string) => {
|
||||
navigate(url)
|
||||
})
|
||||
}, [])
|
||||
|
||||
return useMemo(() => {
|
||||
document.title = `${handle?.titlePrefix ?? ''}${
|
||||
handle?.title ? handle?.title : PRODUCTION_NAME
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
@mixin keyframes($animationName) {
|
||||
@-webkit-keyframes #{$animationName} {
|
||||
@content
|
||||
}
|
||||
@-moz-keyframes #{$animationName} {
|
||||
@content
|
||||
}
|
||||
@-o-keyframes #{$animationName} {
|
||||
@content
|
||||
}
|
||||
@keyframes #{$animationName} {
|
||||
@content
|
||||
}
|
||||
}
|
||||
|
||||
@mixin unique-keyframes {
|
||||
$animationName: unique-id();
|
||||
animation-name: $animationName;
|
||||
@include keyframes($animationName) {
|
||||
@content
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
em,
|
||||
i {
|
||||
font-style: normal
|
||||
}
|
||||
|
||||
li {
|
||||
list-style: none
|
||||
}
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
vertical-align: middle
|
||||
}
|
||||
|
||||
button {
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
a {
|
||||
color: #666;
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
button,
|
||||
input {
|
||||
font-family: Microsoft YaHei, Heiti SC, tahoma, arial, Hiragino Sans GB, "\5B8B\4F53", sans-serif;
|
||||
border: 0;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
body {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
background-color: #fff;
|
||||
font: 12px/1.5 Microsoft YaHei, Heiti SC, tahoma, arial, Hiragino Sans GB, "\5B8B\4F53", sans-serif;
|
||||
color: #666
|
||||
}
|
||||
|
||||
.hide,
|
||||
.none {
|
||||
display: none
|
||||
}
|
||||
|
||||
.clearfix:after {
|
||||
visibility: hidden;
|
||||
clear: both;
|
||||
display: block;
|
||||
content: ".";
|
||||
height: 0
|
||||
}
|
||||
|
||||
.clearfix {
|
||||
*zoom: 1
|
||||
}
|
||||
32
src/renderer/src/assets/css/base.style.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import { createGlobalStyle } from 'antd-style'
|
||||
|
||||
export default createGlobalStyle(() => ({
|
||||
'*': { margin: 0, padding: 0, boxSizing: 'border-box' },
|
||||
html: { scrollBehavior: 'smooth' },
|
||||
'em, i': { fontStyle: 'normal' },
|
||||
li: { listStyle: 'none' },
|
||||
img: { border: 0, verticalAlign: 'middle' },
|
||||
button: { cursor: 'pointer' },
|
||||
a: { color: '#666', textDecoration: 'none', whiteSpace: 'nowrap' },
|
||||
'button, input': {
|
||||
fontFamily:
|
||||
'Microsoft YaHei, Heiti SC, tahoma, arial, Hiragino Sans GB, "\\5B8B\\4F53", sans-serif',
|
||||
border: 0,
|
||||
outline: 'none'
|
||||
},
|
||||
body: {
|
||||
WebkitFontSmoothing: 'antialiased',
|
||||
backgroundColor: '#fff',
|
||||
font: '12px/1.5 Microsoft YaHei, Heiti SC, tahoma, arial, Hiragino Sans GB, "\\5B8B\\4F53", sans-serif',
|
||||
color: '#666'
|
||||
},
|
||||
'.hide, .none': { display: 'none' },
|
||||
'.clearfix:after': {
|
||||
visibility: 'hidden',
|
||||
clear: 'both',
|
||||
display: 'block',
|
||||
content: '"."',
|
||||
height: 0
|
||||
},
|
||||
'.clearfix': { zoom: 1 }
|
||||
}))
|
||||
@@ -1,118 +0,0 @@
|
||||
@use '@/assets/css/constants' as constants;
|
||||
|
||||
#root {
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.body {
|
||||
background-color: constants.$background-color;
|
||||
color: constants.$font-main-color;
|
||||
user-select: none;
|
||||
min-width: 900px;
|
||||
min-height: 400px;
|
||||
}
|
||||
|
||||
.fill {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.fill-with {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.fill-height {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.background-origin {
|
||||
background-color: constants.$origin-color;
|
||||
}
|
||||
|
||||
.center-box {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.vertical-center-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.horizontal-center-box {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.icon-size-xs {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
|
||||
> use {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.icon-size-sm {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
|
||||
> use {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.icon-size-md {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
|
||||
> use {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.icon-size-lg {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
|
||||
> use {
|
||||
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
.icon-size-xl {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
|
||||
> use {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
}
|
||||
}
|
||||
|
||||
.icon-size-menu {
|
||||
width: 23px;
|
||||
height: 23px;
|
||||
|
||||
> use {
|
||||
width: 23px;
|
||||
height: 23px;
|
||||
}
|
||||
}
|
||||
|
||||
.flex-horizontal {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.flex-vertical {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
43
src/renderer/src/assets/css/common.style.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import { createGlobalStyle } from 'antd-style'
|
||||
|
||||
export default createGlobalStyle(() => ({
|
||||
'.center-box': {
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center'
|
||||
},
|
||||
'.vertical-center-box': { display: 'flex', alignItems: 'center' },
|
||||
'.horizontal-center-box': { display: 'flex', justifyContent: 'center' },
|
||||
'.icon-size-xs': {
|
||||
width: 16,
|
||||
height: 16,
|
||||
'> use': { width: 16, height: 16 }
|
||||
},
|
||||
'.icon-size-sm': {
|
||||
width: 20,
|
||||
height: 20,
|
||||
'> use': { width: 20, height: 20 }
|
||||
},
|
||||
'.icon-size-md': {
|
||||
width: 24,
|
||||
height: 24,
|
||||
'> use': { width: 24, height: 24 }
|
||||
},
|
||||
'.icon-size-lg': {
|
||||
width: 32,
|
||||
height: 32,
|
||||
'> use': { width: 32, height: 32 }
|
||||
},
|
||||
'.icon-size-xl': {
|
||||
width: 64,
|
||||
height: 64,
|
||||
'> use': { width: 64, height: 64 }
|
||||
},
|
||||
'.icon-size-menu': {
|
||||
width: 23,
|
||||
height: 23,
|
||||
'> use': { width: 23, height: 23 }
|
||||
},
|
||||
'.flex-horizontal': { display: 'flex', flexDirection: 'row' },
|
||||
'.flex-vertical': { display: 'flex', flexDirection: 'column' }
|
||||
}))
|
||||
@@ -1,8 +0,0 @@
|
||||
@use '@/assets/css/constants' as constants;
|
||||
|
||||
.card-box {
|
||||
background-color: constants.$origin-color;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
box-shadow: 5px 5px 15px 0 rgba(0,0,0,0.1);
|
||||
}
|
||||
10
src/renderer/src/assets/css/components/common/card.style.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(({ token }) => ({
|
||||
cardBox: {
|
||||
backgroundColor: token.colorBgContainer,
|
||||
borderRadius: token.borderRadiusLG,
|
||||
overflow: 'hidden',
|
||||
boxShadow: token.boxShadowTertiary
|
||||
}
|
||||
}))
|
||||
@@ -1,7 +0,0 @@
|
||||
.fit-center {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(() => ({
|
||||
fitCenter: {
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
width: '100%',
|
||||
height: '100%'
|
||||
}
|
||||
}))
|
||||
@@ -1,5 +0,0 @@
|
||||
.fit-fullscreen {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(() => ({
|
||||
fitFullscreen: {
|
||||
position: 'relative',
|
||||
width: '100%',
|
||||
height: '100vh'
|
||||
}
|
||||
}))
|
||||
@@ -1,5 +0,0 @@
|
||||
.flex-box {
|
||||
> * {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(
|
||||
() => ({
|
||||
flexBox: {
|
||||
'> *': {
|
||||
flex: 1
|
||||
}
|
||||
}
|
||||
}),
|
||||
{ hashPriority: 'low' }
|
||||
)
|
||||
@@ -1,10 +0,0 @@
|
||||
.fullscreen-loading-mask {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 100;
|
||||
background-color: rgba(200, 200, 200, 0.2);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(({ token }) => ({
|
||||
fullscreenLoadingMask: {
|
||||
position: 'absolute',
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
zIndex: 100,
|
||||
backgroundColor: token.colorBgContainer
|
||||
}
|
||||
}))
|
||||
@@ -1,93 +0,0 @@
|
||||
@use '@/assets/css/constants' as constants;
|
||||
@use '@/assets/css/mixins' as mixins;
|
||||
|
||||
.hide-scrollbar-mask {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
|
||||
.hide-scrollbar-selection {
|
||||
position: relative;
|
||||
overflow: scroll;
|
||||
scrollbar-width: none;
|
||||
-ms-overflow-style: none;
|
||||
|
||||
.hide-scrollbar-content {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.scrollbar {
|
||||
position: absolute;
|
||||
z-index: 1000;
|
||||
opacity: .5;
|
||||
touch-action: none;
|
||||
|
||||
.box {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
|
||||
|
||||
.block {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 8px;
|
||||
background-color: constants.$font-secondary-color;
|
||||
transition: background-color .2s;
|
||||
}
|
||||
|
||||
:hover {
|
||||
background-color: constants.$font-main-color;
|
||||
}
|
||||
}
|
||||
|
||||
&.hide {
|
||||
display: block;
|
||||
opacity: 0;
|
||||
animation: 0.4s linear;
|
||||
|
||||
@include mixins.unique-keyframes {
|
||||
0% {
|
||||
opacity: 0.5;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.vertical-scrollbar {
|
||||
padding: 12px 2px;
|
||||
height: 100%;
|
||||
left: 100%;
|
||||
top: 0;
|
||||
transform: translateX(-100%);
|
||||
|
||||
.box {
|
||||
width: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
.horizontal-scrollbar {
|
||||
padding: 4px 12px;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
top: 100%;
|
||||
transform: translateY(-100%);
|
||||
|
||||
.box {
|
||||
height: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
import { createStyles, keyframes } from 'antd-style'
|
||||
|
||||
const fadeOut = keyframes`
|
||||
0% {
|
||||
opacity: 0.5;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
}
|
||||
`
|
||||
|
||||
export default createStyles(({ css, cx, token }) => {
|
||||
const scrollbarBox = cx(css`
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: ${token.borderRadiusLG};
|
||||
overflow: hidden;
|
||||
`)
|
||||
|
||||
return {
|
||||
hideScrollbarMask: {
|
||||
position: 'relative',
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
overflow: 'hidden',
|
||||
'::-webkit-scrollbar': {
|
||||
display: 'none'
|
||||
}
|
||||
},
|
||||
hideScrollbarSelection: {
|
||||
position: 'relative',
|
||||
overflow: 'scroll',
|
||||
scrollbarWidth: 'none',
|
||||
msOverflowStyle: 'none'
|
||||
},
|
||||
hideScrollbarContent: {
|
||||
minWidth: '100%'
|
||||
},
|
||||
scrollbar: {
|
||||
position: 'absolute',
|
||||
zIndex: 1000,
|
||||
opacity: 0.5,
|
||||
touchAction: 'none'
|
||||
},
|
||||
scrollbarBox,
|
||||
scrollbarBoxBlock: {
|
||||
position: 'absolute',
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
borderRadius: token.borderRadiusLG,
|
||||
backgroundColor: token.colorTextSecondary,
|
||||
transition: 'background-color 0.2s',
|
||||
':hover': {
|
||||
backgroundColor: token.colorTextLabel
|
||||
}
|
||||
},
|
||||
verticalScrollbar: css`
|
||||
height: 100%;
|
||||
left: 100%;
|
||||
top: 0;
|
||||
transform: translateX(-100%);
|
||||
|
||||
.${scrollbarBox} {
|
||||
width: ${token.sizeXXS}px;
|
||||
}
|
||||
`,
|
||||
horizontalScrollbar: css`
|
||||
width: 100%;
|
||||
left: 0;
|
||||
top: 100%;
|
||||
transform: translateY(-100%);
|
||||
|
||||
.${scrollbarBox} {
|
||||
height: ${token.sizeXXS}px;
|
||||
}
|
||||
`,
|
||||
hide: {
|
||||
display: 'block',
|
||||
opacity: 0,
|
||||
animation: `${fadeOut} 0.4s linear`
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -1,34 +0,0 @@
|
||||
@use '@/assets/css/constants' as constants;
|
||||
|
||||
.dot-list {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
.item {
|
||||
flex: auto;
|
||||
cursor: pointer;
|
||||
|
||||
.dot {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 50%;
|
||||
border: {
|
||||
width: 2px;
|
||||
color: constants.$font-secondary-color;
|
||||
style: solid;
|
||||
};
|
||||
transition: all .2s;
|
||||
}
|
||||
|
||||
:hover {
|
||||
background-color: constants.$focus-color;
|
||||
}
|
||||
}
|
||||
|
||||
.active > * {
|
||||
background-color: constants.$font-secondary-color !important;
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
.loading-mask {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 100;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(() => ({
|
||||
loadingMask: {
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
zIndex: 100
|
||||
}
|
||||
}))
|
||||
@@ -1,322 +0,0 @@
|
||||
@use "@/assets/css/constants" as constants;
|
||||
@use "@/assets/css/mixins" as mixins;
|
||||
|
||||
.sidebar {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
user-select: none;
|
||||
transition: all .3s;
|
||||
white-space: nowrap;
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-weight: bold;
|
||||
padding: 10px 14px;
|
||||
color: constants.$main-color;
|
||||
overflow: hidden;
|
||||
|
||||
.icon-box {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
font-size: constants.$SIZE_ICON_SM;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
span {
|
||||
transform: rotateZ(180deg);
|
||||
transition: all .3s;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: constants.$background-color;
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
flex: 1;
|
||||
font-size: 2em;
|
||||
text-align: center;
|
||||
letter-spacing: 0.2em;
|
||||
transform: translateX(0.1em);
|
||||
}
|
||||
}
|
||||
|
||||
.content, .bottom-fixed {
|
||||
display: flex;
|
||||
min-height: 0;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
|
||||
.scroll {
|
||||
min-height: 0;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
ul {
|
||||
> li {
|
||||
&.item {
|
||||
position: relative;
|
||||
margin: 4px 14px;
|
||||
font-size: 1.4em;
|
||||
|
||||
>.menu-bt {
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
height: 40px;
|
||||
|
||||
.icon-box {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 0 10px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
font-size: constants.$SIZE_ICON_SM;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
transition: all 0.2s;
|
||||
|
||||
.text {
|
||||
flex: 1;
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
&.active {
|
||||
color: constants.$origin-color;
|
||||
background-color: constants.$main-color !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.submenu {
|
||||
visibility: hidden;
|
||||
position: fixed;
|
||||
padding-left: 20px;
|
||||
z-index: 10000;
|
||||
animation: 0.1s ease forwards;
|
||||
@include mixins.unique-keyframes {
|
||||
0% {
|
||||
transform: translateX(0);
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
transform: translateX(-10px);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
padding: 10px 10px;
|
||||
background-color: constants.$origin-color;
|
||||
border-radius: 8px;
|
||||
|
||||
.item {
|
||||
border-radius: 8px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
|
||||
a {
|
||||
display: block;
|
||||
padding: 8px 16px;
|
||||
transition: all 0.2s;
|
||||
|
||||
&.active {
|
||||
color: constants.$origin-color;
|
||||
background-color: constants.$main-color !important;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover a {
|
||||
background-color: constants.$background-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
>.menu-bt {
|
||||
a {
|
||||
background-color: constants.$background-color;
|
||||
}
|
||||
}
|
||||
|
||||
.submenu {
|
||||
visibility: visible;
|
||||
animation: 0.3s ease;
|
||||
@include mixins.unique-keyframes {
|
||||
0% {
|
||||
transform: translateX(-10px);
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
transform: translateX(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.separate {
|
||||
height: 0;
|
||||
margin: 10px 5px;
|
||||
border: {
|
||||
width: 1px;
|
||||
color: constants.$font-secondary-color;
|
||||
style: solid;
|
||||
};
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
.footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-weight: bold;
|
||||
padding: 8px 14px;
|
||||
color: constants.$main-color;
|
||||
|
||||
.icon-user {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex: 0 0 auto;
|
||||
margin-left: 4px;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
font-size: constants.$SIZE_ICON_XS;
|
||||
border: 2px constants.$font-secondary-color solid;
|
||||
color: constants.$font-secondary-color;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
flex: 1;
|
||||
padding-left: 10px;
|
||||
font-size: 1.4em;
|
||||
color: constants.$font-main-color;
|
||||
user-select: text;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
a{
|
||||
color: constants.$main-color;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
.icon-exit {
|
||||
font-size: constants.$SIZE_ICON_XS;
|
||||
color: constants.$error-color;
|
||||
padding: 6px 10px;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
border-radius: 8px;
|
||||
background-color: constants.$background-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.hide {
|
||||
width: 68px !important;
|
||||
|
||||
.title {
|
||||
.icon-box {
|
||||
span {
|
||||
transform: rotateZ(360deg);
|
||||
transition: all .3s;
|
||||
}
|
||||
}
|
||||
.text {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.menu-bt {
|
||||
.text {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.submenu {
|
||||
.menu-bt {
|
||||
.text {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: relative;
|
||||
.text {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.submenu-exit {
|
||||
display: none;
|
||||
position: absolute;
|
||||
padding-left: 6px;
|
||||
left: 100%;
|
||||
z-index: 1000;
|
||||
box-shadow: 5px 5px 15px 0 rgba(0,0,0,0.1);
|
||||
|
||||
.content {
|
||||
padding: 8px;
|
||||
border-radius: 8px;
|
||||
background-color: constants.$origin-color;
|
||||
|
||||
.icon-exit {
|
||||
padding: 4px 8px;
|
||||
&:hover {
|
||||
border-radius: 8px;
|
||||
background-color: constants.$background-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.hide {
|
||||
display: none!important;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover .submenu-exit {
|
||||
display: block;
|
||||
animation: 0.3s ease;
|
||||
@include mixins.unique-keyframes {
|
||||
0% {
|
||||
transform: translateX(-10px);
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
transform: translateX(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
import { createStyles, keyframes } from 'antd-style'
|
||||
|
||||
const slideIn = keyframes`
|
||||
0% {
|
||||
transform: translateX(-10px);
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
transform: translateX(0);
|
||||
opacity: 1;
|
||||
}
|
||||
`
|
||||
|
||||
export default createStyles(({ cx, css, token }) => {
|
||||
const collapsedExit = cx(css`
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
padding-left: ${token.paddingXS}px;
|
||||
left: 100%;
|
||||
z-index: 1000;
|
||||
transform: translateX(-100%);
|
||||
`)
|
||||
|
||||
return {
|
||||
footer: css`
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
font-weight: bold;
|
||||
padding: ${token.paddingXS}px ${token.paddingSM}px;
|
||||
color: ${token.colorPrimary};
|
||||
|
||||
&:hover .${collapsedExit} {
|
||||
opacity: 1;
|
||||
animation: ${slideIn} 0.3s ease;
|
||||
transform: unset;
|
||||
}
|
||||
`,
|
||||
|
||||
icon: {
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
flex: '0 0 auto',
|
||||
marginLeft: token.marginXXS,
|
||||
width: token.sizeXL,
|
||||
height: token.sizeXL,
|
||||
fontSize: token.sizeMS,
|
||||
border: `2px ${token.colorBorder} solid`,
|
||||
color: token.colorBorder,
|
||||
borderRadius: '50%',
|
||||
overflow: 'hidden',
|
||||
cursor: 'pointer',
|
||||
|
||||
img: {
|
||||
width: '100%',
|
||||
height: '100%'
|
||||
}
|
||||
},
|
||||
|
||||
text: {
|
||||
flex: 1,
|
||||
paddingLeft: token.paddingXS,
|
||||
fontSize: token.fontSizeLG,
|
||||
color: token.colorTextLabel,
|
||||
userSelect: 'text',
|
||||
overflow: 'hidden',
|
||||
textOverflow: 'ellipsis',
|
||||
a: {
|
||||
color: token.colorPrimary,
|
||||
textDecoration: 'underline'
|
||||
}
|
||||
},
|
||||
|
||||
collapsedText: {
|
||||
display: 'none'
|
||||
},
|
||||
|
||||
collapsedExit,
|
||||
|
||||
hide: {
|
||||
display: 'none !important'
|
||||
},
|
||||
|
||||
exitContent: {
|
||||
display: 'flex',
|
||||
backgroundColor: token.colorBgContainer
|
||||
},
|
||||
|
||||
collapsedExitContent: {
|
||||
padding: token.paddingXS,
|
||||
borderRadius: token.borderRadiusLG,
|
||||
boxShadow: token.boxShadow
|
||||
},
|
||||
|
||||
exitIcon: {
|
||||
fontSize: token.sizeMS,
|
||||
color: token.colorError,
|
||||
padding: `${token.paddingXXS}px ${token.paddingXS}px`,
|
||||
cursor: 'pointer',
|
||||
|
||||
'&:hover': {
|
||||
borderRadius: token.borderRadiusLG,
|
||||
backgroundColor: token.colorBgLayout
|
||||
}
|
||||
},
|
||||
|
||||
collapsedExitIcon: {
|
||||
padding: `${token.paddingXXS}px ${token.paddingXS}px`
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,85 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(({ cx, css, token }) => {
|
||||
const title = cx(css`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-weight: bold;
|
||||
padding: ${token.paddingXS}px ${token.paddingSM}px;
|
||||
color: ${token.colorPrimary};
|
||||
overflow: hidden;
|
||||
`)
|
||||
|
||||
const titleIcon = cx(css`
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: ${token.paddingXS}px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
font-size: ${token.sizeMD}px;
|
||||
border-radius: ${token.borderRadiusLG}px;
|
||||
cursor: pointer;
|
||||
|
||||
span {
|
||||
transform: rotateZ(180deg);
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: ${token.colorBgLayout};
|
||||
}
|
||||
`)
|
||||
|
||||
const titleText = cx(css`
|
||||
flex: 1;
|
||||
font-size: ${token.fontSizeHeading3}px;
|
||||
text-align: center;
|
||||
letter-spacing: ${token.sizeXS}px;
|
||||
`)
|
||||
|
||||
return {
|
||||
sidebar: {
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
height: '100%',
|
||||
userSelect: 'none',
|
||||
transition: 'all .3s',
|
||||
whiteSpace: 'nowrap'
|
||||
},
|
||||
|
||||
title,
|
||||
|
||||
titleIcon,
|
||||
|
||||
titleText,
|
||||
|
||||
content: {
|
||||
display: 'flex',
|
||||
minHeight: 0,
|
||||
flexDirection: 'column',
|
||||
flex: 1,
|
||||
|
||||
'ul > li, ul > div > li': {
|
||||
padding: `${token.paddingXXS}px ${token.paddingSM}px`
|
||||
}
|
||||
},
|
||||
|
||||
collapse: cx(css`
|
||||
width: ${token.sizeXL * 2}px !important;
|
||||
|
||||
.${title} {
|
||||
.${titleIcon} {
|
||||
span {
|
||||
transform: rotateZ(360deg);
|
||||
transition: all 0.3s;
|
||||
}
|
||||
}
|
||||
|
||||
.${titleText} {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
`)
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,84 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(({ cx, css, token }) => {
|
||||
const menuBt = cx(css`
|
||||
border-radius: ${token.borderRadiusLG}px;
|
||||
overflow: hidden;
|
||||
height: 40px;
|
||||
|
||||
a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
transition: all 0.2s;
|
||||
background-color: ${token.colorBgContainer};
|
||||
}
|
||||
`)
|
||||
|
||||
const active = cx(css`
|
||||
color: ${token.colorTextLightSolid};
|
||||
background-color: ${token.colorPrimary} !important;
|
||||
`)
|
||||
|
||||
return {
|
||||
item: css`
|
||||
position: relative;
|
||||
font-size: ${token.fontSizeHeading5}px;
|
||||
|
||||
&:hover > div > a:not(.${active}),
|
||||
&:hover > a:not(.${active}) {
|
||||
background-color: ${token.colorBgLayout};
|
||||
}
|
||||
`,
|
||||
|
||||
submenuItem: css`
|
||||
border-radius: ${token.borderRadiusLG}px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
padding: 0 !important;
|
||||
|
||||
a {
|
||||
display: block;
|
||||
padding: ${token.paddingXS}px ${token.paddingMD}px;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
`,
|
||||
|
||||
menuBt,
|
||||
|
||||
active,
|
||||
|
||||
icon: {
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
padding: `0 ${token.paddingXS}px`,
|
||||
width: 40,
|
||||
height: 40,
|
||||
flex: '0 0 auto',
|
||||
fontSize: token.sizeMD,
|
||||
cursor: 'pointer',
|
||||
|
||||
img: {
|
||||
width: '100%'
|
||||
}
|
||||
},
|
||||
|
||||
text: {
|
||||
flex: 1,
|
||||
paddingLeft: token.paddingXS,
|
||||
width: 0,
|
||||
overflow: 'hidden',
|
||||
textOverflow: 'ellipsis'
|
||||
},
|
||||
|
||||
collapsedText: {
|
||||
display: 'none'
|
||||
},
|
||||
|
||||
collapsedExtend: {
|
||||
display: 'none'
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,9 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(() => ({
|
||||
scroll: {
|
||||
minHeight: 0,
|
||||
flex: 1,
|
||||
width: '100%'
|
||||
}
|
||||
}))
|
||||
@@ -0,0 +1,9 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(({ token }) => ({
|
||||
separate: {
|
||||
height: 0,
|
||||
margin: `${token.marginSM}px ${token.marginXS}px`,
|
||||
border: `1px solid ${token.colorBorder}`
|
||||
}
|
||||
}))
|
||||
@@ -0,0 +1,50 @@
|
||||
import { createStyles, keyframes } from 'antd-style'
|
||||
|
||||
export default createStyles(({ token }) => {
|
||||
const slideIn = keyframes`
|
||||
0% {
|
||||
transform: translateX(-${token.sizeSM}px);
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
transform: translateX(0);
|
||||
opacity: 1;
|
||||
}
|
||||
`
|
||||
|
||||
const slideOut = keyframes`
|
||||
0% {
|
||||
transform: translateX(0);
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
transform: translateX(-${token.sizeSM}px);
|
||||
opacity: 0;
|
||||
}
|
||||
`
|
||||
|
||||
return {
|
||||
submenu: {
|
||||
visibility: 'hidden',
|
||||
position: 'fixed',
|
||||
paddingLeft: token.paddingXS,
|
||||
zIndex: 10000,
|
||||
animation: `${slideOut} 0.1s ease forwards`
|
||||
},
|
||||
|
||||
hoveredSubmenu: {
|
||||
visibility: 'visible',
|
||||
animation: `${slideIn} 0.3s ease`
|
||||
},
|
||||
|
||||
content: {
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
gap: token.sizeXXS,
|
||||
padding: token.paddingSM,
|
||||
backgroundColor: token.colorBgContainer,
|
||||
borderRadius: token.borderRadiusLG,
|
||||
boxShadow: token.boxShadow
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,24 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(({ token }) => ({
|
||||
root: {
|
||||
width: 180,
|
||||
height: 290,
|
||||
textAlign: 'center',
|
||||
gap: token.sizeXXL,
|
||||
cursor: 'pointer',
|
||||
'> *': {
|
||||
flex: '0 0 auto',
|
||||
display: 'block'
|
||||
}
|
||||
},
|
||||
icon: {
|
||||
marginTop: 80,
|
||||
color: token.colorPrimary,
|
||||
fontSize: token.sizeXXL
|
||||
},
|
||||
text: {
|
||||
fontWeight: 'bolder',
|
||||
fontSize: token.fontSizeXL
|
||||
}
|
||||
}))
|
||||
@@ -0,0 +1,9 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(() => ({
|
||||
root: {
|
||||
backgroundColor: 'transparent',
|
||||
color: 'unset',
|
||||
cursor: 'grab'
|
||||
}
|
||||
}))
|
||||
@@ -0,0 +1,24 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(({ token }) => ({
|
||||
root: {
|
||||
position: 'absolute',
|
||||
left: 0,
|
||||
top: 0,
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
padding: `0 ${token.paddingSM}px ${token.paddingSM}px`,
|
||||
backgroundColor: token.colorBgContainer
|
||||
},
|
||||
|
||||
dropMaskBorder: {
|
||||
display: 'flex',
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
border: `2px dashed ${token.colorBorder}`,
|
||||
borderRadius: token.borderRadiusLG,
|
||||
fontSize: token.fontSizeHeading3
|
||||
}
|
||||
}))
|
||||
15
src/renderer/src/assets/css/components/dnd/sortable.style.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(({ token }) => ({
|
||||
delete: {
|
||||
'.dnd-delete-mask': {
|
||||
border: `1px dashed ${token.colorErrorHover}`,
|
||||
filter: `drop-shadow(1000px 0 0 ${token.colorErrorHover})`,
|
||||
transform: 'translate(-1000px)',
|
||||
|
||||
'> a': {
|
||||
backgroundColor: 'transparent !important'
|
||||
}
|
||||
}
|
||||
}
|
||||
}))
|
||||
@@ -0,0 +1,32 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(({ token }) => ({
|
||||
root: {
|
||||
padding: token.paddingLG,
|
||||
gap: token.paddingLG,
|
||||
color: token.colorPrimary
|
||||
},
|
||||
|
||||
head: {
|
||||
alignItems: 'center',
|
||||
gap: token.sizeXXS,
|
||||
|
||||
'>:nth-child(n+3)': {
|
||||
flex: '0 0 auto'
|
||||
}
|
||||
},
|
||||
|
||||
icon: {
|
||||
fontSize: token.sizeLG,
|
||||
flex: '0 0 auto'
|
||||
},
|
||||
|
||||
title: {
|
||||
display: 'flex',
|
||||
fontSize: token.fontSize
|
||||
},
|
||||
|
||||
btSave: {
|
||||
color: token.colorPrimary
|
||||
}
|
||||
}))
|
||||
@@ -0,0 +1,28 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(({ token }) => ({
|
||||
root: {
|
||||
padding: token.paddingLG,
|
||||
gap: token.paddingLG
|
||||
},
|
||||
|
||||
head: {
|
||||
alignItems: 'center',
|
||||
gap: token.sizeXXS,
|
||||
color: token.colorPrimary,
|
||||
|
||||
'>:nth-child(n+3)': {
|
||||
flex: '0 0 auto'
|
||||
}
|
||||
},
|
||||
|
||||
icon: {
|
||||
fontSize: token.sizeLG,
|
||||
flex: '0 0 auto'
|
||||
},
|
||||
|
||||
title: {
|
||||
display: 'flex',
|
||||
fontSize: token.fontSize
|
||||
}
|
||||
}))
|
||||
@@ -0,0 +1,26 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(({ token }) => ({
|
||||
root: {
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
textAlign: 'center',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
cursor: 'pointer',
|
||||
|
||||
'>*': {
|
||||
flex: '0 0 auto'
|
||||
}
|
||||
},
|
||||
|
||||
icon: {
|
||||
fontSize: token.sizeXXL,
|
||||
color: token.colorPrimary
|
||||
},
|
||||
|
||||
text: {
|
||||
fontSize: token.fontSizeXL,
|
||||
fontWeight: 'bolder'
|
||||
}
|
||||
}))
|
||||
110
src/renderer/src/assets/css/components/tools/local-card.style.ts
Normal file
@@ -0,0 +1,110 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(({ cx, css, token }) => {
|
||||
const version = cx(css`
|
||||
width: 0;
|
||||
transition: all 0.2s;
|
||||
`)
|
||||
|
||||
const operation = cx(css`
|
||||
display: flex;
|
||||
font-size: 1.6em;
|
||||
gap: ${token.sizeXXS}px;
|
||||
opacity: 0;
|
||||
transition: all 0.2s;
|
||||
z-index: 100;
|
||||
|
||||
> *:hover {
|
||||
color: ${token.colorIconHover};
|
||||
}
|
||||
`)
|
||||
|
||||
return {
|
||||
root: css`
|
||||
width: 180px;
|
||||
height: 290px;
|
||||
text-align: center;
|
||||
gap: ${token.sizeSM}px;
|
||||
cursor: pointer;
|
||||
|
||||
> * {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
.${version} {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.${operation} {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
`,
|
||||
|
||||
header: {
|
||||
display: 'flex',
|
||||
width: '100%',
|
||||
padding: token.paddingSM,
|
||||
justifyContent: 'space-between'
|
||||
},
|
||||
|
||||
version,
|
||||
|
||||
operation,
|
||||
|
||||
icon: {
|
||||
img: {
|
||||
width: token.sizeXL * 2
|
||||
}
|
||||
},
|
||||
|
||||
info: {
|
||||
padding: `0 ${token.paddingSM}px`
|
||||
},
|
||||
|
||||
toolName: {
|
||||
fontSize: token.fontSizeXL,
|
||||
fontWeight: 'bolder',
|
||||
overflow: 'hidden',
|
||||
textOverflow: 'ellipsis',
|
||||
whiteSpace: 'nowrap'
|
||||
},
|
||||
|
||||
toolDesc: {
|
||||
marginTop: token.marginXS,
|
||||
color: token.colorTextDescription
|
||||
},
|
||||
|
||||
author: {
|
||||
display: 'flex',
|
||||
marginTop: 'auto',
|
||||
paddingBottom: token.paddingSM,
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'center',
|
||||
gap: token.sizeXS,
|
||||
|
||||
'&:hover': {
|
||||
color: token.colorPrimary
|
||||
}
|
||||
},
|
||||
|
||||
avatar: {
|
||||
'> *': {
|
||||
width: token.sizeLG,
|
||||
height: token.sizeLG
|
||||
}
|
||||
},
|
||||
|
||||
authorName: {
|
||||
display: 'flex',
|
||||
alignItems: 'center'
|
||||
},
|
||||
|
||||
androidQrcode: {
|
||||
alignItems: 'center',
|
||||
transform: 'translateX(-16px)',
|
||||
gap: token.sizeMD
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,108 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(({ cx, css, token }) => {
|
||||
const info = cx(css`
|
||||
padding: 0 ${token.paddingSM}px;
|
||||
transform: translateY(${token.sizeXL}px);
|
||||
transition: all 0.1s ease;
|
||||
`)
|
||||
|
||||
const edit = cx(css`
|
||||
> * {
|
||||
> :first-child {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
`)
|
||||
|
||||
const toolDesc = cx(css`
|
||||
position: relative;
|
||||
margin-top: ${token.marginXS}px;
|
||||
color: ${token.colorTextDescription};
|
||||
transition: all 0.1s ease;
|
||||
`)
|
||||
|
||||
const operation = cx(css`
|
||||
display: flex;
|
||||
position: absolute;
|
||||
flex: 1;
|
||||
gap: ${token.sizeXXS}px;
|
||||
bottom: ${token.sizeLG}px;
|
||||
padding: 0 ${token.paddingLG}px;
|
||||
width: 100%;
|
||||
flex-direction: column;
|
||||
opacity: 0;
|
||||
|
||||
> *,
|
||||
.${edit} > * {
|
||||
width: 100%;
|
||||
}
|
||||
`)
|
||||
|
||||
return {
|
||||
root: css`
|
||||
width: 180px;
|
||||
height: 290px;
|
||||
text-align: center;
|
||||
gap: ${token.sizeSM}px;
|
||||
|
||||
> * {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
.${info} {
|
||||
transform: translateY(-${token.sizeXXS}px);
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.${toolDesc} {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.${operation} {
|
||||
opacity: 1;
|
||||
transition: all 0.4s ease;
|
||||
}
|
||||
}
|
||||
`,
|
||||
|
||||
header: {
|
||||
display: 'flex',
|
||||
width: '100%',
|
||||
padding: token.paddingSM,
|
||||
gap: token.paddingXS,
|
||||
|
||||
'> :first-child': {
|
||||
width: 0,
|
||||
flex: 1
|
||||
},
|
||||
|
||||
'> :not(:first-child)': {
|
||||
fontSize: token.size
|
||||
}
|
||||
},
|
||||
|
||||
icon: {
|
||||
img: {
|
||||
width: token.sizeXL * 2
|
||||
}
|
||||
},
|
||||
|
||||
info,
|
||||
|
||||
toolName: {
|
||||
fontSize: token.fontSizeXL,
|
||||
fontWeight: 'bolder',
|
||||
overflow: 'hidden',
|
||||
textOverflow: 'ellipsis',
|
||||
whiteSpace: 'nowrap'
|
||||
},
|
||||
|
||||
toolDesc,
|
||||
|
||||
operation,
|
||||
|
||||
edit
|
||||
}
|
||||
})
|
||||
110
src/renderer/src/assets/css/components/tools/store-card.style.ts
Normal file
@@ -0,0 +1,110 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(({ cx, css, token }) => {
|
||||
const version = cx(css`
|
||||
width: 0;
|
||||
transition: all 0.2s;
|
||||
`)
|
||||
|
||||
const operation = cx(css`
|
||||
display: flex;
|
||||
font-size: 1.6em;
|
||||
gap: ${token.sizeXXS}px;
|
||||
opacity: 0;
|
||||
transition: all 0.2s;
|
||||
z-index: 100;
|
||||
|
||||
> *:hover {
|
||||
color: ${token.colorIconHover};
|
||||
}
|
||||
`)
|
||||
|
||||
return {
|
||||
root: css`
|
||||
width: 180px;
|
||||
height: 290px;
|
||||
text-align: center;
|
||||
gap: ${token.sizeSM}px;
|
||||
cursor: pointer;
|
||||
|
||||
> * {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
.${version} {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.${operation} {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
`,
|
||||
|
||||
header: {
|
||||
display: 'flex',
|
||||
width: '100%',
|
||||
padding: token.paddingSM,
|
||||
justifyContent: 'space-between'
|
||||
},
|
||||
|
||||
version,
|
||||
|
||||
operation,
|
||||
|
||||
icon: {
|
||||
img: {
|
||||
width: token.sizeXL * 2
|
||||
}
|
||||
},
|
||||
|
||||
info: {
|
||||
padding: `0 ${token.paddingSM}px`
|
||||
},
|
||||
|
||||
toolName: {
|
||||
fontSize: token.fontSizeXL,
|
||||
fontWeight: 'bolder',
|
||||
overflow: 'hidden',
|
||||
textOverflow: 'ellipsis',
|
||||
whiteSpace: 'nowrap'
|
||||
},
|
||||
|
||||
toolDesc: {
|
||||
marginTop: token.marginXS,
|
||||
color: token.colorTextDescription
|
||||
},
|
||||
|
||||
author: {
|
||||
display: 'flex',
|
||||
marginTop: 'auto',
|
||||
paddingBottom: token.paddingSM,
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'center',
|
||||
gap: token.sizeXS,
|
||||
|
||||
'&:hover': {
|
||||
color: token.colorPrimary
|
||||
}
|
||||
},
|
||||
|
||||
avatar: {
|
||||
'> *': {
|
||||
width: token.sizeLG,
|
||||
height: token.sizeLG
|
||||
}
|
||||
},
|
||||
|
||||
authorName: {
|
||||
display: 'flex',
|
||||
alignItems: 'center'
|
||||
},
|
||||
|
||||
androidQrcode: {
|
||||
alignItems: 'center',
|
||||
transform: 'translateX(-16px)',
|
||||
gap: token.sizeMD
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -1,22 +0,0 @@
|
||||
$origin-color: white;
|
||||
$production-color: #4E47BB;
|
||||
$main-color: $production-color;
|
||||
$secondary-color: #BAB8E5;
|
||||
$error-color: #FF4D4F;
|
||||
$error-secondary-color: #FF7875;
|
||||
$blue-color: #1677FF;
|
||||
$active-color: #EBECFD;
|
||||
$background-color: #F5F5F5;
|
||||
$font-main-color: #4D4D4D;
|
||||
$font-secondary-color: #9E9E9E;
|
||||
$focus-color: #DDDDDD;
|
||||
$divide-color: rgba(204, 204, 204, 0.66);
|
||||
$border-color: rgba(204, 204, 204, 0.33);
|
||||
$url-color: rgba(102, 102, 102, .8);
|
||||
$url-active-color: #ccc;
|
||||
$SIZE_ICON_XS: 16px;
|
||||
$SIZE_ICON_SM: 20px;
|
||||
$SIZE_ICON_MD: 24px;
|
||||
$SIZE_ICON_LG: 32px;
|
||||
$SIZE_ICON_XL: 64px;
|
||||
$SIZE_ICON_XXL: 96px;
|
||||
@@ -1,149 +0,0 @@
|
||||
@use "@/assets/css/mixins" as mixins;
|
||||
@use "@/assets/css/constants" as constants;
|
||||
|
||||
[data-component=sign] {
|
||||
background-color: #D2D0DD;
|
||||
user-select: none;
|
||||
|
||||
a {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: constants.$production-color;
|
||||
}
|
||||
|
||||
.sign-box {
|
||||
position: relative;
|
||||
background-color: constants.$origin-color;
|
||||
width: 900px;
|
||||
height: 600px;
|
||||
overflow: hidden;
|
||||
border-radius: 12px;
|
||||
|
||||
.left, .right {
|
||||
opacity: 1;
|
||||
transition: all 1s ease;
|
||||
|
||||
> * {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
&.hidden {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
> * {
|
||||
.title {
|
||||
margin-bottom: 20px;
|
||||
transform: translateY(-10px);
|
||||
|
||||
.primary {
|
||||
font-size: 2.4em;
|
||||
font-weight: bolder;
|
||||
color: constants.$production-color;
|
||||
}
|
||||
|
||||
.secondary {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
}
|
||||
|
||||
.form {
|
||||
width: 300px;
|
||||
font-size: 14px;
|
||||
|
||||
button {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.addition {
|
||||
justify-content: space-between;
|
||||
margin-bottom: 14px;
|
||||
|
||||
> * {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
text-align: center;
|
||||
|
||||
a {
|
||||
color: constants.$production-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.verify {
|
||||
a {
|
||||
color: constants.$production-color;
|
||||
font-weight: bolder;
|
||||
}
|
||||
}
|
||||
|
||||
.sign-up, .sign-in, .forget {
|
||||
.footer {
|
||||
a {
|
||||
font-weight: bolder;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sign-up, .forget {
|
||||
.retry, .success {
|
||||
margin-bottom: 16px;
|
||||
|
||||
a {
|
||||
font-weight: bolder;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.cover {
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
width: 50%;
|
||||
background-color: #F3F4F8;
|
||||
transition: all 0.8s ease;
|
||||
|
||||
.ball-box {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
background-color: #F1F2F7;
|
||||
|
||||
.ball {
|
||||
position: absolute;
|
||||
width: 128px;
|
||||
height: 128px;
|
||||
background-color: constants.$production-color;
|
||||
border-radius: 50%;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%) translateY(50%);
|
||||
}
|
||||
}
|
||||
|
||||
.mask {
|
||||
transform: rotateZ(180deg);
|
||||
filter: blur(12px);
|
||||
|
||||
.ball {
|
||||
width: 140px;
|
||||
height: 140px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.switch {
|
||||
.cover {
|
||||
transform: translateX(100%);
|
||||
transition: all 0.8s ease;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
35
src/renderer/src/assets/css/pages/sign/forget.style.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(({ token }) => ({
|
||||
title: {
|
||||
marginBottom: token.marginMD,
|
||||
transform: `translateY(-${token.sizeSM}px)`
|
||||
},
|
||||
|
||||
primary: {
|
||||
fontSize: token.fontSizeHeading3,
|
||||
fontWeight: 'bolder',
|
||||
color: token.colorPrimary
|
||||
},
|
||||
|
||||
secondary: {
|
||||
fontSize: token.fontSize
|
||||
},
|
||||
|
||||
form: {
|
||||
width: 300,
|
||||
fontSize: token.fontSize
|
||||
},
|
||||
|
||||
retry: {
|
||||
marginBottom: token.margin
|
||||
},
|
||||
|
||||
success: {
|
||||
marginBottom: token.margin
|
||||
},
|
||||
|
||||
footer: {
|
||||
textAlign: 'center'
|
||||
}
|
||||
}))
|
||||
82
src/renderer/src/assets/css/pages/sign/index.style.ts
Normal file
@@ -0,0 +1,82 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(({ cx, css, token }) => {
|
||||
const cover = cx(css`
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
width: 50%;
|
||||
background-color: ${token.colorBgLayout};
|
||||
transition: all 0.8s ease;
|
||||
`)
|
||||
|
||||
const ball = cx(css`
|
||||
position: absolute;
|
||||
width: ${token.sizeXL * 4}px;
|
||||
height: ${token.sizeXL * 4}px;
|
||||
background-color: ${token.colorPrimary};
|
||||
border-radius: 50%;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%) translateY(50%);
|
||||
`)
|
||||
|
||||
return {
|
||||
root: {
|
||||
backgroundColor: token.colorBorderSecondary,
|
||||
userSelect: 'none',
|
||||
|
||||
a: {
|
||||
fontWeight: 'bold'
|
||||
}
|
||||
},
|
||||
|
||||
signBox: {
|
||||
position: 'relative',
|
||||
backgroundColor: token.colorBgContainer,
|
||||
width: 900,
|
||||
height: 600,
|
||||
overflow: 'hidden',
|
||||
borderRadius: token.borderRadiusLG
|
||||
},
|
||||
|
||||
switch: css`
|
||||
.${cover} {
|
||||
transform: translateX(100%);
|
||||
transition: all 0.8s ease;
|
||||
}
|
||||
`,
|
||||
|
||||
side: {
|
||||
opacity: 1,
|
||||
transition: 'all 1s ease',
|
||||
|
||||
'> *': {
|
||||
width: '100%',
|
||||
height: '100%'
|
||||
}
|
||||
},
|
||||
|
||||
hidden: {
|
||||
opacity: 0
|
||||
},
|
||||
|
||||
cover,
|
||||
|
||||
ballBox: {
|
||||
position: 'relative',
|
||||
overflow: 'hidden'
|
||||
},
|
||||
|
||||
ball,
|
||||
|
||||
mask: css`
|
||||
transform: rotateZ(180deg);
|
||||
filter: blur(${token.sizeSM}px);
|
||||
|
||||
.${ball} {
|
||||
width: 140px;
|
||||
height: 140px;
|
||||
}
|
||||
`
|
||||
}
|
||||
})
|
||||
36
src/renderer/src/assets/css/pages/sign/sign-in.style.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(({ token }) => ({
|
||||
title: {
|
||||
marginBottom: token.marginMD,
|
||||
transform: `translateY(-${token.sizeSM}px)`
|
||||
},
|
||||
|
||||
primary: {
|
||||
fontSize: token.fontSizeHeading3,
|
||||
fontWeight: 'bolder',
|
||||
color: token.colorPrimary
|
||||
},
|
||||
|
||||
secondary: {
|
||||
fontSize: token.fontSize
|
||||
},
|
||||
|
||||
form: {
|
||||
width: 300,
|
||||
fontSize: token.fontSize
|
||||
},
|
||||
|
||||
addition: {
|
||||
justifyContent: 'space-between',
|
||||
marginBottom: token.margin,
|
||||
|
||||
a: {
|
||||
flex: '0 0 auto'
|
||||
}
|
||||
},
|
||||
|
||||
footer: {
|
||||
textAlign: 'center'
|
||||
}
|
||||
}))
|
||||
31
src/renderer/src/assets/css/pages/sign/sign-up.style.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(({ token }) => ({
|
||||
title: {
|
||||
marginBottom: token.marginMD,
|
||||
transform: `translateY(-${token.sizeSM}px)`
|
||||
},
|
||||
|
||||
primary: {
|
||||
fontSize: token.fontSizeHeading3,
|
||||
fontWeight: 'bolder',
|
||||
color: token.colorPrimary
|
||||
},
|
||||
|
||||
secondary: {
|
||||
fontSize: token.fontSize
|
||||
},
|
||||
|
||||
form: {
|
||||
width: 300,
|
||||
fontSize: token.fontSize
|
||||
},
|
||||
|
||||
retry: {
|
||||
marginBottom: token.margin
|
||||
},
|
||||
|
||||
footer: {
|
||||
textAlign: 'center'
|
||||
}
|
||||
}))
|
||||
23
src/renderer/src/assets/css/pages/sign/verify.style.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(({ token }) => ({
|
||||
title: {
|
||||
marginBottom: token.marginMD,
|
||||
transform: `translateY(-${token.sizeSM}px)`
|
||||
},
|
||||
|
||||
primary: {
|
||||
fontSize: token.fontSizeHeading3,
|
||||
fontWeight: 'bolder',
|
||||
color: token.colorPrimary
|
||||
},
|
||||
|
||||
secondary: {
|
||||
fontSize: token.fontSize
|
||||
},
|
||||
|
||||
form: {
|
||||
width: 300,
|
||||
fontSize: token.fontSize
|
||||
}
|
||||
}))
|
||||
@@ -1,14 +0,0 @@
|
||||
@use "@/assets/css/constants" as constants;
|
||||
@use "@/assets/css/mixins" as mixins;
|
||||
|
||||
[data-component=system-framework] {
|
||||
.left-panel {
|
||||
background-color: constants.$origin-color;
|
||||
}
|
||||
|
||||
.right-panel {
|
||||
flex: 1;
|
||||
width: 0;
|
||||
background-color: constants.$background-color;
|
||||
}
|
||||
}
|
||||
13
src/renderer/src/assets/css/pages/system-framework.style.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(({ token }) => ({
|
||||
leftPanel: {
|
||||
backgroundColor: token.colorBgContainer
|
||||
},
|
||||
|
||||
rightPanel: {
|
||||
flex: 1,
|
||||
width: 0,
|
||||
backgroundColor: token.colorBgLayout
|
||||
}
|
||||
}))
|
||||
@@ -1,41 +0,0 @@
|
||||
@use '@/assets/css/constants' as constants;
|
||||
|
||||
[data-component=system] {
|
||||
.root-content {
|
||||
padding: 30px;
|
||||
gap: 20px;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
|
||||
> .card-box {
|
||||
width: 200px;
|
||||
height: 360px;
|
||||
flex: 0 0 auto;
|
||||
overflow: hidden !important;
|
||||
cursor: pointer;
|
||||
|
||||
.common-card {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin-top: 100px;
|
||||
text-align: center;
|
||||
gap: 42px;
|
||||
|
||||
> * {
|
||||
flex: 0 0 auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.icon {
|
||||
color: constants.$production-color;
|
||||
font-size: constants.$SIZE_ICON_XL;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-weight: bolder;
|
||||
font-size: 2em;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
15
src/renderer/src/assets/css/pages/system/index.style.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(() => ({
|
||||
root: {
|
||||
padding: 20,
|
||||
gap: 20,
|
||||
flexWrap: 'wrap',
|
||||
justifyContent: 'flex-start',
|
||||
|
||||
'> *': {
|
||||
flex: '0 0 auto',
|
||||
overflow: 'hidden !important'
|
||||
}
|
||||
}
|
||||
}))
|
||||
@@ -1,46 +0,0 @@
|
||||
@use '@/assets/css/constants' as constants;
|
||||
|
||||
[data-component=system-settings] {
|
||||
.root-content {
|
||||
padding: 30px;
|
||||
gap: 20px;
|
||||
|
||||
.root-col {
|
||||
gap: 20px;
|
||||
|
||||
> * {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.settings-card {
|
||||
padding: 20px;
|
||||
gap: 20px;
|
||||
color: constants.$main-color;
|
||||
|
||||
> .head {
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
|
||||
.icon {
|
||||
font-size: constants.$SIZE_ICON_MD;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
:nth-child(n+3) {
|
||||
flex: 0 0 auto;
|
||||
color: constants.$font-main-color;
|
||||
}
|
||||
|
||||
.bt-save {
|
||||
color: constants.$main-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(() => ({
|
||||
root: {
|
||||
padding: 20,
|
||||
gap: 20
|
||||
},
|
||||
|
||||
rootCol: {
|
||||
gap: 20,
|
||||
|
||||
'> *': {
|
||||
flex: '0 0 auto'
|
||||
}
|
||||
}
|
||||
}))
|
||||
@@ -1,90 +0,0 @@
|
||||
@use '@/assets/css/constants' as constants;
|
||||
|
||||
[data-component=system-statistics] {
|
||||
.root-content {
|
||||
padding: 30px;
|
||||
gap: 20px;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
|
||||
> .card-box {
|
||||
width: 48%;
|
||||
flex: 0 0 auto;
|
||||
|
||||
.common-card {
|
||||
padding: 20px;
|
||||
gap: 20px;
|
||||
|
||||
> .head {
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
color: constants.$main-color;
|
||||
|
||||
.icon {
|
||||
font-size: constants.$SIZE_ICON_MD;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
:nth-child(n+3) {
|
||||
flex: 0 0 auto;
|
||||
color: constants.$font-main-color;
|
||||
}
|
||||
}
|
||||
|
||||
.card-content {
|
||||
font-size: 1.1em;
|
||||
padding: 0 10px;
|
||||
gap: 10px;
|
||||
|
||||
.key, .value-percent {
|
||||
flex: 0 0 auto;
|
||||
color: constants.$font-main-color;
|
||||
}
|
||||
|
||||
.value {
|
||||
color: constants.$font-secondary-color;
|
||||
overflow: hidden;
|
||||
|
||||
> * {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
.value-chart {
|
||||
justify-content: space-around;
|
||||
width: 0;
|
||||
|
||||
> div {
|
||||
max-height: 12px;
|
||||
height: 12px;
|
||||
|
||||
> * {
|
||||
transform: translateY(1px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.value-percent {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.big-chart {
|
||||
width: 0;
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
> * {
|
||||
gap: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(({ token }) => ({
|
||||
content: {
|
||||
fontSize: token.fontSize,
|
||||
padding: '0 10px',
|
||||
gap: 10,
|
||||
|
||||
'> *': {
|
||||
gap: 5
|
||||
}
|
||||
},
|
||||
|
||||
bigChart: {
|
||||
width: 0,
|
||||
height: 400
|
||||
},
|
||||
|
||||
key: {
|
||||
flex: '0 0 auto',
|
||||
color: token.colorTextLabel
|
||||
},
|
||||
|
||||
value: {
|
||||
color: token.colorTextDescription,
|
||||
overflow: 'hidden',
|
||||
|
||||
'> *': {
|
||||
overflow: 'hidden',
|
||||
textOverflow: 'ellipsis',
|
||||
whiteSpace: 'nowrap'
|
||||
}
|
||||
},
|
||||
|
||||
chartValue: {
|
||||
justifyContent: 'space-between',
|
||||
width: 0
|
||||
},
|
||||
|
||||
percentValue: {
|
||||
flex: '0 0 auto',
|
||||
color: token.colorTextDescription
|
||||
}
|
||||
}))
|
||||
@@ -0,0 +1,16 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(() => ({
|
||||
root: {
|
||||
padding: 20,
|
||||
gap: 20,
|
||||
minWidth: 800,
|
||||
flexWrap: 'wrap',
|
||||
justifyContent: 'center',
|
||||
|
||||
'> div': {
|
||||
width: '48%',
|
||||
flex: '0 0 auto'
|
||||
}
|
||||
}
|
||||
}))
|
||||
@@ -1,42 +0,0 @@
|
||||
@use '@/assets/css/constants' as constants;
|
||||
|
||||
[data-component=system-tools-base] {
|
||||
.root-content {
|
||||
padding: 30px;
|
||||
gap: 10px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
.has-edited::after {
|
||||
content: '*';
|
||||
color: constants.$font-secondary-color;
|
||||
}
|
||||
|
||||
>*:first-child {
|
||||
height: fit-content;
|
||||
}
|
||||
|
||||
> *:nth-child(2) {
|
||||
position: sticky;
|
||||
top: 20px;
|
||||
height: calc(100vh - 60px);
|
||||
}
|
||||
|
||||
.close-editor-btn {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
background-color: constants.$font-secondary-color;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 50%;
|
||||
color: white;
|
||||
opacity: 0.6;
|
||||
box-shadow: 2px 2px 10px 0 rgba(0,0,0,0.2);
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
44
src/renderer/src/assets/css/pages/system/tools/base.style.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(({ token }) => ({
|
||||
root: {
|
||||
padding: 20,
|
||||
gap: 20,
|
||||
|
||||
'> *:first-child': {
|
||||
width: 0,
|
||||
height: 'fit-content'
|
||||
},
|
||||
|
||||
'> *:nth-child(2)': {
|
||||
position: 'sticky',
|
||||
top: 20,
|
||||
height: 'calc(100vh - 40px)'
|
||||
}
|
||||
},
|
||||
|
||||
hasEdited: {
|
||||
'&::after': {
|
||||
content: '"*"',
|
||||
color: token.colorTextSecondary
|
||||
}
|
||||
},
|
||||
|
||||
closeEditorBtn: {
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
position: 'absolute',
|
||||
top: 10,
|
||||
right: 10,
|
||||
backgroundColor: token.colorBorder,
|
||||
width: 32,
|
||||
height: 32,
|
||||
borderRadius: '50%',
|
||||
color: token.colorTextSecondary,
|
||||
opacity: 0.6,
|
||||
boxShadow: token.boxShadow,
|
||||
cursor: 'pointer',
|
||||
zIndex: 1000
|
||||
}
|
||||
}))
|
||||
@@ -1,20 +0,0 @@
|
||||
[data-component=system-tools-code] {
|
||||
padding: 30px;
|
||||
|
||||
.card-box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.draggable-content {
|
||||
position: fixed;
|
||||
inset-inline-end: 48px;
|
||||
inset-block-end: 48px;
|
||||
|
||||
> * {
|
||||
position: relative;
|
||||
inset-inline-end: 0;
|
||||
inset-block-end: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
24
src/renderer/src/assets/css/pages/system/tools/code.style.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(() => ({
|
||||
root: {
|
||||
padding: 20
|
||||
},
|
||||
|
||||
rootBox: {
|
||||
width: '100%',
|
||||
height: '100%'
|
||||
},
|
||||
|
||||
draggableContent: {
|
||||
position: 'fixed',
|
||||
insetInlineEnd: 48,
|
||||
insetBlockEnd: 48,
|
||||
|
||||
'> *': {
|
||||
position: 'relative',
|
||||
insetInlineEnd: 0,
|
||||
insetBlockEnd: 0
|
||||
}
|
||||
}
|
||||
}))
|
||||
@@ -1,8 +0,0 @@
|
||||
[data-component=system-tools-execute] {
|
||||
padding: 30px;
|
||||
|
||||
.card-box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(() => ({
|
||||
root: {
|
||||
padding: 20
|
||||
},
|
||||
|
||||
rootBox: {
|
||||
width: '100%',
|
||||
height: '100%'
|
||||
}
|
||||
}))
|
||||
@@ -0,0 +1,44 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(({ token }) => ({
|
||||
root: {
|
||||
padding: 20,
|
||||
gap: 20,
|
||||
|
||||
'> *:first-child': {
|
||||
width: 0,
|
||||
height: 'fit-content'
|
||||
},
|
||||
|
||||
'> *:nth-child(2)': {
|
||||
position: 'sticky',
|
||||
top: 20,
|
||||
height: 'calc(100vh - 40px)'
|
||||
}
|
||||
},
|
||||
|
||||
hasEdited: {
|
||||
'&::after': {
|
||||
content: '"*"',
|
||||
color: token.colorTextSecondary
|
||||
}
|
||||
},
|
||||
|
||||
closeEditorBtn: {
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
position: 'absolute',
|
||||
top: 10,
|
||||
right: 10,
|
||||
backgroundColor: token.colorBorder,
|
||||
width: 32,
|
||||
height: 32,
|
||||
borderRadius: '50%',
|
||||
color: token.colorTextSecondary,
|
||||
opacity: 0.6,
|
||||
boxShadow: token.boxShadow,
|
||||
cursor: 'pointer',
|
||||
zIndex: 1000
|
||||
}
|
||||
}))
|
||||
@@ -1,14 +0,0 @@
|
||||
@use "@/assets/css/constants" as constants;
|
||||
@use "@/assets/css/mixins" as mixins;
|
||||
|
||||
[data-component=tools-framework] {
|
||||
.left-panel {
|
||||
background-color: constants.$origin-color;
|
||||
}
|
||||
|
||||
.right-panel {
|
||||
flex: 1;
|
||||
width: 0;
|
||||
background-color: constants.$background-color;
|
||||
}
|
||||
}
|
||||
21
src/renderer/src/assets/css/pages/tools-framework.style.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(({ token }) => ({
|
||||
leftPanel: {
|
||||
backgroundColor: token.colorBgContainer
|
||||
},
|
||||
|
||||
menuDroppable: {
|
||||
display: 'flex',
|
||||
position: 'relative',
|
||||
minHeight: 0,
|
||||
flex: 1,
|
||||
width: '100%'
|
||||
},
|
||||
|
||||
rightPanel: {
|
||||
flex: 1,
|
||||
width: 0,
|
||||
backgroundColor: token.colorBgLayout
|
||||
}
|
||||
}))
|
||||
@@ -1,48 +0,0 @@
|
||||
@use "@/assets/css/mixins" as mixins;
|
||||
@use "@/assets/css/constants" as constants;
|
||||
|
||||
[data-component=tools-create] {
|
||||
.root-content {
|
||||
padding: 20px;
|
||||
gap: 20px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
> * {
|
||||
gap: 10px;
|
||||
width: 0;
|
||||
|
||||
.title {
|
||||
flex: 0 0 auto;
|
||||
height: 40px;
|
||||
|
||||
> * {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 1.6em;
|
||||
color: constants.$production-color;
|
||||
font-weight: bolder;
|
||||
}
|
||||
}
|
||||
|
||||
.config {
|
||||
.config-content {
|
||||
padding: 20px;
|
||||
|
||||
.help {
|
||||
margin-left: 6px;
|
||||
color: constants.$font-main-color;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
.create-bt {
|
||||
width: 100%;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
52
src/renderer/src/assets/css/pages/tools/create.style.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(({ token }) => ({
|
||||
root: {
|
||||
padding: 20,
|
||||
gap: 20,
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
|
||||
'> *': {
|
||||
gap: 10,
|
||||
width: 0
|
||||
}
|
||||
},
|
||||
|
||||
title: {
|
||||
flex: '0 0 auto',
|
||||
height: 40,
|
||||
|
||||
'> *': {
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
fontSize: token.fontSizeXL,
|
||||
fontWeight: 'bolder',
|
||||
color: token.colorPrimary
|
||||
}
|
||||
},
|
||||
|
||||
config: {
|
||||
padding: 20
|
||||
},
|
||||
|
||||
createBt: {
|
||||
width: '100%',
|
||||
fontWeight: 'bold'
|
||||
},
|
||||
|
||||
preview: {
|
||||
display: 'flex',
|
||||
position: 'relative',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center'
|
||||
},
|
||||
|
||||
noPreview: {
|
||||
color: token.colorTextSecondary,
|
||||
fontSize: token.fontSizeLG,
|
||||
fontWeight: 'bolder'
|
||||
}
|
||||
}))
|
||||
@@ -1,28 +0,0 @@
|
||||
[data-component=tools-edit] {
|
||||
.root-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
> * {
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.draggable-mask {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.draggable-content {
|
||||
position: fixed;
|
||||
inset-inline-end: 32px;
|
||||
inset-block-end: 48px;
|
||||
|
||||
> * {
|
||||
position: relative;
|
||||
inset-inline-end: 0;
|
||||
inset-block-end: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
40
src/renderer/src/assets/css/pages/tools/edit.style.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(() => ({
|
||||
root: {
|
||||
padding: 20
|
||||
},
|
||||
|
||||
rootBox: {
|
||||
width: '100%',
|
||||
height: '100%'
|
||||
},
|
||||
|
||||
content: {
|
||||
position: 'relative',
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
|
||||
'> *': {
|
||||
width: 0
|
||||
}
|
||||
},
|
||||
|
||||
draggableMask: {
|
||||
position: 'absolute',
|
||||
width: '100%',
|
||||
height: '100%'
|
||||
},
|
||||
|
||||
draggableContent: {
|
||||
position: 'fixed',
|
||||
insetInlineEnd: 48,
|
||||
insetBlockEnd: 48,
|
||||
|
||||
'> *': {
|
||||
position: 'relative',
|
||||
insetInlineEnd: 0,
|
||||
insetBlockEnd: 0
|
||||
}
|
||||
}
|
||||
}))
|
||||
@@ -1,115 +0,0 @@
|
||||
@use "@/assets/css/mixins" as mixins;
|
||||
@use '@/assets/css/constants' as constants;
|
||||
|
||||
[data-component=tools] {
|
||||
.root-content {
|
||||
padding: 30px;
|
||||
gap: 20px;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
|
||||
> .card-box {
|
||||
width: 180px;
|
||||
height: 290px;
|
||||
flex: 0 0 auto;
|
||||
|
||||
.common-card {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
|
||||
> * {
|
||||
display: block;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.version-select {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
width: 8em;
|
||||
}
|
||||
|
||||
.upgrade-bt {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
font-size: 1.8em;
|
||||
}
|
||||
|
||||
.icon {
|
||||
display: flex;
|
||||
padding-top: 50px;
|
||||
padding-bottom: 20px;
|
||||
color: constants.$production-color;
|
||||
font-size: constants.$SIZE_ICON_XL;
|
||||
justify-content: center;
|
||||
|
||||
img {
|
||||
width: constants.$SIZE_ICON_XL;
|
||||
}
|
||||
}
|
||||
|
||||
.tool-name {
|
||||
font-weight: bolder;
|
||||
font-size: 1.6em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
& > :first-child {
|
||||
cursor: pointer;
|
||||
|
||||
.info {
|
||||
padding-top: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
& > :not(:first-child) {
|
||||
.info {
|
||||
transform: translateY(40px);
|
||||
transition: all 0.1s ease;
|
||||
}
|
||||
|
||||
.operation {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
justify-content: center;
|
||||
padding-bottom: 20px;
|
||||
gap: 4px;
|
||||
width: 70%;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
|
||||
> *, .edit > * {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.edit {
|
||||
> * {
|
||||
> :first-child {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& > :not(:first-child):hover {
|
||||
.info {
|
||||
transform: translateY(-10px);
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.operation {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
transition: all 0.4s ease;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
45
src/renderer/src/assets/css/pages/tools/index.style.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(({ token }) => ({
|
||||
root: {
|
||||
padding: 20,
|
||||
gap: 20
|
||||
},
|
||||
|
||||
ownContent: {
|
||||
gap: 20,
|
||||
flexWrap: 'wrap',
|
||||
justifyContent: 'flex-start',
|
||||
|
||||
'> div': {
|
||||
flex: '0 0 auto'
|
||||
}
|
||||
},
|
||||
|
||||
favoriteDivider: {
|
||||
alignItems: 'center',
|
||||
gap: 20,
|
||||
marginTop: 20,
|
||||
|
||||
'> :first-child, > :last-child': {
|
||||
height: 0,
|
||||
border: `1px dashed ${token.colorSplit}`
|
||||
}
|
||||
},
|
||||
|
||||
dividerText: {
|
||||
flex: '0 0 auto !important',
|
||||
fontSize: '1.2em',
|
||||
color: token.colorTextSecondary
|
||||
},
|
||||
|
||||
starContent: {
|
||||
gap: 20,
|
||||
flexWrap: 'wrap',
|
||||
justifyContent: 'flex-start',
|
||||
|
||||
'> div': {
|
||||
flex: '0 0 auto'
|
||||
}
|
||||
}
|
||||
}))
|
||||
41
src/renderer/src/assets/css/pages/tools/local.style.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(({ token }) => ({
|
||||
search: {
|
||||
display: 'flex',
|
||||
position: 'sticky',
|
||||
width: '100%',
|
||||
marginTop: 20,
|
||||
top: 20,
|
||||
zIndex: 10,
|
||||
justifyContent: 'center',
|
||||
transition: 'all 0.3s ease',
|
||||
|
||||
'> *': {
|
||||
width: '80%'
|
||||
}
|
||||
},
|
||||
|
||||
hide: {
|
||||
transform: 'translateY(-60px)'
|
||||
},
|
||||
|
||||
root: {
|
||||
padding: 20,
|
||||
gap: 20,
|
||||
flexWrap: 'wrap',
|
||||
justifyContent: 'center',
|
||||
|
||||
'> div': {
|
||||
flex: '0 0 auto'
|
||||
}
|
||||
},
|
||||
|
||||
noTool: {
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
fontSize: '1.4em',
|
||||
fontWeight: 'bolder',
|
||||
color: token.colorTextSecondary
|
||||
}
|
||||
}))
|
||||
@@ -1,8 +0,0 @@
|
||||
[data-component=tools-source] {
|
||||
padding: 30px;
|
||||
|
||||
.card-box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
12
src/renderer/src/assets/css/pages/tools/source.style.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { createStyles } from 'antd-style'
|
||||
|
||||
export default createStyles(() => ({
|
||||
root: {
|
||||
padding: 20
|
||||
},
|
||||
|
||||
content: {
|
||||
width: '100%',
|
||||
height: '100%'
|
||||
}
|
||||
}))
|
||||