feat(login): refresh sign-in and introduce the Ray brand mark

This commit is contained in:
XiaoDaiGua-Ray 2026-11-04 10:30:30 +08:00
parent cee3f01cf9
commit 402387eacb
14 changed files with 408 additions and 457 deletions

View File

@ -1,14 +1,7 @@
<svg t="1659811416176" class="icon" viewBox="0 0 1147 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10290" width="64" height="64">
<path d="M472.342857 968.685714c-73.828571 0-130.171429-12-172.114286-36.571428-38.742857-22.742857-84.914286-68.685714-84.914285-158.057143-2.971429-141.942857 109.714286-259.542857 251.657143-262.514286 141.942857-2.971429 259.542857 109.714286 262.514285 251.657143 0.114286 3.657143 0.114286 7.2 0 10.857143 0 89.371429-46.171429 135.2-84.914285 158.057143-41.942857 24.685714-98.285714 36.571429-172.228572 36.571428z" fill="#25467A" p-id="10291"></path>
<path d="M766.742857 968.685714c-73.942857 0-130.171429-12-172.228571-36.571428-38.742857-22.742857-84.914286-68.685714-84.914286-158.057143 2.857143-141.942857 120.228571-254.742857 262.285714-252 137.942857 2.742857 249.142857 113.942857 252 252 0 89.371429-46.171429 135.2-84.914285 158.057143-42.057143 24.685714-98.4 36.571429-172.228572 36.571428z" fill="#25467A" p-id="10292"></path>
<path d="M512 940.571429c-153.257143 0-268.457143-24-352.457143-73.257143-50.971429-29.942857-90.514286-69.714286-117.142857-118.057143C14.285714 698.285714 0 637.028571 0 567.085714c0.114286-282.857143 229.6-512 512.457143-511.885714 205.6 0.114286 391.2 123.2 471.314286 312.571429 26.742857 63.085714 40.342857 130.857143 40.228571 199.314285 0 69.828571-14.285714 131.2-42.4 182.171429-26.742857 48.342857-66.171429 88.114286-117.142857 118.057143C780.571429 916.685714 665.257143 940.571429 512 940.571429z" fill="#25467A" p-id="10293"></path>
<path d="M48 567.085714c0-256.228571 207.771429-464 464-464s464 207.771429 464 464S768.228571 892.571429 512 892.571429 48 823.314286 48 567.085714z" fill="#FFF3E0" p-id="10294"></path>
<path d="M472.342857 943.542857c-69.257143 0-121.371429-10.857143-159.428571-33.142857-48.114286-28.228571-72.457143-74.171429-72.457143-136.342857 0-127.885714 104-232 232-232s232 104 232 232c0 62.171429-24.342857 108.114286-72.571429 136.342857-38.057143 22.4-90.171429 33.142857-159.542857 33.142857z" fill="#25467A" p-id="10295"></path>
<path d="M263.314286 774.057143c0-115.428571 93.485714-209.142857 209.028571-209.142857 115.428571 0 209.142857 93.485714 209.142857 209.028571v0.114286c0 115.428571-93.6 146.628571-209.142857 146.628571s-209.028571-31.085714-209.028571-146.628571z" fill="#FFF3E0" p-id="10296"></path>
<path d="M472.342857 652.8c-73.371429 0-132.8 51.771429-132.8 115.657143 0 18.514286 5.028571 33.142857 13.942857 44.571428-1.714286 10.971429-2.628571 22.057143-2.742857 33.142858 0 32.8 9.942857 38.971429 22.285714 38.971428s22.285714-6.285714 22.285715-38.971428c0-2.057143 0-4.228571-0.114286-6.285715 21.714286 7.085714 48.457143 9.714286 77.142857 9.714286 73.371429 0 132.8-17.257143 132.8-81.142857s-59.428571-115.657143-132.8-115.657143z" fill="#388E3C" p-id="10297"></path>
<path d="M766.742857 943.542857c-69.257143 0-121.371429-10.857143-159.428571-33.142857-48.114286-28.228571-72.571429-74.171429-72.571429-136.342857 0-127.885714 104.114286-232 232-232s232 104 232 232c0 62.171429-24.342857 108.114286-72.571428 136.342857-38.057143 22.4-90.171429 33.142857-159.428572 33.142857z" fill="#25467A" p-id="10298"></path>
<path d="M557.6 774.057143c0-115.428571 93.6-209.142857 209.142857-209.142857s209.142857 93.6 209.142857 209.142857c0 115.428571-93.6 146.628571-209.142857 146.628571s-209.142857-31.085714-209.142857-146.628571z" fill="#FFF3E0" p-id="10299"></path>
<path d="M766.742857 652.8c-73.371429 0-132.8 51.771429-132.8 115.657143 0 18.514286 5.028571 33.142857 13.942857 44.571428-1.714286 10.971429-2.628571 22.057143-2.742857 33.142858 0 32.8 9.942857 38.971429 22.285714 38.971428s22.285714-6.285714 22.285715-38.971428c0-2.057143 0-4.228571-0.114286-6.285715 21.714286 7.085714 48.342857 9.714286 77.142857 9.714286 73.371429 0 132.8-17.257143 132.8-81.142857S840 652.8 766.742857 652.8z" fill="#FBC02D" p-id="10300"></path>
<path d="M401.6 486.857143c-38.171429 0-69.142857-30.971429-69.142857-69.257143 0-7.657143 6.171429-13.828571 13.828571-13.828571 7.314286 0 13.485714 5.714286 13.828572 13.028571v0.8c-0.342857 22.971429 17.942857 41.828571 40.8 42.171429s41.828571-17.942857 42.171428-40.8v-1.371429c-0.228571-7.657143 5.828571-14.057143 13.371429-14.285714s14.057143 5.828571 14.285714 13.371428v0.8c0.114286 38.4-30.857143 69.371429-69.142857 69.371429zM221.714286 306.971429c-0.342857 22.971429 17.942857 41.828571 40.8 42.171428s41.828571-17.942857 42.171428-40.8v-1.371428c0.342857-22.971429-17.942857-41.828571-40.8-42.171429-22.971429-0.342857-41.828571 17.942857-42.171428 40.8v1.371429zM498.514286 306.971429c-0.342857 22.971429 17.828571 41.828571 40.8 42.285714 22.971429 0.342857 41.828571-17.828571 42.285714-40.8v-1.485714c0.342857-22.971429-17.942857-41.828571-40.8-42.171429-22.971429-0.342857-41.828571 17.942857-42.171429 40.8-0.114286 0.457143-0.114286 0.914286-0.114285 1.371429z" fill="#25467A" p-id="10301"></path>
<path d="M207.885714 376.228571h-55.314285c-15.314286-0.342857-27.885714 11.771429-28.228572 27.085715-0.342857 15.314286 11.771429 27.885714 27.085714 28.228571H208c15.314286 0.342857 27.885714-11.771429 28.228571-27.085714 0.342857-15.314286-11.771429-27.885714-27.085714-28.228572h-1.257143z m442.857143 0H595.428571c-15.314286 0-27.657143 12.342857-27.657142 27.657143s12.342857 27.657143 27.657142 27.657143h55.314286c15.314286 0.342857 27.885714-11.771429 28.228572-27.085714 0.342857-15.314286-11.771429-27.885714-27.085715-28.228572h-1.142857z" fill="#F8BBD0" p-id="10302"></path>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<rect width="64" height="64" rx="16" fill="#182436"/>
<path d="M31 21c1-6 6-10 13-10-1 6-6 10-13 10Z" fill="#D5F367"/>
<path d="M10 26h44v3a22 22 0 0 1-44 0Z" fill="#D5F367"/>
<ellipse cx="25" cy="35" rx="2.5" ry="4" fill="#182436"/>
<ellipse cx="39" cy="35" rx="2.5" ry="4" fill="#182436"/>
</svg>

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 370 B

