Skip to content

Commit

Permalink
Update default values for frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
rexruan committed Mar 18, 2024
1 parent 1c4806f commit ccf4c27
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 22 deletions.
6 changes: 3 additions & 3 deletions frontend/src/components/DownloadPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ export default {
},
data() {
return {
downloadType: [],
downloadType: ["texts"],
downloadDisabled: false,
showStatisticsArgs: false,
selectedTextIds: [],
levels: [],
overviewOrDetail: [],
levels: ["text", "para", "sent"],
overviewOrDetail: ["overview", "detail"],
outputForm: '.txt',
tooltipMsg: '',
tooltipDisabled: false,
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/Statistics/SnippetFrequencyPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ export default {
props: {
tagset: {
type: String,
default: '',
default: 'upos',
required: true,
},
category: {
type: String,
default: '',
default: 'form',
required: true,
},
textsInfo: {
Expand All @@ -94,12 +94,12 @@ export default {
},
display: {
type: Boolean,
default: false,
default: true,
required: false,
},
initialized: {
type: Boolean,
default: false,
default: true,
required: false,
},
},
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/Statistics/SnippetStatisticsPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ export default {
props: {
level: {
type: String,
default: null,
default: "text",
required: true,
},
totalItems: {
type: Number,
default: 0,
default: null,
required: false,
},
textsInfo: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default {
},
level: {
type: String,
default: '',
default: 'text',
required: false,
},
},
Expand All @@ -100,7 +100,3 @@ export default {
},
};
</script>

<style scoped>
</style>
5 changes: 3 additions & 2 deletions frontend/src/components/Statistics/SnippetsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@

<script>
import axios from 'axios';
import { ref } from 'vue';
import SnippetStatisticsTable from './SnippetStatisticsTable.vue';
import SnippetContent from '../Common/SnippetContent.vue';
Expand All @@ -99,7 +100,7 @@ export default {
},
level: {
type: String,
default: null,
default: "text",
required: false,
},
total: {
Expand All @@ -115,7 +116,7 @@ export default {
},
data() {
return {
showOverviewOrDetail: '',
showOverviewOrDetail: ref('content'),
overviewData: {},
currentPage: 1,
loadingOverviewData: false,
Expand Down
14 changes: 8 additions & 6 deletions frontend/src/components/Statistics/StatisticsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@

<script>
import axios from 'axios';
import { ref } from 'vue';
import TextSelector from '../Common/TextSelector.vue';
import SnippetStatisticsPanel from './SnippetStatisticsPanel.vue';
import SnippetFrequencyPage from './SnippetFrequencyPage.vue';
Expand All @@ -121,17 +122,17 @@ export default {
},
data() {
return {
showType: '',
featureLevel: '',
showType: ref('frequency'),
featureLevel: ref('text'),
showFrequency: false,
showFrequency: true,
showLength: false,
showFeature: false,
showTagset: false,
showTagset: true,
showSentFeature: false,
showParaFeature: false,
showTextFeature: false,
showTextFeature: true,
initializeFrequency: false,
initializeLength: false,
Expand Down Expand Up @@ -160,7 +161,7 @@ export default {
},
},
mounted() {
// this.fetchTextsStats();
this.fetchTextsStats();
},
methods: {
handleInitialization({ type }) {
Expand Down Expand Up @@ -236,6 +237,7 @@ export default {
this.showLength = false;
this.showFeature = true;
this.showTagset = false;
}
},
handleShowFeatureLevel(obj) {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ axios.defaults.xsrfCookieName = 'csrftoken';

const router = new VueRouter({
routes: [
{ path: '/', redirect: '/en'},
{
path: '/:toolVersion(en|sv)',
component: MainPage,
Expand Down

0 comments on commit ccf4c27

Please sign in to comment.