Skip to content

Commit

Permalink
integrated #355
Browse files Browse the repository at this point in the history
Applied the fixes from the Maplibre migration
added a editorconfig file for more consistent lints
migrated from swagger-codegen's types to openapi-typescript
added the vite-plugin-rewrite-all dependency, as a workaround for vitejs/vite#2415
This will be solved if vitejs/vite#2634 is merged
migrated 1f050e8
stopped eslint from fixing .js files due to a suspeced infinite loop
updated some of our js-dependencys to the newest version. No changes required
adapted the webclient for the new version of our API docs
migrated vite to v4.x
fixed bug of v-for and v-if not being separated
fixed how the DetailsView and the feedbackButton are coupled
added an alt tag for a thumb-building
fixed thumb-building preview not having the correct path
set our npm type to module to prevent import errors
renmoved unneeded defineExpose import
rebase of d2b2a1d
rebase 5e2f141
rebase 31f34b4
rebase of 61b8cd3
rebase of 2c1a33a
updated swagger codegen
Fixed defineExpose being used twice
press `/` to focus the search bar (#270)* press / to focus the search bar
removed legacy file
Try to fix the share menu not opening on Safari (#269)
migrated to the new docs style
Remove API lang cookie (#259)* Remove checking the cookie in the server
* Fix language determination in the webclient
* Remove cookie from API documentationCo-authored-by: Frank Elsinga <[email protected]>
Darkmode lang/theme selector (#256)* Switched the disabled lang/theme selector color to whiteCo-authored-by: octycs <[email protected]>
Separated Coordinate Handling (#243)* seperated coordinates and other data from each other
* improved how entries are formattedCo-authored-by: octycs <[email protected]>
Fixed the room feedback not being correctly interpreted by GitHub
mapbox
migrated the vue3 webclient to nav.tum.de
Link to the calendar (#221)* implemented a link to the calendarCo-authored-by: octycs <[email protected]>
Changed user location dot color to #3070B3 (#233)Co-authored-by: ge78fug <[email protected]>
added the outdatedBrowser detection
hacked together the linking between the feedbackbutton and the interactive map
fixed issues preventing the feedback modal to open properly
improved the typing in the interactive map
changed the localStorage access key for storing feedback-coordinates to be more in line with the other usage `feedback-token`
fixed some of the feedback related functionality in other parts of our app
merged all feedback related functionality into its own component
set mapboxgl and swaggerui to be manually chunked
set mapboxgl to be manually chunked
seperated swagger-ui-dist from the api view for inital page loads
fixed vite not correctly routing /api/
fixed details not correctly registering navigation events
fixed roomfinder maps not being loaded correctly
replaced existance checks via a && a.b with a?.b
replaced v-on:click with @click
fixed interactive maps button not being correctly highlighted
fixed loading icon not disapearing misteriously on the details screen
inlined a bracket into the translation
fiede how referencing between the map componentand the DetailsView.vue worked
added rsync as an docker dependency
added a script, which builds the needed files for our deployment
increased the cache duration of the assets folder
moved everything that can be cached into the assets folder
clairified the theme selector
modived the nginx config for the adapted deployment
inital draft of the updated docs
fixed bug, where early returning after redirection lead to invalid content being shown
moved files around for uniformer layout
inlined loadMap()
fixed a translation not working due to a typo
fixed the map not working due to wrong paths
fixed other typing issues
fixed wrong usage of the translation api
migrated the details view to the composition API
added v-if check for sources being present
extracted the feedbackbutton into its own component
moved confirmLocationPicker and other related functionality to he interactive map
fixed the details routing
unified the Showcase naming to Slideshow
fixed bug in copyCurrentLink method declartion
extracted the roomfinder into a seperate component
sources
extracted the sources into a seperate component
extracted the InfoSection into its own component
extracted the (currently unused) featured section into an own component
extracted the building overview and the room overview into its own component
fixed typing issues in the auto-generated typing stubs
split the interactive map into its own component
added the type keyword to an type-only import
switched from a home-grown reset function to a buildin function for the details store
migrated the error.msg to an pinia store, for accessing the erroer it in the useFetch method
fixed import of mapboxgl in the interactive-map
migrated usages of `==` to `===`
unified the translation formatting previously, the existance of a leading newline and a trailing space was possible

removed scoped stylesheets, as it was noticed, that they cause weird styling issues
removed an v-if statement without any effect
in vue3, this v-for statement is apparently illegal and needs a wrapper
inlined some functions from autocomplete.ts, as they were only used in the searchbar
added active to the acitve toggler in the settings at the bottom
moved the the scss components to their respective owners
moved our noscript warning to our index.html
moved the seachbar to its own component
fixed, that the design of the language toggler was different to currently deployed
fixed the SearchView.vue not being rendered correctly
fixed issue of some translation blocks having a trailing whitespace
reverted change to change copied in the calller and instead changed this state in the called method
fixed the success not being correctly indicaded in copyCurrentLink()
fixed places, where translation was incorrectly used
refactored the details-state to live in pinia
fixed setDescription and setTitle being used in the new waypreviously, this was done via the global variable "navigatum"
refactored the sharebutton into its own component
reconfigured the dockerfile for the new build system
moved our logo to the assets folder to enable automatic inlining
moved removeLocalStorage,setLocalStorageWithExpiry,getLocalStorageWithExpiry to utils/storage
added configuration option to explicitly tell vite, that we are a spa
added the ability to view our about pages
configured environment options and api proxying
removed the preconnect statements and explicit theming
changed the internal name of the details api, to not confuse people between GET and get
fixed an import bug in the search view
made the language selection persistent
made the openapi.yaml server from the actual host, instead of github
fixed origin check to allow local-remote development
added typing to the fetch options. added the credentials handling seen in #198
fixed faulty inlinging of more() and less()
unified the language and theme selectors in their own components
added swagger codegen for typescript types
fixed our localisation by migrating to unplugin-vue-i18n
changed the i18n options to what we want
fixed another path issue with paths not being found
renamed router-link to RouterLink, as this is recomended
moved the main template to app.vue
fixed an issue with locale templates in html
partialy migrated about, details and search
migrated the main view to vue3
moved interactive-map.ts to typescript
moved scss to the index.html for faster time to design
removed legacy code.js
removed unused components from the template
migrated feedback to ts
converted modules to ts modules
changed how comments in our scss work
reodered the package.json
added i18n
migrated the apiview to vue3
fixed an pathing issue
moved our utils to a comon directory
moved all styles to be consistently below the html
changed all paths to the assets to @asset
removed unnessesry app prefix
fromatting
re-enabled some imports from the previous dockerifle
removed old build system
scss move
vueI18n
removed polyfills temporarily to focus on making the app work
moved views 1:1 into single file components
moves
added our old routing config
moved the 404 and api view to a SFC
moved more files to different directories
moved some files to a new directory
added the basic vue3 template
  • Loading branch information
CommanderStorm committed Mar 11, 2023
1 parent 16659d6 commit d584852
Show file tree
Hide file tree
Showing 111 changed files with 6,739 additions and 6,718 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/_docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
steps:
- uses: actions/checkout@v3

- run: cp openapi.yaml data/output
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
Expand Down
3 changes: 1 addition & 2 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ representative at an online or offline event.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[email protected].
reported to the community leaders responsible for enforcement at [email protected].
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
Expand Down
2 changes: 1 addition & 1 deletion map/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ docker run --rm -it -v $(pwd)/map:/data -p 7770:80 maptiler/tileserver-gl
### Edit the style

For editing the style we use [Maputnik](https://github.com/maputnik/editor).
It is a web-based editor for Mapbox styles.
It is a web-based editor for Maplibre styles.
You can use it to edit the style and see the changes live.

Sadly, it is not fully compatible with tileserver-gl.
Expand Down
144 changes: 126 additions & 18 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,13 @@ paths:
time_ms: 23
'400':
description: Invalid Request
content: {}
content:
text/plain:
schema:
type: string
example: Invalid Request
enum:
- Invalid Request
'404':
description: '`search_query` is empty. Since searching for nothing is nonsensical, we dont support this.'
content:
Expand All @@ -258,7 +264,13 @@ paths:
- Not found
'414':
description: The uri you are trying to request is unreasonably long. Search querys dont have thousands of chars..
content: {}
content:
text/plain:
schema:
type: string
example: Uri too long
enum:
- Uri too long
tags:
- core
'/api/get/{id}':
Expand Down Expand Up @@ -734,14 +746,26 @@ paths:
description: |
Too many requests.
We are rate-limiting everyone's requests, please try again later.
content: {}
content:
text/plain:
schema:
type: string
example: Too many requests
enum:
- Too many requests
'503':
description: |
Service unavailable.
We have not configured a GitHub Access Token or a JWT Key.
This could be because we are experiencing technical difficulties or intentional if we experience abuse of these endpoints.
Please try again later.
content: {}
content:
text/plain:
schema:
type: string
example: Service unavailable
enum:
- Service unavailable
tags:
- feedback
/api/feedback/feedback:
Expand Down Expand Up @@ -772,7 +796,13 @@ paths:
example: 'https://github.com/TUM-Dev/navigatum/issues/9'
'400':
description: If not all fields in the body are present as defined above
content: {}
content:
text/plain:
schema:
type: string
example: Not all fields in the body are present as defined in the documentation
enum:
- Not all fields in the body are present as defined in the documentation
'403':
description: |
Forbidden. Causes are (delivered via the body):
Expand All @@ -794,24 +824,48 @@ paths:
description: |
Unprocessable Entity
Subject or body missing or too short.
content: {}
content:
text/plain:
schema:
type: string
example: Unprocessable Entity
enum:
- Unprocessable Entity
'451':
description: |
Unavailable for legal reasons.
Using this endpoint without accepting the privacy policy is not allowed.
For us to post to GitHub, this has to be true
content: {}
content:
text/plain:
schema:
type: string
example: Unavailable for legal reasons
enum:
- Unavailable for legal reasons
'500':
description: |
Internal Server Error.
We have a problem communicating with GitHubs servers. Please try again later.
content: {}
content:
text/plain:
schema:
type: string
example: Internal Server Error
enum:
- Internal Server Error
'503':
description: |
Service unavailable.
We have not configured a GitHub Access Token.
This could be because we are experiencing technical difficulties or intentional. Please try again later.
content: {}
content:
text/plain:
schema:
type: string
example: Service unavailable
enum:
- Service unavailable
tags:
- feedback
'/cdn/{size}/{id}_{counter}.webp':
Expand Down Expand Up @@ -885,7 +939,13 @@ paths:
Bad Request.
The request was malformed.
Please check your request and try again.
content: {}
content:
text/plain:
schema:
type: string
example: Bad Request
enum:
- Bad Request
'404':
description: Requested Resource Not Found
content:
Expand All @@ -897,7 +957,13 @@ paths:
- Not found
'414':
description: 'The uri you are trying to request is unreasonably long. neither ids, nor any other parameter has more than 30 chars..'
content: {}
content:
text/plain:
schema:
type: string
example: Uri too long
enum:
- Uri too long
tags:
- cdn
'/cdn/maps/{source}/{id}.webp':
Expand Down Expand Up @@ -948,7 +1014,13 @@ paths:
Bad Request.
The request was malformed.
Please check your request and try again.
content: {}
content:
text/plain:
schema:
type: string
example: Bad Request
enum:
- Bad Request
'404':
description: Requested Resource Not Found
content:
Expand All @@ -960,7 +1032,13 @@ paths:
- Not found
'414':
description: 'The uri you are trying to request is unreasonably long. neither ids, nor any other parameter has more than 30 chars..'
content: {}
content:
text/plain:
schema:
type: string
example: Uri too long
enum:
- Uri too long
tags:
- cdn
'/api/legacy_redirect/{arch_name}':
Expand Down Expand Up @@ -1008,7 +1086,13 @@ paths:
type: string
'301':
description: Permanent redirect to the roomfinder
content: {}
content:
text/plain:
schema:
type: string
example: Permanent Redirect
enum:
- Permanent Redirect
'404':
description: Requested Resource Not Found
content:
Expand Down Expand Up @@ -1038,7 +1122,13 @@ paths:
source code: https://github.com/TUM-Dev/navigatum/tree/8a0fb71819ac88c8af35683cfb46291f0d0c9b0a
'503':
description: Service Unavailable
content: {}
content:
text/plain:
schema:
type: string
example: Service Unavailable
enum:
- Service Unavailable
tags:
- health
/api/feedback/status:
Expand Down Expand Up @@ -1080,7 +1170,13 @@ paths:
source code: https://github.com/TUM-Dev/navigatum/tree/8a0fb71819ac88c8af35683cfb46291f0d0c9b0a
'503':
description: Service Unavailable
content: {}
content:
text/plain:
schema:
type: string
example: Service Unavailable
enum:
- Service Unavailable
tags:
- health
/cdn/health:
Expand All @@ -1100,7 +1196,13 @@ paths:
- healthy
'503':
description: Service Unavailable
content: {}
content:
text/plain:
schema:
type: string
example: Service Unavailable
enum:
- Service Unavailable
tags:
- health
/health:
Expand All @@ -1120,7 +1222,13 @@ paths:
- healthy
'503':
description: Service Unavailable
content: {}
content:
text/plain:
schema:
type: string
example: Service Unavailable
enum:
- Service Unavailable
tags:
- health
components:
Expand Down
4 changes: 2 additions & 2 deletions resources/scripts/regen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ echo "regenerating the data for /data"
(
cd ./data || exit
python compile.py
rsync ../openapi.yaml output/openapi.yaml
)


Expand All @@ -30,8 +31,7 @@ python init_db.py
echo "regenerating the data for /webclient"
(
cd ./webclient || exit
rm -fr cdn
mkdir cdn
mkdir -p cdn
rsync -r --exclude '*.yaml' ../data/sources/img/ cdn/
cp -r ../data/external/results/maps/roomfinder/* cdn/maps/roomfinder
)
Expand Down
6 changes: 4 additions & 2 deletions webclient/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
**/node_modules
**/build
node_modules/*
dist/*
cdn/*
.vscode/*
12 changes: 12 additions & 0 deletions webclient/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
max_line_length = 120
indent_size = 2
indent_style = space
15 changes: 15 additions & 0 deletions webclient/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* eslint-env node */
require("@rushstack/eslint-patch/modern-module-resolution");

module.exports = {
root: true,
extends: [
"plugin:vue/vue3-essential",
"eslint:recommended",
"@vue/eslint-config-typescript/recommended",
"@vue/eslint-config-prettier",
],
parserOptions: {
ecmaVersion: "latest",
},
};
33 changes: 29 additions & 4 deletions webclient/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
build
cdn
node_modules
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

package-lock.json
yarn.lock
node_modules
.DS_Store
dist
dist-ssr
coverage
*.local

/cypress/videos/
/cypress/screenshots/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
/cdn/
3 changes: 3 additions & 0 deletions webclient/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
}
Loading

0 comments on commit d584852

Please sign in to comment.