feature: the CA certificates and CRLs are always published over HTTP and HTTPS on the status and Manager ports, the Shell page is an entry of the page menu, and the web interface passes its lint.
Release / release (push) Successful in 26s
Release / release (push) Successful in 26s
This commit is contained in:
1 parent
4b5318c676
commit
0cec95c19b
72 files changed
+910
-861
No files matched your search
+6
-20
@@ -2,7 +2,6 @@ import AccountCircle from '@mui/icons-material/AccountCircle'
|
||||
import EditNote from '@mui/icons-material/EditNote'
|
||||
import HelpOutline from '@mui/icons-material/HelpOutlineOutlined'
|
||||
import Logout from '@mui/icons-material/Logout'
|
||||
import Terminal from '@mui/icons-material/Terminal'
|
||||
import { Box, Button, CircularProgress, Container, IconButton, Link, Stack, Tab, Tabs, Tooltip, Typography } from '@mui/material'
|
||||
import { useCallback, useEffect, useState } from 'react'
|
||||
import AccountPanel from './AccountPanel.tsx'
|
||||
@@ -44,7 +43,7 @@ type SitesView = 'sites' | 'files'
|
||||
/** The help topic of each tab of the Web Sites page. */
|
||||
const SITES_TOPICS: Record<SitesView, string> = { sites: 'sites.md', files: 'site-files.md' }
|
||||
|
||||
/** The prefix of the sessionStorage keys of the pages the account and the shell page were opened from, by their paths. */
|
||||
/** The prefix of the sessionStorage key of the page the account page was opened from, by its path. */
|
||||
const RETURN_KEY = 'linux-manager-ui.return:'
|
||||
|
||||
/** The pages of an administrator besides Router, which every other path shows. */
|
||||
@@ -71,11 +70,10 @@ const HELP_KEY = 'linux-manager-ui.help'
|
||||
* WireGuard access; at CA_PATH its certificates; at SITES_PATH its web
|
||||
* sites and the files of a site, opened from the sites too; at DNS_PATH its name server, while it is on; at DOCKER_PATH the state of Docker; at SHELL_PATH a shell on the server; otherwise the state of the server, with the update information of its packages in
|
||||
* the Status panel, its metrics, its logs, its backups or the updates of its system's packages. A page shows one tab at a time, each read only while shown. An
|
||||
* administrator switches pages with the page menu at the right end of the header; the button with the user's name,
|
||||
* left of Sign out, opens the user's own account, and an administrator's shell button, left of it, the shell; pressed
|
||||
* on their page, each returns to the page it was opened from; with the browser setting shellNewTab the shell button opens
|
||||
* the shell in a new tab instead. While files are open in the shell's editor, the editor
|
||||
* button left of the shell button switches the Shell page between the terminal and the editor. The help button, between the theme switcher and the page menu, opens or closes the help on
|
||||
* administrator switches pages with the page menu at the right end of the header, whose Shell entry opens the shell in
|
||||
* a new tab with the browser setting shellNewTab; the button with the user's name, left of Sign out, opens the user's
|
||||
* own account, and pressed on it returns to the page it was opened from. While files are open in the shell's editor, the
|
||||
* editor button left of the user's name switches the Shell page between the terminal and the editor. The help button, between the theme switcher and the page menu, opens or closes the help on
|
||||
* the right (HelpPanel) at the topic of the page and tab shown (HELP_TOPICS), the page moving left; the browser keeps
|
||||
* whether it is open. A call answered 401 ends the session and asks for a sign-in again.
|
||||
*/
|
||||
@@ -219,18 +217,6 @@ export default function App(props: { info: Info }) {
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
)}
|
||||
{session && admin && (
|
||||
<Tooltip title={page === SHELL_PATH ? 'Back from the shell' : 'Shell'}>
|
||||
<IconButton
|
||||
aria-label="shell"
|
||||
color={page === SHELL_PATH ? 'primary' : 'default'}
|
||||
onClick={() => (shellNewTab && page !== SHELL_PATH ? window.open(SHELL_PATH, '_blank') : toggle(SHELL_PATH))}
|
||||
sx={page === SHELL_PATH ? { bgcolor: 'action.selected' } : undefined}
|
||||
>
|
||||
<Terminal />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
)}
|
||||
{session && (
|
||||
<>
|
||||
<Button variant={userPage ? 'contained' : 'outlined'} startIcon={<AccountCircle />} onClick={() => toggle(USER_PATH)} sx={{ textTransform: 'none' }}>
|
||||
@@ -254,7 +240,7 @@ export default function App(props: { info: Info }) {
|
||||
</Tooltip>
|
||||
)}
|
||||
{session && admin && (
|
||||
<PageMenu path={page} hidden={[...(vpnOff ? [REMOTE_ACCESS_PATH] : []), ...(dnsOff ? [DNS_PATH] : []), ...(dockerMissing ? [DOCKER_PATH] : [])]} />
|
||||
<PageMenu path={page} newTab={shellNewTab ? [SHELL_PATH] : []} hidden={[...(vpnOff ? [REMOTE_ACCESS_PATH] : []), ...(dnsOff ? [DNS_PATH] : []), ...(dockerMissing ? [DOCKER_PATH] : [])]} />
|
||||
)}
|
||||
</Stack>
|
||||
</Stack>
|
||||
|
||||
Reference in new issue
Block a user