Browse Source

sachen

pull/943/head
phischdev 8 years ago
parent
commit
cc038c53e2
  1. 76
      .sencha/app/Boot.js
  2. 17
      .sencha/app/Microloader.js
  3. 27
      .sencha/app/build-impl.xml
  4. 50
      .sencha/app/defaults.properties
  5. 6
      .sencha/app/init-impl.xml
  6. 28
      .sencha/app/page-impl.xml
  7. 1
      .sencha/app/refresh-impl.xml
  8. 59
      .sencha/app/sass-impl.xml
  9. 2
      .sencha/app/sencha.cfg
  10. 1
      .sencha/app/slice-impl.xml
  11. 8
      app/Application.js
  12. 6
      app/view/main/MainController.js
  13. 2
      electron/tray.js
  14. 201
      package.json
  15. 2
      test/tests/app/example.spec.js

76
.sencha/app/Boot.js

@ -537,9 +537,27 @@ Ext.Boot = Ext.Boot || (function (emptyFn) {
init: function () { init: function () {
var scriptEls = doc.getElementsByTagName('script'), var scriptEls = doc.getElementsByTagName('script'),
script = scriptEls[0],
len = scriptEls.length, len = scriptEls.length,
re = /\/ext(\-[a-z\-]+)?\.js$/, re = /\/ext(\-[a-z\-]+)?\.js$/,
entry, script, src, state, baseUrl, key, n, origin; entry, src, state, baseUrl, key, n, origin;
// No check for script definedness because there always should be at least one
Boot.hasReadyState = ("readyState" in script);
Boot.hasAsync = ("async" in script);
Boot.hasDefer = ("defer" in script);
Boot.hasOnLoad = ("onload" in script);
// Feature detecting IE
Boot.isIE8 = Boot.hasReadyState && !Boot.hasAsync && Boot.hasDefer && !Boot.hasOnLoad;
Boot.isIE9 = Boot.hasReadyState && !Boot.hasAsync && Boot.hasDefer && Boot.hasOnLoad;
Boot.isIE10p = Boot.hasReadyState && Boot.hasAsync && Boot.hasDefer && Boot.hasOnLoad;
Boot.isIE10 = (new Function('/*@cc_on return @_jscript_version @*/')()) === 10;
Boot.isIE10m = Boot.isIE10 || Boot.isIE9 || Boot.isIE8;
// IE11 does not support conditional compilation so we detect it by exclusion
Boot.isIE11 = Boot.isIE10p && !Boot.isIE10;
// Since we are loading after other scripts, and we needed to gather them // Since we are loading after other scripts, and we needed to gather them
// anyway, we track them in _scripts so we don't have to ask for them all // anyway, we track them in _scripts so we don't have to ask for them all
@ -552,12 +570,8 @@ Ext.Boot = Ext.Boot || (function (emptyFn) {
state = script.readyState || null; state = script.readyState || null;
// If we find a script file called "ext-*.js", then the base path is that file's base path. // If we find a script file called "ext-*.js", then the base path is that file's base path.
if (!baseUrl) { if (!baseUrl && re.test(src)) {
if (re.test(src)) { baseUrl = src;
Boot.hasReadyState = ("readyState" in script);
Boot.hasAsync = ("async" in script) || !Boot.hasReadyState;
baseUrl = src;
}
} }
if (!Boot.scripts[key = Boot.canonicalUrl(src)]) { if (!Boot.scripts[key = Boot.canonicalUrl(src)]) {
@ -578,8 +592,6 @@ Ext.Boot = Ext.Boot || (function (emptyFn) {
if (!baseUrl) { if (!baseUrl) {
script = scriptEls[scriptEls.length - 1]; script = scriptEls[scriptEls.length - 1];
baseUrl = script.src; baseUrl = script.src;
Boot.hasReadyState = ('readyState' in script);
Boot.hasAsync = ("async" in script) || !Boot.hasReadyState;
} }
Boot.baseUrl = baseUrl.substring(0, baseUrl.lastIndexOf('/') + 1); Boot.baseUrl = baseUrl.substring(0, baseUrl.lastIndexOf('/') + 1);
@ -1394,27 +1406,36 @@ Ext.Boot = Ext.Boot || (function (emptyFn) {
createLoadElement: function(callback) { createLoadElement: function(callback) {
var me = this, var me = this,
el = me.getElement(), el = me.getElement();
readyStateChange = function(){
me.preserve = true;
el.onerror = function() {
me.error = true;
if (callback) {
callback();
callback = null;
}
};
if (Boot.isIE10m) {
el.onreadystatechange = function() {
if (this.readyState === 'loaded' || this.readyState === 'complete') { if (this.readyState === 'loaded' || this.readyState === 'complete') {
if(callback) { if (callback) {
callback(); callback();
callback = this.onreadystatechange = this.onerror = null;
} }
} }
},
errorFn = function() {
me.error = true;
if(callback) {
callback();
}
}; };
me.preserve = true;
el.onerror = errorFn;
if(Boot.hasReadyState) {
el.onreadystatechange = readyStateChange;
} else {
el.onload = callback;
} }
else {
el.onload = function() {
callback();
callback = this.onload = this.onerror = null;
};
}
// IE starts loading here // IE starts loading here
el[me.prop] = me.getLoadUrl(); el[me.prop] = me.getLoadUrl();
}, },
@ -1541,8 +1562,11 @@ Ext.Boot = Ext.Boot || (function (emptyFn) {
// for async modes, we have some options // for async modes, we have some options
if (!sync) { if (!sync) {
// if cross domain, just inject the script tag and let the onload // if cross domain, just inject the script tag and let the onload
// events drive the progression // events drive the progression.
if(me.isCrossDomain()) { // IE10 also needs sequential loading because of a bug that makes it
// fire readystate event prematurely:
// https://connect.microsoft.com/IE/feedback/details/729164/ie10-dynamic-script-element-fires-loaded-readystate-prematurely
if (Boot.isIE10 || me.isCrossDomain()) {
return me.loadCrossDomain(); return me.loadCrossDomain();
} }
// for IE, use the readyStateChange allows us to load scripts in parallel // for IE, use the readyStateChange allows us to load scripts in parallel

17
.sencha/app/Microloader.js

@ -51,15 +51,24 @@ Ext.Microloader = Ext.Microloader || (function () {
? manifest ? manifest
: manifest + ".json"; : manifest + ".json";
Boot.fetch(url, function(result){ if (location.href.indexOf('file:/') === 0) {
manifest = Ext.manifest = JSON.parse(result.content); Boot.load(url + 'p');
Microloader.load(manifest); }
}); else {
Boot.fetch(url, function(result){
Microloader.setManifest(JSON.parse(result.content));
});
}
} else { } else {
Microloader.load(manifest); Microloader.load(manifest);
} }
}, },
setManifest: function(cfg) {
manifest = Ext.manifest = cfg;
Microloader.load(manifest);
},
/** /**
* *
* @param manifestDef * @param manifestDef

27
.sencha/app/build-impl.xml

@ -463,6 +463,33 @@ this file in most cases.
depends="init,-before-publish,-publish,-after-publish" depends="init,-before-publish,-publish,-after-publish"
description="Publish app to Sencha Web Application Manager"/> description="Publish app to Sencha Web Application Manager"/>
<!--
===============================================================
Build Dependencies
uses the compiler to build metadata files for all detected
file-to-file dependencies
===============================================================
-->
<target name="build-dependencies" depends="init, -detect-app-build-properties">
<x-compile refid="${compiler.ref.id}">
<![CDATA[
restore
page
and
meta
-infoType=Dependencies
-basePath=${build.dir}
-tpl={0}
-out=${build.dir}/dependencies.json
and
meta
-infoType=AppManifest
-basePath=${build.dir}
-tpl={0}
-out=${build.dir}/bootsequence.json
]]>
</x-compile>
</target>
<!-- <!--
=============================================================== ===============================================================

50
.sencha/app/defaults.properties

@ -1,7 +1,7 @@
# ============================================================================= # =============================================================================
# This file defines properties used by build-impl.xml and the associated # This file defines properties used by build-impl.xml and the associated
# *-impl.xml files (sass-impl.xml, js-impl.xml, etc.), which are the core of # *-impl.xml files (sass-impl.xml, js-impl.xml, etc.), which are the core of
# the applications build process. # the applications build process.
# #
# This file represents the lowest priority file for defining these properties # This file represents the lowest priority file for defining these properties
# as well as the place to look for documentation and learning what properties # as well as the place to look for documentation and learning what properties
@ -48,7 +48,7 @@
# See "sencha help app build" for details. # See "sencha help app build" for details.
# #
# The corresponding properties files: # The corresponding properties files:
# (production.properties, testing.properties, etc.) provide examples of # (production.properties, testing.properties, etc.) provide examples of
# overriding sets of properties depending on the selected environment # overriding sets of properties depending on the selected environment
# NOTE: this replaces the deprecated args.environment # NOTE: this replaces the deprecated args.environment
app.environment=production app.environment=production
@ -236,13 +236,13 @@ build.options=logger:${build.options.logger},debug:${build.options.debug},produc
# This property can be modified to change general build options # This property can be modified to change general build options
# such as excluding files from the set. The format expects newlines # such as excluding files from the set. The format expects newlines
# for each argument, for example: # for each argument, for example:
# #
# build.operations=\ # build.operations=\
# exclude\n \ # exclude\n \
# -namespace=Ext\n # -namespace=Ext\n
# #
# NOTE: modifications to build.operations are intended to be # NOTE: modifications to build.operations are intended to be
# placed in an override of the "-after-init" target, where it # placed in an override of the "-after-init" target, where it
# can be calculated based on other # can be calculated based on other
# ant properties # ant properties
# #
@ -268,7 +268,7 @@ build.optimize.enable=\
build.optimize.disable= build.optimize.disable=
build.optimize=${build.optimize.disable} build.optimize=${build.optimize.disable}
# enables / disables removing text references from # enables / disables removing text references from
# package js build files # package js build files
build.remove.references=true build.remove.references=true
@ -282,10 +282,10 @@ build.optimize.string.references=true
# enables / disables yui compression # enables / disables yui compression
build.compression.yui=${app.output.js.compress} build.compression.yui=${app.output.js.compress}
# enables / disables closure compression # enables / disables closure compression
build.compression.closure=0 build.compression.closure=0
# enables / disables uglify compression # enables / disables uglify compression
build.compression.ugilfy=0 build.compression.ugilfy=0
@ -296,8 +296,8 @@ build.compile.temp.dir.keep=true
# ------------------------------------------ # ------------------------------------------
# DOC ONLY - Do Not Set # DOC ONLY - Do Not Set
# this variable will be set to the appropriate compressor # this variable will be set to the appropriate compressor
# option, and is calculated in init-impl.xml, but may be overridded in # option, and is calculated in init-impl.xml, but may be overridded in
# app.properties, <environment>.properties, or via command line # app.properties, <environment>.properties, or via command line
# #
# build.compression= # build.compression=
@ -312,8 +312,8 @@ build.compile.temp.dir.keep=true
# markup, or left as a separate resource # markup, or left as a separate resource
build.enable.embedded.microloader=${app.output.microloader.embed} build.enable.embedded.microloader=${app.output.microloader.embed}
# whether to include the page's manifest.json code with the # whether to include the page's manifest.json code with the
# microloader content. Production.properties files should set this to # microloader content. Production.properties files should set this to
# false to have manifest.json exist as a server resource. # false to have manifest.json exist as a server resource.
build.enable.embedded.manifest=${app.output.manifest.embed} build.enable.embedded.manifest=${app.output.manifest.embed}
@ -348,18 +348,18 @@ app.microloader=${app.microloader.dir}/${app.microloader.name}
app.microloader.path=${app.microloader} app.microloader.path=${app.microloader}
# specifies how to embed the microloader code into the output markup # specifies how to embed the microloader code into the output markup
# {0} is replaced with the content of the microloader file specified # {0} is replaced with the content of the microloader file specified
# by app.microloader.path # by app.microloader.path
build.microloader.code.tpl={0} build.microloader.code.tpl={0}
# the template to use when generating a stand-alone json manifest file # the template to use when generating a stand-alone json manifest file
build.microloader.json.tpl.standalone={0} build.microloader.json.tpl.standalone={0}
# the template to use when embedding the manifest json directly next to the # the template to use when embedding the manifest json directly next to the
# microloader in the output microloader content # microloader in the output microloader content
build.microloader.json.tpl.embedded=Ext.blink({0}); build.microloader.json.tpl.embedded=Ext.blink({0});
# the template to use in the output microloader content when supplying # the template to use in the output microloader content when supplying
# the manifest json as a separate server-side resource ('production' builds) # the manifest json as a separate server-side resource ('production' builds)
build.microloader.json.tpl.external=Ext.blink('{'id:''${app.id}'''}'); build.microloader.json.tpl.external=Ext.blink('{'id:''${app.id}'''}');
@ -383,7 +383,7 @@ build.external.microloader.markup=<script id="microloader" data-app="${app.id}"
# currently unused : is a placeholder for future microloader interactions # currently unused : is a placeholder for future microloader interactions
build.microloader.mode=${build.environment} build.microloader.mode=${build.environment}
# the tag name to use when generating the compiler save set for # the tag name to use when generating the compiler save set for
# the page's js code # the page's js code
build.tag.name=full-page build.tag.name=full-page
@ -485,7 +485,7 @@ enable.ext42.themes=false
enable.touch.themes=false enable.touch.themes=false
# -------------------- # --------------------
# selector count threshold to use when # selector count threshold to use when
# splitting a single css file into multiple # splitting a single css file into multiple
# css files (IE selector limit workaround) # css files (IE selector limit workaround)
# #
@ -497,7 +497,7 @@ build.css.selector.limit=${app.output.css.split}
build.css.preprocess=${app.output.css.preprocess} build.css.preprocess=${app.output.css.preprocess}
# sets the css preprocessor options, in the form: # sets the css preprocessor options, in the form:
# name1:value1,name2:value2,... # name1:value1,name2:value2,...
build.css.preprocessor.opts= build.css.preprocessor.opts=
# enables / disable css compressor (enable.ext42.themes only) # enables / disable css compressor (enable.ext42.themes only)
@ -580,7 +580,7 @@ theme.name=default
# ***************************************************************************** # *****************************************************************************
# the resources directory of the application # the resources directory of the application
# note: this property is currently only used for building ext 4.1 style themes # note: this property is currently only used for building ext 4.1 style themes
# (used by x-build-theme and x-copy-resources in slice-impl.xml) # (used by x-build-theme and x-copy-resources in slice-impl.xml)
app.resources.dir=${app.dir}/resources app.resources.dir=${app.dir}/resources
@ -592,7 +592,7 @@ app.example.dir=${app.dir}/sass/example
app.example.css.name=example.css app.example.css.name=example.css
app.example.css.file=${app.example.dir}/${app.example.css.name} app.example.css.file=${app.example.dir}/${app.example.css.name}
# the base path for generating the bootstrap code for the # the base path for generating the bootstrap code for the
# slicer page # slicer page
bootstrap.base.path=${app.example.dir} bootstrap.base.path=${app.example.dir}
@ -603,7 +603,7 @@ bootstrap.example.js=${app.example.dir}/bootstrap.js
bootstrap.example.json.name=bootstrap.json bootstrap.example.json.name=bootstrap.json
bootstrap.example.json=${app.example.dir}/${bootstrap.example.json.name} bootstrap.example.json=${app.example.dir}/${bootstrap.example.json.name}
# this is the directory used for intermediate build artifacts used # this is the directory used for intermediate build artifacts used
# by the slicer for generating theme images # by the slicer for generating theme images
app.example.build.dir=${build.temp.dir}/slicer-temp app.example.build.dir=${build.temp.dir}/slicer-temp
@ -644,7 +644,7 @@ build.slice.options=
# ***************************************************************************** # *****************************************************************************
# Packager # Packager
# these properties control features of the native packaging phase of the # these properties control features of the native packaging phase of the
# build process # build process
# ***************************************************************************** # *****************************************************************************
@ -655,13 +655,13 @@ enable.desktop.packager=false
# skips packaging the built application with cordova/phonegap # skips packaging the built application with cordova/phonegap
skip.native-package=false skip.native-package=false
# a property that controls whether a standalone manifest.json file will be # a property that controls whether a standalone manifest.json file will be
# generated for the native packaged application # generated for the native packaged application
enable.standalone.manifest=false enable.standalone.manifest=false
# ***************************************************************************** # *****************************************************************************
# Resolve # Resolve
# these properties control aspects of the dynamic dependency resolver, which # these properties control aspects of the dynamic dependency resolver, which
# uses phantomjs to load the application and extract Ext.Loader class load # uses phantomjs to load the application and extract Ext.Loader class load
# history. # history.
# ***************************************************************************** # *****************************************************************************
@ -691,7 +691,7 @@ build.resolve.mode=references
# the output file for the detected dynamic dependencies # the output file for the detected dynamic dependencies
build.resolve.file=${build.temp.dir}/resolve.json build.resolve.file=${build.temp.dir}/resolve.json
# controls whether unmatched external references in the specified file will # controls whether unmatched external references in the specified file will
# generate build warnings or build failures # generate build warnings or build failures
build.resolve.allow.unmatched=true build.resolve.allow.unmatched=true

6
.sencha/app/init-impl.xml

@ -144,6 +144,8 @@
<property name="app.sass.fashion" value="false"/> <property name="app.sass.fashion" value="false"/>
<property name="app.sass.rhino" value="false"/> <property name="app.sass.rhino" value="false"/>
<property name="app.sass.dynamic" value="false"/> <property name="app.sass.dynamic" value="false"/>
<property name="app.sass.generated.var" value="${app.sass.save}"/>
</target> </target>
<target name="-after-init"/> <target name="-after-init"/>
@ -403,7 +405,9 @@
defaultSassFile="${app.out.scss}" defaultSassFile="${app.out.scss}"
defaultCssFile="${app.out.css}" defaultCssFile="${app.out.css}"
refid="app.web.server" refid="app.web.server"
saveVariablesProp="app.sass.save" saveVariablesProp="app.sass.generated.var"
uiDirProp="app.sass.generated.src"
sassNamespaceProp="app.sass.namespace"
j2eeMode="${use.webxml}"> j2eeMode="${use.webxml}">
<mapping name="~cmd" path="${cmd.dir}"/> <mapping name="~cmd" path="${cmd.dir}"/>
<mapping name="" path="${build.web.root}"/> <mapping name="" path="${build.web.root}"/>

28
.sencha/app/page-impl.xml

@ -2,15 +2,22 @@
<macrodef name="x-build-microload-markup"> <macrodef name="x-build-microload-markup">
<sequential> <sequential>
<x-sencha-command dir="${app.dir}" inheritall="true"> <if>
<![CDATA[ <not>
fs <equals arg1="${build.compression}" arg2=""/>
minify </not>
${build.embedded.microloader.compressor} <then>
-from=${build.microloader.path} <x-sencha-command dir="${app.dir}" inheritall="true">
-to=${build.microloader.path} <![CDATA[
]]> fs
</x-sencha-command> minify
${build.embedded.microloader.compressor}
-from=${build.microloader.path}
-to=${build.microloader.path}
]]>
</x-sencha-command>
</then>
</if>
<if> <if>
<x-is-true value="${build.enable.embedded.microloader}"/> <x-is-true value="${build.enable.embedded.microloader}"/>
<then> <then>
@ -55,6 +62,7 @@
# generate json file # generate json file
microload microload
-operation=manifest -operation=manifest
-jsonp=Ext.Microloader.setManifest
-fashion=${use.fashion} -fashion=${use.fashion}
-tpl=${build.microloader.json.tpl.embedded} -tpl=${build.microloader.json.tpl.embedded}
-out=${build.microloader.path} -out=${build.microloader.path}
@ -77,6 +85,7 @@
# generate json file # generate json file
microload microload
-operation=manifest -operation=manifest
-jsonp=Ext.Microloader.setManifest
-fashion=${use.fashion} -fashion=${use.fashion}
-tpl=${build.microloader.json.tpl.standalone} -tpl=${build.microloader.json.tpl.standalone}
-out=${build.out.json.path} -out=${build.out.json.path}
@ -85,6 +94,7 @@
and and
microload microload
-operation=manifest -operation=manifest
-jsonp=Ext.Microloader.setManifest
-fashion=${use.fashion} -fashion=${use.fashion}
-tpl=${build.microloader.json.tpl.external} -tpl=${build.microloader.json.tpl.external}
-out=${build.microloader.path} -out=${build.microloader.path}

1
.sencha/app/refresh-impl.xml

@ -78,6 +78,7 @@ Ext.manifest = Ext.manifest || "${build.json.bootstrap.rel.path}";
and and
microload microload
-operation=manifest -operation=manifest
-jsonp=Ext.Microloader.setManifest
-fashion=${use.fashion} -fashion=${use.fashion}
-bootstrap -bootstrap
+ignoreDisabled +ignoreDisabled

59
.sencha/app/sass-impl.xml

@ -209,17 +209,74 @@
compress="${build.css.compress}" compress="${build.css.compress}"
compilerRefId="${compiler.ref.id}"/> compilerRefId="${compiler.ref.id}"/>
<x-compile refid="${compiler.ref.id}">
<![CDATA[
microload
-operation=manifest
-fashion=false
-tpl=${build.microloader.json.tpl.standalone}
-out=${build.out.json.path}
-resourcePath=${build.out.base.path}
-basePath=${build.out.metadata.dir}
]]>
</x-compile>
<x-sencha-command> <x-sencha-command>
fashion fashion
-config=${build.out.json.path}
-compress=${build.css.compress} -compress=${build.css.compress}
-split=${build.css.selector.limit} -split=${build.css.selector.limit}
-saveFile=${app.dir}/${app.sass.save} -saveFile=${app.dir}/${app.sass.generated.var}
${app.out.scss} ${app.out.scss}
${app.out.css} ${app.out.css}
</x-sencha-command> </x-sencha-command>
<x-update-css-array input="${app.out.css}" <x-update-css-array input="${app.out.css}"
compilerRefId="${compiler.ref.id}"/> compilerRefId="${compiler.ref.id}"/>
<if>
<and>
<available file="${build.out.css.dir}/css-vars.js"/>
</and>
<then>
<x-sencha-command>
<![CDATA[
fs
concat
-to=${build.out.css.dir}/css-vars.js.tmp
${cmd.dir}/extensions/sencha-fashion/fashion/fashion-export-min.js
${build.out.css.dir}/css-vars.js
]]>
</x-sencha-command>
<if>
<not>
<equals arg1="${build.compression}" arg2=""/>
</not>
<then>
<x-compress-js srcFile="${build.out.css.dir}/css-vars.js.tmp"
outFile="${build.out.css.dir}/css-vars.js.tmp"/>
</then>
</if>
<delete file="${build.out.css.dir}/css-vars.js"/>
<move file="${build.out.css.dir}/css-vars.js.tmp"
tofile="${build.out.css.dir}/css-vars.js"/>
<if>
<not>
<equals arg1="${build.environment}" arg2="development"/>
</not>
<then>
<concat destfile="${build.out.js.path}" append="true">
<filelist files="${build.out.css.dir}/css-vars.js"/>
</concat>
</then>
</if>
</then>
</if>
</else> </else>
</if> </if>
</then> </then>

2
.sencha/app/sencha.cfg

@ -42,4 +42,4 @@ app.resource.paths=${app.dir}/resources
app.framework.version=5.1.1.451 app.framework.version=5.1.1.451
app.cmd.version=6.1.2.15 app.cmd.version=6.2.2.36

1
.sencha/app/slice-impl.xml

@ -182,6 +182,7 @@ Ext.Boot.loadSync([
<![CDATA[ <![CDATA[
slicer-manifest slicer-manifest
-exclude=${manifest.root.excludes} -exclude=${manifest.root.excludes}
-jsonp=Ext.Microloader.setManifest
-removeBootstrapCssEntries=${remove.slicer.css.bootstrap.entries} -removeBootstrapCssEntries=${remove.slicer.css.bootstrap.entries}
+ignoreDisabled +ignoreDisabled
-basePath=${bootstrap.base.path} -basePath=${bootstrap.base.path}

8
app/Application.js

@ -26,7 +26,9 @@ Ext.define('Rambox.Application', {
,getStoredServices: function () { ,getStoredServices: function () {
var stored = Ext.getStore('Services').load(); var stored = Ext.getStore('Services').load();
stored = stored.data.items; stored = stored.data.items;
stored = stored.map(g => g.data); stored = stored.map( function (g) {
return g.data;
});
return stored; return stored;
} }
,defaultServices: function () { ,defaultServices: function () {
@ -423,9 +425,9 @@ Ext.define('Rambox.Application', {
,updateTotalNotifications: function( newValue, oldValue ) { ,updateTotalNotifications: function( newValue, oldValue ) {
newValue = parseInt(newValue); newValue = parseInt(newValue);
if ( newValue > 0 ) { if ( newValue > 0 ) {
document.title = 'Rambox (' + Rambox.util.Format.formatNumber(newValue) + ')'; document.title = 'HumanistenBox (' + Rambox.util.Format.formatNumber(newValue) + ')';
} else { } else {
document.title = 'Rambox'; document.title = 'HumanistenBox';
} }
} }

6
app/view/main/MainController.js

@ -96,7 +96,7 @@ Ext.define('Rambox.view.main.MainController', {
var me = this; var me = this;
// Clear counter for unread messaging // Clear counter for unread messaging
document.title = 'Rambox'; document.title = 'HumanistenBox';
if ( btn ) { if ( btn ) {
Ext.Msg.confirm('Please confirm...', 'Are you sure you want to remove all services?', function(btnId) { Ext.Msg.confirm('Please confirm...', 'Are you sure you want to remove all services?', function(btnId) {
@ -108,7 +108,7 @@ Ext.define('Rambox.view.main.MainController', {
Ext.getStore('Services').load(); Ext.getStore('Services').load();
if ( Ext.isFunction(callback) ) callback(); if ( Ext.isFunction(callback) ) callback();
Ext.cq1('app-main').resumeEvent('remove'); Ext.cq1('app-main').resumeEvent('remove');
document.title = 'Rambox'; document.title = 'HumanistenBox';
} }
}); });
} else { } else {
@ -119,7 +119,7 @@ Ext.define('Rambox.view.main.MainController', {
Ext.getStore('Services').load(); Ext.getStore('Services').load();
if ( Ext.isFunction(callback) ) callback(); if ( Ext.isFunction(callback) ) callback();
Ext.cq1('app-main').resumeEvent('remove'); Ext.cq1('app-main').resumeEvent('remove');
document.title = 'Rambox'; document.title = 'HumanistenBox';
} }
} }

2
electron/tray.js

@ -48,7 +48,7 @@ exports.create = function(win, config) {
]); ]);
appIcon = new Tray(iconPath); appIcon = new Tray(iconPath);
appIcon.setToolTip('Rambox'); appIcon.setToolTip('HumanistenBox');
appIcon.setContextMenu(contextMenu); appIcon.setContextMenu(contextMenu);
appIcon.on('click', () => { appIcon.on('click', () => {
if ( !win.isVisible() ) { if ( !win.isVisible() ) {

201
package.json

@ -1,102 +1,103 @@
{ {
"private": true, "private": true,
"scripts": { "scripts": {
"start": "electron electron/main.js", "start": "electron electron/main.js",
"start:debug": "electron electron/main.js --enable-logging", "start:debug": "electron electron/main.js --enable-logging",
"test": "./node_modules/.bin/mocha test/tests/**/*.spec.js", "test": "./node_modules/.bin/mocha test/tests/**/*.spec.js",
"sencha:clean": "rm -rf ./build/production", "sencha:clean": "rm -rf ./build/production",
"sencha:compile": "sencha app build && cp app/package.json build/production/Rambox/ && npm --prefix ./build/production/Rambox/ install ./build/production/Rambox/", "sencha:compile": "sencha app build && cp app/package.json build/production/Rambox/ && npm --prefix ./build/production/Rambox/ install ./build/production/Rambox/",
"sencha:compile:build": "sencha app build && cp app/package.json build/production/Rambox/ && cp -R build/production/Rambox/* ../rambox-build", "sencha:compile:build": "sencha app build && cp app/package.json build/production/Rambox/ && cp -R build/production/Rambox/* ../rambox-build",
"clean": "rm -rf ./dist", "clean": "rm -rf ./dist",
"clean:osx": "rm -rf ./dist/Rambox-darwin-*", "clean:osx": "rm -rf ./dist/Rambox-darwin-*",
"clean:win": "rm -rf ./dist/Rambox-win32-*", "clean:win": "rm -rf ./dist/Rambox-win32-*",
"pack": "npm run pack:osx && npm run pack:win", "pack": "npm run pack:osx && npm run pack:win",
"pack:osx": "electron-packager \"./build/production/Rambox/\" \"Rambox\" --out=dist --platform=darwin --arch=x64 --version=1.3.4 --icon=resources/installer/Icon.icns --app-version=0.2.0 --build-version=64-bit --version-string.CompanyName=\"Rambox\" --version-string.ProductName=\"Rambox\" --asar --prune --overwrite", "pack:osx": "electron-packager \"./build/production/Rambox/\" \"Rambox\" --out=dist --platform=darwin --arch=x64 --version=1.3.4 --icon=resources/installer/Icon.icns --app-version=0.2.0 --build-version=64-bit --version-string.CompanyName=\"Rambox\" --version-string.ProductName=\"Rambox\" --asar --prune --overwrite",
"pack:win": "npm run pack:win32 && npm run pack:win64", "pack:win": "npm run pack:win32 && npm run pack:win64",
"pack:win32": "electron-packager \"./build/production/Rambox/\" \"Rambox\" --out=dist --platform=win32 --arch=ia32 --version=1.3.4 --icon=resources/installer/Icon.ico --app-version=0.2.0 --build-version=32-bit --version-string.CompanyName=\"Rambox\" --version-string.ProductName=\"Rambox\" --asar --prune --overwrite", "pack:win32": "electron-packager \"./build/production/Rambox/\" \"Rambox\" --out=dist --platform=win32 --arch=ia32 --version=1.3.4 --icon=resources/installer/Icon.ico --app-version=0.2.0 --build-version=32-bit --version-string.CompanyName=\"Rambox\" --version-string.ProductName=\"Rambox\" --asar --prune --overwrite",
"pack:win64": "electron-packager \"./build/production/Rambox/\" \"Rambox\" --out=dist --platform=win32 --arch=x64 --version=1.3.4 --icon=resources/installer/Icon.ico --app-version=0.2.0 --build-version=64-bit --version-string.CompanyName=\"Rambox\" --version-string.ProductName=\"Rambox\" --asar --prune --overwrite", "pack:win64": "electron-packager \"./build/production/Rambox/\" \"Rambox\" --out=dist --platform=win32 --arch=x64 --version=1.3.4 --icon=resources/installer/Icon.ico --app-version=0.2.0 --build-version=64-bit --version-string.CompanyName=\"Rambox\" --version-string.ProductName=\"Rambox\" --asar --prune --overwrite",
"pack:linux": "npm run pack:linux32 && npm run pack:linux64", "pack:linux": "npm run pack:linux32 && npm run pack:linux64",
"pack:linux32": "electron-packager \"./build/production/Rambox/\" \"Rambox\" --out=dist --platform=linux --arch=ia32 --version=1.3.4 --icon=resources/installer/Icon.ico --app-version=0.2.0 --build-version=64-bit --version-string.CompanyName=\"Rambox\" --version-string.ProductName=\"Rambox\" --asar --prune --overwrite", "pack:linux32": "electron-packager \"./build/production/Rambox/\" \"Rambox\" --out=dist --platform=linux --arch=ia32 --version=1.3.4 --icon=resources/installer/Icon.ico --app-version=0.2.0 --build-version=64-bit --version-string.CompanyName=\"Rambox\" --version-string.ProductName=\"Rambox\" --asar --prune --overwrite",
"pack:linux64": "electron-packager \"./build/production/Rambox/\" \"Rambox\" --out=dist --platform=linux --arch=x64 --version=1.3.4 --icon=resources/installer/Icon.ico --app-version=0.2.0 --build-version=64-bit --version-string.CompanyName=\"Rambox\" --version-string.ProductName=\"Rambox\" --asar --prune --overwrite", "pack:linux64": "electron-packager \"./build/production/Rambox/\" \"Rambox\" --out=dist --platform=linux --arch=x64 --version=1.3.4 --icon=resources/installer/Icon.ico --app-version=0.2.0 --build-version=64-bit --version-string.CompanyName=\"Rambox\" --version-string.ProductName=\"Rambox\" --asar --prune --overwrite",
"build": "npm run build:linux && npm run build:osx && npm run build:win", "build": "npm run build:linux && npm run build:osx && npm run build:win",
"build:osx": "build --macos", "build:osx": "build --macos",
"build:linux": "npm run build:linux32 && npm run build:linux64", "build:linux": "npm run build:linux32 && npm run build:linux64",
"build:linux32": "build --linux --ia32", "build:linux32": "build --linux --ia32",
"build:linux64": "build --linux --x64", "build:linux64": "build --linux --x64",
"build:win32": "build --win --ia32", "build:win32": "build --win --ia32",
"build:win64": "build --win --x64", "build:win64": "build --win --x64",
"setup:osx": "npm run sencha:clean && npm run sencha:compile && npm run clean:osx && npm run pack:osx && npm run build:osx", "setup:osx": "npm run sencha:clean && npm run sencha:compile && npm run clean:osx && npm run pack:osx && npm run build:osx",
"setup:win": "npm run sencha:clean && npm run sencha:compile && npm run clean:win && npm run pack:win && npm run build:win", "setup:win": "npm run sencha:clean && npm run sencha:compile && npm run clean:win && npm run pack:win && npm run build:win",
"all:win": "npm run sencha:clean && npm run sencha:compile && npm run clean:win && npm run pack:win && npm run zip:win32 && npm run zip:win64 && npm run build:win", "all:win": "npm run sencha:clean && npm run sencha:compile && npm run clean:win && npm run pack:win && npm run zip:win32 && npm run zip:win64 && npm run build:win",
"all:linux": "npm run sencha:clean && npm run sencha:compile && npm run build:linux" "all:linux": "npm run sencha:clean && npm run sencha:compile && npm run build:linux"
}, },
"build": { "build": {
"productName": "Rambox", "productName": "Rambox",
"appId": "com.saenzramiro.rambox", "appId": "com.saenzramiro.rambox",
"asar": true, "asar": true,
"mac": { "mac": {
"category": "public.app-category.productivity", "category": "public.app-category.productivity",
"target": [ "target": [
"default" "default"
] ]
}, },
"dmg": { "dmg": {
"title": "Rambox", "title": "Rambox",
"iconSize": 128, "iconSize": 128,
"contents": [ "contents": [
{ {
"x": 355, "x": 355,
"y": 125, "y": 125,
"type": "link", "type": "link",
"path": "/Applications" "path": "/Applications"
}, },
{ {
"x": 155, "x": 155,
"y": 125, "y": 125,
"type": "file" "type": "file"
} }
] ]
}, },
"squirrelWindows": { "squirrelWindows": {
"iconUrl": "https://raw.githubusercontent.com/saenzramiro/rambox/master/resources/Icon.ico" "iconUrl": "https://raw.githubusercontent.com/saenzramiro/rambox/master/resources/Icon.ico"
}, },
"win": { "win": {
"target": [ "target": [
"squirrel", "squirrel",
"zip" "zip"
] ]
}, },
"linux": { "linux": {
"category": "Office", "category": "Office",
"target": [ "target": [
"AppImage", "AppImage",
"deb", "deb",
"rpm", "rpm",
"zip", "zip",
"tar.gz" "tar.gz"
] ]
}, },
"directories": { "directories": {
"buildResources": "resources/installer/", "buildResources": "resources/installer/",
"output": "dist/", "output": "dist/",
"app": "build/production/Rambox/" "app": "build/production/Rambox/"
} }
}, },
"devDependencies": { "devDependencies": {
"asar": "^0.12.1", "asar": "^0.12.1",
"electron": "^1.6.1", "electron": "^1.6.1",
"electron-builder": "^14.5.3", "electron-builder": "^14.5.3",
"electron-builder-squirrel-windows": "15.0.0", "electron-builder-squirrel-windows": "15.0.0",
"electron-squirrel-startup": "^1.0.0", "electron-squirrel-startup": "^1.0.0",
"chai": "3.5.0", "chai": "3.5.0",
"mocha": "3.2.0", "mocha": "3.2.0",
"spectron": "3.4.0" "spectron": "3.4.0"
}, },
"dependencies": { "dependencies": {
"auto-launch": "4.0.0", "auto-launch": "4.0.0",
"tmp": "0.0.28", "electron": "^1.6.6",
"mime": "^1.3.4", "electron-config": "0.2.1",
"electron-is-dev": "^0.1.1", "electron-is-dev": "^0.1.1",
"electron-config": "0.2.1" "mime": "^1.3.4",
} "tmp": "0.0.28"
}
} }

2
test/tests/app/example.spec.js

@ -17,7 +17,7 @@ describe('Rambox window', function() {
it('should have "Rambox" in the title', function () { it('should have "Rambox" in the title', function () {
return ramboxTestHelper.app.client.browserWindow.getTitle().then(function(title) { return ramboxTestHelper.app.client.browserWindow.getTitle().then(function(title) {
expect(title).to.contain('Rambox'); expect(title).to.contain('HumanistenBox');
return Promise.resolve(); return Promise.resolve();
}); });
}) })

Loading…
Cancel
Save