-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from DSD-DBS/improve-phone-screen-view
fix: Improve view for smaller screens
- Loading branch information
Showing
46 changed files
with
811 additions
and
455 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,10 @@ | ||
# Copyright DB InfraGO AG and contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
"""The capella_model_explorer package.""" | ||
from importlib import metadata | ||
|
||
try: | ||
__version__ = metadata.version("capella_model_explorer") | ||
except metadata.PackageNotFoundError: # pragma: no cover | ||
__version__ = "0.0.0+unknown" | ||
del metadata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Copyright DB InfraGO AG and contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
import json | ||
import os | ||
import pathlib | ||
import subprocess | ||
|
||
|
||
def run_git_command(cmd: list[str]): | ||
try: | ||
return subprocess.run( | ||
["git", *cmd], | ||
check=True, | ||
capture_output=True, | ||
cwd=pathlib.Path(__file__).parent, | ||
).stdout.decode() | ||
except subprocess.CalledProcessError: | ||
return "No tags found" | ||
|
||
|
||
if os.getenv("MODE") == "production": | ||
path = pathlib.Path(__file__).parent / "dist" / "static" / "version.json" | ||
else: | ||
path = pathlib.Path(__file__).parent / "public" / "static" / "version.json" | ||
|
||
path.write_text( | ||
json.dumps( | ||
{ | ||
"git": { | ||
"version": run_git_command(["describe", "--tags"]).strip(), | ||
"tag": run_git_command( | ||
["describe", "--tags", "--abbrev=0"] | ||
).strip(), | ||
} | ||
} | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,4 @@ module.exports = { | |
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,28 @@ | ||
// Copyright DB InfraGO AG and contributors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { useState } from "react"; | ||
import { Route, BrowserRouter as Router, Routes } from "react-router-dom"; | ||
import { API_BASE_URL, ROUTE_PREFIX } from "./APIConfig"; | ||
import "./App.css"; | ||
import { HomeView } from "./views/HomeView"; | ||
import { TemplateView } from "./views/TemplateView"; | ||
|
||
function App() { | ||
const [count, setCount] = useState(0); | ||
|
||
return ( | ||
<Router basename={ROUTE_PREFIX}> | ||
<Routes> | ||
<Route path="/" element={<HomeView />} /> | ||
<Route | ||
path="/:templateName" | ||
element={ | ||
<TemplateView endpoint={`${API_BASE_URL}/views/`} /> | ||
} | ||
/> | ||
<Route | ||
path="/:templateName/:objectID" | ||
element={ | ||
<TemplateView endpoint={`${API_BASE_URL}/views/`} /> | ||
} | ||
/> | ||
</Routes> | ||
</Router> | ||
); | ||
return ( | ||
<Router basename={ROUTE_PREFIX}> | ||
<Routes> | ||
<Route path="/" element={<HomeView />} /> | ||
<Route | ||
path="/:templateName" | ||
element={<TemplateView endpoint={`${API_BASE_URL}/views/`} />} | ||
/> | ||
<Route | ||
path="/:templateName/:objectID" | ||
element={<TemplateView endpoint={`${API_BASE_URL}/views/`} />} | ||
/> | ||
</Routes> | ||
</Router> | ||
); | ||
} | ||
|
||
export default App; |
Oops, something went wrong.