Skip to content

Commit

Permalink
Merge pull request #1994 from KhalisFoundation/master
Browse files Browse the repository at this point in the history
Production release v9.2.2
  • Loading branch information
Gauravjeetsingh committed Jul 16, 2024
2 parents 6cb186d + 34968c0 commit 0339947
Show file tree
Hide file tree
Showing 43 changed files with 477 additions and 234 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ before_install:
- ./packaging/add-osx-cert.sh;
script:
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then npm test; fi'
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then npm test && travis_wait 30 ./packaging/release --branch=$TRAVIS_BRANCH --dist=mac --platform=mac --token=$GH_TOKEN; fi'
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then npm test && travis_wait 30 ./packaging/release --branch=$TRAVIS_BRANCH --dist=mac --platform=mac --token=$GH_TOKEN && travis_wait 30 ./packaging/release --branch=$TRAVIS_BRANCH --dist=mac --platform=macArm --token=$GH_TOKEN; fi'
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
## New Updates

### 9.2.2 - ਊਨਾ Release _July 15, 2024_

#### Misc. bug fix and other improvements
- Enhanced Bani Controller: Improved functionality when using the Bani Controller in a multipane workspace.
- Improved Theme Handling: Enhanced support for custom images during theme changes.
- Restored Font Size Adjustments: Restored the ability to change the font size for miscellaneous slides such as "Waheguru" and "Mool Mantra."
- Code and Style Improvements: Various code refactors and stylistic enhancements to improve performance and maintainability.

**We would love to hear from you if there a feature that you have been waiting for. Send us your feedback at [sttm.co/feedback](https://www.sttm.co/feedback).**
</br>

### 9.2.1 - ਊਨਾ Release _May 24, 2024_

#### New Features
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"productName": "SikhiToTheMax",
"name": "sttm-desktop",
"version": "9.2.1",
"version": "9.2.2",
"description": "The SikhiToTheMax desktop app",
"main": "app.js",
"scripts": {
Expand All @@ -14,12 +14,14 @@
"start": "npm run build:local && concurrently --kill-others \"npm run watch-css\" \"npm run watch-js\" \"cross-env NODE_ENV=development electron .\"",
"build": "npm run build-css & npm run build-js",
"build:local": "npm run build-css & npm run build-js:sm",
"pack:mac": "npm run build && electron-builder --mac",
"pack:mac": "npm run build && electron-builder --mac --x64",
"pack:macArm": "npm run build && electron-builder --mac --arm64",
"pack:win": "npm run build && electron-builder --win --x64",
"pack:win32": "npm run build && electron-builder --win --ia32",
"pack:linux": "npm run build && electron-builder --linux --x64",
"pack:berry": "export USE_SYSTEM_FPM=true && npm run build && electron-builder --linux --arm64",
"dist:mac": "npm run build && electron-builder --mac --publish always",
"dist:mac": "npm run build && electron-builder --mac --x64 --publish always",
"dist:macArm": "npm run build && electron-builder --mac --arm64 --publish always",
"dist:win": "npm run pack:win && electron-builder --win --x64 --publish always",
"dist:win32": "npm run pack:win32 && electron-builder --win --ia32 --publish always",
"build-css": "run-p build-css:*",
Expand Down Expand Up @@ -216,4 +218,4 @@
"NSAllowsArbitraryLoads": true
}
}
}
}
4 changes: 2 additions & 2 deletions packaging/release
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const release = async () => {
console.log(`Prerelease Track: ${track}`);
}

