mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-19 21:42:24 +00:00
Compare commits
4 commits
728166bd1a
...
431d7350a5
Author | SHA1 | Date | |
---|---|---|---|
![]() |
431d7350a5 | ||
![]() |
127bea7f73 | ||
![]() |
7c58bcbb46 | ||
![]() |
fec9b25248 |
6 changed files with 277 additions and 188 deletions
35
.gitignore
vendored
35
.gitignore
vendored
|
@ -1,16 +1,39 @@
|
||||||
.idea
|
# Ignore editor and IDE settings
|
||||||
.vscode
|
.idea/
|
||||||
.cache
|
.vscode/
|
||||||
|
.cache/
|
||||||
.sync*
|
.sync*
|
||||||
*.tar.gz
|
|
||||||
|
# Ignore log files
|
||||||
*.log
|
*.log
|
||||||
access.log
|
access.log
|
||||||
error.log
|
error.log
|
||||||
tmp
|
|
||||||
main
|
# Ignore temporary files
|
||||||
|
tmp/
|
||||||
|
*.tar.gz
|
||||||
|
|
||||||
|
# Ignore build and distribution directories
|
||||||
backup/
|
backup/
|
||||||
bin/
|
bin/
|
||||||
dist/
|
dist/
|
||||||
release/
|
release/
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# Ignore compiled binaries
|
||||||
|
main
|
||||||
|
|
||||||
|
# Ignore script and executable files
|
||||||
/release.sh
|
/release.sh
|
||||||
/x-ui
|
/x-ui
|
||||||
|
|
||||||
|
# Ignore OS specific files
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# Ignore Go specific files
|
||||||
|
*.exe
|
||||||
|
*.exe~
|
||||||
|
|
||||||
|
# Ignore Docker specific files
|
||||||
|
docker-compose.override.yml
|
||||||
|
|
|
@ -6,27 +6,33 @@
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
/* margin: 20px 0 50px 0;*/
|
/* margin: 20px 0 50px 0;*/
|
||||||
height: 110px;
|
height: 110px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-btn,
|
.ant-btn,
|
||||||
.ant-input {
|
.ant-input {
|
||||||
height: 50px;
|
height: 50px;
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-input-group-addon {
|
.ant-input-group-addon {
|
||||||
border-radius: 0 30px 30px 0;
|
border-radius: 0 30px 30px 0;
|
||||||
width: 50px;
|
width: 50px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-input-affix-wrapper .ant-input-prefix {
|
.ant-input-affix-wrapper .ant-input-prefix {
|
||||||
left: 23px;
|
left: 23px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-input-affix-wrapper .ant-input:not(:first-child) {
|
.ant-input-affix-wrapper .ant-input:not(:first-child) {
|
||||||
padding-left: 50px;
|
padding-left: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.centered {
|
.centered {
|
||||||
display: flex;
|
display: flex;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -34,68 +40,76 @@
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title b {
|
.title b {
|
||||||
font-weight: bold !important;
|
font-weight: bold !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#app {
|
#app {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
#login {
|
#login {
|
||||||
animation: charge 0.5s both;
|
animation: charge 0.5s both;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 2rem;
|
border-radius: 2rem;
|
||||||
padding: 3rem;
|
padding: 3rem;
|
||||||
transition: all 0.3s;
|
transition: all 0.3s;
|
||||||
user-select:none;
|
user-select: none;
|
||||||
-webkit-user-select:none;
|
-webkit-user-select: none;
|
||||||
-moz-user-select: none;
|
-moz-user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#login:hover {
|
#login:hover {
|
||||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09);
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09);
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes charge {
|
@keyframes charge {
|
||||||
from {
|
from {
|
||||||
transform: translateY(5rem);
|
transform: translateY(5rem);
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
to {
|
to {
|
||||||
transform: translateY(0);
|
transform: translateY(0);
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.under {
|
.under {
|
||||||
background-color: #c7ebe2;
|
background-color: #c7ebe2;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dark .under {
|
.dark .under {
|
||||||
background-color: var(--dark-color-login-wave);
|
background-color: var(--dark-color-login-wave);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dark #login {
|
.dark #login {
|
||||||
background-color: var(--dark-color-surface-100);
|
background-color: var(--dark-color-surface-100);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dark h1 {
|
.dark h1 {
|
||||||
color: rgba(255, 255, 255);
|
color: rgba(255, 255, 255);
|
||||||
}
|
}
|
||||||
.ant-form-item {
|
|
||||||
margin-bottom: 16px;
|
|
||||||
}
|
|
||||||
.ant-btn-primary-login {
|
.ant-btn-primary-login {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-btn-primary-login:focus,
|
.ant-btn-primary-login:focus,
|
||||||
.ant-btn-primary-login:hover {
|
.ant-btn-primary-login:hover {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background-color: #006655;
|
background-color: #006655;
|
||||||
border-color: #006655;
|
border-color: #006655;
|
||||||
background-image: linear-gradient(
|
background-image: linear-gradient(270deg,
|
||||||
270deg,
|
rgba(123, 199, 77, 0) 30%,
|
||||||
rgba(123, 199, 77, 0) 30%,
|
#009980,
|
||||||
#009980,
|
rgba(123, 199, 77, 0) 100%);
|
||||||
rgba(123, 199, 77, 0) 100%
|
|
||||||
);
|
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
animation: ma-bg-move ease-in-out 5s infinite;
|
animation: ma-bg-move ease-in-out 5s infinite;
|
||||||
background-position-x: -500px;
|
background-position-x: -500px;
|
||||||
|
@ -103,29 +117,35 @@
|
||||||
animation-delay: -0.5s;
|
animation-delay: -0.5s;
|
||||||
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045);
|
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-btn-primary-login.active,
|
.ant-btn-primary-login.active,
|
||||||
.ant-btn-primary-login:active {
|
.ant-btn-primary-login:active {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background-color: #006655;
|
background-color: #006655;
|
||||||
border-color: #006655;
|
border-color: #006655;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes ma-bg-move {
|
@keyframes ma-bg-move {
|
||||||
0% {
|
0% {
|
||||||
background-position: -500px 0;
|
background-position: -500px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
50% {
|
50% {
|
||||||
background-position: 1000px 0;
|
background-position: 1000px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
100% {
|
100% {
|
||||||
background-position: 1000px 0;
|
background-position: 1000px 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.wave-btn-bg {
|
.wave-btn-bg {
|
||||||
position: relative;
|
position: relative;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
transition: all 0.3s cubic-bezier(.645,.045,.355,1);
|
transition: all 0.3s cubic-bezier(.645, .045, .355, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dark .wave-btn-bg {
|
.dark .wave-btn-bg {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -137,15 +157,21 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
.dark .wave-btn-bg:hover {animation: wave-btn-tara 4s ease infinite;}
|
|
||||||
|
.dark .wave-btn-bg:hover {
|
||||||
|
animation: wave-btn-tara 4s ease infinite;
|
||||||
|
}
|
||||||
|
|
||||||
.dark .wave-btn-bg-cl {
|
.dark .wave-btn-bg-cl {
|
||||||
background-image: linear-gradient(rgba(13, 14, 33, 0), rgba(13, 14, 33, 0)),
|
background-image: linear-gradient(rgba(13, 14, 33, 0), rgba(13, 14, 33, 0)),
|
||||||
radial-gradient(circle at left top, #006655, #009980, #006655) !important;
|
radial-gradient(circle at left top, #006655, #009980, #006655) !important;
|
||||||
border-radius: 3em;
|
border-radius: 3em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dark .wave-btn-bg-cl:hover {
|
.dark .wave-btn-bg-cl:hover {
|
||||||
width: 95%;
|
width: 95%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dark .wave-btn-bg-cl:before {
|
.dark .wave-btn-bg-cl:before {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
content: "";
|
content: "";
|
||||||
|
@ -160,24 +186,25 @@
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transition: 0.5s;
|
transition: 0.5s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dark .wave-btn-bg-cl:hover::before {
|
.dark .wave-btn-bg-cl:hover::before {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
filter: blur(20px);
|
filter: blur(20px);
|
||||||
animation: wave-btn-tara 8s linear infinite;
|
animation: wave-btn-tara 8s linear infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes wave-btn-tara {
|
@keyframes wave-btn-tara {
|
||||||
to {
|
to {
|
||||||
background-position: 300%;
|
background-position: 300%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.dark .ant-btn-primary-login {
|
.dark .ant-btn-primary-login {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-image: linear-gradient(
|
background-image: linear-gradient(rgba(13, 14, 33, 0.45),
|
||||||
rgba(13, 14, 33, 0.45),
|
rgba(13, 14, 33, 0.35));
|
||||||
rgba(13, 14, 33, 0.35)
|
|
||||||
);
|
|
||||||
border-radius: 2rem;
|
border-radius: 2rem;
|
||||||
border: none;
|
border: none;
|
||||||
outline: none;
|
outline: none;
|
||||||
|
@ -193,6 +220,7 @@
|
||||||
background-position-x: 0;
|
background-position-x: 0;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.waves-header {
|
.waves-header {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -201,68 +229,83 @@
|
||||||
color: white;
|
color: white;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dark .waves-header {
|
.dark .waves-header {
|
||||||
background-color: var(--dark-color-login-background);
|
background-color: var(--dark-color-login-background);
|
||||||
}
|
}
|
||||||
|
|
||||||
.waves-inner-header {
|
.waves-inner-header {
|
||||||
height: 50vh;
|
height: 50vh;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.waves {
|
.waves {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 15vh;
|
height: 15vh;
|
||||||
margin-bottom: -8px; /*Fix for safari gap*/
|
margin-bottom: -8px;
|
||||||
|
/*Fix for safari gap*/
|
||||||
min-height: 100px;
|
min-height: 100px;
|
||||||
max-height: 150px;
|
max-height: 150px;
|
||||||
}
|
}
|
||||||
.parallax > use {
|
|
||||||
|
.parallax>use {
|
||||||
animation: move-forever 25s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
|
animation: move-forever 25s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
|
||||||
}
|
}
|
||||||
.dark .parallax > use {
|
|
||||||
|
.dark .parallax>use {
|
||||||
fill: var(--dark-color-login-wave);
|
fill: var(--dark-color-login-wave);
|
||||||
}
|
}
|
||||||
.parallax > use:nth-child(1) {
|
|
||||||
|
.parallax>use:nth-child(1) {
|
||||||
animation-delay: -2s;
|
animation-delay: -2s;
|
||||||
animation-duration: 4s;
|
animation-duration: 4s;
|
||||||
opacity: 0.2;
|
opacity: 0.2;
|
||||||
}
|
}
|
||||||
.parallax > use:nth-child(2) {
|
|
||||||
|
.parallax>use:nth-child(2) {
|
||||||
animation-delay: -3s;
|
animation-delay: -3s;
|
||||||
animation-duration: 7s;
|
animation-duration: 7s;
|
||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
}
|
}
|
||||||
.parallax > use:nth-child(3) {
|
|
||||||
|
.parallax>use:nth-child(3) {
|
||||||
animation-delay: -4s;
|
animation-delay: -4s;
|
||||||
animation-duration: 10s;
|
animation-duration: 10s;
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
.parallax > use:nth-child(4) {
|
|
||||||
animation-delay: -5s;
|
.parallax>use:nth-child(4) {
|
||||||
animation-duration: 13s;
|
animation-delay: -5s;
|
||||||
|
animation-duration: 13s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes move-forever {
|
@keyframes move-forever {
|
||||||
0% {
|
0% {
|
||||||
transform: translate3d(-90px, 0, 0);
|
transform: translate3d(-90px, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
100% {
|
100% {
|
||||||
transform: translate3d(85px, 0, 0);
|
transform: translate3d(85px, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.waves {
|
.waves {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
min-height: 40px;
|
min-height: 40px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.words-wrapper {
|
.words-wrapper {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.words-wrapper b {
|
.words-wrapper b {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -270,33 +313,40 @@
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.words-wrapper b.is-visible {
|
.words-wrapper b.is-visible {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.headline.zoom .words-wrapper {
|
.headline.zoom .words-wrapper {
|
||||||
-webkit-perspective: 300px;
|
-webkit-perspective: 300px;
|
||||||
-moz-perspective: 300px;
|
-moz-perspective: 300px;
|
||||||
perspective: 300px;
|
perspective: 300px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.headline {
|
.headline {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.headline.zoom b {
|
.headline.zoom b {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.headline.zoom b.is-visible {
|
.headline.zoom b.is-visible {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
-webkit-animation: zoom-in 0.8s;
|
-webkit-animation: zoom-in 0.8s;
|
||||||
-moz-animation: zoom-in 0.8s;
|
-moz-animation: zoom-in 0.8s;
|
||||||
animation: cubic-bezier(0.215, 0.610, 0.355, 1.000) zoom-in 0.8s;
|
animation: cubic-bezier(0.215, 0.610, 0.355, 1.000) zoom-in 0.8s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.headline.zoom b.is-hidden {
|
.headline.zoom b.is-hidden {
|
||||||
-webkit-animation: zoom-out 0.8s;
|
-webkit-animation: zoom-out 0.8s;
|
||||||
-moz-animation: zoom-out 0.8s;
|
-moz-animation: zoom-out 0.8s;
|
||||||
animation: cubic-bezier(0.215, 0.610, 0.355, 1.000) zoom-out 0.4s;
|
animation: cubic-bezier(0.215, 0.610, 0.355, 1.000) zoom-out 0.4s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@-webkit-keyframes zoom-in {
|
@-webkit-keyframes zoom-in {
|
||||||
0% {
|
0% {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
@ -308,16 +358,19 @@
|
||||||
-webkit-transform: translateZ(0);
|
-webkit-transform: translateZ(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@-moz-keyframes zoom-in {
|
@-moz-keyframes zoom-in {
|
||||||
0% {
|
0% {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
-moz-transform: translateZ(100px);
|
-moz-transform: translateZ(100px);
|
||||||
}
|
}
|
||||||
|
|
||||||
100% {
|
100% {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
-moz-transform: translateZ(0);
|
-moz-transform: translateZ(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes zoom-in {
|
@keyframes zoom-in {
|
||||||
0% {
|
0% {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
@ -327,6 +380,7 @@
|
||||||
-o-transform: translateZ(100px);
|
-o-transform: translateZ(100px);
|
||||||
transform: translateZ(100px);
|
transform: translateZ(100px);
|
||||||
}
|
}
|
||||||
|
|
||||||
100% {
|
100% {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
-webkit-transform: translateZ(0);
|
-webkit-transform: translateZ(0);
|
||||||
|
@ -336,26 +390,31 @@
|
||||||
transform: translateZ(0);
|
transform: translateZ(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@-webkit-keyframes zoom-out {
|
@-webkit-keyframes zoom-out {
|
||||||
0% {
|
0% {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
-webkit-transform: translateZ(0);
|
-webkit-transform: translateZ(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
100% {
|
100% {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
-webkit-transform: translateZ(-100px);
|
-webkit-transform: translateZ(-100px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@-moz-keyframes zoom-out {
|
@-moz-keyframes zoom-out {
|
||||||
0% {
|
0% {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
-moz-transform: translateZ(0);
|
-moz-transform: translateZ(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
100% {
|
100% {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
-moz-transform: translateZ(-100px);
|
-moz-transform: translateZ(-100px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes zoom-out {
|
@keyframes zoom-out {
|
||||||
0% {
|
0% {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
@ -365,6 +424,7 @@
|
||||||
-o-transform: translateZ(0);
|
-o-transform: translateZ(0);
|
||||||
transform: translateZ(0);
|
transform: translateZ(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
100% {
|
100% {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
-webkit-transform: translateZ(-100px);
|
-webkit-transform: translateZ(-100px);
|
||||||
|
@ -374,13 +434,20 @@
|
||||||
transform: translateZ(-100px);
|
transform: translateZ(-100px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.ant-menu-item .anticon {
|
|
||||||
margin-right: 4px;
|
.setting-section {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
padding: 24px;
|
||||||
}
|
}
|
||||||
.ant-menu-inline .ant-menu-item {
|
|
||||||
padding: 0 16px !important;
|
.setting-section > .ant-btn {
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<a-layout id="app" v-cloak :class="themeSwitcher.currentTheme">
|
<a-layout id="app" v-cloak :class="themeSwitcher.currentTheme">
|
||||||
<transition name="list" appear>
|
<transition name="list" appear>
|
||||||
|
@ -388,7 +455,7 @@
|
||||||
<div class="waves-header">
|
<div class="waves-header">
|
||||||
<div class="waves-inner-header"></div>
|
<div class="waves-inner-header"></div>
|
||||||
<svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
<svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto">
|
viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto">
|
||||||
<defs>
|
<defs>
|
||||||
<path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z" />
|
<path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z" />
|
||||||
</defs>
|
</defs>
|
||||||
|
@ -400,70 +467,67 @@
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="setting-section">
|
||||||
|
<a-popover :overlay-class-name="themeSwitcher.currentTheme" title='{{ i18n "menu.settings" }}' placement="bottomRight" trigger="click">
|
||||||
|
<template slot="content">
|
||||||
|
<a-space direction="vertical" :size="10">
|
||||||
|
<a-theme-switch-login></a-theme-switch-login>
|
||||||
|
<span>{{ i18n "pages.settings.language" }}</span>
|
||||||
|
<a-select ref="selectLang" :style="{ width: '100%' }" v-model="lang" @change="LanguageManager.setLanguage(lang)" :dropdown-class-name="themeSwitcher.currentTheme">
|
||||||
|
<a-select-option :value="l.value" label="English" v-for="l in LanguageManager.supportedLanguages">
|
||||||
|
<span role="img" aria-label="l.name" v-text="l.icon"></span>
|
||||||
|
<span v-text="l.name"></span>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-space>
|
||||||
|
</template>
|
||||||
|
<a-button shape="circle" icon="setting"></a-button>
|
||||||
|
</a-popover>
|
||||||
|
</div>
|
||||||
<a-row type="flex" justify="center" align="middle" style="height: 100%; overflow: auto; overflow-x: hidden;">
|
<a-row type="flex" justify="center" align="middle" style="height: 100%; overflow: auto; overflow-x: hidden;">
|
||||||
<a-col :xs="22" :sm="20" :md="14" :lg="10" :xl="8" :xxl="6" id="login" style="margin: 3rem 0;">
|
<a-col :xs="22" :sm="20" :md="14" :lg="10" :xl="8" :xxl="6" id="login" style="margin: 3rem 0;">
|
||||||
<a-row type="flex" justify="center">
|
<a-row type="flex" justify="center">
|
||||||
<a-col style="width: 100%;">
|
<a-col style="width: 100%;">
|
||||||
<h1 class="title headline zoom">
|
<h2 class="title headline zoom">
|
||||||
<span class="words-wrapper">
|
<span class="words-wrapper">
|
||||||
<b class="is-visible">{{ i18n "pages.login.hello" }}</b>
|
<b class="is-visible">{{ i18n "pages.login.hello" }}</b>
|
||||||
<b>{{ i18n "pages.login.title" }}</b>
|
<b>{{ i18n "pages.login.title" }}</b>
|
||||||
</span>
|
</span>
|
||||||
</h1>
|
</h2>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row type="flex" justify="center">
|
<a-row type="flex" justify="center">
|
||||||
<a-col span="24">
|
<a-col span="24">
|
||||||
<a-form>
|
<a-form>
|
||||||
<a-form-item>
|
<a-space direction="vertical" size="middle">
|
||||||
<a-input autocomplete="username" name="username" v-model.trim="user.username" placeholder='{{ i18n "username" }}'
|
<a-form-item>
|
||||||
@keydown.enter.native="login" autofocus>
|
<a-input autocomplete="username" name="username" v-model.trim="user.username"
|
||||||
<a-icon slot="prefix" type="user" style="font-size: 16px;"></a-icon>
|
placeholder='{{ i18n "username" }}' @keydown.enter.native="login" autofocus>
|
||||||
</a-input>
|
<a-icon slot="prefix" type="user" style="font-size: 16px;"></a-icon>
|
||||||
</a-form-item>
|
</a-input>
|
||||||
<a-form-item>
|
</a-form-item>
|
||||||
<a-password-input autocomplete="password" name="password" icon="lock" v-model.trim="user.password"
|
<a-form-item>
|
||||||
placeholder='{{ i18n "password" }}'
|
<a-password-input autocomplete="password" name="password" icon="lock" v-model.trim="user.password"
|
||||||
@keydown.enter.native="login">
|
placeholder='{{ i18n "password" }}' @keydown.enter.native="login">
|
||||||
</a-password-input>
|
</a-password-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item v-if="secretEnable">
|
<a-form-item v-if="secretEnable">
|
||||||
<a-password-input autocomplete="secret" name="secret" icon="key" v-model.trim="user.loginSecret"
|
<a-password-input autocomplete="secret" name="secret" icon="key" v-model.trim="user.loginSecret"
|
||||||
placeholder='{{ i18n "secretToken" }}'
|
placeholder='{{ i18n "secretToken" }}' @keydown.enter.native="login">
|
||||||
@keydown.enter.native="login">
|
</a-password-input>
|
||||||
</a-password-input>
|
</a-form-item>
|
||||||
</a-form-item>
|
<a-form-item>
|
||||||
<a-form-item>
|
<a-row justify="center" class="centered">
|
||||||
<a-row justify="center" class="centered">
|
<div :style="{ height: '50px', marginTop: '16px' }" class="wave-btn-bg wave-btn-bg-cl"
|
||||||
<div style="height: 50px;" class="wave-btn-bg wave-btn-bg-cl"
|
:style="loading ? { width: '52px' } : { display: 'inline-block' }">
|
||||||
:style="loading ? { width: '52px' } : { display: 'inline-block' }">
|
<a-button class="ant-btn-primary-login" type="primary" :loading="loading" @click="login"
|
||||||
<a-button class="ant-btn-primary-login" type="primary"
|
:icon="loading ? 'poweroff' : undefined">
|
||||||
:loading="loading" @click="login"
|
[[ loading ? '' : '{{ i18n "login" }}' ]]
|
||||||
:icon="loading ? 'poweroff' : undefined">
|
</a-button>
|
||||||
[[ loading ? '' : '{{ i18n "login" }}' ]]
|
</div>
|
||||||
</a-button>
|
</a-row>
|
||||||
</div>
|
</a-form-item>
|
||||||
</a-row>
|
</a-space>
|
||||||
</a-form-item>
|
|
||||||
<a-form-item>
|
|
||||||
<a-row justify="center" class="centered">
|
|
||||||
<a-col :span="24">
|
|
||||||
<a-select ref="selectLang" v-model="lang"
|
|
||||||
@change="LanguageManager.setLanguage(lang)" style="width: 200px;"
|
|
||||||
:dropdown-class-name="themeSwitcher.currentTheme">
|
|
||||||
<a-select-option :value="l.value" label="English" v-for="l in LanguageManager.supportedLanguages">
|
|
||||||
<span role="img" aria-label="l.name" v-text="l.icon"></span>
|
|
||||||
<span v-text="l.name"></span>
|
|
||||||
</a-select-option>
|
|
||||||
</a-select>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</a-form-item>
|
|
||||||
<a-form-item>
|
|
||||||
<a-row justify="center" class="centered">
|
|
||||||
<a-theme-switch-login></a-theme-switch-login>
|
|
||||||
</a-row>
|
|
||||||
</a-form-item>
|
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
@ -472,86 +536,85 @@
|
||||||
</a-layout-content>
|
</a-layout-content>
|
||||||
</transition>
|
</transition>
|
||||||
</a-layout>
|
</a-layout>
|
||||||
{{template "js" .}}
|
{{template "js" .}}
|
||||||
{{template "component/aThemeSwitch" .}}
|
{{template "component/aThemeSwitch" .}}
|
||||||
{{template "component/aPasswordInput" .}}
|
{{template "component/aPasswordInput" .}}
|
||||||
<script>
|
<script>
|
||||||
class User {
|
const app = new Vue({
|
||||||
constructor() {
|
delimiters: ['[[', ']]'],
|
||||||
this.username = "";
|
el: '#app',
|
||||||
this.password = "";
|
data: {
|
||||||
}
|
themeSwitcher,
|
||||||
}
|
loading: false,
|
||||||
const app = new Vue({
|
user: {
|
||||||
delimiters: ['[[', ']]'],
|
username: "",
|
||||||
el: '#app',
|
password: "",
|
||||||
data: {
|
loginSecret: ""
|
||||||
themeSwitcher,
|
},
|
||||||
loading: false,
|
secretEnable: false,
|
||||||
user: new User(),
|
lang: ""
|
||||||
secretEnable: false,
|
|
||||||
lang: ""
|
|
||||||
},
|
|
||||||
async created() {
|
|
||||||
this.lang = LanguageManager.getLanguage();
|
|
||||||
this.secretEnable = await this.getSecretStatus();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async login() {
|
|
||||||
this.loading = true;
|
|
||||||
const msg = await HttpUtil.post('/login', this.user);
|
|
||||||
this.loading = false;
|
|
||||||
if (msg.success) {
|
|
||||||
location.href = basePath + 'panel/';
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
async getSecretStatus() {
|
async mounted() {
|
||||||
this.loading = true;
|
this.lang = LanguageManager.getLanguage();
|
||||||
const msg = await HttpUtil.post('/getSecretStatus');
|
this.secretEnable = await this.getSecretStatus();
|
||||||
this.loading = false;
|
|
||||||
if (msg.success) {
|
|
||||||
this.secretEnable = msg.obj;
|
|
||||||
return msg.obj;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
methods: {
|
||||||
});
|
async login() {
|
||||||
document.addEventListener("DOMContentLoaded", function() {
|
this.loading = true;
|
||||||
var animationDelay = 2000;
|
const msg = await HttpUtil.post('/login', this.user);
|
||||||
initHeadline();
|
this.loading = false;
|
||||||
|
if (msg.success) {
|
||||||
|
location.href = basePath + 'panel/';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getSecretStatus() {
|
||||||
|
this.loading = true;
|
||||||
|
const msg = await HttpUtil.post('/getSecretStatus');
|
||||||
|
this.loading = false;
|
||||||
|
if (msg.success) {
|
||||||
|
this.secretEnable = msg.obj;
|
||||||
|
return msg.obj;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
function initHeadline() {
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
animateHeadline(document.querySelectorAll('.headline'));
|
var animationDelay = 2000;
|
||||||
}
|
initHeadline();
|
||||||
|
|
||||||
function animateHeadline(headlines) {
|
function initHeadline() {
|
||||||
var duration = animationDelay;
|
animateHeadline(document.querySelectorAll('.headline'));
|
||||||
headlines.forEach(function(headline) {
|
}
|
||||||
setTimeout(function() {
|
|
||||||
hideWord(headline.querySelector('.is-visible'));
|
|
||||||
}, duration);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function hideWord(word) {
|
function animateHeadline(headlines) {
|
||||||
var nextWord = takeNext(word);
|
var duration = animationDelay;
|
||||||
switchWord(word, nextWord);
|
headlines.forEach(function (headline) {
|
||||||
setTimeout(function() {
|
setTimeout(function () {
|
||||||
hideWord(nextWord);
|
hideWord(headline.querySelector('.is-visible'));
|
||||||
}, animationDelay);
|
}, duration);
|
||||||
}
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function takeNext(word) {
|
function hideWord(word) {
|
||||||
return (word.nextElementSibling) ? word.nextElementSibling : word.parentElement.firstElementChild;
|
var nextWord = takeNext(word);
|
||||||
}
|
switchWord(word, nextWord);
|
||||||
|
setTimeout(function () {
|
||||||
|
hideWord(nextWord);
|
||||||
|
}, animationDelay);
|
||||||
|
}
|
||||||
|
|
||||||
function switchWord(oldWord, newWord) {
|
function takeNext(word) {
|
||||||
oldWord.classList.remove('is-visible');
|
return word.nextElementSibling ? word.nextElementSibling : word.parentElement.firstElementChild;
|
||||||
oldWord.classList.add('is-hidden');
|
}
|
||||||
newWord.classList.remove('is-hidden');
|
|
||||||
newWord.classList.add('is-visible');
|
function switchWord(oldWord, newWord) {
|
||||||
}
|
oldWord.classList.remove('is-visible');
|
||||||
});
|
oldWord.classList.add('is-hidden');
|
||||||
</script>
|
newWord.classList.remove('is-hidden');
|
||||||
|
newWord.classList.add('is-visible');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -45,27 +45,27 @@
|
||||||
return {
|
return {
|
||||||
tabs: [
|
tabs: [
|
||||||
{
|
{
|
||||||
key: '/panel/',
|
key: 'panel/',
|
||||||
icon: 'dashboard',
|
icon: 'dashboard',
|
||||||
title: '{{ i18n "menu.dashboard"}}'
|
title: '{{ i18n "menu.dashboard"}}'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: '/panel/inbounds',
|
key: 'panel/inbounds',
|
||||||
icon: 'user',
|
icon: 'user',
|
||||||
title: '{{ i18n "menu.inbounds"}}'
|
title: '{{ i18n "menu.inbounds"}}'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: '/panel/settings',
|
key: 'panel/settings',
|
||||||
icon: 'setting',
|
icon: 'setting',
|
||||||
title: '{{ i18n "menu.settings"}}'
|
title: '{{ i18n "menu.settings"}}'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: '/panel/xray',
|
key: 'panel/xray',
|
||||||
icon: 'tool',
|
icon: 'tool',
|
||||||
title: '{{ i18n "menu.xray"}}'
|
title: '{{ i18n "menu.xray"}}'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: '/logout/',
|
key: 'logout/',
|
||||||
icon: 'logout',
|
icon: 'logout',
|
||||||
title: '{{ i18n "menu.logout"}}'
|
title: '{{ i18n "menu.logout"}}'
|
||||||
},
|
},
|
||||||
|
@ -79,7 +79,9 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openLink(key) {
|
openLink(key) {
|
||||||
return key.startsWith('http') ? window.open(key) : location.href = key
|
return key.startsWith('http') ?
|
||||||
|
window.open(`{{ .base_path }}${key}`) :
|
||||||
|
location.href = `{{ .base_path }}${key}`
|
||||||
},
|
},
|
||||||
closeDrawer() {
|
closeDrawer() {
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
|
|
|
@ -6,13 +6,16 @@
|
||||||
<a-icon type="bulb" :theme="themeSwitcher.isDarkTheme ? 'filled' : 'outlined'"></a-icon>
|
<a-icon type="bulb" :theme="themeSwitcher.isDarkTheme ? 'filled' : 'outlined'"></a-icon>
|
||||||
<span>{{ i18n "menu.theme" }}</span>
|
<span>{{ i18n "menu.theme" }}</span>
|
||||||
</span>
|
</span>
|
||||||
<a-menu-item id="change-theme" class="ant-menu-theme-switch" @mousedown="themeSwitcher.animationsOff()">
|
<a-menu-item id="change-theme" class="ant-menu-theme-switch" @mousedown="themeSwitcher.animationsOff()">
|
||||||
<span>{{ i18n "menu.dark" }}</span>
|
<span>{{ i18n "menu.dark" }}</span>
|
||||||
<a-switch style="margin-left: 2px;" size="small" :default-checked="themeSwitcher.isDarkTheme" @change="themeSwitcher.toggleTheme()"></a-switch>
|
<a-switch style="margin-left: 2px;" size="small" :default-checked="themeSwitcher.isDarkTheme"
|
||||||
|
@change="themeSwitcher.toggleTheme()"></a-switch>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
<a-menu-item id="change-theme-ultra" v-if="themeSwitcher.isDarkTheme" class="ant-menu-theme-switch" @mousedown="themeSwitcher.animationsOffUltra()">
|
<a-menu-item id="change-theme-ultra" v-if="themeSwitcher.isDarkTheme" class="ant-menu-theme-switch"
|
||||||
|
@mousedown="themeSwitcher.animationsOffUltra()">
|
||||||
<span>{{ i18n "menu.ultraDark" }}</span>
|
<span>{{ i18n "menu.ultraDark" }}</span>
|
||||||
<a-checkbox style="margin-left: 2px;" :checked="themeSwitcher.isUltra" @click="themeSwitcher.toggleUltra()"></a-checkbox>
|
<a-checkbox style="margin-left: 2px;" :checked="themeSwitcher.isUltra"
|
||||||
|
@click="themeSwitcher.toggleUltra()"></a-checkbox>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
</a-sub-menu>
|
</a-sub-menu>
|
||||||
</a-menu>
|
</a-menu>
|
||||||
|
@ -21,18 +24,16 @@
|
||||||
|
|
||||||
{{define "component/themeSwitchTemplateLogin"}}
|
{{define "component/themeSwitchTemplateLogin"}}
|
||||||
<template>
|
<template>
|
||||||
<a-menu @mousedown="themeSwitcher.animationsOff()" id="change-theme" :theme="themeSwitcher.currentTheme" mode="inline"
|
<a-space direction="vertical" :size="10" :style="{ width: '100%' }">
|
||||||
selected-keys="">
|
<a-space direction="horizontal" size="small">
|
||||||
<a-menu-item mode="inline" class="ant-menu-theme-switch">
|
<a-switch size="small" :default-checked="themeSwitcher.isDarkTheme" @change="themeSwitcher.toggleTheme()"></a-switch>
|
||||||
<a-icon type="bulb" :theme="themeSwitcher.isDarkTheme ? 'filled' : 'outlined'"></a-icon>
|
<span>{{ i18n "menu.dark" }}</span>
|
||||||
<a-switch size="small" :default-checked="themeSwitcher.isDarkTheme"
|
</a-space>
|
||||||
@change="themeSwitcher.toggleTheme()"></a-switch>
|
<a-space v-if="themeSwitcher.isDarkTheme" direction="horizontal" size="small">
|
||||||
<template v-if="themeSwitcher.isDarkTheme">
|
<a-checkbox :checked="themeSwitcher.isUltra" @click="themeSwitcher.toggleUltra()"></a-checkbox>
|
||||||
<a-checkbox style="margin-left: 1rem; vertical-align: middle;" :checked="themeSwitcher.isUltra"
|
<span>{{ i18n "menu.ultraDark" }}</span>
|
||||||
@click="themeSwitcher.toggleUltra()">Ultra</a-checkbox>
|
</a-space>
|
||||||
</template>
|
</a-space>
|
||||||
</a-menu-item>
|
|
||||||
</a-menu>
|
|
||||||
</template>
|
</template>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
|
|
|
@ -635,7 +635,7 @@
|
||||||
"allClients" = "Все клиенты"
|
"allClients" = "Все клиенты"
|
||||||
|
|
||||||
"addClient" = "Добавить клиента"
|
"addClient" = "Добавить клиента"
|
||||||
"submitDisable" = "Отправить как отключенный ✅"
|
"submitDisable" = "Отправить отключенным ✅"
|
||||||
"use_default" = "🏷️ Использовать по умолчанию"
|
"use_default" = "🏷️ Использовать по умолчанию"
|
||||||
"change_id" = "⚙️🔑 ID"
|
"change_id" = "⚙️🔑 ID"
|
||||||
"change_password" = "⚙️🔑 Пароль"
|
"change_password" = "⚙️🔑 Пароль"
|
||||||
|
|
|
@ -635,7 +635,7 @@
|
||||||
"allClients" = "Всі Клієнти"
|
"allClients" = "Всі Клієнти"
|
||||||
|
|
||||||
"addClient" = "Додати клієнта"
|
"addClient" = "Додати клієнта"
|
||||||
"submitDisable" = "Надіслати як вимкнене ✅"
|
"submitDisable" = "Надіслати відключеним ✅"
|
||||||
"use_default" = "🏷️ Використовувати за замовчуванням"
|
"use_default" = "🏷️ Використовувати за замовчуванням"
|
||||||
"change_id" = "⚙️🔑 ID"
|
"change_id" = "⚙️🔑 ID"
|
||||||
"change_password" = "⚙️🔑 Пароль"
|
"change_password" = "⚙️🔑 Пароль"
|
||||||
|
|
Loading…
Reference in a new issue