in
Clone
https://git.tahinli.com/Tahinli/in.git
0 watching0 forksRustAGPL-3.0528.7 KiB9215377Tahinli27 days ago37 commits
| 1 | //! Shared page chrome: the HTML shell and the small components every page is built from. |
| 2 | //! |
| 3 | //! `view!` escapes text and attribute values, so user data is safe in it by default. Nothing here |
| 4 | //! emits an inline script, style or event handler; see `security.rs`. |
| 5 | |
| 6 | use Result; |
| 7 | use ; |
| 8 | |
| 9 | use crate; |
| 10 | use crateViewer; |
| 11 | use crateFamilyLink; |
| 12 | use crateLang; |
| 13 | use crate; |
| 14 | use crate; |
| 15 | use crate; |
| 16 | use crate; |
| 17 | use crate; |
| 18 | use cratequota_bar; |
| 19 | |
| 20 | |
| 21 | |
| 22 | /// What the shell shows about the signed-in person: the name, the administrator badge, and the CSRF |
| 23 | /// token of the session for the sign-out form. |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | /// The HTML document around a page. `title` is the page's own title; the document title adds the |
| 57 | /// app name. `child` is the page, placed in `<main>`. `drive_js` adds the upload script, which only the |
| 58 | /// drive pages need. |
| 59 | /// |
| 60 | /// The topbar has the wordmark on the left, the service switcher in the middle (this service's pages, then |
| 61 | /// the other family services from the family worker) and the viewer's user menu on the right. The menu's |
| 62 | /// sign-out form opts out of soft navigation, because it ends in a redirect to `im`. `nav.js` reads the |
| 63 | /// restart text from `<body data-restart-text>`. |
| 64 | |
| 65 | pub async |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | |
| 92 | |
| 93 | |
| 94 | |
| 95 | |
| 96 | |
| 97 | |
| 98 | |
| 99 | |
| 100 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 | |
| 108 | |
| 109 | |
| 110 | |
| 111 | |
| 112 | |
| 113 | |
| 114 | |
| 115 | |
| 116 | |
| 117 | |
| 118 | |
| 119 | |
| 120 | |
| 121 | |
| 122 | |
| 123 | |
| 124 | |
| 125 | |
| 126 | |
| 127 | |
| 128 | |
| 129 | |
| 130 | |
| 131 | |
| 132 | /// The menu link to the settings page, in the viewer's language. |
| 133 | |
| 134 | |
| 135 | |
| 136 | |
| 137 | /// The menu link to the administration page, in the viewer's language. |
| 138 | |
| 139 | |
| 140 | |
| 141 | |
| 142 | /// One other family service in the switcher. The name and the URL are escaped by `view!`, and the URL was |
| 143 | /// checked by `family::usable` before it was stored. |
| 144 | |
| 145 | pub async |
| 146 | |
| 147 | |
| 148 | |
| 149 | /// An error message for a failed action. Forms show it above their fields. |
| 150 | // The first form that can fail a check uses it. |
| 151 | |
| 152 | pub async |
| 153 | |
| 154 | |
| 155 | |
| 156 | /// A plain message that is not an error, such as a confirmation or a hint. |
| 157 | |
| 158 | pub async |
| 159 | |
| 160 | |
| 161 | |
| 162 | /// Something to look at that is not a failure yet, such as a state that has gone stale. |
| 163 | |
| 164 | pub async |
| 165 | |
| 166 | |
| 167 | |
| 168 | /// A section with nothing in it yet: a title, then what to do next. |
| 169 | |
| 170 | pub async |
| 171 | |
| 172 | |
| 173 | |
| 174 | |
| 175 | |
| 176 | |
| 177 |