// win-ia32 is run on the same machine right after win-x64, so don't update the version
if (platform !== 'win32') {
// win-ia32 and macArm is run on the same machine right after win-x64, so don't update the version
if (platform !== 'win32' && platform !== 'macArm') {
// Get all tags, sort in desc order, and get latest from current track
const gitTags = await git().tags();
const gitTag = gitTags.all.reverse().find((tag) => tag.indexOf(track) > -1);
Expand Down
2 changes: 1 addition & 1 deletion packaging/update-packagejson.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const teamId = process.env.APPLE_TEAM_ID;

if (!teamId) {
console.error('TEAM_ID is not defined in the environment variables');
process.exit(1);
process.exit(0);
}

if (!process.env.I_AM_TRAVIS) {
Expand Down
1 change: 1 addition & 0 deletions packaging/update-remote.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const { version } = require('../package.json');

const files = {
mac: 'sttm-mac-x64',
macArm: 'sttm-mac-arm64',
win: 'sttm-win-x64',
win32: 'sttm-win-ia32',
};
Expand Down
6 changes: 5 additions & 1 deletion www/configs/navigator-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"savedCrossPlatformId": null,
"historyOrder": "newest",

"lineNumber": null,


"isMiscSlide": false,
"miscSlideText": "",
Expand Down Expand Up @@ -75,5 +77,7 @@
"homeVerse": false,
"content":"",
"baniType": ""
}
},

"disabledContent": []
}
12 changes: 11 additions & 1 deletion www/configs/overlay.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"subtitles": {
"title": "SUBTITLES",
"type": "title",
"subcategories": ["gurbani-options", "text-options"]
"subcategories": ["gurbani-options", "text-options", "text-format-options"]
},
"gurbani-options": {
"title": "GURBANI",
Expand All @@ -16,6 +16,11 @@
"type": "dropdown",
"settings": ["text-color", "text-font", "text-size"]
},
"text-format-options": {
"title": "TEXT_FORMAT",
"type": "icon-toggle",
"settings": ["text-format"]
},
"background": {
"title": "BACKGROUND",
"type": "title",
Expand Down Expand Up @@ -129,6 +134,11 @@
"step": 0.25,
"disableOnChange": ["fit-text-switch"]
},
"text-format": {
"title": "",
"type": "text-format-icon",
"initialValue": { "bold": false, "italic": false }
},
"bg-color": {
"title": "",
"type": "color-input",
Expand Down
1 change: 1 addition & 0 deletions www/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"SUBTITLES": "Subtitles",
"GURBANI": "Gurbani",
"TEXT": "Text",
"TEXT_FORMAT": "Text Formatting",
"BACKGROUND": "Background",
"DATE_AND_TIME": "Date & Time",
"ANNOUNCEMENT": "Announcement",
Expand Down
2 changes: 1 addition & 1 deletion www/main/addons/announcement/components/Annoucement.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const Announcement = ({ isGurmukhi }) => {
<textarea
className={classNames(
'announcement-text',
keyboardOpenStatus && 'gurmukhi',
keyboardOpenStatus && isGurmukhi && 'gurmukhi',
isGurmukhi && 'gurmukhi',
'disable-kb-shortcuts',
)}
Expand Down
2 changes: 1 addition & 1 deletion www/main/addons/announcement/components/MiscSlides.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const MiscSlides = () => {
const [paneSelectorActive, setPaneSelectorActive] = useState(false);
const paneSelector = useRef(null);

const openSlideFromDropdown = (paneId) => {
const openSlideFromDropdown = (e, paneId) => {
displayAnandSahibBhog({ openedFrom: 'shortcut-tray', paneId });
setPaneSelectorActive(false);
};
Expand Down
7 changes: 7 additions & 0 deletions www/main/addons/bani-controller/components/BaniController.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import QrCode from './QrCode';
import ConnectionSwitch from './ConnectionSwitch';
import ZoomController from './ZoomController';
import useSocketListeners from '../hooks/use-socket-listeners';
import updateMultipane from '../../../navigator/search/utils/update-multipane';

const remote = require('@electron/remote');

Expand All @@ -29,6 +30,7 @@ const BaniController = ({ onScreenClose, className }) => {
const canvasRef = useRef(null);

const changeActiveShabad = useNewShabad();
const updatePane = updateMultipane();

// Local State
const [codeLabel, setCodeLabel] = useState('');
Expand Down Expand Up @@ -58,6 +60,7 @@ const BaniController = ({ onScreenClose, className }) => {
miscSlideText,
isMiscSlideGurmukhi,
savedCrossPlatformId,
lineNumber,
} = useStoreState((state) => state.navigator);

const {
Expand All @@ -69,6 +72,7 @@ const BaniController = ({ onScreenClose, className }) => {
setMiscSlideText,
setIsMiscSlideGurmukhi,
setSavedCrossPlatformId,
setLineNumber,
} = useStoreActions((state) => state.navigator);

const {
Expand Down Expand Up @@ -205,6 +209,9 @@ const BaniController = ({ onScreenClose, className }) => {
setMiscSlideText,
setIsMiscSlideGurmukhi,
setSavedCrossPlatformId,
lineNumber,
setLineNumber,
updatePane,
);
}, [socketData]);

Expand Down
6 changes: 6 additions & 0 deletions www/main/addons/bani-controller/hooks/use-socket-listeners.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,16 @@ const useSocketListeners = (
setMiscSlideText,
setIsMiscSlideGurmukhi,
setSavedCrossPlatformId,
lineNumber,
setLineNumber,
updatePane,
) => {
if (socketData) {
const isPinCorrect = parseInt(socketData.pin, 10) === adminPin;
const listenerActions = {
shabad: (payload) => {
changeActiveShabad(payload.shabadId, payload.verseId);
if (lineNumber !== payload.lineCount) setLineNumber(payload.lineCount);
analytics.trackEvent({
category: 'controller',
action: 'shabad',
Expand Down Expand Up @@ -80,6 +84,7 @@ const useSocketListeners = (
setSavedCrossPlatformId(payload.verseId);
}
}
updatePane('bani', payload.baniId);
analytics.trackEvent({
category: 'controller',
action: 'bani',
Expand All @@ -99,6 +104,7 @@ const useSocketListeners = (
if (ceremonyId !== payload.ceremonyId) {
setCeremonyId(payload.ceremonyId);
}
updatePane('ceremony', payload.ceremonyId);
analytics.trackEvent({
category: 'controller',
action: 'ceremony',
Expand Down
8 changes: 4 additions & 4 deletions www/main/addons/ceremonies/components/CeremonyPane.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const CeremonyPane = ({ token, name, id, onScreenClose }) => {
setPaneSelectorActive(true);
};

const onThemeClick = (theme, multipaneId = null) => {
const onThemeClick = (event, theme, multipaneId = null) => {
let parsedTheme = theme;
if (typeof theme === 'string') {
parsedTheme = JSON.parse(theme);
Expand Down Expand Up @@ -136,8 +136,8 @@ const CeremonyPane = ({ token, name, id, onScreenClose }) => {
current: getTheme(currentTheme),
};

const openCeremonyFromDropdown = (givenPane) => {
onThemeClick(paneSelector.current.dataset.theme, givenPane);
const openCeremonyFromDropdown = (e, givenPane) => {
onThemeClick(e, paneSelector.current.dataset.theme, givenPane);
setPaneSelectorActive(false);
};

Expand Down Expand Up @@ -183,7 +183,7 @@ const CeremonyPane = ({ token, name, id, onScreenClose }) => {
if (currentWorkspace === i18n.t('WORKSPACES.MULTI_PANE')) {
openPaneMenu(e, themes.light);
} else {
onThemeClick(themes.light);
onThemeClick(e, themes.light);
}
}}
className="theme-instance"
Expand Down
2 changes: 1 addition & 1 deletion www/main/addons/sundar-gutka/components/SundarGutka.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ const SundarGutka = ({ isShowTranslitSwitch = false, onScreenClose }) => {
}
};

const openBaniFromDropdown = (paneId) => {
const openBaniFromDropdown = (e, paneId) => {
loadBani(parseInt(paneSelector.current.dataset.baniId, 10), paneId);
setPaneSelectorActive(false);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ const MultipaneDropdown = ({
const dropdownOptions = [pane1, pane2, pane3].map((item, index) => (
<p
key={`pane-option-${index + 1}`}
onClick={() => {
onClick={(e) => {
if (!item.locked) {
clickHandler(index + 1);
clickHandler(e, index + 1);
}
}}
title={item.locked ? i18n.t('MULTI_PANE.LOCKED_PANE_MSG') : ''}
Expand Down
4 changes: 2 additions & 2 deletions www/main/common/sttm-ui/tile/Tile.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';

import { joinClasses } from '../../utils';
import { classNames, joinClasses } from '../../utils';

const Tile = ({
children,
Expand Down Expand Up @@ -32,7 +32,7 @@ const Tile = ({
className={`ui-tile ${tileClassname}`}
style={theme ? getThemeSwatchStyles(theme) : null}
>
<span className={isEngTransliterated && 'eng-tile'}>{children || content}</span>
<span className={classNames(isEngTransliterated && 'eng-tile')}>{children || content}</span>
</button>
);
};
Expand Down
6 changes: 3 additions & 3 deletions www/main/navigator/Navigator.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ const remote = require('@electron/remote');
const { i18n } = remote.require('./app');

const Navigator = () => {
const { minimizedBySingleDisplay, currentWorkspace } = useStoreState(
(state) => state.userSettings,
);
const { currentWorkspace } = useStoreState((state) => state.userSettings);

const { minimizedBySingleDisplay } = useStoreState((state) => state.navigator);

const {
displayWaheguruSlide,
Expand Down
3 changes: 3 additions & 0 deletions www/main/navigator/misc/components/favoritePane.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,20 +128,23 @@ export const FavoritePane = ({ className, paneId }) => {
...pane1,
content: i18n.t('MULTI_PANE.SHABAD'),
activeShabad: shabadId,
baniType: 'shabad',
});
break;
case 2:
setPane2({
...pane2,
content: i18n.t('MULTI_PANE.SHABAD'),
activeShabad: shabadId,
baniType: 'shabad',
});
break;
case 3:
setPane3({
...pane3,
content: i18n.t('MULTI_PANE.SHABAD'),
activeShabad: shabadId,
baniType: 'shabad',
});
break;
default:
Expand Down
Loading

0 comments on commit 0339947

Please sign in to comment.