Skip to content

Latest commit

 

History

History
156 lines (130 loc) · 2.35 KB

SETTINGS.md

File metadata and controls

156 lines (130 loc) · 2.35 KB

classic-player-controls/addons_settings/controls.rb

require 'package_settings'

settings = PackageSettings.new

settings.level(0) do |level|
  level[:name] = 'standard'
  level[:template] = {
    enable: {
      type: 'boolean',
      values: [true, false],
      default: true
    },
    visibility: {
      type: 'string',
      values: ['autohide', 'visible'],
      default: 'autohide'
    }
  }
end

chromeless-player-controls/addons_settings/controls.rb

require 'package_settings'

settings = PackageSettings.new('classic-player-controls', 'controls')

settings.get_level(0).delete_key(:visibility)

settings
settings[0][:name] = 'sublime'
settings[0][:template] = {
  enable: {
    type: 'boolean',
    values: [true],
    default: true
  },
  type: {
    type: 'string',
    values: ['sv'],
    default: 'sv'
  }
}

settings[1][:name] = 'disabled'
settings[1][:template] = {
  enable: {
    type: 'boolean',
    values: [true, false],
    default: false
  },
  type: {
    type: 'string',
    values: ['sv'],
    default: 'sv'
  }
}

settings[2][:name] = 'custom'
settings[3][:template] = {
  enable: {
    type: 'boolean',
    values: [true, false],
    default: true
  },
  type: {
    type: 'string',
    values: ['sv', 'custom'],
    default: 'custom'
  }
}

settings

settings.js

allowed['logo'] = {
  enable: [true],
  type: ['sv']
}

kits['1']['config']['logo'] = {
  enable: false,
  type: 'custom'
}

settings.rb in lightbox package

require 'package_settings'

settings = PackageSettings.new

settings[0][:name] = 'standard'
settings[0][:template] = {
  enable: {
    type: boolean,
    values: [true, false],
    default: true
  },
  close_button: {
    type: boolean,
    values: [true, false],
    default: true
  },
  position: {
    type: string,
    values: ['left', 'right'],
    default: 'left
  }
}

settings

settings.rb in light.lightbox package

require 'package_settings'

settings = PackageSettings.new('lightbox')

settings.get_level(1).delete_key(:close_button)

settings

settings.js

allowed['classic.controls'] = {
  enable: [true],
  type: ['sv']
}

allowed['light.controls'] = {
  enable: [true],
  type: ['sv']
}

allowed['logo'] = {
  enable: [true],
  type: ['sv']
}

kits['1']['config']['logo'] = {
  type: 'custom',
  position: 'top-left'
}