Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language per project #3

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/router/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import LayerSettings from '@/views/LayerSettings.vue'
import PublishView from '@/views/PublishView.vue'
import ProjectTopics from '@/views/ProjectTopics.vue'
import ProjectAccess from '@/views/ProjectAccess.vue'
import ProjectSettings from '@/views/ProjectSettings.vue'
import ProjectUpdate from '@/views/ProjectUpdate.vue'

Vue.use(VueRouter)
Expand Down Expand Up @@ -86,6 +87,11 @@ const routes = [
name: 'access',
component: ProjectAccess
},
{
path: 'settings',
name: 'settings',
component: ProjectSettings
},
{
path: 'update',
name: 'update',
Expand Down
51 changes: 51 additions & 0 deletions src/views/ProjectSettings.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<template>
<div class="page-content light">
<ScrollArea>
<div>
<h2 class="subheader px-2">Project settings</h2>

<v-select
class="filled"
label="Language"
v-model="settings.lang"
:items="availableLanguages"
itemValue="code"
itemText="title"
/>
</div>
</ScrollArea>
</div>
</template>

<script>
import ScrollArea from '@/ui/ScrollArea.vue'

export default {
components: { ScrollArea },
props: {
project: Object,
settings: Object,
},
setup() {
return {
availableLanguages: [
{
id: 'en',
code: 'en-us',
title: 'English',
},
{
id: 'cs',
code: 'cs-cz',
title: 'Czech',
},
{
id: 'sk',
code: 'sk-sk',
title: 'Slovak',
},
],
}
},
}
</script>
1 change: 1 addition & 0 deletions src/views/ProjectView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
<router-link class="m-2" :to="{name: 'layers'}">Layers</router-link>
<router-link class="m-2" :to="{name: 'topics'}">Topics</router-link>
<router-link class="m-2" :to="{name: 'access'}">Permissions</router-link>
<router-link class="m-2" :to="{name: 'settings'}">Settings</router-link>
<div class="v-separator"/>

<!-- <v-btn v-if="project.settings" class="small" :to="{name: 'update'}"> -->
Expand Down