<commit_before>class TeamworkDashboard extends JView

  constructor: (options = {}, data) ->

    options.cssClass = "tw-dashboard"

    super options, data

    @fetchManifests()

    @playgrounds  = new KDCustomHTMLView
      cssClass    : "tw-playgrounds"

  createPlaygrounds: (manifests) ->
    # @playgrounds.addSubView new KDCustomHTMLView
    #   cssClass    : "tw-playground-item default-item add-new"
    #   partial     : "<div></div><p>New Project</p>"

    @playgrounds.addSubView new KDCustomHTMLView
      cssClass    : "tw-playground-item default-item import"
      partial     : "<div></div><p>Import Project</p>"
      click       : => @getDelegate().teamwork.showImportModal()

    manifests?.forEach (manifest) =>
      @setClass "ready"
      @playgrounds.addSubView view = new KDCustomHTMLView
        cssClass  : "tw-playground-item"
        partial   : "<img src='#{manifest.icon}'/> <p>#{manifest.name}</p>"
        click     : =>
          # @getDelegate().handlePlaygroundSelection manifest.name, manifest.manifestUrl
          new KDNotificationView
            title : "Coming Soon"

  fetchManifests: ->
    filename = if location.hostname is "localhost" then "manifest-dev" else "manifest"
    delegate = @getDelegate()

    delegate.fetchManifestFile "#{filename}.json", (err, manifests) =>
      if err
        @setClass "ready"
        @playgrounds.hide()
        return new KDNotificationView
          type     : "mini"
          cssClass : "error"
          title    : "Could not fetch Playground manifest."
          duration : 4000

      delegate.playgroundsManifest = manifests
      @createPlaygrounds manifests

  pistachio: ->
    """
      <div class="headline">
        <h1>Welcome to Teamwork</h1>
        <p>Teamwork is a collaborative IDE for Koding. You can share your code, invite friends and code together.</p>
        <div class="separator"></div>
        <p>Start a new project from scratch, import one from GitHub or a .zip file or play with one of the ready-to-go templates below.</p>
      </div><commit_msg>Teamwork: Fixed manifest url for playgrounds.<commit_after>class TeamworkDashboard extends JView

  constructor: (options = {}, data) ->

    options.cssClass = "tw-dashboard"

    super options, data

    @fetchManifests()

    @playgrounds  = new KDCustomHTMLView
      cssClass    : "tw-playgrounds"

  createPlaygrounds: (manifests) ->
    # @playgrounds.addSubView new KDCustomHTMLView
    #   cssClass    : "tw-playground-item default-item add-new"
    #   partial     : "<div></div><p>New Project</p>"

    @playgrounds.addSubView new KDCustomHTMLView
      cssClass    : "tw-playground-item default-item import"
      partial     : "<div></div><p>Import Project</p>"
      click       : => @getDelegate().teamwork.showImportModal()

    manifests?.forEach (manifest) =>
      @setClass "ready"
      @playgrounds.addSubView view = new KDCustomHTMLView
        cssClass  : "tw-playground-item"
        partial   : "<img src='#{manifest.icon}'/> <p>#{manifest.name}</p>"
        click     : =>
          # @getDelegate().handlePlaygroundSelection manifest.name, manifest.manifestUrl
          new KDNotificationView
            title : "Coming Soon"

  fetchManifests: ->
    delegate = @getDelegate()
    delegate.fetchManifestFile "manifest.json", (err, manifests) =>
      if err
        @setClass "ready"
        @playgrounds.hide()
        return new KDNotificationView
          type     : "mini"
          cssClass : "error"
          title    : "Could not fetch Playground manifest."
          duration : 4000

      delegate.playgroundsManifest = manifests
      @createPlaygrounds manifests

  pistachio: ->
    """
      <div class="headline">
        <h1>Welcome to Teamwork</h1>
        <p>Teamwork is a collaborative IDE for Koding. You can share your code, invite friends and code together.</p>
        <div class="separator"></div>
        <p>Start a new project from scratch, import one from GitHub or a .zip file or play with one of the ready-to-go templates below.</p>
      </div>
{'fraction_non_alphanumeric': 0.11348563006632277, 'fraction_numerical': 0.0029476787030213707, 'mean_word_length': 2.597173144876325, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 61, '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': '125605', 'n_tokens_mistral': 1221, 'n_tokens_neox': 1147, 'n_words': 303}