-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 #147 from wailsapp/develop
Release v0.17.0
- Loading branch information
Showing
67 changed files
with
1,462 additions
and
323 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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
module.exports = { | ||
"env": { | ||
"browser": true, | ||
"es6": true | ||
}, | ||
"extends": "eslint:recommended", | ||
"parserOptions": { | ||
"ecmaVersion": 2016, | ||
"sourceType": "module", | ||
}, | ||
"rules": { | ||
"indent": [ | ||
"error", | ||
"tab" | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"unix" | ||
], | ||
"quotes": [ | ||
"error", | ||
"single" | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
] | ||
} | ||
}; |
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,3 @@ | ||
{ | ||
"esversion": 6 | ||
} |
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,3 +1,4 @@ | ||
{ | ||
"go.formatTool": "goimports" | ||
"go.formatTool": "goimports", | ||
"eslint.alwaysShowStatus": true | ||
} |
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
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,65 @@ | ||
package wails | ||
|
||
import "strings" | ||
import "fmt" | ||
|
||
type internalMethods struct{ | ||
log *CustomLogger | ||
browser *RuntimeBrowser | ||
} | ||
|
||
func newInternalMethods() *internalMethods { | ||
return &internalMethods{ | ||
log: newCustomLogger("InternalCall"), | ||
browser: newRuntimeBrowser(), | ||
} | ||
} | ||
|
||
func (i *internalMethods) processCall(callData *callData) (interface{}, error) { | ||
if !strings.HasPrefix(callData.BindingName, ".wails.") { | ||
return nil, fmt.Errorf("Invalid call signature '%s'", callData.BindingName) | ||
} | ||
|
||
// Strip prefix | ||
var splitCall = strings.Split(callData.BindingName,".")[2:] | ||
if len(splitCall) != 2 { | ||
return nil, fmt.Errorf("Invalid call signature '%s'", callData.BindingName) | ||
} | ||
|
||
group := splitCall[0] | ||
switch group { | ||
case "Browser": | ||
return i.processBrowserCommand(splitCall[1], callData.Data) | ||
default: | ||
return nil, fmt.Errorf("Unknown internal command group '%s'", group) | ||
} | ||
} | ||
|
||
func (i *internalMethods) processBrowserCommand(command string, data interface{}) (interface{}, error) { | ||
switch command { | ||
case "OpenURL": | ||
url := data.(string) | ||
// Strip string quotes. Credit: https://stackoverflow.com/a/44222648 | ||
if url[0] == '"' { | ||
url = url[1:] | ||
} | ||
if i := len(url)-1; url[i] == '"' { | ||
url = url[:i] | ||
} | ||
i.log.Debugf("Calling Browser.OpenURL with '%s'", url) | ||
return nil, i.browser.OpenURL(url) | ||
case "OpenFile": | ||
filename := data.(string) | ||
// Strip string quotes. Credit: https://stackoverflow.com/a/44222648 | ||
if filename[0] == '"' { | ||
filename = filename[1:] | ||
} | ||
if i := len(filename)-1; filename[i] == '"' { | ||
filename = filename[:i] | ||
} | ||
i.log.Debugf("Calling Browser.OpenFile with '%s'", filename) | ||
return nil, i.browser.OpenFile(filename) | ||
default: | ||
return nil, fmt.Errorf("Unknown Browser command '%s'", command) | ||
} | ||
} |
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,10 @@ | ||
package cmd | ||
|
||
// Autogenerated by Mewn - Do not alter | ||
|
||
import "github.com/leaanthony/mewn" | ||
|
||
func init() { | ||
mewn.AddAsset("../wailsruntimeassets/bridge/", "wailsbridge.js", "1f8b08000000000000ffac7a7953eb3ad2f7ff7c0a4da66e9d3040f6842cf7dc7a9d05084b201b4ba6a6de2bdb1d5b604b4652e22467f8ee4f49b61387012ef3d4935309b6d5ddeafea9d58b7cf2ff384008a1074c3c81da9cd80ea0ac75884a8562e324e020804a740d181954ba8cae0f34f9c4250279c4e498af91c5014b10082333e23741860014add982231c041eb1b0248c6a564c6d245d4073cea8046a1f23ec792c24d451f4483264c3123c166cd9d142a851cd2d24a636e636928c79ea69d6e42c14c011ac2450411815c7c8234b401c3c86ed6304d23acca148efa9c00e34f5e59f7ffea9ff123f605c26a6cf39f35126970f151e91399996a68b08726389b9cc0af56b04c1616b2b2bc6059043964091853dcfc4d60bdad22242b5e1b0c27ee0c1210a89e721133429d89a3f7421228a9174b14062615920c47ce1796b442891047b44809d437d89022c0408c512f1136ab330a7b547cc7c064b22a5c5b19adcc20210918808449944588b25a607c8261c2ce9ad7307ffc81f1ce4f3091a918483b4d458b19fe8d701421c2c462958f27609dcc3eb26a20bcf3b4e8f4c880fbc89ca85827a1c8ae9e8ba8932a168e6f31eb3b0e732219be54ab158cdc7702bba9899303a9658c24eaec5e89c384df4eb4d8b035330eb05648a20c67df78445ba5d4c6eaea395fff1bb4d96c8f2b0103f33daa893adba273175e68f6f109d58da85e5f78825911e64fe48efb4dff33659fef1bbc9bf2540b933a18e0808a5c0337fbce326f6e7ac3e08e5f97a76a9b6cd9c71ed1840ed584ceaf7470ab6ce781ca196c97d22fc57c004514bd59c9315d82dc98266a1e5c15c360bad90d8d26d160b85df5a2e10c795d1b59adae16c41ed26774c9c2d1cab7fb9da616bcea83c99639f78eba6c0549c08e064deb2890894835146a1b53921d48655b3a13f6f9f29962ccfaf00db0ab866a910ac50b910ac5a1256f2047bc4a14d0ba8041e2b5a2a80dfdadac3c1c3922c61ab7a05fc96c9b80dfc84639b2c44b3087ecbc7dc21b459fd0de18564a890b2eec4621ee3cdbfcfe7f396c95627c2c5360b9bc56085d437522858a53988af42d4827b591b4bdcd4b7f9803a2d130ba8558ec97dfb761416aece1d66188631184fddded4310ca35357f78b8e71a36eee02d338550f5ecfda37f7bda9f15f7e7a6d63f8d17572afbe5d23bc5197ea59f237f9a4ef3b86d357dff7341fd12bbaff56d7b3f6f0e1aaf35c8b00298fc613efc6b826fdd7aefb72de364478f97c57385fddd506a3ca4323bf91cfa3ee8dfb30ad16ce1b4e152e1e97e6acf1d8eb3756b389f53af34ad8b3af58b53a0c5967399b3a1b5709168dcb51ef6c3abe818107f0f0fa6c4cdd69a1ddc117e5be246163733569948f36e785d2f0aae8faf9eac5d9d1f36676599b0fa166ad1f7b47cf4ee3f19435c2d562edf5fbf3ca6459ba2f1f99b7bcf748e7753b1ce6af86fdf3eea0941f1f556efdfbcefde3757e6cb5e99c98abe9e8b5df5edfe5dddb41afceeb9323b37be30d1bf5abb177fa547737cfc1b8be2cbecaae5b5f54e7f5ab61701ecce9dd9dfb7a5ebf04e60ccaa717af0dc083d26ae4f643039fd36528ea67c5b1bb7abdaa32b324c327523c336eba15fe289e24ede42f7b64647a156bca3b0f2ebde95c8fcec07f84cda369561bc3abca8331be157e8d961e8a47954e7b52baf4e566589b0b6e9e2fcc517e7066da25a7fa543c6d1c55c3fc79ef025f898be7a70ec8d38ec31fa765b9c27cd0397d5addde5fcafe7325df1b6d6eecd97c63958b6e7054b7ba3538ef5f3b98cf9e1a8b59b1e41aa2505ecedbdd46a7785a74c6d55b7f737a6b2d57c6f5b04f2b8bfa68d46eb72d411a0f0fa590dd364870edcc37c193e7384e7936b247b7d34efd6a723abc7e7d2d3f34aedad5b6699fdd3b9546a9f1628741ede815cfe84da73368dbcf4783f5a0f850af5747ebbc715dee568ca129eeef2b9475c84dbe532fbfac9f5eeb8547af6b3c0d25c7de2de96ed8c8b8f0987cf0eaaf25f9bc7cf26e1dcb291af5e79e11ccf051a7509bb46d63531a2e0be1a258ece737b3dbf5e5b0d60bcf6153ba2b99f5bbfe9017dd30a4c64c18abd0a84c8da7dbf5e37475935f05357961d0caf9d4bf3bbf698c4a7576bf723a05c86f869797fd5a77edae67457ebad88c866e603d9cae4e9713fc30de5c8dcf6b1882d3d317ce263daf3cad1717e37b3c9d48a7d71fcc3b75085647c3ca59631c04dec579bdd27ba9f99591f1dac84fae5f6edb7cb586856dcfdc8be5793f283e3ececfd6e5597929c381e95d9d932e3dba3c6a94966168b42f1cf7f9f4826ebc71f1a2fad2ae348cd9d23eef9c39a47df75a6bbcce1fef78797d74b426de59e1765019d561742a02435c07b34675f06a3c5425368b5665f932f36bd803fc6cb937e1d3c4ee5f0f8793b057babdaf148bb39bc6c346769fef5ebd62c9c26d5273bac1f4caefda9569f171600f57b3ca75ff7158cd4f78e5eeb4df904fd619ef5e95a328e69d4d5ec68ba1dfe91ca603308700b06c52165fa5c7b6a921ca1a9fa71e9dec7fe96426c8069a25f03f278eb3738abc982b7fc5b05f09fc0a1851da9cc012a814518e8cf359ae0a7e92bea29b287f357315f091601eb191e4988a0073a032c96e71da2af76aa7bd0efa3b00e89f77c9af5af8ad8529f17571df4c29858aaa3ba080392274ae6a5648b2a44a91ad6d42561abdfdbf1758cf39f641a0948c5faa50f8a5759b33ee3739539560b65c2bd8e01cbebde93ad1634e13cd1754978a281b0379a88b5384f27904c223549ed84460d38313aaf2bed24c8f5b8c0ae641ce634e563f4028f39b85a2ea392e747fb350061da158323a4219a467d6c4a93206fd1de342a15068a1083ba4733eda074ce57a5488bf2aefa30409550eb4d0ce01502177cac1ff64aa42a1d1f8aba9e2299229ff7a2a3d936e68de0ede5aba0d306c1c48b0a3ae2804734920442748ba98be08b411c01df8dbc1167f4255bbd0198fb39610d1222c3147e0818f7e229b590b1fa8cc45fd62cf037597cd08b9f620a32756943901d29092137321219b91eb0032c728a32ab6bc25444448e6281b112be6b10b2093457ff7386709318195443f912584b60e8127204d8d8300a8dd71896767df69a95807cc066d510c4e64950bd84e5ba5effffdefdd0307646ca368af27d819601fb219459639fc67e15f4a96bad99b5da973d83a78d3e877b67d35653624ed6397f93bc42325b582d1063ed6160195937500c788d8c75157a1263f467141bc5b1afbf37549c9d9424eec04653b47142fb11348d4f076a61dd5f691c23fb9dee349aba4e5aa90a69a35c5110d26f49189fbcba575e320179c223b416e0c52a045a0f18a63e60e33017211c40d6b760785c9ec751a0d75df8ac77444885a3685b5d26c07bc223c46199b2c959f46213b6e65b572ef98f70cfccfce3a976a575b07073a88f5f5be4a5b833ae3b10270bbe13e17d4198fb71ea50f2fb49c74179a82468d470f63642230df4189de61a8f5fc40836d7b8e7eea6ebcf53159faa4e06bcaf7e70de9f57a5d005f8fc1034b329efdba6555b1eef06b6d92a307f4532dad889f829d491665ecb250bc836507a4cbc2d13b65b3898f7fc3b02880e5e2ae57e9607acc7ac9443b2152e082d8f0a9022eb1e1ff56015555eccd1f9f11c14a02a7d8cb11ba642fb003351988cf8a94b72a82bd7c2d9c44a7af1d282780da9a3c3a7053d1e02d5909c3b65590141627814492256132170d8fc0674b10fae46b8e8432d456a104fb2081232290e40bc8a5d1c3b63dd6d2b291d063c4b59044591513c457294d73656265c57e4afba152da8f63f443a7b467bcc411f98f2db91ae844a10ffd8ced8ac6f6b2cd5e2014d12e4c598c7451a816202e5e4494c7353ab737d192cc5176df34357f146775b08a0677536cc14f9c1053db53e0528bf9843abb23b9d4199ed8f34ccdd18906bf72495595653ac9be53eb1a1f5825b87eece3d198e501e67d05c0127b1f45c774d08979be7440462d8f09150e2203badb98f02de6a47e4cd86fa2fb4f793f8842e910f49f0bb0c37d17ad3ec07da7f65f42df4d45bdc873dee1ffcd88ffbf8cb2da153f0ca3ada4788fcc48a331e16be528f158120b62bd112c81af51b950f005cada30c70b4fa225f6167018c78a8e8ba90348ba44440349d5e5634251fa003c3a1adf8b1adf00f65daa1320b73eba8b8abbada8b6e7d7284730ef38fe7a5520440f608ef5fd87c2c574741d63fc0dc76601d0ad5777d23be21bccc0395338ec6c87b42908414e4816f47d1f6c8225dc71166047b79bd9948a09dd17c301d7cd71375af4fdd16ffb71f4898bcd39f604ec9ebf25976f518c3cfe32cbeec28ef6dc779b340e0e1fb4b346ea2d5b088838947140cf42bf55b384882bc238e6222442222d77db18e76c2cf13f0bffda819ccfc7a560f232ef2416f1b79840bf34ca8499e6d6d25d724c4bcd098f58902d1e267928963e6061dc50f30595c4079570559b0ff6713c30675cef310ed85e23bd4e6909dab4e46d5abca3f576c441f0a1a3e57afa1c24774bb35139de8ce6cb1ca38f36d9573130c266a414cbecf9cc273b33d1735ffae7f2074c92f95ae5cdd46bd2fd993e8e23f13c7b3aecb1bded3cf3ebcdacf5b8d600c5ae308a162aad86c901bfb40e52ab2ac93c5657ec790afdbea71cebc2eb8b59da84da843a7bf2cd947cddb64534e827fa708e56ca93b4a5b1cca63ed589990f3f76a3ff9fa310c6f4d984f4736d3bd8f374aad9d3d77aa76fb2725d2cf15f2bfd4e9fedb2a7a57cac52ba488bda3e73adf3a9022bd534e4722a877d966823fe5c2ea736219612fca8c28e290ff6d2f0dbc101acf4cbf424b7c61de424d9b1c9f68b1edf6ddf5d47a30fe9b7d6f146df6e7c328f5eac2b6db53de93ee2fdb65336e325ec49f834252733fcdc92ee2ae908b9b84d46d1ff3fd875c8dbb3b2ff090000ffff9e7f4ebf45210000") | ||
mewn.AddAsset("../wailsruntimeassets/bridge/", "wailsbridge.prod.js", "1f8b08000000000000ff6490316fdb30108577fe8a074fb6e14a6db7da530b742bd00031e099124fd225ccd1208f528cc0ff3d200d7bc9c0e5ddbbef3d5ebb350070b2ec13fe44762361dd6ff0f3fb8f5fdfce911289e21f59fc169d825c4cb51f274e38c7e030534c1c049ca00123296c0c591c263bb38c458cb44456c225e4883e38aa8821c44ac8bd729006a789042e941d8b489e6c227499bddb414bdcc09eb0b0f7e808399143e5b02425eb1006e84418b2f7f7528dd9b6c6d0fb394485a3c166aff83040dbe23811de2c0b862cb5c14d7eb22951aaa43abddd25742fd46bf94b19f4d6fbcef6afe00123cf248d019ed546dd3f6858df5d9b9a8862fea2010b8b0b4bb39498e6ef4ca2a9f92feb5515f691acbbac768fc4cda1ae5d4d79d783f90c0000ffff2bfba0b2bd010000") | ||
} |
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
Oops, something went wrong.