Added more settings stuff.
This commit is contained in:
parent
0564cd5789
commit
40891656d0
|
@ -2,12 +2,33 @@
|
||||||
<q-page>
|
<q-page>
|
||||||
<StandardCenteredPage>
|
<StandardCenteredPage>
|
||||||
<h3>{{ $t('userSettingsPage.title') }}</h3>
|
<h3>{{ $t('userSettingsPage.title') }}</h3>
|
||||||
|
<hr>
|
||||||
|
<q-form>
|
||||||
|
|
||||||
|
</q-form>
|
||||||
</StandardCenteredPage>
|
</StandardCenteredPage>
|
||||||
</q-page>
|
</q-page>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import StandardCenteredPage from 'components/StandardCenteredPage.vue';
|
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>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
Loading…
Reference in New Issue