remove libloki references from ingored files

This commit is contained in:
Audric Ackermann 2022-03-29 12:19:54 +11:00
parent 12d9a8db78
commit 92814ba36c
5 changed files with 65 additions and 42 deletions

View File

@ -10,8 +10,6 @@ js/libtextsecure.js
js/util_worker.js
libtextsecure/components.js
test/test.js
libloki/test/components.js
libloki/test/test.js
# Third-party files

1
.gitignore vendored
View File

@ -46,7 +46,6 @@ yarn-error.log
# editor
.vscode/
libloki/test/test.js
playwright.config.js
*.js.map

View File

@ -11,7 +11,6 @@ js/libtextsecure.js
libtextsecure/components.js
stylesheets/*.css
test/test.js
libloki/test/test.js
test/ts/**/*.js
ts/**/*.js

View File

@ -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;

65
js/views/whisper_view.js Normal file
View File

@ -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;
// })(),
// }
// );
})();