Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}}
style={{
flex: 1,
height: 1000,
}}
>
{ITEMS.map(i => <label>)}
<label> */}
)
}
// Create a window and a root container:
const win = gui.Window.create({})
win.setContentSize({ width: 400, height: 250 })
const contentView = gui.Container.create()
contentView.setStyle({ flexDirection: 'row' })
win.setContentView(contentView)
win.center()
win.activate()
// Create your react elements and render them:
render(, contentView)
// Start your app
if (!process.versions.yode) {
gui.MessageLoop.run()
process.exit(0)
}</label></label>
new gui.Builder (__dirname + '/data/clip.glade', function (builder) {
var window = builder.get ('window', gui.Window);
window.show ();
// Load configuration
if (config.token) {
// Auto login
agent.autoLogin (config.token);
} else if (config.first_time_using) {
// Prompt for registing
} else {
// Prompt for username and password
agent.login ('fool', '1234');
}
});
createLoginWindow() {
this.loginWindow = gui.Window.create({})
this.loginWindow.setTitle('Login to Slack')
this.loginWindow.onClose = () => this.loginWindow = null
const contentView = gui.Container.create()
contentView.setStyle({padding: 10})
this.loginWindow.setContentView(contentView)
const row1 = this.createRow(contentView)
const label11 = gui.Label.create('Workspace')
row1.addChildView(label11)
const labelWidth = label11.getBounds().width + 5
label11.setAlign('start')
label11.setStyle({minWidth: labelWidth})
const teamInput = gui.Entry.create()
teamInput.setStyle({flex: 1})
row1.addChildView(teamInput)
constructor(messageList, bounds) {
this.window = gui.Window.create({})
this.chatBox = new ChatBox(this)
this.window.setContentView(this.chatBox.view)
this.window.setContentSize(bounds)
let title = messageList.account.name
if (messageList.type === 'channel')
title += ` | ${messageList.name}`
else if (messageList.type === 'thread')
title += ` | ${messageList.channel.name} | Thread`
this.window.setTitle(title)
this.chatBox.loadChannel(messageList)
windowManager.addWindow(this)
}
export function createConnectWindow(next) {
try {
const connectionWindow = gui.Window.create({})
connectionWindow.setTitle('connect')
connectionWindow.setContentSize({ width: 440, height: 200 })
connectionWindow.setAlwaysOnTop(true)
const container = gui.Container.create()
container.setStyle({ flexDirection: 'row' })
connectionWindow.setContentView(container)
render(
{
next(...args)
connectionWindow.close()
}}
/>,
container
constructor() {
this.window = gui.Window.create({})
this.window.setTitle(require('../../package.json').build.productName)
const contentView = gui.Container.create()
contentView.setStyle({flexDirection: 'row'})
this.window.setContentView(contentView)
this.accountsPanel = new AccountsPanel(this)
contentView.addChildView(this.accountsPanel.view)
this.channelsPanel = new ChannelsPanel(this)
contentView.addChildView(this.channelsPanel.view)
this.chatBox = new ChatBox(this)
contentView.addChildView(this.chatBox.view)
this.channelsSearcher = new ChannelsSearcher(this)
this.channelsSearcher.view.setVisible(false)
contentView.addChildView(this.channelsSearcher.view)