-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from rule110-io/feature/redesign-2
Feature/redesign 2
- Loading branch information
Showing
332 changed files
with
31,261 additions
and
37,981 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,7 @@ db | |
.DS_Store | ||
frontend/package.json.md5 | ||
Output | ||
wailsjs | ||
frontend/wailsjs | ||
wailsjs | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
{ | ||
"version": "0.3.2-beta", | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Wails: build debug", | ||
"name": "Launch Package", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "exec", | ||
"program": "${workspaceFolder}/build/surge", | ||
"preLaunchTask": "wails_debug_build", | ||
"env": {}, | ||
"args": [] | ||
"mode": "auto", | ||
"program": "${fileDirname}" | ||
} | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package main | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
|
||
surge "github.com/rule110-io/surge/backend" | ||
) | ||
|
||
// App struct | ||
type App struct { | ||
ctx context.Context | ||
} | ||
|
||
// NewApp creates a new App application struct | ||
func NewApp() *App { | ||
return &App{} | ||
} | ||
|
||
// startup is called at application startup | ||
func (b *App) startup(ctx context.Context) { | ||
// Perform your setup here | ||
b.ctx = ctx | ||
go surge.WailsBind(&ctx) | ||
} | ||
|
||
// domReady is called after the front-end dom has been loaded | ||
func (b *App) domReady(ctx context.Context) { | ||
// Add your action here | ||
} | ||
|
||
// shutdown is called at application termination | ||
func (b *App) shutdown(ctx context.Context) { | ||
surge.StopClient() | ||
} | ||
|
||
// Greet returns a greeting for the given name | ||
func (b *App) Greet(name string) string { | ||
return fmt.Sprintf("Hello %s, It's show time!", name) | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright 2021 rule101. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
/* | ||
This file contains all blockchain related functions | ||
*/ | ||
|
||
package surge | ||
|
||
import ( | ||
"log" | ||
|
||
"github.com/rule110-io/surge/backend/constants" | ||
) | ||
|
||
func subscribeToPubSub(topic string) { | ||
txnHash, err := client.Subscribe("", topic, constants.SubscriptionDuration, "Surge Beta Client", nil) | ||
if err != nil { | ||
log.Println("Probably already subscribed", err) | ||
} else { | ||
log.Println("Subscribed: ", txnHash) | ||
} | ||
} | ||
|
||
func unsubscribeToPubSub(topic string) { | ||
txnHash, err := client.Unsubscribe("", topic, nil) | ||
if err != nil { | ||
log.Println("Probably already subscribed", err) | ||
} else { | ||
log.Println("Subscribed: ", txnHash) | ||
} | ||
} |
Oops, something went wrong.