Skip to content

Commit

Permalink
1.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
toyobayashi committed Feb 12, 2019
1 parent ce9ff14 commit 5aa4f73
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ os:
- osx
before_install:
- node -v
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install yarn --without-node; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install yarn --ignore-dependencies; fi
- yarn --verison
- cd app
- yarn global add node-gyp
Expand Down
8 changes: 4 additions & 4 deletions app/package-lock.json

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

4 changes: 2 additions & 2 deletions app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mishiro",
"version": "1.8.0",
"version": "1.8.1",
"description": "mishiro",
"main": "./public/mishiro.main.js",
"scripts": {
Expand Down Expand Up @@ -76,7 +76,7 @@
"electron-github-asar-updater": "^2.0.0",
"fs-extra": "^7.0.1",
"marked": "^0.5.2",
"mishiro-core": "^1.4.0",
"mishiro-core": "^1.4.1",
"request": "^2.88.0",
"sqlite3": "^4.0.6"
}
Expand Down
26 changes: 23 additions & 3 deletions app/src/ts/renderer/developer-api.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
import { Client } from 'mishiro-core'
import { Client, ServerResponse } from 'mishiro-core'
import { remote } from 'electron'

declare namespace window {
export let decryptBody: typeof Client.decryptBody
export namespace mishiro {
export const encode: typeof Client.cryptoGrapher.encode
export const decode: typeof Client.cryptoGrapher.decode
export const _decryptBody: typeof Client.decryptBody
export function decryptBody (body: string, udid: string): any
export function getProfile (viewer: string | number): Promise<ServerResponse>
}
}

window.decryptBody = Client.decryptBody
window.mishiro = {
encode: Client.cryptoGrapher.encode,
decode: Client.cryptoGrapher.decode,
_decryptBody: Client.decryptBody,
decryptBody (body, udid) {
if (!(/^[0-9a-f\-]{36}$/.test(udid))) {
udid = Client.cryptoGrapher.decode(udid)
}
return Client.decryptBody(body, Buffer.from(udid.replace(/-/g, ''), 'hex'))
},
getProfile (viewer) {
return (remote.getGlobal('client') as Client).post('/profile/get_profile', { friend_id: viewer.toString() })
}
}
4 changes: 2 additions & 2 deletions app/src/ts/renderer/mishiro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ const i18nTabs: any = {
en: 'i18n.english'
}

// const useResVer = require('electron').remote.getGlobal('configurer').getConfig().latestResVer
const useResVer = void 0
const useResVer = require('electron').remote.getGlobal('configurer').getConfig().latestResVer
// const useResVer = void 0

@Component({
components: {
Expand Down

0 comments on commit 5aa4f73

Please sign in to comment.