objective categorical abstract machine language personal data server
65
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix text truncation on frontend, improve buttons

futurGH 1a73ae5c 5adf5ede

+36 -27
+8 -6
frontend/src/components/Button.mlx
··· 1 1 let base_classes = 2 2 "py-1 px-4 text-lg rounded-lg w-full flex items-center justify-center \ 3 - transition delay-50 duration-300 focus-visible:outline-none \ 4 - disabled:text-mist-80" 3 + transition duration-300 focus-visible:outline-none disabled:text-mist-80" 5 4 6 5 type kind = [`Primary | `Secondary | `Tertiary | `Danger] 7 6 ··· 9 8 | `Primary -> 10 9 base_classes 11 10 ^ " bg-white font-serif text-mana-200 shadow-whisper \ 12 - hover:shadow-shimmer hover:bg-mist-20 focus-visible:shadow-shimmer \ 13 - focus-visible:bg-mist-20 active:shadow-glow disabled:bg-mana-40" 11 + hover:shadow-shimmer hover:bg-mist-20 hover:text-mist-100 \ 12 + focus-visible:shadow-shimmer focus-visible:bg-mist-20 \ 13 + focus-visible:text-mist-100 active:shadow-glow active:text-mana-100 \ 14 + disabled:bg-mist-60 disabled:shadow-none" 14 15 | `Secondary -> 15 16 base_classes 16 17 ^ " bg-feather font-serif underline text-mana-100 hover:no-underline \ 17 18 focus-visible:shadow-whisper active:shadow-whisper \ 18 - disabled:no-underline disabled:bg-mana-40" 19 + disabled:no-underline disabled:bg-mist-60 disabled:shadow-none" 19 20 | `Tertiary -> 20 21 base_classes 21 22 ^ " font-sans underline text-mana-100 hover:no-underline \ ··· 24 25 base_classes 25 26 ^ " bg-white font-serif text-phoenix-100 shadow-bleed hover:bg-mist-20 \ 26 27 focus:bg-mist-20 focus:text-phoenix-40 focus-visible:outline-none \ 27 - active:bg-phoenix-40 active:text-mist-20 disabled:bg-mana-40" 28 + active:bg-phoenix-40 active:text-mist-20 disabled:bg-mist-60 \ 29 + disabled:shadow-none" 28 30 | `Danger_secondary -> 29 31 base_classes 30 32 ^ " bg-feather font-serif underline text-phoenix-100 hover:no-underline \
+21 -12
frontend/src/templates/AccountPermissionsPage.mlx
··· 67 67 ~props: 68 68 ({current_user; logged_in_users; csrf_token; authorized_apps; devices} : 69 69 props ) () = 70 - <div className="w-auto h-full px-4 sm:px-0 pt-16 mx-auto flex flex-col md:flex-row gap-12"> 70 + <div 71 + className="w-auto h-full max-w-full px-4 sm:px-0 pt-16 mx-auto flex \ 72 + flex-col md:flex-row gap-12"> 71 73 <AccountSidebar 72 74 current_user logged_in_users active_page="/account/permissions" 73 75 /> ··· 87 89 <ul className="space-y-2"> 88 90 ( List.map 89 91 (fun (app : authorized_app) -> 92 + let name = Option.value app.client_name ~default:app.client_host in 90 93 <li key=app.client_id className="flex items-center gap-x-2"> 91 - <span className="font-serif text-mana-100"> 92 - (string 93 - (Option.value app.client_name 94 - ~default:app.client_host ) ) 94 + <span 95 + title=name 96 + className="flex-1 max-w-fit font-serif text-mana-100 \ 97 + truncate"> 98 + (string name) 95 99 </span> 96 100 ( match app.client_name with 97 101 | Some _ -> 98 - <span className="text-mist-80"> 99 - (string ("(" ^ app.client_host ^ ")")) 100 - </span> 102 + array 103 + [| <span className="text-mist-80">(string "-")</span> 104 + ; <span 105 + title=app.client_host 106 + className="flex-2 max-w-fit block \ 107 + text-mist-80 truncate"> 108 + (string app.client_host) 109 + </span> |] 101 110 | None -> 102 111 null ) 103 112 <span className="text-mist-80">(string "-")</span> ··· 112 121 formMethod="post" 113 122 name="action" 114 123 value="revoke_app" 115 - className="text-mist-100 underline \ 124 + className="text-mist-100 underline whitespace-nowrap \ 116 125 hover:text-mana-100"> 117 126 (string "revoke access") 118 127 </button> ··· 138 147 let key = device.last_ip ^ "-" ^ string_of_int i in 139 148 <li key className="flex flex-col"> 140 149 <div className="flex items-center gap-x-2"> 141 - <span className="font-serif text-mana-100"> 150 + <span className="font-serif text-mana-100 truncate"> 142 151 (string (parse_user_agent device.last_user_agent)) 143 152 </span> 144 153 ( if device.is_current then ··· 165 174 formMethod="post" 166 175 name="action" 167 176 value="sign_out_device" 168 - className="text-mist-100 underline \ 177 + className="text-mist-100 underline whitespace-nowrap \ 169 178 hover:text-mana-100"> 170 179 (string "sign out") 171 180 </button> 172 181 </form> 173 182 </div> 174 - <span className="text-sm text-mist-80"> 183 + <span className="text-sm text-mist-80 truncate"> 175 184 (string 176 185 ( "Last active " ^ device.last_refreshed_at 177 186 ^ {js| · |js} ^ device.last_ip ) )
+3 -4
frontend/src/templates/Layout.mlx
··· 1 1 open React 2 2 3 - let[@react.component] make ?(title = "Pegasus") ?(children = null) ?(favicon = "/public/favicon.ico") () = 3 + let[@react.component] make ?(title = "Pegasus") ?(children = null) 4 + ?(favicon = "/public/favicon.ico") () = 4 5 <html lang="en"> 5 6 <head> 6 7 <meta charSet="utf-8" /> ··· 32 33 </head> 33 34 <body 34 35 className="bg-feather-100 font-sans font-normal text-base tracking-normal"> 35 - <div id="root" className="flex justify-center min-h-screen"> 36 - children 37 - </div> 36 + <div id="root" className="flex justify-center min-h-screen">children</div> 38 37 </body> 39 38 </html>
+1 -2
pegasus/lib/env.ml
··· 50 50 | _ -> 51 51 Uri.make ~scheme:"https" ~host:u () ) 52 52 53 - let favicon_url = 54 - getenv_opt "PDS_FAVICON_URL" ~default:"/public/favicon.ico" 53 + let favicon_url = getenv_opt "PDS_FAVICON_URL" ~default:"/public/favicon.ico" 55 54 56 55 let dpop_nonce_secret = 57 56 match getenv_opt "PDS_DPOP_NONCE_SECRET" ~default:"" with
+3 -3
public/main.css
··· 61 61 --color-mist-100: #4f4f53; 62 62 63 63 --shadow-whisper: inset 0 0 1em #97baff8c; 64 - --shadow-shimmer: inset 0 0 1em #79a7ed99; 65 - --shadow-glow: inset 0 0 2em #2d37ba73; 66 - --shadow-bleed: inset 0 0 2em #db4c6466; 64 + --shadow-shimmer: inset 0 0 1em #90bbeea6; 65 + --shadow-glow: inset 0 0 1.25em #2d37ba80; 66 + --shadow-bleed: inset 0 0 1.25em #db4c6473; 67 67 }