Compare commits
47 Commits
Author | SHA1 | Date |
---|---|---|
Stapxs | eafc78043f | |
Stapxs | 6731f897f2 | |
Stapxs | 753597b06d | |
Stapxs | aad51799c4 | |
Stapxs | 7ff61f86b2 | |
Stapxs | f365ec9a15 | |
Stapxs | 172ec95cd7 | |
Stapxs | c5122f1251 | |
Stapxs | ea13f1e9c6 | |
Stapxs | d1134b7aa0 | |
Stapxs | 67c96622d3 | |
Stapxs | c35146938d | |
Stapxs | b3cba48d97 | |
Stapxs | cce9d3e917 | |
Stapxs | d622a998a2 | |
Stapxs | 5c3b7d2e71 | |
Stapxs | 2e314def42 | |
Stapxs | c3ceb977e1 | |
Stapxs | acd149cc86 | |
Stapxs | fa86fb75c8 | |
Stapxs | 3e1a9b3d4c | |
Stapxs | a25dc25de8 | |
Stapxs | 0bc2109474 | |
Stapxs | f657f8d0cb | |
Stapxs | 31772784b0 | |
Stapxs | 49618927ec | |
Stapxs | a4f8895798 | |
Stapxs | 60f05f5952 | |
Stapxs | 5d5e794264 | |
Stapxs | 765d2a5814 | |
Stapxs | f935eaf287 | |
Stapxs | 5da42a63a4 | |
Stapxs | 716704154f | |
Stapxs | 12eaa58714 | |
Stapxs | 854d090566 | |
Stapxs | a00858e195 | |
Stapxs | dd4404c6de | |
Stapxs | 3c0262e638 | |
Stapxs | dd7e949e2e | |
Stapxs | 2d2b348761 | |
Stapxs | 51919dc584 | |
Stapxs | 6ef6620ad7 | |
Stapxs | 2ba6b4dd97 | |
Stapxs | c94414bfba | |
Stapxs | 8aa2cd3bf0 | |
Stapxs | 3db249ab12 | |
Stapxs | 045a161b13 |
12
.babelrc
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
"presets": [
|
||||
["env", {
|
||||
"modules": false,
|
||||
"targets": {
|
||||
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
|
||||
}
|
||||
}],
|
||||
"stage-2"
|
||||
],
|
||||
"plugins": ["transform-vue-jsx", "transform-runtime"]
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
|
@ -1,4 +0,0 @@
|
|||
/build/
|
||||
/config/
|
||||
/dist/
|
||||
/*.js
|
29
.eslintrc.js
|
@ -1,29 +0,0 @@
|
|||
// https://eslint.org/docs/user-guide/configuring
|
||||
|
||||
module.exports = {
|
||||
root: true,
|
||||
parserOptions: {
|
||||
parser: 'babel-eslint'
|
||||
},
|
||||
env: {
|
||||
browser: true,
|
||||
},
|
||||
extends: [
|
||||
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
|
||||
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
|
||||
'plugin:vue/essential',
|
||||
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
|
||||
'standard'
|
||||
],
|
||||
// required to lint *.vue files
|
||||
plugins: [
|
||||
'vue'
|
||||
],
|
||||
// add your custom rules here
|
||||
rules: {
|
||||
// allow async-await
|
||||
'generator-star-spacing': 'off',
|
||||
// allow debugger during development
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
.DS_Store
|
||||
node_modules/
|
||||
/dist/
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
|
@ -1,10 +0,0 @@
|
|||
// https://github.com/michael-ciniawsky/postcss-load-config
|
||||
|
||||
module.exports = {
|
||||
"plugins": {
|
||||
"postcss-import": {},
|
||||
"postcss-url": {},
|
||||
// to edit target browsers: use "browserslist" field in package.json
|
||||
"autoprefixer": {}
|
||||
}
|
||||
}
|
|
@ -1,201 +1,201 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
|
@ -0,0 +1,35 @@
|
|||
:root {
|
||||
/* 卡片颜色 */
|
||||
--color-bg: #2D2D2D;
|
||||
--color-card: #3A3A3A;
|
||||
--color-card-1: #494949;
|
||||
--color-card-2: #5F5F5F;
|
||||
|
||||
--color-bg-rgb: 45, 45, 45;
|
||||
--color-card-rgb: 58, 58, 58;
|
||||
--color-card-1-rgb: 73, 73, 73;
|
||||
--color-card-2-rgb: 95, 95, 95;
|
||||
|
||||
/* 字体颜色 */
|
||||
--color-font: #FFFFFF;
|
||||
--color-font-1: #CFCFCF;
|
||||
--color-font-2: #B0B0B0;
|
||||
|
||||
/* 字体颜色(反转) */
|
||||
--color-font-r: var(--color-bg);
|
||||
--color-font-1-r: var(--color-card);
|
||||
|
||||
/* 阴影颜色 */
|
||||
--color-shader: #1010109c;
|
||||
|
||||
/* 主题色 */
|
||||
--color-main: #c8e5ff;
|
||||
|
||||
/* 内置主题色*/
|
||||
--color-main-0: #c8e5ff;
|
||||
--color-main-1: #d4ffcf;
|
||||
--color-main-2: #ffafaa;
|
||||
--color-main-3: #cdb7ff;
|
||||
--color-main-4: #f9d27d;
|
||||
--color-main-5: #bcbfc7;
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
:root {
|
||||
/* 卡片颜色 */
|
||||
--color-bg: #F8F9FA;
|
||||
--color-card: #FFFFFF;
|
||||
--color-card-1: #F1F3F5;
|
||||
--color-card-2: #e3e8ec;
|
||||
|
||||
--color-bg-rgb: 248, 249, 250;
|
||||
--color-card-rgb: 255, 255, 255;
|
||||
--color-card-1-rgb: 241, 243, 245;
|
||||
--color-card-2-rgb: 227, 232, 236;
|
||||
|
||||
/* 字体颜色 */
|
||||
--color-font: #50534F;
|
||||
--color-font-1: #5c5f5a;
|
||||
--color-font-2: #7d817c;
|
||||
|
||||
/* 字体颜色(反转) */
|
||||
--color-font-r: var(--color-bg);
|
||||
--color-font-1-r: var(--color-card);
|
||||
|
||||
/* 阴影颜色 */
|
||||
--color-shader: #72727240;
|
||||
|
||||
/* 主题色 */
|
||||
--color-main: #606E7A;
|
||||
|
||||
/* 内置主题色*/
|
||||
--color-main-0: #606E7A;
|
||||
--color-main-1: #92aa8a;
|
||||
--color-main-2: #f0a1a8;
|
||||
--color-main-3: #8076a3;
|
||||
--color-main-4: #f9a633;
|
||||
--color-main-5: #50534f;
|
||||
}
|
|
@ -0,0 +1,468 @@
|
|||
input {
|
||||
caret-color: var(--color-main);
|
||||
color: var(--color-font);
|
||||
}
|
||||
|
||||
.ss-code {
|
||||
background: var(--color-main);
|
||||
color: var(--color-font-r);
|
||||
border-radius: 7px;
|
||||
padding: 3px 10px;
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
.ss-card {
|
||||
background-color: var(--color-card);;
|
||||
box-shadow:0 0 5px transparent;
|
||||
transition: box-shadow .3s;
|
||||
color: var(--color-font);
|
||||
border-radius: 7px;
|
||||
min-height: 40px;
|
||||
min-width: 40px;
|
||||
padding: 20px;
|
||||
}
|
||||
.ss-card div[class="ss-card"] {
|
||||
min-height: 65px;
|
||||
padding: 0;
|
||||
}
|
||||
.ss-card div[class="ss-card"] header {
|
||||
padding: 20px 0 0 20px;
|
||||
}
|
||||
.ss-card div[class="ss-card"] > button > svg {
|
||||
margin-right: 20px;
|
||||
margin-top: -25px;
|
||||
}
|
||||
.ss-card:hover {
|
||||
box-shadow:0 0 5px var(--color-shader);
|
||||
}
|
||||
.ss-card header {
|
||||
color: var(--color-font);
|
||||
letter-spacing: 0.1rem;
|
||||
padding-bottom: 10px;
|
||||
font-size: 1.02rem;
|
||||
font-weight: 300;
|
||||
text-indent: 0;
|
||||
}
|
||||
.ss-card header div:first-child {
|
||||
background: var(--color-main);
|
||||
margin-right: 20px;
|
||||
border-radius: 5px;
|
||||
height: 25px;
|
||||
float: left;
|
||||
width: 5px;
|
||||
}
|
||||
.ss-card header > i:first-child {
|
||||
color: var(--color-main);
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
text-align: center;
|
||||
font-size: 1.1rem;
|
||||
min-width: 20px;
|
||||
}
|
||||
|
||||
.ss-button {
|
||||
background: var(--color-main);
|
||||
color: var(--color-font-r);
|
||||
border-radius: 7px;
|
||||
font-size: 0.95rem;
|
||||
font-weight: 600;
|
||||
height: 33px;
|
||||
border: 0;
|
||||
}
|
||||
.ss-button:hover {
|
||||
opacity: 0.95;
|
||||
}
|
||||
.ss-button:focus {
|
||||
outline: none;
|
||||
}
|
||||
.ss-button:active {
|
||||
opacity: 0.9;
|
||||
}
|
||||
.ss-button:disabled {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
.ss-input {
|
||||
background: var(--color-card-1);
|
||||
border-radius: 7px;
|
||||
padding: 0 10px;
|
||||
font-size: 15px;
|
||||
height: 35px;
|
||||
border: 0;
|
||||
}
|
||||
.ss-input:focus {
|
||||
outline: 2px solid var(--color-card-1);
|
||||
}
|
||||
|
||||
.ss-pop {
|
||||
-webkit-box-shadow: 0 0 5px var(--color-shader);
|
||||
-moz-box-shadow: 0 0 5px var(--color-shader);
|
||||
box-shadow: 0 0 5px var(--color-shader);
|
||||
background: var(--color-bg);
|
||||
}
|
||||
.ss-pop div[class="arrow"]:before {
|
||||
border: none;
|
||||
}
|
||||
.ss-pop div[class="arrow"]:after {
|
||||
border: none;
|
||||
}
|
||||
.ss-pop div {
|
||||
color: var(--color-font);
|
||||
}
|
||||
|
||||
.ss-radio {
|
||||
--radio-size: 32px;
|
||||
|
||||
height: var(--radio-size);
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.ss-radio:hover > div:nth-child(2) {
|
||||
padding: calc((var(--radio-size) / 4) + 1px);
|
||||
}
|
||||
.ss-radio > div:nth-child(2) {
|
||||
padding: calc((var(--radio-size) / 4) + 2px);
|
||||
border-radius: var(--radio-size);
|
||||
background: var(--color-main);
|
||||
height: var(--radio-size);
|
||||
width: var(--radio-size);
|
||||
transition: padding .1s;
|
||||
}
|
||||
.ss-radio > div:nth-child(2) > div {
|
||||
background: #fff;
|
||||
border-radius: 100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.ss-radio input {
|
||||
display: none;
|
||||
}
|
||||
.ss-radio input:checked ~ div:nth-child(2) {
|
||||
padding: calc(var(--radio-size) / 4);
|
||||
}
|
||||
|
||||
.ss-checkbox {
|
||||
--checkbox-size: 13px;
|
||||
margin-bottom: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.ss-checkbox > input {
|
||||
display: none;
|
||||
}
|
||||
.ss-checkbox > div {
|
||||
border: 1px solid var(--color-font);
|
||||
border-radius: 30%;
|
||||
background: transparent;
|
||||
transition: background .3s, border .1s;
|
||||
height: var(--checkbox-size);
|
||||
width: var(--checkbox-size);
|
||||
}
|
||||
.ss-checkbox > input:checked ~ div {
|
||||
background: var(--color-bg);
|
||||
border: calc(var(--checkbox-size) / 3) solid var(--color-main);
|
||||
}
|
||||
.ss-checkbox > span {
|
||||
margin-left: 10px;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
.ss-checkbox.button {
|
||||
border: 2px solid var(--color-main);
|
||||
border-radius: 7px;
|
||||
background: transparent;
|
||||
padding: 10px 15px;
|
||||
}
|
||||
.ss-checkbox.button > div {
|
||||
border: 0 !important;
|
||||
max-width: 5px;
|
||||
border-radius: 5px;
|
||||
transform: scaleY(0);
|
||||
background: var(--color-main) !important;
|
||||
transition: transform .3s;
|
||||
}
|
||||
.ss-checkbox.button > input:checked ~ div {
|
||||
transform: scaleY(1);
|
||||
}
|
||||
|
||||
.ss-switch {
|
||||
--switch-dot-border: 4px;
|
||||
--switch-dot-margin: 5px;
|
||||
--switch-height: 30px;
|
||||
min-width: 55px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.ss-switch > div {
|
||||
border-radius: var(--switch-height);
|
||||
background: var(--color-card-1);
|
||||
height: var(--switch-height);
|
||||
transition: background .4s;
|
||||
width: 100%;
|
||||
}
|
||||
.ss-switch > div > div {
|
||||
transition: margin-left .3s cubic-bezier(0.85, 0, 0.12, 0.99), border .2s;
|
||||
border-radius: calc(var(--switch-height) - (var(--switch-dot-margin) * 2));
|
||||
height: calc(var(--switch-height) - (var(--switch-dot-margin) * 2));
|
||||
width: calc(var(--switch-height) - (var(--switch-dot-margin) * 2));
|
||||
border: var(--switch-dot-border) solid #fff;
|
||||
box-shadow:0 0 5px var(--color-shader);
|
||||
margin-left: var(--switch-dot-margin);
|
||||
margin-top: var(--switch-dot-margin);
|
||||
background: var(--color-main);
|
||||
float: left;
|
||||
}
|
||||
.ss-switch input {
|
||||
display: none;
|
||||
}
|
||||
.ss-switch input:checked ~ div {
|
||||
background: var(--color-main);
|
||||
}
|
||||
.ss-switch input:checked ~ div > div {
|
||||
border: calc((var(--switch-height) - var(--switch-dot-margin) * 2) / 2 + 0.5px) solid #fff;
|
||||
margin-left: calc(100% - var(--switch-height) + var(--switch-dot-margin));
|
||||
}
|
||||
|
||||
.ss-code-input {
|
||||
flex-direction: initial;
|
||||
justify-content: center;
|
||||
padding-top: 30px;
|
||||
display: flex;
|
||||
}
|
||||
.ss-code-input input {
|
||||
background: var(--color-card-1);
|
||||
outline: 2px solid transparent;
|
||||
caret-color: transparent;
|
||||
transition: outline .3s;
|
||||
border-radius: 7px;
|
||||
text-align: center;
|
||||
font-size: 1.5rem;
|
||||
margin: 0 10px;
|
||||
height: 60px;
|
||||
width: 60px;
|
||||
border: 0;
|
||||
}
|
||||
.ss-code-input input:first-child {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
height: 0;
|
||||
width: 0;
|
||||
}
|
||||
.ss-code-input-selete {
|
||||
outline: 2px solid var(--color-main) !important;
|
||||
}
|
||||
.ss-code-input-err {
|
||||
outline: 2px solid #ef5f5f !important;
|
||||
}
|
||||
|
||||
.ana-card {
|
||||
color: var(--color-font);
|
||||
text-align: center;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 100;
|
||||
display: flex;
|
||||
height: 60px;
|
||||
}
|
||||
.ana-card div {
|
||||
background: var(--color-main);
|
||||
border-radius: 5px;
|
||||
height: 100%;
|
||||
width: 5px;
|
||||
}
|
||||
.ana-card span {
|
||||
width: 100%;
|
||||
}
|
||||
.ana-card-left {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
footer > div:first-child {
|
||||
color: var(--color-font);
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
footer > div:first-child > span {
|
||||
margin-left: 20px;
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
footer > div:last-child {
|
||||
margin-bottom: 10px;
|
||||
text-align: center;
|
||||
margin-top: -10px;
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
footer > div:last-child span a {
|
||||
color: var(--color-font-1);
|
||||
}
|
||||
footer header {
|
||||
color: var(--color-main);
|
||||
}
|
||||
footer header span {
|
||||
color: var(--color-font-1);
|
||||
font-size: 0.7rem;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.cls-1 {
|
||||
fill: var(--color-card-1);
|
||||
}
|
||||
|
||||
.bar-search {
|
||||
border: 0;
|
||||
height: 35px;
|
||||
font-size: 15px;
|
||||
margin-right: 0 !important;
|
||||
background: var(--color-card-1);
|
||||
}
|
||||
.bar-search:focus {
|
||||
background: var(--color-card-1);
|
||||
outline: none;
|
||||
|
||||
-webkit-box-shadow:0 0 5px var(--color-shader);
|
||||
-moz-box-shadow:0 0 5px var(--color-shader);
|
||||
box-shadow:0 0 5px var(--color-shader);
|
||||
}
|
||||
|
||||
.avatar {
|
||||
cursor: hand;
|
||||
overflow: hidden;
|
||||
margin-left: 20px;
|
||||
--main-size: 33px;
|
||||
margin-right: 5px;
|
||||
width: var(--main-size);
|
||||
height: var(--main-size);
|
||||
border-radius: var(--main-size);
|
||||
background: var(--color-card-1);
|
||||
}
|
||||
.avatar img {
|
||||
width: var(--main-size);
|
||||
height: var(--main-size);
|
||||
}
|
||||
|
||||
.user-name {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.scroll-top {
|
||||
border-top: 1px dashed var(--color-main);
|
||||
margin: 0 30px;
|
||||
}
|
||||
|
||||
pre {
|
||||
background: transparent !important;
|
||||
overflow: visible !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
pre:before {
|
||||
display: none !important;
|
||||
}
|
||||
pre:after {
|
||||
display: none !important;
|
||||
}
|
||||
pre > code {
|
||||
font-family: 'Fira Code', monospace !important;
|
||||
padding: 1rem !important;
|
||||
}
|
||||
@supports (font-variation-settings: normal) {
|
||||
pre > code
|
||||
{
|
||||
font-family: 'Fira Code VF', monospace !important;
|
||||
}
|
||||
}
|
||||
pre > code span {
|
||||
background: transparent !important;
|
||||
}
|
||||
pre[class*=language-]>code {
|
||||
border-left: 0px solid var(--color-main) !important;
|
||||
background-color: var(--color-card-2) !important;
|
||||
background-image: none !important;
|
||||
border-left: 10px solid #358ccb;
|
||||
background-origin: content-box;
|
||||
background-attachment: local;
|
||||
box-shadow: none !important;
|
||||
background-size: 3em 3em;
|
||||
margin-bottom: -75px;
|
||||
border-radius: 7px;
|
||||
position: relative;
|
||||
margin-top: -10px;
|
||||
z-index: 1;
|
||||
}
|
||||
code[class*=language-] {
|
||||
max-height: inherit;
|
||||
font-size: 0.8rem;
|
||||
height: inherit;
|
||||
padding: 0 1em;
|
||||
display: block;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.about-text {
|
||||
padding: 20px;
|
||||
}
|
||||
.about-text i {
|
||||
color: var(--color-font-1);
|
||||
margin-bottom: 10px;
|
||||
font-style: normal;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 400;
|
||||
text-indent: 2em;
|
||||
display: block;
|
||||
}
|
||||
.about-text a {
|
||||
color: var(--color-font);
|
||||
font-weight: bold;
|
||||
}
|
||||
.no-indent i {
|
||||
text-indent: 0;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: var(--color-main);
|
||||
border-radius: 6px;
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
background-color:var(--color-card-1);
|
||||
width:6px;
|
||||
}
|
||||
::-webkit-scrollbar-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 992px) {
|
||||
.avatar {
|
||||
width: auto;
|
||||
height: auto;
|
||||
margin-left: 0;
|
||||
border-radius: 0;
|
||||
background: none;
|
||||
}
|
||||
.avatar img {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.bar-search {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.user-name {
|
||||
display: unset;
|
||||
cursor: pointer;
|
||||
color: var(--color-font-1);
|
||||
}
|
||||
.user-name:hover {
|
||||
color: var(--color-font);
|
||||
opacity: 0.7;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-dark .navbar-brand {
|
||||
color: var(--color-font) !important;
|
||||
}
|
||||
|
||||
.navbar-dark .navbar-nav .nav-link.active {
|
||||
color: var(--color-font) !important;
|
||||
}
|
||||
|
||||
.navbar-dark .navbar-nav .nav-link {
|
||||
color: var(--color-font-1) !important;
|
||||
}
|
||||
.navbar-dark:hover .navbar-nav:hover .nav-link:hover {
|
||||
color: var(--color-font) !important;
|
||||
opacity: 0.7 !important;
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
// 自动暗黑模式相关代码
|
||||
let media = window.matchMedia('(prefers-color-scheme: dark)');
|
||||
if(is_auto_dark !== false) {
|
||||
if (media.matches) {
|
||||
changeColor("dark")
|
||||
} else {
|
||||
changeColor("light")
|
||||
}
|
||||
}
|
||||
let callback = (e) => {
|
||||
if(is_auto_dark) {
|
||||
console.log("正在自动切换颜色 ……")
|
||||
let prefersDarkMode = e.matches;
|
||||
if (prefersDarkMode) {
|
||||
changeColor("dark")
|
||||
} else {
|
||||
changeColor("light")
|
||||
}
|
||||
}
|
||||
};
|
||||
if (typeof media.addEventListener === 'function') {
|
||||
media.addEventListener('change', callback);
|
||||
} else if (typeof media.addListener === 'function') {
|
||||
media.addListener(callback);
|
||||
}
|
|
@ -0,0 +1,193 @@
|
|||
let fist_load = true
|
||||
|
||||
function changeColor(type) {
|
||||
if(!fist_load) {
|
||||
// 启用颜色渐变动画
|
||||
document.body.style.transition = 'background, color, background-color .3s'
|
||||
} else {
|
||||
fist_load = false
|
||||
}
|
||||
// 切换颜色
|
||||
let match_list = ['color-.*\.css', 'prism-.*\.css']
|
||||
const css_list = document.getElementsByTagName("link")
|
||||
for(let i=0; i<css_list.length; i++) {
|
||||
name = css_list[i].href
|
||||
match_list.forEach(function (value) {
|
||||
if(name.match(value) != null) {
|
||||
const newLink = document.createElement("link");
|
||||
newLink.setAttribute("rel", "stylesheet");
|
||||
newLink.setAttribute("type", "text/css");
|
||||
if(type === "dark") {
|
||||
newLink.setAttribute("href", name.replace('light', 'dark'));
|
||||
} else {
|
||||
newLink.setAttribute("href", name.replace('dark', 'light'));
|
||||
}
|
||||
document.getElementsByTagName("head").item(0).replaceChild(newLink, css_list[i]);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function foldChange(sender) {
|
||||
const svg = sender.getElementsByTagName('svg');
|
||||
if(svg[0].style.transform === 'rotate(-90deg)') {
|
||||
svg[0].style.transform = 'rotate(90deg)'
|
||||
animateScroll(sender, 40)
|
||||
} else {
|
||||
svg[0].style.transform = 'rotate(-90deg)'
|
||||
}
|
||||
}
|
||||
|
||||
function animateScroll(element, speed) {
|
||||
let rect=element.getBoundingClientRect()
|
||||
let top=window.pageYOffset+rect.top
|
||||
let currentTop=document.documentElement.scrollTop
|
||||
let requestId
|
||||
function step(timestamp) {
|
||||
currentTop+=speed
|
||||
if(currentTop<=top){
|
||||
window.scrollTo(0,currentTop)
|
||||
requestId=window.requestAnimationFrame(step)
|
||||
}else{
|
||||
window.cancelAnimationFrame(requestId)
|
||||
}
|
||||
}
|
||||
window.requestAnimationFrame(step)
|
||||
}
|
||||
|
||||
function scrollDiv(sender) {
|
||||
const par_body = sender.parentNode
|
||||
const line = par_body.getElementsByClassName('scroll-top')[0];
|
||||
if(sender.scrollTop === 0) {
|
||||
line.style.display = 'none'
|
||||
} else {
|
||||
line.style.display = 'block'
|
||||
}
|
||||
}
|
||||
|
||||
function getQueryVariable(variable) {
|
||||
const query = window.location.search.substring(1);
|
||||
const vars = query.split("&");
|
||||
for (let i=0; i<vars.length; i++) {
|
||||
const pair = vars[i].split("=");
|
||||
if(pair[0] === variable){
|
||||
return pair[1]
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
function initCodeInput(body, fun, regex) {
|
||||
// 初始化输入框
|
||||
if(body.classList.toString().indexOf('ss-code-input') >= 0) {
|
||||
// 初始化 label onclick 事件
|
||||
body.onclick = function () { codeInputAllow(body) }
|
||||
// 初始化主输入框
|
||||
const input = body.getElementsByTagName('input')[0]
|
||||
input.oninput = function() { codeInputChanged(body, fun, regex) }
|
||||
input.onblur = function() { codeInputNoAllow(body) }
|
||||
input.dataset.typeing = "false"
|
||||
input.addEventListener('compositionstart',function(e){ input.dataset.typeing = "true" }, false)
|
||||
input.addEventListener('compositionend',function(e){ input.dataset.typeing = "false"; }, false)
|
||||
if(input !== undefined) {
|
||||
// 添加显示输入框
|
||||
for(var i=0; i<body.dataset.num; i++) {
|
||||
// 构建
|
||||
let inputShow = document.createElement("input")
|
||||
inputShow.onclick = function () { codeInputAllow(body) }
|
||||
inputShow.dataset.id = (i+1).toString()
|
||||
inputShow.disabled = true
|
||||
// 添加
|
||||
body.appendChild(inputShow)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function codeInputAllow(body) {
|
||||
// 输入框 label 点击事件
|
||||
const inputs = body.getElementsByTagName('input')
|
||||
inputs[0].focus()
|
||||
codeInputChanged(body)
|
||||
}
|
||||
|
||||
function codeInputNoAllow(body) {
|
||||
const inputs = body.getElementsByTagName('input')
|
||||
for(let i=1; i<inputs.length; i++) {
|
||||
inputs[i].classList = ""
|
||||
}
|
||||
}
|
||||
|
||||
function codeInputChanged(body, fun, regex) {
|
||||
// 主输入框变化事件
|
||||
const inputs = body.getElementsByTagName('input')
|
||||
if(inputs !== undefined && inputs.length > 1 && inputs[0].dataset.typeing === "false") {
|
||||
if(regex === undefined) {
|
||||
regex = ""
|
||||
}
|
||||
if(inputs[0].dataset.up === "true") {
|
||||
inputs[0].value = inputs[0].value.toUpperCase()
|
||||
}
|
||||
// 变更输入框内容
|
||||
for(let i=1; i<inputs.length; i++) {
|
||||
inputs[i].value = ""
|
||||
}
|
||||
for(let i=0; i<inputs[0].value.length; i++) {
|
||||
// 检查正则表达式
|
||||
const reg = new RegExp(regex)
|
||||
if(reg.test(inputs[0].value.substring(i, i+1))) {
|
||||
if(i < inputs.length - 2) {
|
||||
inputs[i+1].classList = ""
|
||||
inputs[i+1].value = inputs[0].value.substring(i, i+1)
|
||||
if(i + 2 < inputs.length) {
|
||||
inputs[i+2].classList = "ss-code-input-selete"
|
||||
}
|
||||
if(i + 3 < inputs.length) {
|
||||
inputs[i+3].classList = ""
|
||||
}
|
||||
} else if( i == inputs.length - 2) {
|
||||
inputs[i+1].value = inputs[0].value.substring(i, i+1)
|
||||
if(fun !== undefined) {
|
||||
// 触发函数
|
||||
inputs[0].disabled = true
|
||||
// 完成部分动画
|
||||
setTimeout(() => {
|
||||
fun()
|
||||
}, 300)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
inputs[0].value = inputs[0].value.substring(0, inputs[0].value.length - 1)
|
||||
inputs[i+1].classList = "ss-code-input-selete ss-code-input-err"
|
||||
setTimeout(() => {
|
||||
inputs[i+1].classList = "ss-code-input-selete"
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
if(inputs[0].value.length == 0) {
|
||||
inputs[1].classList = "ss-code-input-selete"
|
||||
inputs[2].classList = ""
|
||||
}
|
||||
// 防止光标不在最后
|
||||
inputs[0].setSelectionRange(inputs[0].value.length, inputs[0].value.length)
|
||||
}
|
||||
}
|
||||
|
||||
function getCodeInput(body) {
|
||||
if(body.classList.toString().indexOf('ss-code-input') >= 0) {
|
||||
const inputs = body.getElementsByTagName('input')
|
||||
return inputs[0].value.substring(0, inputs.length - 1)
|
||||
}
|
||||
}
|
||||
|
||||
function cleanCodeInput(body) {
|
||||
if(body.classList.toString().indexOf('ss-code-input') >= 0) {
|
||||
const inputs = body.getElementsByTagName('input')
|
||||
inputs[0].value = ""
|
||||
inputs[0].disabled = false
|
||||
for(let i=1; i<inputs.length; i++) {
|
||||
inputs[i].classList = ""
|
||||
}
|
||||
codeInputChanged(body)
|
||||
}
|
||||
}
|
21
README.md
|
@ -1,21 +0,0 @@
|
|||
# stapxs-qq-lite
|
||||
|
||||
> 一个兼容 oicq-http 的非官方网页版 QQ 客户端
|
||||
|
||||
## Build Setup
|
||||
|
||||
``` bash
|
||||
# install dependencies
|
||||
npm install
|
||||
|
||||
# serve with hot reload at localhost:8080
|
||||
npm run dev
|
||||
|
||||
# build for production with minification
|
||||
npm run build
|
||||
|
||||
# build for production and view the bundle analyzer report
|
||||
npm run build --report
|
||||
```
|
||||
|
||||
For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
|
|
@ -1,41 +0,0 @@
|
|||
'use strict'
|
||||
require('./check-versions')()
|
||||
|
||||
process.env.NODE_ENV = 'production'
|
||||
|
||||
const ora = require('ora')
|
||||
const rm = require('rimraf')
|
||||
const path = require('path')
|
||||
const chalk = require('chalk')
|
||||
const webpack = require('webpack')
|
||||
const config = require('../config')
|
||||
const webpackConfig = require('./webpack.prod.conf')
|
||||
|
||||
const spinner = ora('building for production...')
|
||||
spinner.start()
|
||||
|
||||
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
|
||||
if (err) throw err
|
||||
webpack(webpackConfig, (err, stats) => {
|
||||
spinner.stop()
|
||||
if (err) throw err
|
||||
process.stdout.write(stats.toString({
|
||||
colors: true,
|
||||
modules: false,
|
||||
children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
|
||||
chunks: false,
|
||||
chunkModules: false
|
||||
}) + '\n\n')
|
||||
|
||||
if (stats.hasErrors()) {
|
||||
console.log(chalk.red(' Build failed with errors.\n'))
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
console.log(chalk.cyan(' Build complete.\n'))
|
||||
console.log(chalk.yellow(
|
||||
' Tip: built files are meant to be served over an HTTP server.\n' +
|
||||
' Opening index.html over file:// won\'t work.\n'
|
||||
))
|
||||
})
|
||||
})
|
|
@ -1,54 +0,0 @@
|
|||
'use strict'
|
||||
const chalk = require('chalk')
|
||||
const semver = require('semver')
|
||||
const packageConfig = require('../package.json')
|
||||
const shell = require('shelljs')
|
||||
|
||||
function exec (cmd) {
|
||||
return require('child_process').execSync(cmd).toString().trim()
|
||||
}
|
||||
|
||||
const versionRequirements = [
|
||||
{
|
||||
name: 'node',
|
||||
currentVersion: semver.clean(process.version),
|
||||
versionRequirement: packageConfig.engines.node
|
||||
}
|
||||
]
|
||||
|
||||
if (shell.which('npm')) {
|
||||
versionRequirements.push({
|
||||
name: 'npm',
|
||||
currentVersion: exec('npm --version'),
|
||||
versionRequirement: packageConfig.engines.npm
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = function () {
|
||||
const warnings = []
|
||||
|
||||
for (let i = 0; i < versionRequirements.length; i++) {
|
||||
const mod = versionRequirements[i]
|
||||
|
||||
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
|
||||
warnings.push(mod.name + ': ' +
|
||||
chalk.red(mod.currentVersion) + ' should be ' +
|
||||
chalk.green(mod.versionRequirement)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
if (warnings.length) {
|
||||
console.log('')
|
||||
console.log(chalk.yellow('To use this template, you must update following to modules:'))
|
||||
console.log()
|
||||
|
||||
for (let i = 0; i < warnings.length; i++) {
|
||||
const warning = warnings[i]
|
||||
console.log(' ' + warning)
|
||||
}
|
||||
|
||||
console.log()
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
BIN
build/logo.png
Before Width: | Height: | Size: 6.7 KiB |
101
build/utils.js
|
@ -1,101 +0,0 @@
|
|||
'use strict'
|
||||
const path = require('path')
|
||||
const config = require('../config')
|
||||
const ExtractTextPlugin = require('extract-text-webpack-plugin')
|
||||
const packageConfig = require('../package.json')
|
||||
|
||||
exports.assetsPath = function (_path) {
|
||||
const assetsSubDirectory = process.env.NODE_ENV === 'production'
|
||||
? config.build.assetsSubDirectory
|
||||
: config.dev.assetsSubDirectory
|
||||
|
||||
return path.posix.join(assetsSubDirectory, _path)
|
||||
}
|
||||
|
||||
exports.cssLoaders = function (options) {
|
||||
options = options || {}
|
||||
|
||||
const cssLoader = {
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
sourceMap: options.sourceMap
|
||||
}
|
||||
}
|
||||
|
||||
const postcssLoader = {
|
||||
loader: 'postcss-loader',
|
||||
options: {
|
||||
sourceMap: options.sourceMap
|
||||
}
|
||||
}
|
||||
|
||||
// generate loader string to be used with extract text plugin
|
||||
function generateLoaders (loader, loaderOptions) {
|
||||
const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
|
||||
|
||||
if (loader) {
|
||||
loaders.push({
|
||||
loader: loader + '-loader',
|
||||
options: Object.assign({}, loaderOptions, {
|
||||
sourceMap: options.sourceMap
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// Extract CSS when that option is specified
|
||||
// (which is the case during production build)
|
||||
if (options.extract) {
|
||||
return ExtractTextPlugin.extract({
|
||||
use: loaders,
|
||||
fallback: 'vue-style-loader'
|
||||
})
|
||||
} else {
|
||||
return ['vue-style-loader'].concat(loaders)
|
||||
}
|
||||
}
|
||||
|
||||
// https://vue-loader.vuejs.org/en/configurations/extract-css.html
|
||||
return {
|
||||
css: generateLoaders(),
|
||||
postcss: generateLoaders(),
|
||||
less: generateLoaders('less'),
|
||||
sass: generateLoaders('sass', { indentedSyntax: true }),
|
||||
scss: generateLoaders('sass'),
|
||||
stylus: generateLoaders('stylus'),
|
||||
styl: generateLoaders('stylus')
|
||||
}
|
||||
}
|
||||
|
||||
// Generate loaders for standalone style files (outside of .vue)
|
||||
exports.styleLoaders = function (options) {
|
||||
const output = []
|
||||
const loaders = exports.cssLoaders(options)
|
||||
|
||||
for (const extension in loaders) {
|
||||
const loader = loaders[extension]
|
||||
output.push({
|
||||
test: new RegExp('\\.' + extension + '$'),
|
||||
use: loader
|
||||
})
|
||||
}
|
||||
|
||||
return output
|
||||
}
|
||||
|
||||
exports.createNotifierCallback = () => {
|
||||
const notifier = require('node-notifier')
|
||||
|
||||
return (severity, errors) => {
|
||||
if (severity !== 'error') return
|
||||
|
||||
const error = errors[0]
|
||||
const filename = error.file && error.file.split('!').pop()
|
||||
|
||||
notifier.notify({
|
||||
title: packageConfig.name,
|
||||
message: severity + ': ' + error.name,
|
||||
subtitle: filename || '',
|
||||
icon: path.join(__dirname, 'logo.png')
|
||||
})
|
||||
}
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
'use strict'
|
||||
const utils = require('./utils')
|
||||
const config = require('../config')
|
||||
const isProduction = process.env.NODE_ENV === 'production'
|
||||
const sourceMapEnabled = isProduction
|
||||
? config.build.productionSourceMap
|
||||
: config.dev.cssSourceMap
|
||||
|
||||
module.exports = {
|
||||
loaders: utils.cssLoaders({
|
||||
sourceMap: sourceMapEnabled,
|
||||
extract: isProduction
|
||||
}),
|
||||
cssSourceMap: sourceMapEnabled,
|
||||
cacheBusting: config.dev.cacheBusting,
|
||||
transformToRequire: {
|
||||
video: ['src', 'poster'],
|
||||
source: 'src',
|
||||
img: 'src',
|
||||
image: 'xlink:href'
|
||||
}
|
||||
}
|
|
@ -1,92 +0,0 @@
|
|||
'use strict'
|
||||
const path = require('path')
|
||||
const utils = require('./utils')
|
||||
const config = require('../config')
|
||||
const vueLoaderConfig = require('./vue-loader.conf')
|
||||
|
||||
function resolve (dir) {
|
||||
return path.join(__dirname, '..', dir)
|
||||
}
|
||||
|
||||
const createLintingRule = () => ({
|
||||
test: /\.(js|vue)$/,
|
||||
loader: 'eslint-loader',
|
||||
enforce: 'pre',
|
||||
include: [resolve('src'), resolve('test')],
|
||||
options: {
|
||||
formatter: require('eslint-friendly-formatter'),
|
||||
emitWarning: !config.dev.showEslintErrorsInOverlay
|
||||
}
|
||||
})
|
||||
|
||||
module.exports = {
|
||||
context: path.resolve(__dirname, '../'),
|
||||
entry: {
|
||||
app: './src/main.js'
|
||||
},
|
||||
output: {
|
||||
path: config.build.assetsRoot,
|
||||
filename: '[name].js',
|
||||
publicPath: process.env.NODE_ENV === 'production'
|
||||
? config.build.assetsPublicPath
|
||||
: config.dev.assetsPublicPath
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.js', '.vue', '.json'],
|
||||
alias: {
|
||||
'vue$': 'vue/dist/vue.esm.js',
|
||||
'@': resolve('src'),
|
||||
}
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
...(config.dev.useEslint ? [createLintingRule()] : []),
|
||||
{
|
||||
test: /\.vue$/,
|
||||
loader: 'vue-loader',
|
||||
options: vueLoaderConfig
|
||||
},
|
||||
{
|
||||
test: /\.js$/,
|
||||
loader: 'babel-loader',
|
||||
include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')]
|
||||
},
|
||||
{
|
||||
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
|
||||
loader: 'url-loader',
|
||||
options: {
|
||||
limit: 10000,
|
||||
name: utils.assetsPath('img/[name].[hash:7].[ext]')
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
|
||||
loader: 'url-loader',
|
||||
options: {
|
||||
limit: 10000,
|
||||
name: utils.assetsPath('media/[name].[hash:7].[ext]')
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
|
||||
loader: 'url-loader',
|
||||
options: {
|
||||
limit: 10000,
|
||||
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
node: {
|
||||
// prevent webpack from injecting useless setImmediate polyfill because Vue
|
||||
// source contains it (although only uses it if it's native).
|
||||
setImmediate: false,
|
||||
// prevent webpack from injecting mocks to Node native modules
|
||||
// that does not make sense for the client
|
||||
dgram: 'empty',
|
||||
fs: 'empty',
|
||||
net: 'empty',
|
||||
tls: 'empty',
|
||||
child_process: 'empty'
|
||||
}
|
||||
}
|
|
@ -1,95 +0,0 @@
|
|||
'use strict'
|
||||
const utils = require('./utils')
|
||||
const webpack = require('webpack')
|
||||
const config = require('../config')
|
||||
const merge = require('webpack-merge')
|
||||
const path = require('path')
|
||||
const baseWebpackConfig = require('./webpack.base.conf')
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin')
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
|
||||
const portfinder = require('portfinder')
|
||||
|
||||
const HOST = process.env.HOST
|
||||
const PORT = process.env.PORT && Number(process.env.PORT)
|
||||
|
||||
const devWebpackConfig = merge(baseWebpackConfig, {
|
||||
module: {
|
||||
rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
|
||||
},
|
||||
// cheap-module-eval-source-map is faster for development
|
||||
devtool: config.dev.devtool,
|
||||
|
||||
// these devServer options should be customized in /config/index.js
|
||||
devServer: {
|
||||
clientLogLevel: 'warning',
|
||||
historyApiFallback: {
|
||||
rewrites: [
|
||||
{ from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
|
||||
],
|
||||
},
|
||||
hot: true,
|
||||
contentBase: false, // since we use CopyWebpackPlugin.
|
||||
compress: true,
|
||||
host: HOST || config.dev.host,
|
||||
port: PORT || config.dev.port,
|
||||
open: config.dev.autoOpenBrowser,
|
||||
overlay: config.dev.errorOverlay
|
||||
? { warnings: false, errors: true }
|
||||
: false,
|
||||
publicPath: config.dev.assetsPublicPath,
|
||||
proxy: config.dev.proxyTable,
|
||||
quiet: true, // necessary for FriendlyErrorsPlugin
|
||||
watchOptions: {
|
||||
poll: config.dev.poll,
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': require('../config/dev.env')
|
||||
}),
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
|
||||
new webpack.NoEmitOnErrorsPlugin(),
|
||||
// https://github.com/ampedandwired/html-webpack-plugin
|
||||
new HtmlWebpackPlugin({
|
||||
filename: 'index.html',
|
||||
template: 'index.html',
|
||||
inject: true
|
||||
}),
|
||||
// copy custom static assets
|
||||
new CopyWebpackPlugin([
|
||||
{
|
||||
from: path.resolve(__dirname, '../static'),
|
||||
to: config.dev.assetsSubDirectory,
|
||||
ignore: ['.*']
|
||||
}
|
||||
])
|
||||
]
|
||||
})
|
||||
|
||||
module.exports = new Promise((resolve, reject) => {
|
||||
portfinder.basePort = process.env.PORT || config.dev.port
|
||||
portfinder.getPort((err, port) => {
|
||||
if (err) {
|
||||
reject(err)
|
||||
} else {
|
||||
// publish the new Port, necessary for e2e tests
|
||||
process.env.PORT = port
|
||||
// add port to devServer config
|
||||
devWebpackConfig.devServer.port = port
|
||||
|
||||
// Add FriendlyErrorsPlugin
|
||||
devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
|
||||
compilationSuccessInfo: {
|
||||
messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
|
||||
},
|
||||
onErrors: config.dev.notifyOnErrors
|
||||
? utils.createNotifierCallback()
|
||||
: undefined
|
||||
}))
|
||||
|
||||
resolve(devWebpackConfig)
|
||||
}
|
||||
})
|
||||
})
|
|
@ -1,145 +0,0 @@
|
|||
'use strict'
|
||||
const path = require('path')
|
||||
const utils = require('./utils')
|
||||
const webpack = require('webpack')
|
||||
const config = require('../config')
|
||||
const merge = require('webpack-merge')
|
||||
const baseWebpackConfig = require('./webpack.base.conf')
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin')
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||
const ExtractTextPlugin = require('extract-text-webpack-plugin')
|
||||
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
|
||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
|
||||
|
||||
const env = require('../config/prod.env')
|
||||
|
||||
const webpackConfig = merge(baseWebpackConfig, {
|
||||
module: {
|
||||
rules: utils.styleLoaders({
|
||||
sourceMap: config.build.productionSourceMap,
|
||||
extract: true,
|
||||
usePostCSS: true
|
||||
})
|
||||
},
|
||||
devtool: config.build.productionSourceMap ? config.build.devtool : false,
|
||||
output: {
|
||||
path: config.build.assetsRoot,
|
||||
filename: utils.assetsPath('js/[name].[chunkhash].js'),
|
||||
chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
|
||||
},
|
||||
plugins: [
|
||||
// http://vuejs.github.io/vue-loader/en/workflow/production.html
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': env
|
||||
}),
|
||||
new UglifyJsPlugin({
|
||||
uglifyOptions: {
|
||||
compress: {
|
||||
warnings: false
|
||||
}
|
||||
},
|
||||
sourceMap: config.build.productionSourceMap,
|
||||
parallel: true
|
||||
}),
|
||||
// extract css into its own file
|
||||
new ExtractTextPlugin({
|
||||
filename: utils.assetsPath('css/[name].[contenthash].css'),
|
||||
// Setting the following option to `false` will not extract CSS from codesplit chunks.
|
||||
// Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
|
||||
// It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`,
|
||||
// increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
|
||||
allChunks: true,
|
||||
}),
|
||||
// Compress extracted CSS. We are using this plugin so that possible
|
||||
// duplicated CSS from different components can be deduped.
|
||||
new OptimizeCSSPlugin({
|
||||
cssProcessorOptions: config.build.productionSourceMap
|
||||
? { safe: true, map: { inline: false } }
|
||||
: { safe: true }
|
||||
}),
|
||||
// generate dist index.html with correct asset hash for caching.
|
||||
// you can customize output by editing /index.html
|
||||
// see https://github.com/ampedandwired/html-webpack-plugin
|
||||
new HtmlWebpackPlugin({
|
||||
filename: config.build.index,
|
||||
template: 'index.html',
|
||||
inject: true,
|
||||
minify: {
|
||||
removeComments: true,
|
||||
collapseWhitespace: true,
|
||||
removeAttributeQuotes: true
|
||||
// more options:
|
||||
// https://github.com/kangax/html-minifier#options-quick-reference
|
||||
},
|
||||
// necessary to consistently work with multiple chunks via CommonsChunkPlugin
|
||||
chunksSortMode: 'dependency'
|
||||
}),
|
||||
// keep module.id stable when vendor modules does not change
|
||||
new webpack.HashedModuleIdsPlugin(),
|
||||
// enable scope hoisting
|
||||
new webpack.optimize.ModuleConcatenationPlugin(),
|
||||
// split vendor js into its own file
|
||||
new webpack.optimize.CommonsChunkPlugin({
|
||||
name: 'vendor',
|
||||
minChunks (module) {
|
||||
// any required modules inside node_modules are extracted to vendor
|
||||
return (
|
||||
module.resource &&
|
||||
/\.js$/.test(module.resource) &&
|
||||
module.resource.indexOf(
|
||||
path.join(__dirname, '../node_modules')
|
||||
) === 0
|
||||
)
|
||||
}
|
||||
}),
|
||||
// extract webpack runtime and module manifest to its own file in order to
|
||||
// prevent vendor hash from being updated whenever app bundle is updated
|
||||
new webpack.optimize.CommonsChunkPlugin({
|
||||
name: 'manifest',
|
||||
minChunks: Infinity
|
||||
}),
|
||||
// This instance extracts shared chunks from code splitted chunks and bundles them
|
||||
// in a separate chunk, similar to the vendor chunk
|
||||
// see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk
|
||||
new webpack.optimize.CommonsChunkPlugin({
|
||||
name: 'app',
|
||||
async: 'vendor-async',
|
||||
children: true,
|
||||
minChunks: 3
|
||||
}),
|
||||
|
||||
// copy custom static assets
|
||||
new CopyWebpackPlugin([
|
||||
{
|
||||
from: path.resolve(__dirname, '../static'),
|
||||
to: config.build.assetsSubDirectory,
|
||||
ignore: ['.*']
|
||||
}
|
||||
])
|
||||
]
|
||||
})
|
||||
|
||||
if (config.build.productionGzip) {
|
||||
const CompressionWebpackPlugin = require('compression-webpack-plugin')
|
||||
|
||||
webpackConfig.plugins.push(
|
||||
new CompressionWebpackPlugin({
|
||||
asset: '[path].gz[query]',
|
||||
algorithm: 'gzip',
|
||||
test: new RegExp(
|
||||
'\\.(' +
|
||||
config.build.productionGzipExtensions.join('|') +
|
||||
')$'
|
||||
),
|
||||
threshold: 10240,
|
||||
minRatio: 0.8
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
if (config.build.bundleAnalyzerReport) {
|
||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
|
||||
webpackConfig.plugins.push(new BundleAnalyzerPlugin())
|
||||
}
|
||||
|
||||
module.exports = webpackConfig
|
|
@ -1,7 +0,0 @@
|
|||
'use strict'
|
||||
const merge = require('webpack-merge')
|
||||
const prodEnv = require('./prod.env')
|
||||
|
||||
module.exports = merge(prodEnv, {
|
||||
NODE_ENV: '"development"'
|
||||
})
|
|
@ -1,76 +0,0 @@
|
|||
'use strict'
|
||||
// Template version: 1.3.1
|
||||
// see http://vuejs-templates.github.io/webpack for documentation.
|
||||
|
||||
const path = require('path')
|
||||
|
||||
module.exports = {
|
||||
dev: {
|
||||
|
||||
// Paths
|
||||
assetsSubDirectory: 'static',
|
||||
assetsPublicPath: '/',
|
||||
proxyTable: {},
|
||||
|
||||
// Various Dev Server settings
|
||||
host: 'localhost', // can be overwritten by process.env.HOST
|
||||
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
|
||||
autoOpenBrowser: false,
|
||||
errorOverlay: true,
|
||||
notifyOnErrors: true,
|
||||
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
|
||||
|
||||
// Use Eslint Loader?
|
||||
// If true, your code will be linted during bundling and
|
||||
// linting errors and warnings will be shown in the console.
|
||||
useEslint: true,
|
||||
// If true, eslint errors and warnings will also be shown in the error overlay
|
||||
// in the browser.
|
||||
showEslintErrorsInOverlay: false,
|
||||
|
||||
/**
|
||||
* Source Maps
|
||||
*/
|
||||
|
||||
// https://webpack.js.org/configuration/devtool/#development
|
||||
devtool: 'cheap-module-eval-source-map',
|
||||
|
||||
// If you have problems debugging vue-files in devtools,
|
||||
// set this to false - it *may* help
|
||||
// https://vue-loader.vuejs.org/en/options.html#cachebusting
|
||||
cacheBusting: true,
|
||||
|
||||
cssSourceMap: true
|
||||
},
|
||||
|
||||
build: {
|
||||
// Template for index.html
|
||||
index: path.resolve(__dirname, '../dist/index.html'),
|
||||
|
||||
// Paths
|
||||
assetsRoot: path.resolve(__dirname, '../dist'),
|
||||
assetsSubDirectory: 'static',
|
||||
assetsPublicPath: '',
|
||||
|
||||
/**
|
||||
* Source Maps
|
||||
*/
|
||||
|
||||
productionSourceMap: true,
|
||||
// https://webpack.js.org/configuration/devtool/#production
|
||||
devtool: '#source-map',
|
||||
|
||||
// Gzip off by default as many popular static hosts such as
|
||||
// Surge or Netlify already gzip all static assets for you.
|
||||
// Before setting to `true`, make sure to:
|
||||
// npm install --save-dev compression-webpack-plugin
|
||||
productionGzip: false,
|
||||
productionGzipExtensions: ['js', 'css'],
|
||||
|
||||
// Run the build command with an extra argument to
|
||||
// View the bundle analyzer report after build finishes:
|
||||
// `npm run build --report`
|
||||
// Set to `true` or `false` to always turn it on or off
|
||||
bundleAnalyzerReport: process.env.npm_config_report
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
'use strict'
|
||||
module.exports = {
|
||||
NODE_ENV: '"production"'
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
a{font-family:FiraCode Nerd Font;white-space:pre-wrap}a,a:hover{color:var(--color-font)}span{font-family:FiraCode Nerd Font;white-space:pre-wrap}.line-head{margin-bottom:5px}.line-head>span.time{background:var(--color-main);color:var(--color-font-r);border-radius:7px 0 0 7px;padding:0 5px 0 10px}.line-head>span.c1{color:var(--color-main)}.line-head>span.name{background:var(--color-card);padding:0 10px}.line-head>span.c2{background:#007acc;color:var(--color-card)}.line-head>span.dir{background:#007acc;padding:0 10px}.line-head>span.c3{color:#007acc}.line-head>span.c3.c3bg{background:var(--color-main)}.command-start{color:#adff2f}.shell-pan{padding:20px;pointer-events:all;overflow-y:scroll;overflow-x:hidden}.shell-pan>a{flex:1}.shell-msg.revoke{display:none}.shell-msg>span.sname.sadmin{color:green}.shell-msg>span.sname.sowner{color:gold}.shell-msg>span.sname.smine{color:#007acc!important}.shell-msg>span.smsg{color:var(--color-font-2)}.shell-msg img{max-width:50%;opacity:0}.shell-msg pre{font-family:FiraCode Nerd Font;line-height:7px;font-size:6px}.shell-input{margin-bottom:40px}.shell-input>input{font-family:FiraCode Nerd Font;caret-color:var(--color-main);width:calc(100% - 2rem);background:transparent;margin-top:-3px;border:0}.shell-neofetch{display:flex;flex-wrap:wrap}.shell-neofetch>span{color:var(--color-main);margin-bottom:20px;margin-right:20px;line-height:1.3rem}.shell-neofetch>div{flex-direction:column;display:flex}.shell-neofetch>div>a{font-family:unset}.shell-neofetch>div>span{color:var(--color-main)}.shell-neofetch>div>span>span{color:var(--color-font)}.shell-neofetch>div>div{margin-top:1rem;display:flex}.shell-neofetch>div>div>div{height:1.5rem;width:2rem}
|
After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 9.8 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.0 KiB |
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |