diff options
author | Emiliano Ciavatta | 2020-10-03 15:01:32 +0000 |
---|---|---|
committer | Emiliano Ciavatta | 2020-10-03 15:01:32 +0000 |
commit | f11e5d9e55c963109af8b8517c7790bf2eb7cac8 (patch) | |
tree | 9414951f4f2d7e1b5097ba655d50791b9faf27e0 | |
parent | 7d40e85e64762db8d420a33ed352f707edd7a9ba (diff) |
Add title page window titles
-rw-r--r-- | frontend/public/index.html | 2 | ||||
-rw-r--r-- | frontend/src/components/ConnectionContent.js | 2 | ||||
-rw-r--r-- | frontend/src/components/panels/PcapPane.js | 2 | ||||
-rw-r--r-- | frontend/src/components/panels/RulePane.js | 2 | ||||
-rw-r--r-- | frontend/src/components/panels/ServicePane.js | 2 | ||||
-rw-r--r-- | frontend/src/views/App.js | 8 |
6 files changed, 17 insertions, 1 deletions
diff --git a/frontend/public/index.html b/frontend/public/index.html index 5cc974e..1c98f08 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -8,7 +8,7 @@ <meta name="description" content="A tool to analyze the network flow during attack/defence capture the flag events" /> <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> - <title>Caronte</title> + <title>caronte:~/$</title> </head> <body> <noscript>You need to enable JavaScript to run this app.</noscript> diff --git a/frontend/src/components/ConnectionContent.js b/frontend/src/components/ConnectionContent.js index 11b8617..2e4f2fd 100644 --- a/frontend/src/components/ConnectionContent.js +++ b/frontend/src/components/ConnectionContent.js @@ -30,6 +30,8 @@ class ConnectionContent extends Component { if (this.props.connection != null) { this.loadStream(); } + + document.title = "caronte:~/$"; } componentDidUpdate(prevProps, prevState, snapshot) { diff --git a/frontend/src/components/panels/PcapPane.js b/frontend/src/components/panels/PcapPane.js index 7b3fde6..31d8815 100644 --- a/frontend/src/components/panels/PcapPane.js +++ b/frontend/src/components/panels/PcapPane.js @@ -30,6 +30,8 @@ class PcapPane extends Component { componentDidMount() { this.loadSessions(); + + document.title = "caronte:~/pcaps$"; } loadSessions = () => { diff --git a/frontend/src/components/panels/RulePane.js b/frontend/src/components/panels/RulePane.js index 49364d2..4641378 100644 --- a/frontend/src/components/panels/RulePane.js +++ b/frontend/src/components/panels/RulePane.js @@ -39,6 +39,8 @@ class RulePane extends Component { componentDidMount() { this.reset(); this.loadRules(); + + document.title = "caronte:~/rules$"; } emptyRule = { diff --git a/frontend/src/components/panels/ServicePane.js b/frontend/src/components/panels/ServicePane.js index eaefa64..0e99652 100644 --- a/frontend/src/components/panels/ServicePane.js +++ b/frontend/src/components/panels/ServicePane.js @@ -25,6 +25,8 @@ class ServicePane extends Component { services: [], currentService: this.emptyService, }; + + document.title = "caronte:~/services$"; } componentDidMount() { diff --git a/frontend/src/views/App.js b/frontend/src/views/App.js index fb4454c..abd5209 100644 --- a/frontend/src/views/App.js +++ b/frontend/src/views/App.js @@ -18,6 +18,14 @@ class App extends Component { componentDidMount() { backend.get("/api/services").then(_ => this.setState({configured: true})); + + setInterval(() => { + if (document.title.endsWith("❚")) { + document.title = document.title.slice(0, -1); + } else { + document.title += "❚"; + } + }, 500); } render() { |