Change "grouping" to "view"

1. *Grouping* becomes *view*. Because *view* is more clear and extensible than *grouping*. It increases flexibility to extend by e.g. adding *flat* as a new view as discussed in #50, in this case "flat *view*" would make more sense than "flat *grouping*".
2. *None* becomes *tree*. Because *tree* is more descriptive than *none*.

Updates labels on top menu. As labels are updated, the file structure/names are refactored to follow the same concept. `TheScriptsList` is renamed to `TheScriptsView`. Also refactors `ViewChanger` so view types are presented in same way.
This commit is contained in:
undergroundwires
2021-08-29 11:33:16 +01:00
parent 6dc768817f
commit c0c475ff56
37 changed files with 112 additions and 117 deletions

View File

@@ -1,9 +1,9 @@
<template>
<div class="scripts">
<TheScriptsMenu v-on:groupingChanged="grouping = $event" />
<TheScriptsMenu v-on:viewChanged="currentView = $event" />
<HorizontalResizeSlider class="row">
<template v-slot:left>
<TheScriptsList :grouping="grouping" />
<TheScriptsView :currentView="currentView" />
</template>
<template v-slot:right>
<TheCodeArea theme="xcode" />
@@ -15,21 +15,21 @@
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
import TheCodeArea from '@/presentation/components/Code/TheCodeArea.vue';
import TheScriptsList from '@/presentation/components/Scripts/TheScriptsList.vue';
import TheScriptsView from '@/presentation/components/Scripts/View/TheScriptsView.vue';
import TheScriptsMenu from '@/presentation/components/Scripts/Menu/TheScriptsMenu.vue';
import HorizontalResizeSlider from '@/presentation/components/Scripts/Slider/HorizontalResizeSlider.vue';
import { Grouping } from '@/presentation/components/Scripts/Menu/Grouping/Grouping';
import { ViewType } from '@/presentation/components/Scripts/Menu/View/ViewType';
@Component({
components: {
TheCodeArea,
TheScriptsList,
TheScriptsView,
TheScriptsMenu,
HorizontalResizeSlider,
},
})
export default class TheScriptArea extends Vue {
public grouping = Grouping.Cards;
public currentView = ViewType.Cards;
}
</script>