Module: SlashMigrate::ApplicationHelper

Defined in:
app/helpers/slash_migrate/application_helper.rb

Constant Summary collapse

ICON_PATHS =

Inline 16px SVG icons, ported from the design's stroke set. Returned with width/height of 1em so they scale with surrounding text; per-context CSS (.btn svg, .nav-link svg, …) overrides the size where needed.

{
  database: %(<ellipse cx="8" cy="3.5" rx="5.5" ry="2"/><path d="M2.5 3.5v9c0 1.1 2.46 2 5.5 2s5.5-.9 5.5-2v-9"/><path d="M2.5 8c0 1.1 2.46 2 5.5 2s5.5-.9 5.5-2"/>),
  plus: %(<path d="M8 3v10M3 8h10"/>),
  arrow_right: %(<path d="M3 8h10M9 4l4 4-4 4"/>),
  arrow_left: %(<path d="M13 8H3M7 4L3 8l4 4"/>),
  chevron: %(<path d="M6 4l4 4-4 4"/>),
  history: %(<path d="M2.5 8a5.5 5.5 0 1 0 1.6-3.9"/><path d="M2 2v3h3"/><path d="M8 5v3.5l2 1.2"/>),
  info: %(<circle cx="8" cy="8" r="6"/><path d="M8 7.2v3.6M8 5.2v.01"/>),
  warn: %(<path d="M8 2.5l6 11H2l6-11Z"/><path d="M8 6.5v3M8 11.4v.01"/>),
  check: %(<path d="M3 8.5l3.5 3.5L13 5"/>),
  x: %(<path d="M4 4l8 8M12 4l-8 8"/>),
  trash: %(<path d="M3 4.5h10M6.5 4.5V3a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v1.5M5 4.5l.5 8a1 1 0 0 0 1 .9h3a1 1 0 0 0 1-.9l.5-8"/>),
  play: %(<path d="M5 3.5v9l8-4.5z"/>),
  rotate: %(<path d="M13.5 8a5.5 5.5 0 1 1-1.6-3.9"/><path d="M14 2v3h-3"/>),
  file: %(<path d="M9 1.5H4.5A1.5 1.5 0 0 0 3 3v10a1.5 1.5 0 0 0 1.5 1.5h7A1.5 1.5 0 0 0 13 13V5.5z"/><path d="M9 1.5V5.5H13"/>),
  terminal: %(<rect x="2" y="3" width="12" height="10" rx="1.5"/><path d="M5 7l2 1.5L5 10M8.5 10h2.5"/>),
  key: %(<circle cx="6" cy="10" r="3"/><path d="M8.1 7.9 13 3M11 5l2 2M9.5 6.5L11.5 8.5"/>),
  lock: %(<rect x="3.5" y="7" width="9" height="6.5" rx="1.5"/><path d="M5.5 7V5.2a2.5 2.5 0 0 1 5 0V7"/>)
}.freeze
FILLED_ICONS =
%i[play].freeze
COMMON_COLUMN_TYPES =

The column types worth showing first, in teaching order. Anything else the database supports follows, alphabetically.

%w[string text integer boolean references datetime date decimal float].freeze

Instance Method Summary collapse