Remove game detail views setting

This commit is contained in:
Gamebrary 2022-05-18 21:18:14 -07:00
parent c8aa0eba1d
commit e9b12d245d
4 changed files with 3 additions and 40 deletions

View file

@ -23,36 +23,18 @@
</b-form-select-option> </b-form-select-option>
</b-form-select> </b-form-select>
</b-form-group> </b-form-group>
<b-form-group label="Open games in:">
<b-form-select
v-model="gameDetailView"
style="max-width: 200px"
@change="save"
>
<b-form-select-option
v-for="{ name, value } in GAME_DETAIL_VIEWS"
:key="value"
:value="value"
>
{{ name }}
</b-form-select-option>
</b-form-select>
</b-form-group>
</div> </div>
</template> </template>
<script> <script>
import { mapState } from 'vuex'; import { mapState } from 'vuex';
import { GAME_DETAIL_VIEWS, AGE_RATING_SYSTEMS } from '@/constants'; import { AGE_RATING_SYSTEMS } from '@/constants';
export default { export default {
data() { data() {
return { return {
saving: false, saving: false,
GAME_DETAIL_VIEWS,
AGE_RATING_SYSTEMS, AGE_RATING_SYSTEMS,
gameDetailView: null,
gameRatingSystem: null, gameRatingSystem: null,
}; };
}, },
@ -64,10 +46,6 @@ export default {
mounted() { mounted() {
const { settings } = this; const { settings } = this;
this.gameDetailView = settings && settings.gameDetailView
? settings.gameDetailView
: null;
this.gameRatingSystem = settings && settings.gameRatingSystem this.gameRatingSystem = settings && settings.gameRatingSystem
? settings.gameRatingSystem ? settings.gameRatingSystem
: null; : null;
@ -75,11 +53,10 @@ export default {
methods: { methods: {
async save() { async save() {
const { gameDetailView, gameRatingSystem, settings } = this; const { gameRatingSystem, settings } = this;
const payload = { const payload = {
...settings, ...settings,
gameDetailView,
gameRatingSystem, gameRatingSystem,
}; };

View file

@ -15,13 +15,11 @@
<script> <script>
import { mapState } from 'vuex'; import { mapState } from 'vuex';
import { GAME_DETAIL_VIEWS } from '@/constants';
export default { export default {
data() { data() {
return { return {
saving: false, saving: false,
GAME_DETAIL_VIEWS,
steamId: null, steamId: null,
}; };
}, },

View file

@ -238,13 +238,6 @@ export const SUPPORTED_LANGUAGES = [
{ name: 'Spanish', nativeName: 'Español', value: 'es' }, { name: 'Spanish', nativeName: 'Español', value: 'es' },
]; ];
export const GAME_DETAIL_VIEWS = [
// { name: 'popup', value: 'popup' },
{ name: 'Modal', value: null },
{ name: 'Side panel', value: 'side' },
{ name: 'New page', value: 'new' },
];
// Source: https://api-docs.igdb.com/#age-rating // Source: https://api-docs.igdb.com/#age-rating
export const AGE_RATING_SYSTEMS = [ export const AGE_RATING_SYSTEMS = [
{ {

View file

@ -2,10 +2,7 @@
<b-container fluid> <b-container fluid>
<page-title title="Steam settings" /> <page-title title="Steam settings" />
<!-- <b-alert show> <!-- TODO: Explain how steam id is used -->
Explain how steam id is used
</b-alert> -->
<b-form-group label="Steam ID:"> <b-form-group label="Steam ID:">
<b-form-input <b-form-input
v-model="steamId" v-model="steamId"
@ -18,13 +15,11 @@
<script> <script>
import { mapState } from 'vuex'; import { mapState } from 'vuex';
import { GAME_DETAIL_VIEWS } from '@/constants';
export default { export default {
data() { data() {
return { return {
saving: false, saving: false,
GAME_DETAIL_VIEWS,
steamId: null, steamId: null,
}; };
}, },