feat: Implement WebcamFileSource for life webcam capture #12

Open
busti wants to merge 51 commits from busti/proto/frontend into jedi/proto/frontend
2 changed files with 3 additions and 9 deletions
Showing only changes of commit 49a063f2a7 - Show all commits

View file

@ -34,7 +34,7 @@ const router = createRouter({
routes, // short for `routes: routes`
})
router.beforeEach((to, from) => {
router.beforeEach((to/*, from*/) => {
// instead of having to check every route record with
// to.matched.some(record => record.meta.requiresAuth)
if (to.meta.requiresAuth && !store.getters.isLoggedIn) {

View file

@ -102,16 +102,10 @@ export default createStore({
body: JSON.stringify({username: username, password: password}),
credentials: 'omit'
}).then(r => r.json())
if (data.token) {
if (data.token && data.key) {
commit('setToken', data.token);
commit('setUser', username);
const j = await fetch('/auth/keys/', {
method: 'GET',
headers: {'Authorization': 'Token ' + data.token},
credentials: 'omit'
}).then(r => r.json())
const k = j.key
commit('setKey', k)
commit('setKey', data.key);
const s = await dispatch('lookupServer', {username}).then(servers => new ServerSet(servers, state.unreachable_neighbors))
commit('setHomeServers', s)
return true;