Fix emojione in electron
This commit is contained in:
parent
4fb04dae09
commit
2112757a2d
4 changed files with 12 additions and 2 deletions
|
@ -14,6 +14,7 @@
|
|||
"angular-mocks": "1.4.x",
|
||||
"html5-boilerplate": "~4.3.0",
|
||||
"underscore": "~1.7",
|
||||
"bootstrap": "~3.1"
|
||||
"bootstrap": "~3.1",
|
||||
"emojione": "~2.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,3 +7,6 @@ var setElectronBadge = function(value) {
|
|||
};
|
||||
|
||||
global.setElectronBadge = setElectronBadge;
|
||||
|
||||
// Let Glowing Bear know it's running as an electron app
|
||||
window.is_electron = 1;
|
||||
|
|
|
@ -104,6 +104,12 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
|
|||
}
|
||||
})();
|
||||
|
||||
if (window.is_electron) {
|
||||
// Use packaged emojione sprite in the electron app
|
||||
emojione.imageType = 'svg';
|
||||
emojione.sprites = true;
|
||||
emojione.imagePathSVGSprites = './3rdparty/emojione.sprites.svg';
|
||||
}
|
||||
|
||||
$rootScope.isWindowFocused = function() {
|
||||
if (typeof $scope.documentHidden === "undefined") {
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
"update-webdriver": "webdriver-manager update",
|
||||
"preprotractor": "npm run update-webdriver",
|
||||
"protractor": "protractor test/protractor-conf.js",
|
||||
"use-local-files": "find bower_components \\( -name \"*min.js\" -o -name \"*min.css\" \\) -exec cp {} 3rdparty \\; ; cp -r bower_components/bootstrap/fonts . ; sed -i 's,https://cdnjs.cloudflare.com/ajax/libs/[^\"]*/,3rdparty/,g' index.html ; sed -i 's, integrity=\".*\" crossorigin=\"anonymous\",,' index.html",
|
||||
"use-local-files": "find bower_components \\( -name \"*min.js\" -o -name \"*min.css\" \\) -exec cp {} 3rdparty \\; ; cp -r bower_components/bootstrap/fonts . ; p bower_components/emojione/assets/sprites/emojione.sprites.svg 3rdparty; sed -i 's,https://cdnjs.cloudflare.com/ajax/libs/[^\"]*/,3rdparty/,g' index.html ; sed -i 's, integrity=\".*\" crossorigin=\"anonymous\",,' index.html",
|
||||
"build-electron-windows": "electron-packager . \"Glowing Bear\" --platform=win32 --arch=ia32 --version=0.37.2 --overwrite --icon=assets/img/favicon.ico --asar=true --version-string.FileDescription=\"Glowing Bear\" --ignore=node_modules --ignore=test",
|
||||
"build-electron-darwin": "electron-packager . \"Glowing Bear\" --platform=darwin --arch=x64 --version=0.37.3 --overwrite --icon=assets/img/glowing-bear.icns --version-string.FileDescription=\"Glowing Bear\" --ignore=node_modules --ignore=test",
|
||||
"build-electron-linux": "electron-packager . \"Glowing Bear\" --platform=linux --arch=x64 --version=0.37.3 --overwrite --icon=assets/img/favicon.ico --version-string.FileDescription=\"Glowing Bear\" --ignore=node_modules --ignore=test",
|
||||
|
|
Loading…
Reference in a new issue