Mailspring/examples/N1-Quick-Schedule/lib/calendar-button.cjsx
Drew Regitsky a3e986d94a fix(quickschedule): Several UI fixes
Summary:
Fixes a number of smaller UI issues. Fixes T6173, T6207
Full list of changes:
 - Ensure time slots / days display in order
 - Allow time blocks of any size to be set on half hour intervals
 - Don't reset calendar when changing event length
 - Expand calendar on window resize
 - Change window title from "Electron"
 - Add delete button to cancel individual calendar events
 - Move event details box to the left side
 - Prevent addition of duplicate time slots

Test Plan: manual

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T6173, T6207

Differential Revision: https://phab.nylas.com/D2333
2015-12-09 16:41:30 -08:00

33 lines
961 B
CoffeeScript

{Utils, DraftStore, React} = require 'nylas-exports'
{RetinaImg} = require 'nylas-component-kit'
class CalendarButton extends React.Component
@displayName: 'CalendarButton'
render: =>
<button className="btn btn-toolbar" onClick={@_onClick} title="QuickSchedule">
<RetinaImg url="nylas://N1-Quick-Schedule/assets/quickschedule-icon@2x.png" mode={RetinaImg.Mode.ContentIsMask} />
</button>
_onClick: =>
BrowserWindow = require('remote').require('browser-window')
w = new BrowserWindow
title: 'N1 QuickSchedule'
nodeIntegration: false
webPreferences:
webSecurity:false
width: 800
height: 650
# Here, we load an arbitrary html file into the Composer!
path = require 'path'
url = path.join __dirname, '..', 'calendar.html'
w.loadURL "file://#{url}?draftClientId=#{@props.draftClientId}"
_getDialog: =>
require('remote').require('dialog')
module.exports = CalendarButton