Skip to content

Commit

Permalink
Merge pull request #2 from xsolla/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
katerinapsperm authored Feb 13, 2017
2 parents 2088511 + 60732d9 commit 54e3624
Show file tree
Hide file tree
Showing 15 changed files with 86 additions and 141 deletions.
14 changes: 1 addition & 13 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,7 @@ jspm_packages
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff:
.idea/workspace.xml
.idea/tasks.xml
.idea/dictionaries
.idea/vcs.xml
.idea/jsLibraryMappings.xml

# Sensitive or high-churn files:
.idea/dataSources.ids
.idea/dataSources.xml
.idea/dataSources.local.xml
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
.idea/

# Gradle:
.idea/gradle.xml
Expand Down
3 changes: 0 additions & 3 deletions .idea/copyright/profiles_settings.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/encodings.xml

This file was deleted.

84 changes: 0 additions & 84 deletions .idea/misc.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/xsolla-login-lib.iml

This file was deleted.

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.1.1 - 2017-02-13

- [fix] Compatibility with IE 11

## 1.1.0 - 2017-02-09

- [feature] Event handler after widget was loaded
Expand Down
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ To use the SDK in the browser, simply add the following script tag to your
HTML pages:

```html
<script src="https://static.xsolla.com/xsolla-login/1.1.0/xl.min.js"></script>
<script src="https://static.xsolla.com/xsolla-login/1.1.1/xl.min.js"></script>
```
### Using Bower

Expand Down Expand Up @@ -50,6 +50,37 @@ SDK supports two types of integration:
1. API call integration

You can mix intefration types within project.

### Authentication widget
You can add a standard authentication widget using the example below. The layout can be customized using CSS.
The default block width is 400 px; the height depends on the authentication options.

To add an Xsolla Login widget to your game:
1. Enable js-sdk.js in the `<head>` tag:
1. Add the initialization code in the `<body>` tag:

```html
<script type="text/javascript">
XL.init({
projectId: '40db2ea4-5p47-11e6-a3ff-005056a0e04a',
locale: 'en_US',
onlyWidgets: true,
redirectUrl: '<your redirect url>',
fields: 'email'
});
</script>

<div id="xl_auth"></div>
<script type="text/javascript">
var element_id = 'xl_auth';
var options = {
width: '200px',
height: '200px'
};
XL.AuthWidget(element_id, options);
</script>
```

### Markup Integration
You can integrate Xsolla Login simply mark your code html controls with `data-xl-auth=""` attribute so SDK automatically applies appropriate `onclick` handler.

Expand Down
32 changes: 24 additions & 8 deletions dist/xl.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/xl.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/xl.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function setupBrowserify(watch) {
standalone: 'XL',
fullPaths: false,
debug: true,
transform: [["babelify", { "presets": ["es2015"] }]]
transform: [["babelify", { "presets": ["es2015"], "plugins": ["transform-object-assign"] }]]
};
var bundler = browserify('./src/main.js', bundleOptions);
bundler.require('./src/main.js', {entry: true, expose: 'main'});
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xsolla-login-lib",
"version": "1.1.0",
"version": "1.1.1",
"description": "",
"main": "src/main.js",
"scripts": {
Expand All @@ -13,6 +13,7 @@
"winchan": "^0.1.2"
},
"devDependencies": {
"babel-plugin-transform-object-assign": "^6.22.0",
"babel-preset-es2015": "^6.18.0",
"babelify": "^7.3.0",
"bower": "1.4.1",
Expand Down
Loading

0 comments on commit 54e3624

Please sign in to comment.