Sha256: 85f0f5cc24b7ebcd1860fcec355fb7c9f83c7f6bfa26de6515342c31317a6d6a

Contents?: true

Size: 662 Bytes

Versions: 3

Compression:

Stored size: 662 Bytes

Contents

import { observable, computed } from 'mobx';
import { titleize, humanize } from '../lib/util';
import Extensions from './index';
import RootView from '../workspace/root-view';

export { identifiedBy, identifier } from '../models/base';

export class BaseExtension {
    @observable data;

    static register() {
        Extensions.register(this);
    }

    @computed get title() {
        return titleize(humanize(this.identifier));
    }

    setBootstrapData(data) {
        this.data = data;
    }

    @computed get domain() {
        return window.location.hostname.split('.').slice(-2).join('.');
    }

    rootView() {
        return RootView;
    }
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hippo-fw-0.9.7 client/hippo/extensions/base.js
hippo-fw-0.9.6 client/hippo/extensions/base.js
hippo-fw-0.9.5 client/hippo/extensions/base.js