mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-11 12:12:55 +00:00
refactor: move to eslint
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2021 StApps
|
||||
* Copyright (C) 2019-2022 Open StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
@@ -63,11 +63,7 @@ export interface SCSettingWithoutReferences
|
||||
/**
|
||||
* A list of categories for settings
|
||||
*/
|
||||
export type SCSettingCategories =
|
||||
'profile'
|
||||
| 'privacy'
|
||||
| 'credentials'
|
||||
| 'others';
|
||||
export type SCSettingCategories = 'profile' | 'privacy' | 'credentials' | 'others';
|
||||
|
||||
/**
|
||||
* The types of input/value a setting object can carry
|
||||
@@ -86,7 +82,8 @@ export enum SCSettingInputType {
|
||||
* @validatable
|
||||
*/
|
||||
export interface SCSetting
|
||||
extends SCSettingWithoutReferences, SCThing,
|
||||
extends SCSettingWithoutReferences,
|
||||
SCThing,
|
||||
SCThingWithCategories<SCSettingCategories, SCThingWithCategoriesSpecificValues> {
|
||||
/**
|
||||
* Translated fields of a setting
|
||||
@@ -129,8 +126,10 @@ export class SCSettingMeta extends SCThingMeta implements SCMetaTranslations<SCS
|
||||
*/
|
||||
fieldTranslations = {
|
||||
de: {
|
||||
...new SCThingWithCategoriesWithoutReferencesMeta<SCSettingCategories,
|
||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
||||
...new SCThingWithCategoriesWithoutReferencesMeta<
|
||||
SCSettingCategories,
|
||||
SCThingWithCategoriesSpecificValues
|
||||
>().fieldTranslations.de,
|
||||
defaultValue: 'Standard Wert',
|
||||
inputType: 'Eingabetyp',
|
||||
order: 'Position',
|
||||
@@ -138,8 +137,10 @@ export class SCSettingMeta extends SCThingMeta implements SCMetaTranslations<SCS
|
||||
values: 'Werte',
|
||||
},
|
||||
en: {
|
||||
...new SCThingWithCategoriesWithoutReferencesMeta<SCSettingCategories,
|
||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
||||
...new SCThingWithCategoriesWithoutReferencesMeta<
|
||||
SCSettingCategories,
|
||||
SCThingWithCategoriesSpecificValues
|
||||
>().fieldTranslations.en,
|
||||
defaultValue: 'default value',
|
||||
inputType: 'input type',
|
||||
order: 'position',
|
||||
@@ -153,8 +154,10 @@ export class SCSettingMeta extends SCThingMeta implements SCMetaTranslations<SCS
|
||||
*/
|
||||
fieldValueTranslations = {
|
||||
de: {
|
||||
...new SCThingWithCategoriesWithoutReferencesMeta<SCSettingCategories,
|
||||
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.de,
|
||||
...new SCThingWithCategoriesWithoutReferencesMeta<
|
||||
SCSettingCategories,
|
||||
SCThingWithCategoriesSpecificValues
|
||||
>().fieldValueTranslations.de,
|
||||
categories: {
|
||||
credentials: 'Anmeldedaten',
|
||||
others: 'Andere',
|
||||
@@ -163,16 +166,18 @@ export class SCSettingMeta extends SCThingMeta implements SCMetaTranslations<SCS
|
||||
},
|
||||
inputType: {
|
||||
'multiple choice': 'mehrfach Auswahl',
|
||||
number: 'Zahl',
|
||||
password: 'Passwort',
|
||||
'number': 'Zahl',
|
||||
'password': 'Passwort',
|
||||
'single choice': 'einfache Auswahl',
|
||||
text: 'Text',
|
||||
'text': 'Text',
|
||||
},
|
||||
type: 'Einstellung',
|
||||
},
|
||||
en: {
|
||||
...new SCThingWithCategoriesWithoutReferencesMeta<SCSettingCategories,
|
||||
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.en,
|
||||
...new SCThingWithCategoriesWithoutReferencesMeta<
|
||||
SCSettingCategories,
|
||||
SCThingWithCategoriesSpecificValues
|
||||
>().fieldValueTranslations.en,
|
||||
type: SCThingType.Setting,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user