Skip to content

Commit

Permalink
4.3.0 Release (#448)
Browse files Browse the repository at this point in the history
* 4.2.3 (#366)

* Roll Back to 4.1.0 (#363)

* Fix 356 detach viewer from db (#364)

* Revert "Roll Back to 4.1.0 (#363)"

This reverts commit 2092372.

* Send rows to viewer
Remove BaniDB search from viewer
Separate infiniteScroll from APV
De-promisify synchronous createCards method

* Update SQLite payload to match Realm

* Prevent default action on arrow keys when using keyboard shortcuts

* Fix results block height so last result isn't hidden

* Update Changelog for Release (#365)

* 4.3.0 (#447)

* Roll Back to 4.1.0 (#363)

* Fix 356 detach viewer from db (#364)

* Revert "Roll Back to 4.1.0 (#363)"

This reverts commit 2092372.

* Send rows to viewer
Remove BaniDB search from viewer
Separate infiniteScroll from APV
De-promisify synchronous createCards method

* Update SQLite payload to match Realm

* Prevent default action on arrow keys when using keyboard shortcuts

* Fix results block height so last result isn't hidden

* Update Changelog for Release (#365)

* 4.2.3 (#366) (#369)

* Roll Back to 4.1.0 (#363)

* Fix 356 detach viewer from db (#364)

* Revert "Roll Back to 4.1.0 (#363)"

This reverts commit 2092372.

* Send rows to viewer
Remove BaniDB search from viewer
Separate infiniteScroll from APV
De-promisify synchronous createCards method

* Update SQLite payload to match Realm

* Prevent default action on arrow keys when using keyboard shortcuts

* Fix results block height so last result isn't hidden

* Update Changelog for Release (#365)

* Only use Electron auto-updater if not published in an app store (#361)

* adds new toggle for presenter view (#373)

* adds new toggle for presenter view

* a better checkPresenterView function

* remove commented code

* Cmd +e / Ctrl + e shows empty slide (#372)

* escape shows empty slide

* adds comment for clarity

* adds cmd+e key to show empty slide

* removed esc key bind

* Add Google analytics (#370)

* Add analytics plumbing

* add more events

* cleanup

* Add opt out

* update UA ID

* adds support for paste to search function

* Pressing a letter should go to that panktee in current shabad panel. (#376)

* escape shows empty slide

* adds comment for clarity

* adds cmd+e key to show empty slide

* removed esc key bind

* adding keyboard movements to current shabad panel

* refactor code to use spread operator and data attribute

* Update Event tracking and setting default (#380)

* Update Event tracking and setting default

* disable tracking for development

* address review comments

*  adds asterisk as wild  char for realm search (#371)

* adds aesterisk as wild card char for realm search

* change from one character per * to multiple

* merging asterisk (sqlite version)

* Vishraams (#375)

* surfacing bisrams

* adds setting to toggle bisrams

* add gradient vishraams as an option

* the css for padchhed bisrams

* support for vishraams for color and special themes

* adds support for yamki

* Custom background theme (#362)

* adding custom background option

* fixes some typos

* adds highlight to save readability

* refactor theme editor to support custom bg only for few themes

* refactors the show overlay code

* changed back bg-main to its original value

* uses imagemin for images and removes code used for supporting all themes

* removes the commented code

* restricts support to only single theme

* refactors code to add comments properly

* adds package-lock.json to pass travis check

* decouples larivaar at overlay from main larivaar setting (#378)

* decouples larivaar at overlay from main larivaar setting

* adds the word use for better icon label

* uses sockets instead of upsert preview

* removes the upsertPreview call

* adds insert preview back

* removes extra variable isLarivaar

* Announcement formatting (#379)

* adds formatting to announcement text

* adds non focus to content editable placeholder

* sanitizes html for announcement box

* cleans the announcment text sanitizing

* Add default vishraam option (#391)

* Fix backwards input for annocements (#389)

* Bani overlay bg (#400)

* decouples larivaar at overlay from main larivaar setting

* adds the word use for better icon label

* uses sockets instead of upsert preview

* removes the upsertPreview call

* adds insert preview back

* removes extra variable isLarivaar

* fixes #396 changes bani overlay bg path

* changes the focus pattern (#403)

* changes the focus pattern

* cleans scss

* chromecast bisram removal fixes #399 (#401)

* chromecast bisram removal fixes #399

* uses object.assign instead of referring object directly

* Fix uploading a custom background images (#390)

* Update HELP.md for 5.0 (#384)

Update HELP.md for 5.0

* Fix #419 Add GurmukhiBisram column to SQLite lookup (#420)

* Add User Agent for OS tracking (#422)

* Add event for custom theme and shabad selection (#425)

* move vishraam settings under display options

* changes to uk english (colour)

* hide vishraam toggles

* move vishraam settings under display options (#431)

* move vishraam settings under display options

* changes to uk english (colour)

* [WIP] adds custom bg fix to windows (#438)

Adds custom bg fix to windows

* [Don't merge until before release] Update Changelog (#424)

Update Changelog

* Add Tracking for app version (#439)

* fixes windows build (#445)

* Revert GurmukhiBisram usage (#446)

* Revert GurmukhiBisram usage

Commenting out until database is updated with better data

* Update viewer.js

* Update package.json

Increment version to 4.3.0
  • Loading branch information
tsingh777 authored Jan 16, 2019
1 parent 5e590ee commit 0891f6a
Show file tree
Hide file tree
Showing 35 changed files with 5,869 additions and 4,301 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
## SikhiToTheMax Desktop App

### 4.3 - _190115_
### Added:
* You can now upload a custom background image! Check out the Custom option in the Themes menu
* Added wildcard support. Type a * when you are searching if you are unsure of a letter. See the Help section for more info
* Pressing CTRL (Windows) or CMD (Mac) + E will now display a blank slide
* You can now paste text into the search field
* When viewing a Shabad, you can now press a letter on your keyboard to go to the next panktee that starts with that letter
* We have added Google Analytics to help support our future updates. You can toggle this off/on in the settings

### Improved:
* The announcements section now supports formatting, line breaks, and spacing!
* We've made the toggle for Presenter View more accessible

### 4.2.3 - _181115_
* Bug Fixes

Expand Down
37 changes: 29 additions & 8 deletions HELP.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### How do I install the desktop application?

You can install SikhiToTheMax (STTM) by visiting [this website](https://khalisfoundation.org/portfolio/sikhitothemax-everywhere/) and choosing the Windows or macOS download link. After that, open the installer and follow the steps that are displayed. ![](https://www.sikhitothemax.org/assets/images/help/desktop-search-ex.png)
You can install SikhiToTheMax (STTM) by visiting [this website](https://khalisfoundation.org/portfolio/sikhitothemax-everywhere/) and choosing the Windows or macOS download link. After that, open the installer and follow the steps that are displayed.

### How do I search for a shabad?

Expand All @@ -25,28 +25,49 @@ After launching STTM, by default you can search for a shabad by entering the fir

* STTM's database includes shabads from Sri Guru Granth Sahib Ji, Sri Dasam Granth Sahib, Bhai Gurdas Jee, Bhai Gurdas Singh Jee, Bhai Nand Lal Jee, and various rehatnamas and thankhanamas. If your shabad is not from one of those sources, it will not appear.
* If you verified your shabad should be in the database and it is still not coming up, make sure you are typing in the correct letters for search. If you aren’t sure about a letter, or are still having difficulties, try using one of the different search types to locate the shabad.

* If you don't know one of the letters, consider using an asterisk in its place. Here's some information on how it works:
* *First letter start* -
`ssnh` it will search for “soche soch na hovayi je sochi lakh vaar” not “jat sat sanjam naam hai”
* *First letter anywhere* -
`ssnh` it will search for “soche soch na hovayi je sochi lakh vaar” and “jat sat sanjam naam hai”
* *First letter start* -
`*ssnh` will search for “jat sat sanjam naam hai” and not “soche soch na hovayi je sochi lakh vaar”
* *First letter anywhere* -
`*ssnh` will search for “jat sat sanjam naam hai” and not “soche soch na hovayi je sochi lakh vaar”
* *First letter start* -
`ssnh*` will search for “soche soch na hovayi je sochi lakh vaar” and not “jat sat sanjam naam hai”
* *First letter anywhere* -
`ssnh*` will search for “soche soch na hovayi je sochi lakh vaar” and “jat sat sanjam naam hai”
* *First letter start* -
`ss*nh` will search for “sukh sagar har naam hai” and neither “soche soch na hovayi..” nor “rasna sacha simriye man tan nirmal hoye”
* *First letter anywhere* -
`ss*nh` will search for “sukh sagar har naam hai” and “rasna sacha simriye man tan nirmal hoye” but not “soche soch na hovayi…”

### How do I connect STTM to a projector?

Plug in your computer to the projector or TV. Once you do this, go to your computer's display settings and change it to "Extended Desktop" (NOT mirroring). After that, launch STTM and turn on "Presenter View" in the settings! ![](https://www.sikhitothemax.org/assets/images/help/desktop-extend-pc.png) ![](https://www.sikhitothemax.org/assets/images/help/desktop-extend-mac.png)

### How do I change the background color?

After launching STTM, click the icon for settings, and choose your theme. ![](https://www.sikhitothemax.org/assets/images/help/desktop-theme.png)
After launching STTM, click the icon for Themes and choose your preferred option. Alternatively, you can scroll to the bottom and upload a custom background image.

### Can you view the Gurbani in Larivaar?

Yes! After launching STTM, click the icon for settings, and choose the Larivaar option. ![](https://www.sikhitothemax.org/assets/images/help/desktop-larivaar.png)</div>

Yes! After launching STTM, click the icon for Display Settings, and choose the Larivaar option.

### How can I make the fonts on the screen smaller?
### How can I adjust the font size?

<div>After launching STTM, click the icon for settings, and scroll down for options to adjust the font size. ![](https://www.sikhitothemax.org/assets/images/help/desktop-font-size.png)</div>
After launching STTM, click the icon for settings, and scroll down for options to adjust the font size. Alternatively, you can adjust font sizes by using the "Quick Tools" menu in the preview pane.

### Where can I see my previous shabads?

When using STTM in “Presenter View”, your history will appear in the bottom right quadrant. You can click any of the shabads in the list to bring them back up as your primary one. ![](https://www.sikhitothemax.org/assets/images/help/desktop-history.png)
When using STTM in “Presenter View”, your history will appear in the bottom right quadrant under the "History" tab. You can click any of the shabads in the list to bring them back up as your primary one.

### What is Bani Overlay?

Bani Overlay allows you to display Gurbani from SikhiToTheMax on a Live Stream. It will require a third party software such as OBS. To learn more, watch this video:

<div class="video-wrapper"><iframe width="100%" height="400px" src="https://www.youtube.com/embed/WrckmAcwboM" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen=""></iframe></div>

### How do I report a mistake?

Expand Down
87 changes: 87 additions & 0 deletions analytics.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
const ua = require('universal-analytics'); // https://www.npmjs.com/package/universal-analytics
const isOnline = require('is-online');

const pjson = require('./package.json');

const appVersion = pjson.version;
const trackingId = 'UA-45513519-12';

class Analytics {
constructor(userId, store) {
if (trackingId) {
this.usr = ua(trackingId, userId);
this.store = store;
}
}

/**
* https://developers.google.com/analytics/devguides/collection/analyticsjs/events
* Name | type | required | example
* ------------------------------------------
* eventCategory | text | yes | Typically the object that was interacted with (e.g. 'Video')
* eventAction | text | yes | The type of interaction (e.g. 'play')
* eventLabel | text | no | Useful for categorizing events (e.g. 'Fall Campaign')
* eventValue | int | no | A numeric value associated with the event (e.g. 42)
* @param category
* @param action
* @param label
* @param value
*/
trackEvent(category, action, label, value) {
const useragent = this.store.get('user-agent');

if (process.env.NODE_ENV !== 'development') {
if (this.store.get('userPrefs.app.analytics.collect-statistics')) {
isOnline().then((online) => {
// TODO: for offline users, come up with a way of storing and send when online.
if (online && this.usr) {
this.usr
.event({
ec: category,
ea: action,
el: label,
ev: value,
ua: useragent,
cd1: appVersion,
})
.send();
}
});
}
} else {
console.log(`Tracking Event suppressed for development ec: ${category}, ea: ${action}, el: ${label}, ev: ${value}, ua: ${useragent}`);
}
}


/**
*
* @param path
* @param title
* @param hostname
*/
trackPageView(path, title, hostname = 'SikhiToTheMax Desktop') {
if (process.env.NODE_ENV !== 'development') {
if (this.store.get('userPrefs.app.analytics.collect-statistics')) {
isOnline().then((online) => {
if (online && this.usr) {
const useragent = this.store.get('user-agent');

this.usr
.pageview({
dp: path,
dt: title,
dh: hostname,
ua: useragent,
})
.send();
}
});
}
} else {
console.log('Tracking Page suppressed for development');
}
}
}

module.exports = Analytics;
28 changes: 27 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ const log = require('electron-log');
const express = require('express');
const fs = require('fs');
const path = require('path');
const Analytics = require('./analytics');
const uuid = require('uuid/v4');

// Are we packaging for a platform's app store?
const appstore = false;

const expressApp = express();

Expand Down Expand Up @@ -39,6 +44,17 @@ const store = new Store({
configName: 'user-preferences',
defaults: defaultPrefs,
});

// Retrieve the userid value, and if it's not there, assign it a new uuid.
let userId = store.get('userId');

if (!userId) {
userId = uuid();
store.set('userId', userId);
}
const analytics = new Analytics(userId, store);
global.trackEvent = analytics.trackEvent;

const appVersion = app.getVersion();

let mainWindow;
Expand Down Expand Up @@ -234,7 +250,11 @@ app.on('ready', () => {
});
}
mainWindow.show();
checkForUpdates();
// Platform-specific app stores have their own update mechanism
// so only check if we're not in one
if (!appstore) {
checkForUpdates();
}
// Show changelog if last version wasn't seen
const lastSeen = store.get('changelog-seen');
if (lastSeen !== appVersion) {
Expand All @@ -246,6 +266,10 @@ app.on('ready', () => {
});
mainWindow.loadURL(`file://${__dirname}/www/index.html`);

if (!store.get('user-agent')) {
store.set('user-agent', mainWindow.webContents.getUserAgent());
}

// Close all other windows if closing the main
mainWindow.on('close', () => {
if (viewerWindow && !viewerWindow.isDestroyed()) {
Expand Down Expand Up @@ -415,4 +439,6 @@ module.exports = {
checkForUpdates,
autoUpdater,
store,
appstore,
analytics,
};
Loading

0 comments on commit 0891f6a

Please sign in to comment.