remove libloki references from ingored files
							parent
							
								
									12d9a8db78
								
							
						
					
					
						commit
						92814ba36c
					
				| @ -1,38 +0,0 @@ | ||||
| const path = require('path'); | ||||
| const process = require('process'); | ||||
| 
 | ||||
| const { app } = require('electron'); | ||||
| 
 | ||||
| const { start } = require('./base_config'); | ||||
| 
 | ||||
| let storageProfile; | ||||
| 
 | ||||
| // Node makes sure all environment variables are strings
 | ||||
| const { NODE_ENV: environment, NODE_APP_INSTANCE: instance } = process.env; | ||||
| 
 | ||||
| // We need to make sure instance is not empty
 | ||||
| const isValidInstance = typeof instance === 'string' && instance.length > 0; | ||||
| const isProduction = environment === 'production' && !isValidInstance; | ||||
| 
 | ||||
| // Use seperate data directories for each different environment and app instances
 | ||||
| if (!isProduction) { | ||||
|   storageProfile = environment; | ||||
|   if (isValidInstance) { | ||||
|     storageProfile = storageProfile.concat(`-${instance}`); | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| if (storageProfile) { | ||||
|   const userData = path.join(app.getPath('appData'), `Session-${storageProfile}`); | ||||
| 
 | ||||
|   app.setPath('userData', userData); | ||||
| } | ||||
| 
 | ||||
| console.log(`userData: ${app.getPath('userData')}`); | ||||
| 
 | ||||
| const userDataPath = app.getPath('userData'); | ||||
| const targetPath = path.join(userDataPath, 'config.json'); | ||||
| 
 | ||||
| const userConfig = start('user', targetPath); | ||||
| 
 | ||||
| module.exports = userConfig; | ||||
| @ -0,0 +1,65 @@ | ||||
| "use strict"; | ||||
| /* global Whisper, Backbone, Mustache, _, $ */ | ||||
| /* | ||||
|  * Whisper.View | ||||
|  * | ||||
|  * This is the base for most of our views. The Backbone view is extended | ||||
|  * with some conveniences: | ||||
|  * | ||||
|  * 1. Pre-parses all our mustache templates for performance. | ||||
|  * https://github.com/janl/mustache.js#pre-parsing-and-caching-templates
 | ||||
|  * | ||||
|  * 2. Defines a default definition for render() which allows sub-classes | ||||
|  * to simply specify a templateName and renderAttributes which are plugged | ||||
|  * into Mustache.render | ||||
|  * | ||||
|  * 3. Makes all the templates available for rendering as partials. | ||||
|  * https://github.com/janl/mustache.js#partials
 | ||||
|  * | ||||
|  * 4. Provides some common functionality, e.g. confirmation dialog | ||||
|  * | ||||
|  */ | ||||
| // eslint-disable-next-line func-names
 | ||||
| (function () { | ||||
|     'use strict'; | ||||
|     window.Whisper = window.Whisper || {}; | ||||
|     // window.Whisper.View = Backbone.View.extend(
 | ||||
|     //   {
 | ||||
|     //     constructor(...params: any) {
 | ||||
|     //       Backbone.View.call(this, ...params);
 | ||||
|     //       Mustache.parse(_.result(this, 'template'));
 | ||||
|     //     },
 | ||||
|     //     render_attributes() {
 | ||||
|     //       return _.result(this.model, 'attributes', {});
 | ||||
|     //     },
 | ||||
|     //     render_partials() {
 | ||||
|     //       return window.Whisper.View.Templates;
 | ||||
|     //     },
 | ||||
|     //     template() {
 | ||||
|     //       if (this.templateName) {
 | ||||
|     //         return window.Whisper.View.Templates[this.templateName];
 | ||||
|     //       }
 | ||||
|     //       return '';
 | ||||
|     //     },
 | ||||
|     //     render() {
 | ||||
|     //       const attrs = _.result(this, 'render_attributes', {});
 | ||||
|     //       const template = _.result(this, 'template', '');
 | ||||
|     //       const partials = _.result(this, 'render_partials', '');
 | ||||
|     //       this.$el.html(Mustache.render(template, attrs, partials));
 | ||||
|     //       return this;
 | ||||
|     //     },
 | ||||
|     //   },
 | ||||
|     //   {
 | ||||
|     //     // Class attributes
 | ||||
|     //     Templates: (() => {
 | ||||
|     //       const templates = {};
 | ||||
|     //       $('script[type="text/x-tmpl-mustache"]').each((i, el) => {
 | ||||
|     //         const $el = $(el);
 | ||||
|     //         const id = $el.attr('id');
 | ||||
|     //         templates[id] = $el.html();
 | ||||
|     //       });
 | ||||
|     //       return templates;
 | ||||
|     //     })(),
 | ||||
|     //   }
 | ||||
|     // );
 | ||||
| })(); | ||||
					Loading…
					
					
				
		Reference in New Issue