Added more settings stuff.

This commit is contained in:
Andrew Lalis 2023-02-16 08:22:19 +01:00
parent 0564cd5789
commit 40891656d0
1 changed files with 21 additions and 0 deletions

View File

@ -2,12 +2,33 @@
<q-page>
<StandardCenteredPage>
<h3>{{ $t('userSettingsPage.title') }}</h3>
<hr>
<q-form>
</q-form>
</StandardCenteredPage>
</q-page>
</template>
<script setup lang="ts">
import StandardCenteredPage from 'components/StandardCenteredPage.vue';
import { User } from 'src/api/main/auth';
import { getUserRoute } from 'src/router/user-routing';
import { useAuthStore } from 'src/stores/auth-store';
import { onMounted } from 'vue';
import { useRoute, useRouter } from 'vue-router';
const route = useRoute();
const router = useRouter();
const authStore = useAuthStore();
onMounted(async () => {
// If the user isn't on their own settings page, redirect them back to the user's profile page.
const userId = route.params.userId as string;
if (authStore.user?.id !== userId) {
await router.push(`/users/${userId}`);
}
});
</script>
<style scoped>