0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-06 20:40:08 -05:00

feat(console): configure M2M app access (#1999)

* feat(console): configure M2M app access

* refactor(console): limit admin access switch to M2M

* refactor(console): update app icons
This commit is contained in:
Gao Sun 2022-09-26 11:46:06 +08:00 committed by GitHub
parent 2d99378778
commit a75f8fe959
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 176 additions and 90 deletions

View file

@ -0,0 +1,36 @@
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="40" height="40" rx="8" fill="#3A3B59"/>
<path d="M17 6C17 4.89543 17.8954 4 19 4H33C34.1046 4 35 4.89543 35 6V16C35 17.1046 34.1046 18 33 18H19C17.8954 18 17 17.1046 17 16V6Z" fill="url(#paint0_linear_1091_20373)"/>
<rect x="17" y="8" width="18" height="1" fill="#D361E7"/>
<rect x="27" y="6" width="6" height="1" rx="0.5" fill="#B545CA"/>
<rect x="19" y="6" width="1" height="1" rx="0.5" fill="#F4E560"/>
<rect x="27" y="11" width="6" height="1" rx="0.5" fill="#B545CA"/>
<rect x="19" y="11" width="1" height="1" rx="0.5" fill="#7958FF"/>
<rect x="21" y="11" width="1" height="1" rx="0.5" fill="#F4E560"/>
<rect x="27" y="16" width="6" height="1" rx="0.5" fill="#B545CA"/>
<rect x="19" y="16" width="1" height="1" rx="0.5" fill="#F4E560"/>
<rect x="21" y="16" width="1" height="1" rx="0.5" fill="#F4E560"/>
<rect x="17" y="13" width="18" height="1" fill="#D361E7"/>
<path d="M5 24C5 22.8954 5.89543 22 7 22H21C22.1046 22 23 22.8954 23 24V34C23 35.1046 22.1046 36 21 36H7C5.89543 36 5 35.1046 5 34V24Z" fill="url(#paint1_linear_1091_20373)"/>
<rect x="5" y="26" width="18" height="1" fill="#947DFF"/>
<rect x="15" y="24" width="6" height="1" rx="0.5" fill="#7958FF"/>
<rect x="7" y="24" width="1" height="1" rx="0.5" fill="#FFEAFE"/>
<rect x="15" y="29" width="6" height="1" rx="0.5" fill="#7958FF"/>
<rect x="7" y="29" width="1" height="1" rx="0.5" fill="#FFEAFE"/>
<rect x="9" y="29" width="1" height="1" rx="0.5" fill="#FFEAFE"/>
<rect x="15" y="34" width="6" height="1" rx="0.5" fill="#7958FF"/>
<rect x="7" y="34" width="1" height="1" rx="0.5" fill="#FFEAFE"/>
<rect x="9" y="34" width="1" height="1" rx="0.5" fill="#FFEAFE"/>
<rect x="5" y="31" width="18" height="1" fill="#947DFF"/>
<path opacity="0.4" d="M20 27C24.4183 27 28 23.4183 28 19M12 20C12 15.5817 15.5817 12 20 12" stroke="#C9C5D0" stroke-width="2"/>
<defs>
<linearGradient id="paint0_linear_1091_20373" x1="12.5" y1="13.3333" x2="36.4143" y2="9.97917" gradientUnits="userSpaceOnUse">
<stop stop-color="#E4A3FB"/>
<stop offset="1" stop-color="#EC78FF"/>
</linearGradient>
<linearGradient id="paint1_linear_1091_20373" x1="3.52143" y1="30.0208" x2="21.3627" y2="21.5511" gradientUnits="userSpaceOnUse">
<stop stop-color="#492EF3"/>
<stop offset="1" stop-color="#CF69FF"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View file

@ -0,0 +1,38 @@
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="40" height="40" rx="8" fill="#F3EFFA"/>
<path d="M17 6C17 4.89543 17.8954 4 19 4H33C34.1046 4 35 4.89543 35 6V16C35 17.1046 34.1046 18 33 18H19C17.8954 18 17 17.1046 17 16V6Z" fill="url(#paint0_linear_1091_20131)"/>
<rect x="17" y="8" width="18" height="1" fill="#D361E7"/>
<rect x="27" y="6" width="6" height="1" rx="0.5" fill="#B545CA"/>
<rect x="19" y="6" width="1" height="1" rx="0.5" fill="#F4E560"/>
<rect x="27" y="11" width="6" height="1" rx="0.5" fill="#B545CA"/>
<rect x="19" y="11" width="1" height="1" rx="0.5" fill="#7958FF"/>
<rect x="21" y="11" width="1" height="1" rx="0.5" fill="#F4E560"/>
<rect x="27" y="16" width="6" height="1" rx="0.5" fill="#B545CA"/>
<rect x="19" y="16" width="1" height="1" rx="0.5" fill="#F4E560"/>
<rect x="21" y="16" width="1" height="1" rx="0.5" fill="#F4E560"/>
<rect x="17" y="13" width="18" height="1" fill="#D361E7"/>
<path d="M5 24C5 22.8954 5.89543 22 7 22H21C22.1046 22 23 22.8954 23 24V34C23 35.1046 22.1046 36 21 36H7C5.89543 36 5 35.1046 5 34V24Z" fill="url(#paint1_linear_1091_20131)"/>
<rect x="5" y="26" width="18" height="1" fill="#947DFF"/>
<rect x="15" y="24" width="6" height="1" rx="0.5" fill="#7958FF"/>
<rect x="7" y="24" width="1" height="1" rx="0.5" fill="#FFEAFE"/>
<rect x="15" y="29" width="6" height="1" rx="0.5" fill="#7958FF"/>
<rect x="7" y="29" width="1" height="1" rx="0.5" fill="#FFEAFE"/>
<rect x="9" y="29" width="1" height="1" rx="0.5" fill="#FFEAFE"/>
<rect x="15" y="34" width="6" height="1" rx="0.5" fill="#7958FF"/>
<rect x="7" y="34" width="1" height="1" rx="0.5" fill="#FFEAFE"/>
<rect x="9" y="34" width="1" height="1" rx="0.5" fill="#FFEAFE"/>
<rect x="5" y="31" width="18" height="1" fill="#947DFF"/>
<g style="mix-blend-mode:multiply">
<path d="M20 27C24.4183 27 28 23.4183 28 19M12 20C12 15.5817 15.5817 12 20 12" stroke="#C9C5D0" stroke-width="2"/>
</g>
<defs>
<linearGradient id="paint0_linear_1091_20131" x1="12.5" y1="13.3333" x2="36.4143" y2="9.97917" gradientUnits="userSpaceOnUse">
<stop stop-color="#E4A3FB"/>
<stop offset="1" stop-color="#EC78FF"/>
</linearGradient>
<linearGradient id="paint1_linear_1091_20131" x1="3.52143" y1="30.0208" x2="21.3627" y2="21.5511" gradientUnits="userSpaceOnUse">
<stop stop-color="#492EF3"/>
<stop offset="1" stop-color="#CF69FF"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View file

@ -1,14 +1,14 @@
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="40" height="40" rx="8" fill="#3A3B59"/>
<rect x="12" y="5" width="16" height="30" rx="4" fill="url(#paint0_linear_270_11564)"/>
<g style="mix-blend-mode:overlay">
<circle cx="10" cy="26" r="6" fill="#E09AEA"/>
</g>
<rect x="12" y="5" width="16" height="30" rx="4" fill="url(#paint0_linear_1091_20297)"/>
<circle cx="20" cy="31" r="1.5" stroke="#D3BCF3"/>
<path d="M16 5H24V7C24 7.55228 23.5523 8 23 8H17C16.4477 8 16 7.55228 16 7V5Z" fill="#5938A3"/>
<path d="M28.3509 4C28.6075 3.55555 29.249 3.55556 29.5056 4L35.2791 14C35.5357 14.4444 35.2149 15 34.7017 15H23.1547C22.6415 15 22.3208 14.4444 22.5774 14L28.3509 4Z" fill="#EEE591"/>
<path opacity="0.6" d="M28.3509 4C28.6075 3.55555 29.249 3.55556 29.5056 4L35.2791 14C35.5357 14.4444 35.2149 15 34.7017 15H23.1547C22.6415 15 22.3208 14.4444 22.5774 14L28.3509 4Z" fill="#F4E560"/>
<g style="mix-blend-mode:multiply">
<circle cx="10" cy="26" r="6" fill="#F07EFF"/>
</g>
<defs>
<linearGradient id="paint0_linear_270_11564" x1="10.6857" y1="22.1875" x2="29.3932" y2="18.5036" gradientUnits="userSpaceOnUse">
<linearGradient id="paint0_linear_1091_20297" x1="10.6857" y1="22.1875" x2="29.3932" y2="18.5036" gradientUnits="userSpaceOnUse">
<stop stop-color="#614DDD"/>
<stop offset="1" stop-color="#D47AFE"/>
</linearGradient>

Before

Width:  |  Height:  |  Size: 894 B

After

Width:  |  Height:  |  Size: 911 B

View file

@ -1,14 +1,14 @@
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 8C0 3.58172 3.58172 0 8 0H32C36.4183 0 40 3.58172 40 8V32C40 36.4183 36.4183 40 32 40H8C3.58172 40 0 36.4183 0 32V8Z" fill="#F3EFFA"/>
<rect x="12" y="5" width="16" height="30" rx="4" fill="url(#paint0_linear_1436_37873)"/>
<rect width="40" height="40" rx="8" fill="#F3EFFA"/>
<rect x="12" y="5" width="16" height="30" rx="4" fill="url(#paint0_linear_1091_20216)"/>
<circle cx="20" cy="31" r="1.5" stroke="#F5EEFF"/>
<path d="M16 5H24V7C24 7.55228 23.5523 8 23 8H17C16.4477 8 16 7.55228 16 7V5Z" fill="#4300DA"/>
<path d="M28.3509 4C28.6075 3.55555 29.249 3.55556 29.5056 4L35.2791 14C35.5357 14.4444 35.2149 15 34.7017 15H23.1547C22.6415 15 22.3208 14.4444 22.5774 14L28.3509 4Z" fill="#F4E560"/>
<path opacity="0.8" d="M28.3509 3C28.6075 2.55555 29.249 2.55556 29.5056 3L35.2791 13C35.5357 13.4444 35.2149 14 34.7017 14H23.1547C22.6415 14 22.3208 13.4444 22.5774 13L28.3509 3Z" fill="#F4E560"/>
<g style="mix-blend-mode:multiply">
<circle cx="10" cy="26" r="6" fill="#F07EFF"/>
</g>
<defs>
<linearGradient id="paint0_linear_1436_37873" x1="10.6857" y1="22.1875" x2="29.3932" y2="18.5036" gradientUnits="userSpaceOnUse">
<linearGradient id="paint0_linear_1091_20216" x1="10.6857" y1="22.1875" x2="29.3932" y2="18.5036" gradientUnits="userSpaceOnUse">
<stop stop-color="#492EF3"/>
<stop offset="1" stop-color="#CF69FF"/>
</linearGradient>

Before

Width:  |  Height:  |  Size: 991 B

After

Width:  |  Height:  |  Size: 911 B

View file

@ -4,21 +4,21 @@
<path d="M26.75 8.96892C28.6105 10.0431 30.0553 11.3812 30.8959 12.6544C31.755 13.9556 31.9017 15.0458 31.4952 15.75C31.0886 16.4542 30.0711 16.8722 28.5147 16.7788C26.9917 16.6874 25.1105 16.1053 23.25 15.0311C21.3895 13.9569 19.9447 12.6188 19.104 11.3456C18.245 10.0444 18.0982 8.95422 18.5048 8.25001C18.9114 7.5458 19.9289 7.12778 21.4853 7.22119C23.0082 7.31261 24.8895 7.89475 26.75 8.96892Z" stroke="#9D85FD" stroke-miterlimit="16" stroke-linecap="round"/>
<path d="M23.25 8.96892C21.3895 10.0431 19.9447 11.3812 19.1041 12.6544C18.245 13.9556 18.0983 15.0458 18.5048 15.75C18.9114 16.4542 19.9289 16.8722 21.4853 16.7788C23.0083 16.6874 24.8895 16.1053 26.75 15.0311C28.6105 13.9569 30.0553 12.6188 30.896 11.3456C31.755 10.0444 31.9018 8.95422 31.4952 8.25001C31.0886 7.5458 30.0711 7.12778 28.5147 7.22119C26.9918 7.31261 25.1105 7.89475 23.25 8.96892Z" stroke="#9C85FD" stroke-miterlimit="16" stroke-linecap="round"/>
<circle cx="25" cy="12" r="1" fill="#FAABFF"/>
<path d="M4.77773 17.7408L9.68377 16.1054C9.88904 16.037 10.111 16.037 10.3162 16.1054L15.2223 17.7408C15.6745 17.8915 15.9574 18.3405 15.8983 18.8135L15.0732 25.4146C15.028 25.7758 14.7902 26.0839 14.4523 26.2191L10.3714 27.8514C10.133 27.9468 9.86702 27.9468 9.62861 27.8514L5.54772 26.2191C5.20978 26.0839 4.97198 25.7758 4.92683 25.4146L4.10168 18.8135C4.04256 18.3405 4.32551 17.8915 4.77773 17.7408Z" fill="url(#paint0_linear_270_11698)"/>
<path d="M4.77773 17.7408L9.68377 16.1054C9.88904 16.037 10.111 16.037 10.3162 16.1054L15.2223 17.7408C15.6745 17.8915 15.9574 18.3405 15.8983 18.8135L15.0732 25.4146C15.028 25.7758 14.7902 26.0839 14.4523 26.2191L10.3714 27.8514C10.133 27.9468 9.86702 27.9468 9.62861 27.8514L5.54772 26.2191C5.20978 26.0839 4.97198 25.7758 4.92683 25.4146L4.10168 18.8135C4.04256 18.3405 4.32551 17.8915 4.77773 17.7408Z" fill="url(#paint0_linear_1091_20314)"/>
<path d="M11.5817 25H13L10.782 19H9.21355L7 25H8.36966L8.85567 23.5447H11.0957L11.5817 25ZM9.96024 20.1476H9.99116L10.8085 22.605H9.14286L9.96024 20.1476Z" fill="#F5EEFF"/>
<path d="M18.4952 22.7704L26.5794 35.3457C26.7762 35.6519 27.2238 35.6519 27.4206 35.3457L35.5048 22.7704C35.7187 22.4376 35.4797 22 35.0842 22H29.2676C29.1004 22 28.9443 22.0836 28.8516 22.2226L27 25L25.1484 22.2226C25.0557 22.0836 24.8996 22 24.7324 22H18.9158C18.5202 22 18.2813 22.4376 18.4952 22.7704Z" fill="url(#paint1_linear_270_11698)"/>
<mask id="mask0_270_11698" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="18" y="22" width="18" height="14">
<path d="M18.4952 22.7704L26.5794 35.3457C26.7762 35.6519 27.2238 35.6519 27.4206 35.3457L35.5048 22.7704C35.7187 22.4376 35.4797 22 35.0842 22H29.2676C29.1004 22 28.9443 22.0836 28.8516 22.2226L27 25L25.1484 22.2226C25.0557 22.0836 24.8996 22 24.7324 22H18.9158C18.5202 22 18.2813 22.4376 18.4952 22.7704Z" fill="url(#paint1_linear_1091_20314)"/>
<mask id="mask0_1091_20314" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="18" y="22" width="18" height="14">
<path opacity="0.7" d="M18.4952 22.7704L26.5794 35.3457C26.7762 35.6519 27.2238 35.6519 27.4206 35.3457L35.5048 22.7704C35.7187 22.4376 35.4797 22 35.0842 22H29.2676C29.1004 22 28.9443 22.0836 28.8516 22.2226L27 25L25.1484 22.2226C25.0557 22.0836 24.8996 22 24.7324 22H18.9158C18.5202 22 18.2813 22.4376 18.4952 22.7704Z" fill="#7958FF"/>
</mask>
<g mask="url(#mask0_270_11698)">
<g mask="url(#mask0_1091_20314)">
<path d="M22 22L26.576 29.3216C26.7718 29.6349 27.2282 29.6349 27.424 29.3216L32 22H22Z" fill="#4300DA"/>
</g>
<defs>
<linearGradient id="paint0_linear_270_11698" x1="1" y1="24" x2="16.9429" y2="21.125" gradientUnits="userSpaceOnUse">
<linearGradient id="paint0_linear_1091_20314" x1="1" y1="24" x2="16.9429" y2="21.125" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFF06A"/>
<stop offset="1" stop-color="#EC78FF"/>
</linearGradient>
<linearGradient id="paint1_linear_270_11698" x1="16.5214" y1="30.0208" x2="34.3627" y2="21.5511" gradientUnits="userSpaceOnUse">
<linearGradient id="paint1_linear_1091_20314" x1="16.5214" y1="30.0208" x2="34.3627" y2="21.5511" gradientUnits="userSpaceOnUse">
<stop stop-color="#492EF3"/>
<stop offset="1" stop-color="#CF69FF"/>
</linearGradient>

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View file

@ -1,24 +1,24 @@
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 8C0 3.58172 3.58172 0 8 0H32C36.4183 0 40 3.58172 40 8V32C40 36.4183 36.4183 40 32 40H8C3.58172 40 0 36.4183 0 32V8Z" fill="#F3EFFA"/>
<rect width="40" height="40" rx="8" fill="#F3EFFA"/>
<path d="M28.5 12C28.5 14.1483 28.0635 16.0686 27.3812 17.4332C26.6839 18.8278 25.8132 19.5 25 19.5C24.1868 19.5 23.3161 18.8278 22.6188 17.4332C21.9365 16.0686 21.5 14.1483 21.5 12C21.5 9.85165 21.9365 7.93141 22.6188 6.56675C23.3161 5.17219 24.1868 4.5 25 4.5C25.8132 4.5 26.6839 5.17219 27.3812 6.56675C28.0635 7.93141 28.5 9.85165 28.5 12Z" stroke="#7958FF" stroke-miterlimit="16" stroke-linecap="round"/>
<path d="M26.7505 8.96892C28.611 10.0431 30.0557 11.3812 30.8964 12.6544C31.7555 13.9556 31.9022 15.0458 31.4957 15.75C31.0891 16.4542 30.0716 16.8722 28.5152 16.7788C26.9922 16.6874 25.111 16.1053 23.2505 15.0311C21.3899 13.9569 19.9452 12.6188 19.1045 11.3456C18.2454 10.0444 18.0987 8.95422 18.5053 8.25001C18.9119 7.5458 19.9294 7.12778 21.4857 7.22119C23.0087 7.31261 24.8899 7.89475 26.7505 8.96892Z" stroke="#7958FF" stroke-miterlimit="16" stroke-linecap="round"/>
<path d="M23.2515 8.96892C21.391 10.0431 19.9462 11.3812 19.1055 12.6544C18.2465 13.9556 18.0997 15.0458 18.5063 15.75C18.9129 16.4542 19.9304 16.8722 21.4868 16.7788C23.0098 16.6874 24.891 16.1053 26.7515 15.0311C28.612 13.9569 30.0568 12.6188 30.8974 11.3456C31.7565 10.0444 31.9033 8.95422 31.4967 8.25001C31.0901 7.5458 30.0726 7.12778 28.5162 7.22119C26.9932 7.31261 25.112 7.89475 23.2515 8.96892Z" stroke="#7958FF" stroke-miterlimit="16" stroke-linecap="round"/>
<path d="M26.75 8.96892C28.6105 10.0431 30.0553 11.3812 30.8959 12.6544C31.755 13.9556 31.9017 15.0458 31.4952 15.75C31.0886 16.4542 30.0711 16.8722 28.5147 16.7788C26.9917 16.6874 25.1105 16.1053 23.25 15.0311C21.3895 13.9569 19.9447 12.6188 19.104 11.3456C18.245 10.0444 18.0982 8.95422 18.5048 8.25001C18.9114 7.5458 19.9289 7.12778 21.4853 7.22119C23.0082 7.31261 24.8895 7.89475 26.75 8.96892Z" stroke="#7958FF" stroke-miterlimit="16" stroke-linecap="round"/>
<path d="M23.25 8.96892C21.3895 10.0431 19.9447 11.3812 19.1041 12.6544C18.245 13.9556 18.0983 15.0458 18.5048 15.75C18.9114 16.4542 19.9289 16.8722 21.4853 16.7788C23.0083 16.6874 24.8895 16.1053 26.75 15.0311C28.6105 13.9569 30.0553 12.6188 30.896 11.3456C31.755 10.0444 31.9018 8.95422 31.4952 8.25001C31.0886 7.5458 30.0711 7.12778 28.5147 7.22119C26.9918 7.31261 25.1105 7.89475 23.25 8.96892Z" stroke="#7958FF" stroke-miterlimit="16" stroke-linecap="round"/>
<circle cx="25" cy="12" r="1" fill="#F07EFF"/>
<path d="M4.77773 17.7408L9.68377 16.1054C9.88904 16.037 10.111 16.037 10.3162 16.1054L15.2223 17.7408C15.6745 17.8915 15.9574 18.3405 15.8983 18.8135L15.0732 25.4146C15.028 25.7758 14.7902 26.0839 14.4523 26.2191L10.3714 27.8514C10.133 27.9468 9.86702 27.9468 9.62861 27.8514L5.54772 26.2191C5.20978 26.0839 4.97198 25.7758 4.92683 25.4146L4.10168 18.8135C4.04256 18.3405 4.32551 17.8915 4.77773 17.7408Z" fill="url(#paint0_linear_1436_37927)"/>
<path d="M4.77773 17.7408L9.68377 16.1054C9.88904 16.037 10.111 16.037 10.3162 16.1054L15.2223 17.7408C15.6745 17.8915 15.9574 18.3405 15.8983 18.8135L15.0732 25.4146C15.028 25.7758 14.7902 26.0839 14.4523 26.2191L10.3714 27.8514C10.133 27.9468 9.86702 27.9468 9.62861 27.8514L5.54772 26.2191C5.20978 26.0839 4.97198 25.7758 4.92683 25.4146L4.10168 18.8135C4.04256 18.3405 4.32551 17.8915 4.77773 17.7408Z" fill="url(#paint0_linear_1091_20233)"/>
<path d="M11.5817 25H13L10.782 19H9.21355L7 25H8.36966L8.85567 23.5447H11.0957L11.5817 25ZM9.96024 20.1476H9.99116L10.8085 22.605H9.14286L9.96024 20.1476Z" fill="#F5EEFF"/>
<path d="M18.4952 22.7704L26.5794 35.3457C26.7762 35.6519 27.2238 35.6519 27.4206 35.3457L35.5048 22.7704C35.7187 22.4376 35.4797 22 35.0842 22H29.2676C29.1004 22 28.9443 22.0836 28.8516 22.2226L27 25L25.1484 22.2226C25.0557 22.0836 24.8996 22 24.7324 22H18.9158C18.5202 22 18.2813 22.4376 18.4952 22.7704Z" fill="url(#paint1_linear_1436_37927)"/>
<mask id="mask0_1436_37927" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="18" y="22" width="18" height="14">
<path d="M18.4952 22.7704L26.5794 35.3457C26.7762 35.6519 27.2238 35.6519 27.4206 35.3457L35.5048 22.7704C35.7187 22.4376 35.4797 22 35.0842 22H29.2676C29.1004 22 28.9443 22.0836 28.8516 22.2226L27 25L25.1484 22.2226C25.0557 22.0836 24.8996 22 24.7324 22H18.9158C18.5202 22 18.2813 22.4376 18.4952 22.7704Z" fill="url(#paint1_linear_1091_20233)"/>
<mask id="mask0_1091_20233" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="18" y="22" width="18" height="14">
<path opacity="0.7" d="M18.4952 22.7704L26.5794 35.3457C26.7762 35.6519 27.2238 35.6519 27.4206 35.3457L35.5048 22.7704C35.7187 22.4376 35.4797 22 35.0842 22H29.2676C29.1004 22 28.9443 22.0836 28.8516 22.2226L27 25L25.1484 22.2226C25.0557 22.0836 24.8996 22 24.7324 22H18.9158C18.5202 22 18.2813 22.4376 18.4952 22.7704Z" fill="#7958FF"/>
</mask>
<g mask="url(#mask0_1436_37927)">
<g mask="url(#mask0_1091_20233)">
<path d="M22 22L26.576 29.3216C26.7718 29.6349 27.2282 29.6349 27.424 29.3216L32 22H22Z" fill="#4300DA"/>
</g>
<defs>
<linearGradient id="paint0_linear_1436_37927" x1="1" y1="24" x2="16.9429" y2="21.125" gradientUnits="userSpaceOnUse">
<linearGradient id="paint0_linear_1091_20233" x1="1" y1="24" x2="16.9429" y2="21.125" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFF06A"/>
<stop offset="1" stop-color="#EC78FF"/>
</linearGradient>
<linearGradient id="paint1_linear_1436_37927" x1="16.5214" y1="30.0208" x2="34.3627" y2="21.5511" gradientUnits="userSpaceOnUse">
<linearGradient id="paint1_linear_1091_20233" x1="16.5214" y1="30.0208" x2="34.3627" y2="21.5511" gradientUnits="userSpaceOnUse">
<stop stop-color="#492EF3"/>
<stop offset="1" stop-color="#CF69FF"/>
</linearGradient>

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View file

@ -1,33 +1,17 @@
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="40" height="40" rx="8" fill="#3A3B59"/>
<rect x="17" y="5" width="18" height="14" rx="2" fill="url(#paint0_linear_270_11727)"/>
<rect x="17" y="9" width="18" height="1" fill="#D361E7"/>
<rect x="27" y="7" width="6" height="1" rx="0.5" fill="#B545CA"/>
<rect x="19" y="7" width="1" height="1" rx="0.5" fill="#F4E560"/>
<rect x="21" y="7" width="1" height="1" rx="0.5" fill="#7958FF"/>
<rect x="23" y="7" width="1" height="1" rx="0.5" fill="#F4E560"/>
<rect x="27" y="12" width="6" height="1" rx="0.5" fill="#B545CA"/>
<rect x="19" y="12" width="1" height="1" rx="0.5" fill="#F4E560"/>
<rect x="21" y="12" width="1" height="1" rx="0.5" fill="#F4E560"/>
<rect x="27" y="17" width="6" height="1" rx="0.5" fill="#B545CA"/>
<rect x="19" y="17" width="1" height="1" rx="0.5" fill="#F4E560"/>
<rect x="21" y="17" width="1" height="1" rx="0.5" fill="#F4E560"/>
<rect x="23" y="17" width="1" height="1" rx="0.5" fill="#7958FF"/>
<rect x="17" y="14" width="18" height="1" fill="#D361E7"/>
<rect x="5" y="21" width="18" height="14" rx="2" fill="url(#paint1_linear_270_11727)"/>
<path d="M5 24H23V23C23 21.8954 22.1046 21 21 21H7C5.89543 21 5 21.8954 5 23V24Z" fill="#6B4DD6"/>
<rect x="7" y="26" width="6" height="1" rx="0.5" fill="#D3A4FB"/>
<rect x="7" y="29" width="12" height="1" rx="0.5" fill="#D3A4FB"/>
<path d="M20 28C24.4183 28 28 24.4183 28 20" stroke="#D4CFF3" stroke-width="2"/>
<path d="M12 20C12 15.5817 15.5817 12 20 12" stroke="#D4CFF3" stroke-width="2"/>
<rect opacity="0.8" x="7.5" y="11" width="25" height="19" rx="2" fill="url(#paint0_linear_1091_20258)"/>
<path d="M7.5 15.0715H32.5V13.0001C32.5 11.8955 31.6046 11.0001 30.5 11.0001H9.5C8.39543 11.0001 7.5 11.8955 7.5 13.0001V15.0715Z" fill="#5D34F2"/>
<rect x="10.2773" y="17.7856" width="8.33333" height="1.35714" rx="0.678572" fill="#D3BCF3"/>
<rect x="10.2773" y="21.8571" width="16.6667" height="1.35714" rx="0.678572" fill="#D3BCF3"/>
<path opacity="0.6" d="M29.3509 25C29.6075 24.5556 30.249 24.5556 30.5056 25L36.2791 35C36.5357 35.4444 36.2149 36 35.7017 36H24.1547C23.6415 36 23.3208 35.4444 23.5774 35L29.3509 25Z" fill="#F4E560"/>
<g style="mix-blend-mode:multiply">
<circle cx="10" cy="10" r="6" fill="#F07EFF"/>
</g>
<defs>
<linearGradient id="paint0_linear_270_11727" x1="12.5" y1="14.3333" x2="36.4143" y2="10.9792" gradientUnits="userSpaceOnUse">
<stop stop-color="#E4A3FB"/>
<stop offset="1" stop-color="#EC78FF"/>
</linearGradient>
<linearGradient id="paint1_linear_270_11727" x1="3.52143" y1="29.0208" x2="21.3627" y2="20.5511" gradientUnits="userSpaceOnUse">
<stop stop-color="#6B56EF"/>
<stop offset="1" stop-color="#D57CFF"/>
<linearGradient id="paint0_linear_1091_20258" x1="5.44643" y1="21.8854" x2="30.0122" y2="9.95067" gradientUnits="userSpaceOnUse">
<stop stop-color="#492EF3"/>
<stop offset="1" stop-color="#CF69FF"/>
</linearGradient>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -1,35 +1,15 @@
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 8C0 3.58172 3.58172 0 8 0H32C36.4183 0 40 3.58172 40 8V32C40 36.4183 36.4183 40 32 40H8C3.58172 40 0 36.4183 0 32V8Z" fill="#F3EFFA"/>
<rect x="17" y="5" width="18" height="14" rx="2" fill="url(#paint0_linear_1436_37890)"/>
<rect x="17" y="9" width="18" height="1" fill="#D361E7"/>
<rect x="27" y="7" width="6" height="1" rx="0.5" fill="#B545CA"/>
<rect x="19" y="7" width="1" height="1" rx="0.5" fill="#F4E560"/>
<rect x="21" y="7" width="1" height="1" rx="0.5" fill="#7958FF"/>
<rect x="23" y="7" width="1" height="1" rx="0.5" fill="#F4E560"/>
<rect x="27" y="12" width="6" height="1" rx="0.5" fill="#B545CA"/>
<rect x="19" y="12" width="1" height="1" rx="0.5" fill="#F4E560"/>
<rect x="21" y="12" width="1" height="1" rx="0.5" fill="#F4E560"/>
<rect x="27" y="17" width="6" height="1" rx="0.5" fill="#B545CA"/>
<rect x="19" y="17" width="1" height="1" rx="0.5" fill="#F4E560"/>
<rect x="21" y="17" width="1" height="1" rx="0.5" fill="#F4E560"/>
<rect x="23" y="17" width="1" height="1" rx="0.5" fill="#7958FF"/>
<rect x="17" y="14" width="18" height="1" fill="#D361E7"/>
<rect x="5" y="21" width="18" height="14" rx="2" fill="url(#paint1_linear_1436_37890)"/>
<path d="M5 24H23V23C23 21.8954 22.1046 21 21 21H7C5.89543 21 5 21.8954 5 23V24Z" fill="#5D34F2"/>
<rect x="7" y="26" width="6" height="1" rx="0.5" fill="#CABEFF"/>
<rect x="7" y="29" width="12" height="1" rx="0.5" fill="#CABEFF"/>
<rect width="40" height="40" rx="8" fill="#F3EFFA"/>
<rect opacity="0.8" x="7.5" y="11" width="25" height="19" rx="2" fill="url(#paint0_linear_1091_20177)"/>
<path d="M7.5 15.0715H32.5V13.0001C32.5 11.8955 31.6046 11.0001 30.5 11.0001H9.5C8.39543 11.0001 7.5 11.8955 7.5 13.0001V15.0715Z" fill="#5D34F2"/>
<rect x="10.2773" y="17.7856" width="8.33333" height="1.35714" rx="0.678572" fill="#F5EEFF"/>
<rect x="10.2773" y="21.8571" width="16.6667" height="1.35714" rx="0.678572" fill="#F5EEFF"/>
<path opacity="0.8" d="M29.3509 25C29.6075 24.5556 30.249 24.5556 30.5056 25L36.2791 35C36.5357 35.4444 36.2149 36 35.7017 36H24.1547C23.6415 36 23.3208 35.4444 23.5774 35L29.3509 25Z" fill="#F4E560"/>
<g style="mix-blend-mode:multiply">
<path d="M20 28C24.4183 28 28 24.4183 28 20" stroke="#C4C7C7" stroke-width="2"/>
</g>
<g style="mix-blend-mode:multiply">
<path d="M12 20C12 15.5817 15.5817 12 20 12" stroke="#C4C7C7" stroke-width="2"/>
<circle cx="10" cy="10" r="6" fill="#F07EFF"/>
</g>
<defs>
<linearGradient id="paint0_linear_1436_37890" x1="12.5" y1="14.3333" x2="36.4143" y2="10.9792" gradientUnits="userSpaceOnUse">
<stop stop-color="#E4A3FB"/>
<stop offset="1" stop-color="#EC78FF"/>
</linearGradient>
<linearGradient id="paint1_linear_1436_37890" x1="3.52143" y1="29.0208" x2="21.3627" y2="20.5511" gradientUnits="userSpaceOnUse">
<linearGradient id="paint0_linear_1091_20177" x1="5.44643" y1="21.8854" x2="30.0122" y2="9.95067" gradientUnits="userSpaceOnUse">
<stop stop-color="#492EF3"/>
<stop offset="1" stop-color="#CF69FF"/>
</linearGradient>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -13,12 +13,12 @@
.card {
display: flex;
flex-wrap: wrap;
margin: 0 _.unit(-8) _.unit(-8) 0;
gap: _.unit(3);
> .radio {
position: relative;
flex: 1;
min-width: 180px;
min-width: 170px;
max-width: 230px;
padding: _.unit(5);
display: flex;
@ -28,7 +28,6 @@
outline: 1px solid var(--color-neutral-90);
user-select: none;
cursor: pointer;
margin: 0 _.unit(8) _.unit(8) 0;
&.disabled {
cursor: not-allowed;

View file

@ -1,5 +1,7 @@
import { ApplicationType } from '@logto/schemas';
import MachineToMachineDark from '@/assets/images/machine-to-machine-dark.svg';
import MachineToMachine from '@/assets/images/machine-to-machine.svg';
import NativeAppDark from '@/assets/images/native-app-dark.svg';
import NativeApp from '@/assets/images/native-app.svg';
import SinglePageAppDark from '@/assets/images/single-page-app-dark.svg';
@ -15,12 +17,12 @@ export const lightModeApplicationIconMap: ApplicationIconMap = Object.freeze({
[ApplicationType.Native]: NativeApp,
[ApplicationType.SPA]: SinglePageApp,
[ApplicationType.Traditional]: TraditionalWebApp,
[ApplicationType.MachineToMachine]: TraditionalWebApp,
[ApplicationType.MachineToMachine]: MachineToMachine,
} as const);
export const darkModeApplicationIconMap: ApplicationIconMap = Object.freeze({
[ApplicationType.Native]: NativeAppDark,
[ApplicationType.SPA]: SinglePageAppDark,
[ApplicationType.Traditional]: TraditionalWebAppDark,
[ApplicationType.MachineToMachine]: TraditionalWebAppDark,
[ApplicationType.MachineToMachine]: MachineToMachineDark,
} as const);

View file

@ -1,24 +1,29 @@
import { Application, SnakeCaseOidcConfig } from '@logto/schemas';
import { Application, ApplicationType, SnakeCaseOidcConfig, UserRole } from '@logto/schemas';
import { useEffect } from 'react';
import { useFormContext } from 'react-hook-form';
import { Controller, useFormContext } from 'react-hook-form';
import { useTranslation } from 'react-i18next';
import CopyToClipboard from '@/components/CopyToClipboard';
import FormField from '@/components/FormField';
import Switch from '@/components/Switch';
import UnsavedChangesAlertModal from '@/components/UnsavedChangesAlertModal';
import * as styles from '../index.module.scss';
type Props = {
applicationType: ApplicationType;
oidcConfig: SnakeCaseOidcConfig;
defaultData: Application;
isDeleted: boolean;
};
const AdvancedSettings = ({ oidcConfig, defaultData, isDeleted }: Props) => {
const AdvancedSettings = ({ applicationType, oidcConfig, defaultData, isDeleted }: Props) => {
const {
control,
reset,
formState: { isDirty },
} = useFormContext<Application>();
const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' });
useEffect(() => {
reset(defaultData);
@ -48,6 +53,28 @@ const AdvancedSettings = ({ oidcConfig, defaultData, isDeleted }: Props) => {
variant="border"
/>
</FormField>
{applicationType === ApplicationType.MachineToMachine && (
<FormField title="application_details.enable_admin_access">
<Controller
name="roleNames"
control={control}
defaultValue={[]}
render={({ field: { onChange, value } }) => (
<Switch
label={t('application_details.enable_admin_access_label')}
checked={value.includes(UserRole.Admin)}
onChange={({ currentTarget: { checked } }) => {
if (checked) {
onChange([...new Set(value.concat(UserRole.Admin))]);
} else {
onChange(value.filter((value) => value !== UserRole.Admin));
}
}}
/>
)}
/>
</FormField>
)}
<UnsavedChangesAlertModal hasUnsavedChanges={!isDeleted && isDirty} />
</>
);

View file

@ -204,6 +204,7 @@ const ApplicationDetails = () => {
<div className={styles.fields}>
{isAdvancedSettings && (
<AdvancedSettings
applicationType={data.type}
oidcConfig={oidcConfig}
defaultData={data}
isDeleted={isDeleted}

View file

@ -3,6 +3,7 @@
.title {
font: var(--font-subhead-2);
color: var(--color-text);
padding-right: _.unit(6); /* For check mark */
}
.subtitle,

View file

@ -31,6 +31,9 @@ const application_details = {
refresh_token_expiration: 'Refresh Token expiration',
token_endpoint: 'Token Endpoint',
user_info_endpoint: 'Userinfo endpoint',
enable_admin_access: 'Enable admin access',
enable_admin_access_label:
'Enable or disable the access to Management API. Once enabled, you can use access tokens to call Management API on behalf on this application.',
delete_description:
'This action cannot be undone. It will permanently delete the application. Please enter the application name <span>{{name}}</span> to confirm.',
enter_your_application_name: 'Enter your application name',

View file

@ -30,7 +30,10 @@ const application_details = {
id_token_expiration: "Expiration du jeton d'identification",
refresh_token_expiration: "Rafraîchir l'expiration du jeton",
token_endpoint: 'Token Endpoint',
user_info_endpoint: 'Userinfo endpoint',
user_info_endpoint: 'Userinfo Endpoint',
enable_admin_access: 'Enable admin access', // UNTRANSLATED
enable_admin_access_label:
'Enable or disable the access to Management API. Once enabled, you can use access tokens to call Management API on behalf on this application.', // UNTRANSLATED
delete_description:
"Cette action ne peut être annulée. Elle supprimera définitivement l'application. Veuillez entrer le nom de l'application <span>{{nom}}</span> pour confirmer.",
enter_your_application_name: "Saisissez votre nom d'application",

View file

@ -31,6 +31,9 @@ const application_details = {
refresh_token_expiration: 'Refresh 토큰 만료',
token_endpoint: '토큰 End-Point',
user_info_endpoint: '사용자 정보 End-Point',
enable_admin_access: 'Enable admin access', // UNTRANSLATED
enable_admin_access_label:
'Enable or disable the access to Management API. Once enabled, you can use access tokens to call Management API on behalf on this application.', // UNTRANSLATED
delete_description:
'이 행동은 취소될 수 없어요. 어플리케이션을 영원히 삭제할 거에요. 삭제를 진행하기 위해 <span>{{name}}</span> 를 입력해주세요.',
enter_your_application_name: '어플리케이션 이름을 입력해주세요.',

View file

@ -31,6 +31,9 @@ const application_details = {
refresh_token_expiration: 'Expiração do token de atualização',
token_endpoint: 'Endpoint Token',
user_info_endpoint: 'Enpoint Userinfo',
enable_admin_access: 'Enable admin access', // UNTRANSLATED
enable_admin_access_label:
'Enable or disable the access to Management API. Once enabled, you can use access tokens to call Management API on behalf on this application.', // UNTRANSLATED
delete_description:
'Esta ação não pode ser desfeita. Isso ira eliminar permanentemente a app. Insira o nome da aplicação <span>{{name}}</span> para confirmar.',
enter_your_application_name: 'Digite o nome da aplicação',

View file

@ -31,6 +31,9 @@ const application_details = {
refresh_token_expiration: 'Refresh Token sona erme süresi',
token_endpoint: 'Token bitiş noktası',
user_info_endpoint: 'Userinfo bitiş noktası',
enable_admin_access: 'Enable admin access', // UNTRANSLATED
enable_admin_access_label:
'Enable or disable the access to Management API. Once enabled, you can use access tokens to call Management API on behalf on this application.', // UNTRANSLATED
delete_description:
'Bu eylem geri alınamaz. Uygulama kalıcı olarak silinecektir. Lütfen onaylamak için uygulama adı <span>{{name}}</span> girin.',
enter_your_application_name: 'Uygulama adı giriniz',

View file

@ -29,7 +29,10 @@ const application_details = {
id_token_expiration: 'ID Token 过期时间',
refresh_token_expiration: 'Refresh Token 过期时间',
token_endpoint: 'Token Endpoint',
user_info_endpoint: 'UserInfo endpoint',
user_info_endpoint: 'UserInfo Endpoint',
enable_admin_access: 'Enable admin access', // UNTRANSLATED
enable_admin_access_label:
'Enable or disable the access to Management API. Once enabled, you can use access tokens to call Management API on behalf on this application.', // UNTRANSLATED
delete_description: '本操作会永久性地删除该应用,且不可撤销。输入 <span>{{name}}</span> 确认。',
enter_your_application_name: '输入你的应用名称',
application_deleted: '应用 {{name}} 成功删除.',