<commit_before>import * as m from 'mithril';
import ParentComponent from '../ParentComponent';
import { ViewModelStatus } from '../../Enums';
import MainLayoutComponent from '../MainLayoutComponent';
import factory from '../../ViewModel/ViewModelFactory';
import SettingViewModel from '../../ViewModel/Setting/SettingViewModel';
import Util from '../../Util/Util';

/**
* SettingComponent
*/
class SettingComponent extends ParentComponent<void> {
    private viewModel: SettingViewModel;

    constructor() {
        super();
        this.viewModel = <SettingViewModel>(factory.get('SettingViewModel'));
    }

    protected initViewModel(status: ViewModelStatus = 'init'): void {
        super.initViewModel(status);
        if(status === 'init') {
            this.viewModel.setTemp();
        }
        this.setRestorePositionFlag(status);
    }

    /**
    * page name
    */
    protected getComponentName(): string { return 'Setting'; }

    /**
    * view
    */
    public view(): m.Child {
        return m(MainLayoutComponent, {
            header: { title: '設定' },<commit_msg>一分環境で /setting の scroll position が復元されない問題を修正<commit_after>import * as m from 'mithril';
import ParentComponent from '../ParentComponent';
import { ViewModelStatus } from '../../Enums';
import MainLayoutComponent from '../MainLayoutComponent';
import factory from '../../ViewModel/ViewModelFactory';
import SettingViewModel from '../../ViewModel/Setting/SettingViewModel';
import Util from '../../Util/Util';

/**
* SettingComponent
*/
class SettingComponent extends ParentComponent<void> {
    private viewModel: SettingViewModel;

    constructor() {
        super();
        this.viewModel = <SettingViewModel>(factory.get('SettingViewModel'));
    }

    protected initViewModel(status: ViewModelStatus = 'init'): void {
        super.initViewModel(status);
        if(status === 'init') {
            this.viewModel.setTemp();
        }
        Util.sleep(10)
        .then(() => {
            this.setRestorePositionFlag(status);
        });
    }

    /**
    * page name
    */
    protected getComponentName(): string { return 'Setting'; }

    /**
    * view
    */
    public view(): m.Child {
        return m(MainLayoutComponent, {
            header: { title: '設定' },
{'fraction_non_alphanumeric': 0.14455707360070516, 'fraction_numerical': 0.0008814455707360071, 'mean_word_length': 2.7959866220735785, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6639849', 'n_tokens_mistral': 615, 'n_tokens_neox': 595, 'n_words': 141}