View File

@ -38,6 +38,7 @@
}
.r-share-links--compact {
container-type: normal;
.r-share-links__grid {
display: flex;
flex-wrap: wrap;

View File

@ -1,14 +1,7 @@
<svg t="1659811416176" class="icon" viewBox="0 0 1147 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10290" width="64" height="64">
<path d="M472.342857 968.685714c-73.828571 0-130.171429-12-172.114286-36.571428-38.742857-22.742857-84.914286-68.685714-84.914285-158.057143-2.971429-141.942857 109.714286-259.542857 251.657143-262.514286 141.942857-2.971429 259.542857 109.714286 262.514285 251.657143 0.114286 3.657143 0.114286 7.2 0 10.857143 0 89.371429-46.171429 135.2-84.914285 158.057143-41.942857 24.685714-98.285714 36.571429-172.228572 36.571428z" fill="#25467A" p-id="10291"></path>
<path d="M766.742857 968.685714c-73.942857 0-130.171429-12-172.228571-36.571428-38.742857-22.742857-84.914286-68.685714-84.914286-158.057143 2.857143-141.942857 120.228571-254.742857 262.285714-252 137.942857 2.742857 249.142857 113.942857 252 252 0 89.371429-46.171429 135.2-84.914285 158.057143-42.057143 24.685714-98.4 36.571429-172.228572 36.571428z" fill="#25467A" p-id="10292"></path>
<path d="M512 940.571429c-153.257143 0-268.457143-24-352.457143-73.257143-50.971429-29.942857-90.514286-69.714286-117.142857-118.057143C14.285714 698.285714 0 637.028571 0 567.085714c0.114286-282.857143 229.6-512 512.457143-511.885714 205.6 0.114286 391.2 123.2 471.314286 312.571429 26.742857 63.085714 40.342857 130.857143 40.228571 199.314285 0 69.828571-14.285714 131.2-42.4 182.171429-26.742857 48.342857-66.171429 88.114286-117.142857 118.057143C780.571429 916.685714 665.257143 940.571429 512 940.571429z" fill="#25467A" p-id="10293"></path>
<path d="M48 567.085714c0-256.228571 207.771429-464 464-464s464 207.771429 464 464S768.228571 892.571429 512 892.571429 48 823.314286 48 567.085714z" fill="#FFF3E0" p-id="10294"></path>
<path d="M472.342857 943.542857c-69.257143 0-121.371429-10.857143-159.428571-33.142857-48.114286-28.228571-72.457143-74.171429-72.457143-136.342857 0-127.885714 104-232 232-232s232 104 232 232c0 62.171429-24.342857 108.114286-72.571429 136.342857-38.057143 22.4-90.171429 33.142857-159.542857 33.142857z" fill="#25467A" p-id="10295"></path>
<path d="M263.314286 774.057143c0-115.428571 93.485714-209.142857 209.028571-209.142857 115.428571 0 209.142857 93.485714 209.142857 209.028571v0.114286c0 115.428571-93.6 146.628571-209.142857 146.628571s-209.028571-31.085714-209.028571-146.628571z" fill="#FFF3E0" p-id="10296"></path>
<path d="M472.342857 652.8c-73.371429 0-132.8 51.771429-132.8 115.657143 0 18.514286 5.028571 33.142857 13.942857 44.571428-1.714286 10.971429-2.628571 22.057143-2.742857 33.142858 0 32.8 9.942857 38.971429 22.285714 38.971428s22.285714-6.285714 22.285715-38.971428c0-2.057143 0-4.228571-0.114286-6.285715 21.714286 7.085714 48.457143 9.714286 77.142857 9.714286 73.371429 0 132.8-17.257143 132.8-81.142857s-59.428571-115.657143-132.8-115.657143z" fill="#388E3C" p-id="10297"></path>
<path d="M766.742857 943.542857c-69.257143 0-121.371429-10.857143-159.428571-33.142857-48.114286-28.228571-72.571429-74.171429-72.571429-136.342857 0-127.885714 104.114286-232 232-232s232 104 232 232c0 62.171429-24.342857 108.114286-72.571428 136.342857-38.057143 22.4-90.171429 33.142857-159.428572 33.142857z" fill="#25467A" p-id="10298"></path>
<path d="M557.6 774.057143c0-115.428571 93.6-209.142857 209.142857-209.142857s209.142857 93.6 209.142857 209.142857c0 115.428571-93.6 146.628571-209.142857 146.628571s-209.142857-31.085714-209.142857-146.628571z" fill="#FFF3E0" p-id="10299"></path>
<path d="M766.742857 652.8c-73.371429 0-132.8 51.771429-132.8 115.657143 0 18.514286 5.028571 33.142857 13.942857 44.571428-1.714286 10.971429-2.628571 22.057143-2.742857 33.142858 0 32.8 9.942857 38.971429 22.285714 38.971428s22.285714-6.285714 22.285715-38.971428c0-2.057143 0-4.228571-0.114286-6.285715 21.714286 7.085714 48.342857 9.714286 77.142857 9.714286 73.371429 0 132.8-17.257143 132.8-81.142857S840 652.8 766.742857 652.8z" fill="#FBC02D" p-id="10300"></path>
<path d="M401.6 486.857143c-38.171429 0-69.142857-30.971429-69.142857-69.257143 0-7.657143 6.171429-13.828571 13.828571-13.828571 7.314286 0 13.485714 5.714286 13.828572 13.028571v0.8c-0.342857 22.971429 17.942857 41.828571 40.8 42.171429s41.828571-17.942857 42.171428-40.8v-1.371429c-0.228571-7.657143 5.828571-14.057143 13.371429-14.285714s14.057143 5.828571 14.285714 13.371428v0.8c0.114286 38.4-30.857143 69.371429-69.142857 69.371429zM221.714286 306.971429c-0.342857 22.971429 17.942857 41.828571 40.8 42.171428s41.828571-17.942857 42.171428-40.8v-1.371428c0.342857-22.971429-17.942857-41.828571-40.8-42.171429-22.971429-0.342857-41.828571 17.942857-42.171428 40.8v1.371429zM498.514286 306.971429c-0.342857 22.971429 17.828571 41.828571 40.8 42.285714 22.971429 0.342857 41.828571-17.828571 42.285714-40.8v-1.485714c0.342857-22.971429-17.942857-41.828571-40.8-42.171429-22.971429-0.342857-41.828571 17.942857-42.171429 40.8-0.114286 0.457143-0.114286 0.914286-0.114285 1.371429z" fill="#25467A" p-id="10301"></path>
<path d="M207.885714 376.228571h-55.314285c-15.314286-0.342857-27.885714 11.771429-28.228572 27.085715-0.342857 15.314286 11.771429 27.885714 27.085714 28.228571H208c15.314286 0.342857 27.885714-11.771429 28.228571-27.085714 0.342857-15.314286-11.771429-27.885714-27.085714-28.228572h-1.257143z m442.857143 0H595.428571c-15.314286 0-27.657143 12.342857-27.657142 27.657143s12.342857 27.657143 27.657142 27.657143h55.314286c15.314286 0.342857 27.885714-11.771429 28.228572-27.085714 0.342857-15.314286-11.771429-27.885714-27.085715-28.228572h-1.142857z" fill="#F8BBD0" p-id="10302"></path>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<rect width="64" height="64" rx="16" fill="#182436"/>
<path d="M31 21c1-6 6-10 13-10-1 6-6 10-13 10Z" fill="#D5F367"/>
<path d="M10 26h44v3a22 22 0 0 1-44 0Z" fill="#D5F367"/>
<ellipse cx="25" cy="35" rx="2.5" ry="4" fill="#182436"/>
<ellipse cx="39" cy="35" rx="2.5" ry="4" fill="#182436"/>
</svg>

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 370 B

View File

@ -1,14 +1,7 @@
<svg t="1659811416176" class="icon" viewBox="0 0 1147 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10290" width="64" height="64">
<path d="M472.342857 968.685714c-73.828571 0-130.171429-12-172.114286-36.571428-38.742857-22.742857-84.914286-68.685714-84.914285-158.057143-2.971429-141.942857 109.714286-259.542857 251.657143-262.514286 141.942857-2.971429 259.542857 109.714286 262.514285 251.657143 0.114286 3.657143 0.114286 7.2 0 10.857143 0 89.371429-46.171429 135.2-84.914285 158.057143-41.942857 24.685714-98.285714 36.571429-172.228572 36.571428z" fill="#25467A" p-id="10291"></path>
<path d="M766.742857 968.685714c-73.942857 0-130.171429-12-172.228571-36.571428-38.742857-22.742857-84.914286-68.685714-84.914286-158.057143 2.857143-141.942857 120.228571-254.742857 262.285714-252 137.942857 2.742857 249.142857 113.942857 252 252 0 89.371429-46.171429 135.2-84.914285 158.057143-42.057143 24.685714-98.4 36.571429-172.228572 36.571428z" fill="#25467A" p-id="10292"></path>
<path d="M512 940.571429c-153.257143 0-268.457143-24-352.457143-73.257143-50.971429-29.942857-90.514286-69.714286-117.142857-118.057143C14.285714 698.285714 0 637.028571 0 567.085714c0.114286-282.857143 229.6-512 512.457143-511.885714 205.6 0.114286 391.2 123.2 471.314286 312.571429 26.742857 63.085714 40.342857 130.857143 40.228571 199.314285 0 69.828571-14.285714 131.2-42.4 182.171429-26.742857 48.342857-66.171429 88.114286-117.142857 118.057143C780.571429 916.685714 665.257143 940.571429 512 940.571429z" fill="#25467A" p-id="10293"></path>
<path d="M48 567.085714c0-256.228571 207.771429-464 464-464s464 207.771429 464 464S768.228571 892.571429 512 892.571429 48 823.314286 48 567.085714z" fill="#FFF3E0" p-id="10294"></path>
<path d="M472.342857 943.542857c-69.257143 0-121.371429-10.857143-159.428571-33.142857-48.114286-28.228571-72.457143-74.171429-72.457143-136.342857 0-127.885714 104-232 232-232s232 104 232 232c0 62.171429-24.342857 108.114286-72.571429 136.342857-38.057143 22.4-90.171429 33.142857-159.542857 33.142857z" fill="#25467A" p-id="10295"></path>
<path d="M263.314286 774.057143c0-115.428571 93.485714-209.142857 209.028571-209.142857 115.428571 0 209.142857 93.485714 209.142857 209.028571v0.114286c0 115.428571-93.6 146.628571-209.142857 146.628571s-209.028571-31.085714-209.028571-146.628571z" fill="#FFF3E0" p-id="10296"></path>
<path d="M472.342857 652.8c-73.371429 0-132.8 51.771429-132.8 115.657143 0 18.514286 5.028571 33.142857 13.942857 44.571428-1.714286 10.971429-2.628571 22.057143-2.742857 33.142858 0 32.8 9.942857 38.971429 22.285714 38.971428s22.285714-6.285714 22.285715-38.971428c0-2.057143 0-4.228571-0.114286-6.285715 21.714286 7.085714 48.457143 9.714286 77.142857 9.714286 73.371429 0 132.8-17.257143 132.8-81.142857s-59.428571-115.657143-132.8-115.657143z" fill="#388E3C" p-id="10297"></path>
<path d="M766.742857 943.542857c-69.257143 0-121.371429-10.857143-159.428571-33.142857-48.114286-28.228571-72.571429-74.171429-72.571429-136.342857 0-127.885714 104.114286-232 232-232s232 104 232 232c0 62.171429-24.342857 108.114286-72.571428 136.342857-38.057143 22.4-90.171429 33.142857-159.428572 33.142857z" fill="#25467A" p-id="10298"></path>
<path d="M557.6 774.057143c0-115.428571 93.6-209.142857 209.142857-209.142857s209.142857 93.6 209.142857 209.142857c0 115.428571-93.6 146.628571-209.142857 146.628571s-209.142857-31.085714-209.142857-146.628571z" fill="#FFF3E0" p-id="10299"></path>
<path d="M766.742857 652.8c-73.371429 0-132.8 51.771429-132.8 115.657143 0 18.514286 5.028571 33.142857 13.942857 44.571428-1.714286 10.971429-2.628571 22.057143-2.742857 33.142858 0 32.8 9.942857 38.971429 22.285714 38.971428s22.285714-6.285714 22.285715-38.971428c0-2.057143 0-4.228571-0.114286-6.285715 21.714286 7.085714 48.342857 9.714286 77.142857 9.714286 73.371429 0 132.8-17.257143 132.8-81.142857S840 652.8 766.742857 652.8z" fill="#FBC02D" p-id="10300"></path>
<path d="M401.6 486.857143c-38.171429 0-69.142857-30.971429-69.142857-69.257143 0-7.657143 6.171429-13.828571 13.828571-13.828571 7.314286 0 13.485714 5.714286 13.828572 13.028571v0.8c-0.342857 22.971429 17.942857 41.828571 40.8 42.171429s41.828571-17.942857 42.171428-40.8v-1.371429c-0.228571-7.657143 5.828571-14.057143 13.371429-14.285714s14.057143 5.828571 14.285714 13.371428v0.8c0.114286 38.4-30.857143 69.371429-69.142857 69.371429zM221.714286 306.971429c-0.342857 22.971429 17.942857 41.828571 40.8 42.171428s41.828571-17.942857 42.171428-40.8v-1.371428c0.342857-22.971429-17.942857-41.828571-40.8-42.171429-22.971429-0.342857-41.828571 17.942857-42.171428 40.8v1.371429zM498.514286 306.971429c-0.342857 22.971429 17.828571 41.828571 40.8 42.285714 22.971429 0.342857 41.828571-17.828571 42.285714-40.8v-1.485714c0.342857-22.971429-17.942857-41.828571-40.8-42.171429-22.971429-0.342857-41.828571 17.942857-42.171429 40.8-0.114286 0.457143-0.114286 0.914286-0.114285 1.371429z" fill="#25467A" p-id="10301"></path>
<path d="M207.885714 376.228571h-55.314285c-15.314286-0.342857-27.885714 11.771429-28.228572 27.085715-0.342857 15.314286 11.771429 27.885714 27.085714 28.228571H208c15.314286 0.342857 27.885714-11.771429 28.228571-27.085714 0.342857-15.314286-11.771429-27.885714-27.085714-28.228572h-1.257143z m442.857143 0H595.428571c-15.314286 0-27.657143 12.342857-27.657142 27.657143s12.342857 27.657143 27.657142 27.657143h55.314286c15.314286 0.342857 27.885714-11.771429 28.228572-27.085714 0.342857-15.314286-11.771429-27.885714-27.085715-28.228572h-1.142857z" fill="#F8BBD0" p-id="10302"></path>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<rect width="64" height="64" rx="16" fill="#182436"/>
<path d="M31 21c1-6 6-10 13-10-1 6-6 10-13 10Z" fill="#D5F367"/>
<path d="M10 26h44v3a22 22 0 0 1-44 0Z" fill="#D5F367"/>
<ellipse cx="25" cy="35" rx="2.5" ry="4" fill="#182436"/>
<ellipse cx="39" cy="35" rx="2.5" ry="4" fill="#182436"/>
</svg>

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 370 B

View File

@ -1,14 +1,25 @@
{
"Register": "Register",
"Signing": "Signing",
"QRCodeSigning": "QRCode Signing",
"Signing": "Sign in",
"QRCodeSigning": "QR code",
"NamePlaceholder": "please enter user name",
"PasswordPlaceholder": "please enter password",
"Login": "Login",
"Login": "Sign in",
"Name": "User Name",
"Password": "User Password",
"RayTemplate": "Build your next admin dashboard",
"TemplateDescription": "Open-source Vue 3 admin dashboard template with TypeScript and Naive UI.",
"OtherSignInOptions": "Other sign-in options",
"Resources": "Resources"
"OtherSignInOptions": "More sign-in examples",
"Resources": "Resources",
"Language": "Change language",
"Stack": "Technology stack",
"Access": "WORKSPACE ACCESS",
"Welcome": "Welcome to Ray Template",
"AccessDescription": "Explore the workspace and component demos using the demo account.",
"UseDemo": "Continue with demo account",
"SignInError": "Sign-in failed. Please try again.",
"RegisterHint": "This registration example is ready to connect to your account service.",
"Provider": "Sign in with {provider}",
"ProviderHint": "The {provider} sign-in option is a demo.",
"QRHint": "Scan to open the Ray Template source code."
}

View File

@ -1,14 +1,25 @@
{
"Register": "注册",
"Signing": "登录",
"QRCodeSigning": "扫码登陆",
"QRCodeSigning": "二维码",
"NamePlaceholder": "请输入用户名",
"PasswordPlaceholder": "请输入密码",
"Login": "登 陆",
"Login": "登录",
"Name": "用户名",
"Password": "密码",
"RayTemplate": "构建你的中后台管理系统",
"TemplateDescription": "基于 Vue 3、TypeScript 和 Naive UI 的开源中后台管理模板。",
"OtherSignInOptions": "其他登录方式",
"Resources": "项目资源"
"OtherSignInOptions": "其他登录方式示例",
"Resources": "项目资源",
"Language": "切换语言",
"Stack": "技术栈",
"Access": "工作台入口",
"Welcome": "欢迎使用 Ray Template",
"AccessDescription": "使用演示账号探索工作台与组件示例。",
"UseDemo": "使用演示账号进入",
"SignInError": "登录失败,请重试。",
"RegisterHint": "此页面是注册流程的接入示例,可连接项目的账号服务。",
"Provider": "通过 {provider} 登录",
"ProviderHint": "{provider} 登录是演示入口。",
"QRHint": "扫码访问 Ray Template 源码。"
}

View File

@ -1,5 +1,9 @@
.qrcode-signing {
width: 100%;
height: 240px;
@include flexCenter;
display: grid;
justify-items: center;
gap: 12px;
margin: 0;
padding-block: 8px;
color: var(--r-text-secondary);
text-align: center;
}

View File

@ -2,24 +2,18 @@ import './index.scss'
import LOGO from '@/assets/images/ray.svg'
import { Vue3NextQrcode } from 'vue3-next-qrcode'
const QRCodeSigning = defineComponent({
export default defineComponent({
name: 'QRCodeSigning',
setup() {
const qrcodeState = reactive({
qrcodeValue: 'https://github.com/XiaoDaiGua-Ray/xiaodaigua-ray.github.io',
})
return {
...toRefs(qrcodeState),
}
},
render() {
return (
<div class="qrcode-signing">
<Vue3NextQrcode text="ray template yes" size={200} logoImage={LOGO} />
</div>
<figure class="qrcode-signing">
<Vue3NextQrcode
text="https://github.com/XiaoDaiGua-Ray/ray-template"
size={160}
logoImage={LOGO}
/>
<figcaption>{this.$t('views.login.index.QRHint')}</figcaption>
</figure>
)
},
})
export default QRCodeSigning

View File

@ -1,12 +1,12 @@
import { NResult } from 'naive-ui'
import { NAlert } from 'naive-ui'
const Register = defineComponent({
export default defineComponent({
name: 'RRegister',
render() {
return (
<NResult status="info" title="提示" description="我实在是不想写了..." />
<NAlert type="info" title={this.$t('views.login.index.Register')}>
{this.$t('views.login.index.RegisterHint')}
</NAlert>
)
},
})
export default Register

View File

@ -1,5 +0,0 @@
.r-template--light {
& .sso-signing {
color: #878787;
}
}

View File

@ -1,65 +1,43 @@
import type { IconName } from '@/icons'
import './index.scss'
import { RIcon } from '@/components'
import { NFlex, NPopover } from 'naive-ui'
import type { IconName } from '@/icons'
import { NButton, NFlex, NTooltip } from 'naive-ui'
interface SSOSigningOptions {
icon: IconName
key: string
tooltipLabel: string
}
const providers = [
['GitHub', 'logo/github'],
['Google', 'logo/google'],
['Twitter', 'logo/twitter'],
] as const satisfies ReadonlyArray<readonly [string, IconName]>
const SSOSigning = defineComponent({
export default defineComponent({
name: 'SSOSigning',
setup() {
const ssoSigningOptions: SSOSigningOptions[] = [
{
icon: 'logo/github',
key: 'github',
tooltipLabel: 'Github登陆',
},
{
icon: 'logo/google',
key: 'google',
tooltipLabel: 'Google登陆',
},
{
icon: 'logo/twitter',
key: 'twitter',
tooltipLabel: 'Twitter登陆',
},
]
const handleSSOSigningClick = (option: SSOSigningOptions) => {
window.$message.info(`调用${option.tooltipLabel}`)
}
return {
ssoSigningOptions,
handleSSOSigningClick,
}
},
render() {
const { $t } = this
return (
<NFlex class="sso-signing" align="center">
{this.ssoSigningOptions.map((curr) => (
<NPopover key={curr.key}>
<NFlex align="center" size="small">
{providers.map(([provider, icon]) => (
<NTooltip key={provider}>
{{
trigger: () => (
<RIcon
name={curr.icon}
size="24"
cursor="pointer"
onClick={this.handleSSOSigningClick.bind(this, curr)}
/>
<NButton
circle
secondary
size="small"
aria-label={$t('views.login.index.Provider', { provider })}
onClick={() =>
window.$message.info(
$t('views.login.index.ProviderHint', { provider }),
)
}
>
<RIcon name={icon} size={16} />
</NButton>
),
default: () => curr.tooltipLabel,
default: () => $t('views.login.index.Provider', { provider }),
}}
</NPopover>
</NTooltip>
))}
</NFlex>
)
},
})
export default SSOSigning

View File

@ -1,104 +1,125 @@
import { APP_CATCH_KEY } from '@/app-config'
import { RForm, useForm } from '@/components'
import { useAppRoot, useI18n } from '@/hooks'
import { resolveLandingPath } from '@/router/utils/resolve-landing-path'
import { useSigningActions } from '@/store'
import { setStorage } from '@/utils'
import { NButton, NForm, NFormItem, NInput } from 'naive-ui'
import type { FormInst } from 'naive-ui'
import { NButton, NFlex, NFormItem, NInput } from 'naive-ui'
export default defineComponent({
name: 'RSigning',
setup() {
const [register, { validate }] = useForm()
const { t } = useI18n()
const { t } = useI18n('views.login.index')
const { signing } = useSigningActions()
const { getRootPath } = useAppRoot()
const loading = ref(false)
const useSigningForm = () => ({
name: 'Ray Admin',
pwd: '123456',
})
const router = useRouter()
const signingForm = ref(useSigningForm())
const loading = ref(false)
const signingForm = reactive({ name: '', pwd: '' })
const nameId = useId()
const passwordId = useId()
const rules = {
const rules = computed(() => ({
name: {
required: true,
message: t('views.login.index.NamePlaceholder'),
message: t('NamePlaceholder'),
trigger: ['blur', 'input'],
},
pwd: {
required: true,
message: t('views.login.index.PasswordPlaceholder'),
message: t('PasswordPlaceholder'),
trigger: ['blur', 'input'],
},
}))
const handleLogin = async (event?: Event) => {
event?.preventDefault()
if (loading.value) return
try {
await validate()
} catch {
return
}
loading.value = true
try {
const res = await signing(signingForm)
if (res.code !== 0) throw new Error(res.message)
setStorage(APP_CATCH_KEY.token, 'tokenValue', 'localStorage')
setStorage(APP_CATCH_KEY.signing, res.data, 'localStorage')
await router.push(resolveLandingPath(router, getRootPath.value))
} catch {
window.$message.error(t('SignInError'))
} finally {
loading.value = false
}
}
/** 普通登陆形式 */
const handleLogin = () => {
validate().then(() => {
loading.value = true
signing(signingForm.value)
.then((res) => {
if (res.code === 0) {
setTimeout(() => {
window.$message.success(`欢迎${signingForm.value.name}登陆~`)
setStorage(APP_CATCH_KEY.token, 'tokenValue', 'localStorage')
setStorage(APP_CATCH_KEY.signing, res.data, 'localStorage')
router.push(getRootPath.value)
loading.value = false
}, 2 * 1000)
}
})
.catch(() => {
window.$message.error('不可以这样哟, 不可以哟')
})
})
}
return {
signingForm,
register,
handleLogin,
rules,
loading,
}
},
render() {
const { $t, loading, register } = this
return (
<RForm model={this.signingForm} onRegister={register} rules={this.rules}>
<NFormItem label={$t('views.login.index.Name')} path="name">
return () => (
<RForm
model={signingForm}
onRegister={register}
rules={rules.value}
onSubmit={handleLogin}
>
<NFormItem label={t('Name')} labelProps={{ for: nameId }} path="name">
<NInput
v-model:value={this.signingForm.name}
placeholder={$t('views.login.index.NamePlaceholder')}
v-model:value={signingForm.name}
inputProps={{
id: nameId,
name: 'ray-demo-user',
autocomplete: 'off',
enterkeyhint: 'next',
}}
placeholder={t('NamePlaceholder')}
/>
</NFormItem>
<NFormItem label={$t('views.login.index.Password')} path="pwd">
<NFormItem
label={t('Password')}
labelProps={{ for: passwordId }}
path="pwd"
>
<NInput
v-model:value={this.signingForm.pwd}
v-model:value={signingForm.pwd}
inputProps={{
id: passwordId,
name: 'ray-demo-password',
autocomplete: 'off',
enterkeyhint: 'go',
}}
type="password"
showPasswordOn="click"
placeholder={$t('views.login.index.PasswordPlaceholder')}
onKeydown={(e) => e.key === 'Enter' && this.handleLogin()}
placeholder={t('PasswordPlaceholder')}
/>
</NFormItem>
<NButton
style={['width: 100%', 'margin-to: 18px']}
type="primary"
onClick={this.handleLogin.bind(this)}
loading={loading}
>
{$t('views.login.index.Login')}
</NButton>
<NFlex vertical>
<NButton
block
type="primary"
attrType="submit"
loading={loading.value}
>
{t('Login')}
</NButton>
<NButton
block
secondary
attrType="button"
disabled={loading.value}
onClick={() => {
signingForm.name = 'Ray Admin'
signingForm.pwd = '123456'
void handleLogin()
}}
>
{t('UseDemo')}
</NButton>
</NFlex>
</RForm>
)
},

View File

@ -1,147 +1,169 @@
$positionX: 24px;
$positionY: 24px;
.login {
width: 100%;
display: flex;
overflow: hidden;
min-block-size: 100vh;
min-block-size: 100dvh;
box-sizing: border-box;
display: grid;
grid-template-rows: auto 1fr auto;
gap: clamp(20px, 4vw, 52px);
padding: clamp(16px, 4vw, 54px);
background: var(--r-canvas);
color: var(--r-text);
.login-heading {
margin: 0;
line-height: 1;
&__header,
&__grid,
&__footer {
width: min(100%, 1120px);
margin-inline: auto;
min-width: 0;
}
.login-template-description {
margin: 0 0 12px;
font-size: 14px;
&__header,
&__footer,
&__brand,
&__secondary {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
flex-wrap: wrap;
}
& .login-wrapper {
position: relative;
flex: auto;
&__brand {
font-size: 16px;
font-weight: 700;
}
&.login-wrapper--divider {
position: relative;
&__grid {
display: grid;
align-self: center;
grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
border: 1px solid var(--r-line);
border-radius: 20px;
overflow: clip;
background: var(--r-surface);
box-shadow: var(--r-shadow-soft);
}
&::before {
content: '';
position: absolute;
width: var(--login-height);
height: 2px;
background:
linear-gradient(
135deg,
transparent,
transparent 75%,
#2080f0,
transparent 80%,
transparent 100%
),
linear-gradient(
45deg,
transparent,
transparent 75%,
#2080f0,
transparent 80%,
transparent 100%
);
background-size: 1em 1em;
background-repeat: repeat-x, repeat-x;
transform: rotate(90deg);
transform-origin: 0;
left: 50%;
}
&__story,
&__panel {
min-width: 0;
padding: clamp(24px, 4vw, 54px);
}
&__story {
display: flex;
flex-direction: column;
justify-content: space-between;
gap: 44px;
color: #f1f7ff;
background:
radial-gradient(ellipse at 95% 88%, #204c7e, transparent 64%), #132743;
.login__eyebrow {
color: #9ce7ff;
}
& .login-title__wrapper {
position: absolute;
left: $positionX;
top: $positionY;
h1 {
max-width: 14ch;
margin: 18px 0;
font-size: clamp(2rem, 1.2rem + 2.2vw, 3.6rem);
line-height: 1.12;
letter-spacing: -0.035em;
text-wrap: balance;
}
& .login-action__wrapper {
position: absolute;
height: 54.4px;
right: $positionX;
top: $positionY;
h1 + p {
max-width: 36ch;
color: #c6d7eb;
line-height: 1.75;
}
}
&__stack {
display: flex;
flex-wrap: wrap;
gap: 8px;
list-style: none;
padding: 0;
margin: 24px 0 0;
li {
border: 1px solid #6983a3;
border-radius: 100px;
padding: 5px 12px;
font-size: 12px;
}
}
&__mark {
align-self: end;
display: grid;
place-items: center;
width: 196px;
aspect-ratio: 1;
border-radius: 50%;
background: repeating-radial-gradient(
circle,
transparent 0 29px,
rgb(156 231 255 / 20%) 30px 31px
);
}
&__eyebrow {
font-size: 11px;
line-height: 1.5;
font-weight: 700;
letter-spacing: 0.12em;
color: var(--r-text-secondary);
}
&__panel-heading {
margin-bottom: 20px;
h2 {
font-size: clamp(1.5rem, 1.1rem + 1vw, 2rem);
margin-block: 8px;
}
& .login-copyright__wrapper {
position: absolute;
width: 100%;
text-align: center;
bottom: $positionY;
font-size: 14px;
h2 + p {
color: var(--r-text-secondary);
line-height: 1.6;
}
}
&__secondary {
margin-top: 20px;
padding-top: 16px;
border-top: 1px solid var(--r-line);
}
&__footer,
&__secondary {
color: var(--r-text-secondary);
font-size: 13px;
}
}
@media (max-width: 760px) {
.login {
&__grid {
grid-template-columns: minmax(0, 1fr);
}
& .login-wrapper__content {
width: 100%;
height: 100%;
&__story h1 {
max-width: 24ch;
}
& .login-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
block-size: 100%;
}
& .login__left-wrapper {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
transition: background-color 0.3s var(--r-bezier);
}
& .login__right-wrapper {
@include flexCenter;
& .login__right-wrapper__content {
width: 50%;
background-color: transparent;
}
}
@media screen and (max-width: 1200px) {
& .login-grid {
grid-template-columns: minmax(0, 1fr);
}
& .login__left-wrapper {
display: none;
}
}
&__mark {
display: none;
}
}
}
.r-template--light {
& .login__left-wrapper {
background-color: rgba(32, 128, 240, 0.22);
}
& .login__right-wrapper {
background-color: #ffffff;
}
}
.r-template--dark {
& .login__left-wrapper {
background-color: #2c354b;
}
& .login__right-wrapper {
background-color: #2a3146;
}
}
@media screen and (min-width: 768px) and (max-width: 992px) {
.login__right-wrapper .login__right-wrapper__content {
width: 55% !important;
}
}
@media screen and (max-width: 768px) {
.login__right-wrapper .login__right-wrapper__content {
width: 100% !important;
@media (forced-colors: active) {
.login__story,
.login__story .login__eyebrow,
.login__story h1 + p {
color: CanvasText;
}
}

View File

@ -4,158 +4,93 @@ import { LOCAL_OPTIONS } from '@/app-config'
import { RIcon } from '@/components'
import ThemeSwitch from '@/layout/components/SiderBar/components/SettingDrawer/components/ThemeSwitch'
import { useSettingActions } from '@/store'
import { useWindowSize } from '@vueuse/core'
import {
NCard,
NDivider,
NDropdown,
NFlex,
NGradientText,
NTabPane,
NTabs,
} from 'naive-ui'
import { NButton, NDropdown, NFlex, NTabPane, NTabs } from 'naive-ui'
import QRCodeSigning from './components/QRCodeSigning'
import Register from './components/Register'
import Signing from './components/Signing'
import SSOSigning from './components/SSOSigning'
const Login = defineComponent({
export default defineComponent({
name: 'RLogin',
setup() {
const {
layout: { copyright },
} = __APP_CFG__
const state = reactive({
tabsValue: 'signing',
})
const { height: windowHeight, width: windowWidth } = useWindowSize()
const { updateLocale } = useSettingActions()
const tabsValue = ref('signing')
return {
...toRefs(state),
windowHeight,
updateLocale,
copyright,
windowWidth,
}
return { updateLocale, tabsValue, copyright: __APP_CFG__.layout.copyright }
},
render() {
const { $t } = this
const copy = (key: string) => $t(`views.login.index.${key}`)
return (
<main
class={['login']}
style={[
`height: ${this.windowHeight}px`,
`--login-height: ${this.windowHeight}px`,
]}
>
<div
class={[
'login-wrapper',
this.windowWidth >= 1440 ? 'login-wrapper--divider' : '',
]}
>
<div class={['login-wrapper__content']}>
<NFlex align="center" class="login-title__wrapper">
<RIcon name="logo/ray" size="48" />
<h1 class="login-heading">
<NGradientText class="login-title" type="info" size={28}>
Ray Template
</NGradientText>
</h1>
</NFlex>
<NFlex align="center" class="login-action__wrapper">
<ThemeSwitch />
<NDropdown
options={LOCAL_OPTIONS}
onSelect={(key) => this.updateLocale(key)}
trigger="click"
>
<RIcon
customClassName="login-icon"
name="system/language"
size="18"
cursor="pointer"
/>
</NDropdown>
</NFlex>
<div class="login-grid">
<div class="login__left-wrapper">
<NFlex align="center" vertical>
<RIcon
name="illustration/login_bg"
width="368"
height="368"
/>
<NGradientText class="login-title" type="info" size={36}>
{$t('views.login.index.RayTemplate')}
</NGradientText>
</NFlex>
</div>
<div class="login__right-wrapper">
<NCard
class="login__right-wrapper__content"
embedded
bordered={false}
>
<p class="login-template-description">
{$t('views.login.index.TemplateDescription')}
</p>
<NTabs
v-model:value={this.tabsValue}
type="line"
animated
size="large"
>
{{
default: () => (
<>
<NTabPane
tab={$t('views.login.index.Signing')}
name="signing"
>
<Signing />
</NTabPane>
<NTabPane
tab={$t('views.login.index.Register')}
name="register"
>
<Register />
</NTabPane>
<NTabPane
tab={$t('views.login.index.QRCodeSigning')}
name="qrcodeSigning"
>
<QRCodeSigning />
</NTabPane>
</>
),
}}
</NTabs>
<NDivider>
{$t('views.login.index.OtherSignInOptions')}
</NDivider>
<SSOSigning />
<NDivider>{$t('views.login.index.Resources')}</NDivider>
<AppShareLink />
</NCard>
</div>
</div>
<NFlex
align="center"
justify="center"
class="login-copyright__wrapper"
>
{this.copyright}
</NFlex>
<main class="login">
<header class="login__header">
<div class="login__brand">
<RIcon name="logo/ray" size={36} />
<span>Ray Template</span>
</div>
<NFlex align="center">
<ThemeSwitch />
<NDropdown
options={LOCAL_OPTIONS}
onSelect={this.updateLocale}
trigger="click"
>
<NButton quaternary circle aria-label={copy('Language')}>
<RIcon name="system/language" size={18} />
</NButton>
</NDropdown>
</NFlex>
</header>
<div class="login__grid">
<section class="login__story" aria-labelledby="login-intro">
<div class="login__story-copy">
<p class="login__eyebrow">RAY TEMPLATE / WORKSPACE</p>
<h1 id="login-intro">{copy('RayTemplate')}</h1>
<p>{copy('TemplateDescription')}</p>
<ul class="login__stack" aria-label={copy('Stack')}>
<li>Vue 3</li>
<li>TypeScript</li>
<li>Naive UI</li>
</ul>
</div>
<div class="login__mark" aria-hidden="true">
<RIcon name="logo/ray" size={128} />
</div>
</section>
<section class="login__panel" aria-labelledby="login-panel-heading">
<div class="login__panel-heading">
<p class="login__eyebrow">{copy('Access')}</p>
<h2 id="login-panel-heading">{copy('Welcome')}</h2>
<p>{copy('AccessDescription')}</p>
</div>
<NTabs v-model:value={this.tabsValue} type="line" size="medium">
<NTabPane tab={copy('Signing')} name="signing">
<Signing />
</NTabPane>
<NTabPane tab={copy('Register')} name="register">
<Register />
</NTabPane>
<NTabPane tab={copy('QRCodeSigning')} name="qrcodeSigning">
<QRCodeSigning />
</NTabPane>
</NTabs>
<div class="login__secondary">
<span>{copy('OtherSignInOptions')}</span>
<SSOSigning />
</div>
</section>
</div>
<footer class="login__footer">
<span>{this.copyright}</span>
<div aria-label={copy('Resources')}>
<AppShareLink />
</div>
</footer>
</main>
)
},
})
export default Login