mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
29 lines
583 B
CoffeeScript
29 lines
583 B
CoffeeScript
|
|
# Experimental: This will likely change, do not use.
|
|
module.exports =
|
|
class Notification
|
|
constructor: (@type, @message, @options={}) ->
|
|
@timestamp = new Date()
|
|
|
|
getOptions: -> @options
|
|
|
|
getType: -> @type
|
|
|
|
getMessage: -> @message
|
|
|
|
getTimestamp: -> @timestamp
|
|
|
|
getDetail: -> @options.detail
|
|
|
|
isClosable: ->
|
|
!!@options.closable
|
|
|
|
getIcon: ->
|
|
return @options.icon if @options.icon?
|
|
switch @type
|
|
when 'fatal' then 'bug'
|
|
when 'error' then 'flame'
|
|
when 'warning' then 'alert'
|
|
when 'info' then 'info'
|
|
when 'success' then 'check'
|