Skip to content

Commit

Permalink
⚙️ Update logo + Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-akashdesai committed Sep 6, 2022
1 parent 2a26a23 commit d60bc49
Show file tree
Hide file tree
Showing 17 changed files with 76 additions and 54 deletions.
85 changes: 43 additions & 42 deletions forge.configure.js
Original file line number Diff line number Diff line change
@@ -1,49 +1,50 @@
/* eslint-disable quotes */

module.exports = {
"packagerConfig": {},
"makers": [
{
"name": "@electron-forge/maker-squirrel",
"config": {
"name": "screen_recorder_electron_react"
}
},
{
"name": "@electron-forge/maker-zip",
"platforms": [
"darwin"
]
},
{
"name": "@electron-forge/maker-deb",
"config": {}
},
{
"name": "@electron-forge/maker-rpm",
"config": {}
packagerConfig: {
icon: './src/assets/images/logo/fantom-logo.icns'
},
makers: [
{
name: '@electron-forge/maker-squirrel',
config: {
name: 'screen_recorder_electron_react'
}
],
"plugins": [
[
"@electron-forge/plugin-webpack",
{
"mainConfig": "./webpack.main.config.js",
"devContentSecurityPolicy":"default-src * self blob: data: gap:; style-src * self 'unsafe-inline' blob: data: gap:; script-src * 'self' 'unsafe-eval' 'unsafe-inline' blob: data: gap:; object-src * 'self' blob: data: gap:; img-src * self 'unsafe-inline' blob: data: gap:; connect-src self * 'unsafe-inline' blob: data: gap:; frame-src * self blob: data: gap:;",
"renderer": {
"config": "./webpack.renderer.config.js",
"entryPoints": [
{
"html": "./src/index.html",
"js": "./src/electron/renderer.tsx",
"name": "main_window",
"preload": {
"js": "./src/electron/preload.ts"
}
},
{
name: '@electron-forge/maker-zip',
platforms: ['darwin']
},
{
name: '@electron-forge/maker-deb',
config: {}
},
{
name: '@electron-forge/maker-rpm',
config: {}
}
],
plugins: [
[
'@electron-forge/plugin-webpack',
{
mainConfig: './webpack.main.config.js',
devContentSecurityPolicy:
"default-src * self blob: data: gap:; style-src * self 'unsafe-inline' blob: data: gap:; script-src * 'self' 'unsafe-eval' 'unsafe-inline' blob: data: gap:; object-src * 'self' blob: data: gap:; img-src * self 'unsafe-inline' blob: data: gap:; connect-src self * 'unsafe-inline' blob: data: gap:; frame-src * self blob: data: gap:;",
renderer: {
config: './webpack.renderer.config.js',
entryPoints: [
{
html: './src/index.html',
js: './src/electron/renderer.tsx',
name: 'main_window',
preload: {
js: './src/electron/preload.ts'
}
]
}
}
]
}
]
}
]
}
]
}
Binary file removed src/assets/images/logo/fantom-logo-1024.icns
Binary file not shown.
1 change: 0 additions & 1 deletion src/assets/images/logo/fantom-logo-large.svg

This file was deleted.

Binary file removed src/assets/images/logo/fantom-logo-lg.ico
Binary file not shown.
Binary file modified src/assets/images/logo/fantom-logo-lg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions src/assets/images/logo/fantom-logo-lg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/logo/fantom-logo-md.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/assets/images/logo/fantom-logo-sm.png
Binary file not shown.
Binary file added src/assets/images/logo/fantom-logo.icns
Binary file not shown.
Binary file added src/assets/images/logo/fantom-logo.ico
Binary file not shown.
Binary file removed src/assets/images/logo/fantom-logo.png
Binary file not shown.
2 changes: 1 addition & 1 deletion src/components/NavBar/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { GiTrophyCup, GiPopcorn } from 'react-icons/gi'
import { GoMail } from 'react-icons/go'
import { useLocation, useNavigate } from 'react-router-dom'
import { Divider, Nav } from 'rsuite'
import logo from '../../assets/images/logo/fantom-logo-large.svg'
import logo from '../../assets/images/logo/fantom-logo-lg.svg'
import paths from '../../constants/paths'
import TopBar from './TopBar'

Expand Down
2 changes: 1 addition & 1 deletion src/components/ScreenRecorder/ScreenRecorder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ const ScreenRecorder = () => {
buffer: buffer
})
.then((res: any) => res && console.log('Recording Saved! 🎉'))
.catch((err: any) => console.log('Error: ' + err.message))
.catch((err: Error) => console.log('Error: ' + err.message))
setDisableStart(false)
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/TempMail/MailModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const MailModal = ({ mailjs, showLoginModal, setShowLoginModal, history, setCred
setRepeatPassword('')
setShowLoginModal(false)
})
.catch((err: any) => console.log(err.message))
.catch((err: Error) => console.log(err.message))
.then(() => setLoading(false))
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/Weather/CurrentWeather.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const CurrentWeather = ({ currentWeather, forecastData }: CurrentWeatherProps) =
{Math.round(forecast.mintemp_c)}°
</span>
<span className='currentWeather__icon'>
<img src={weather.condition.icon} />
<img src={`http://${weather.condition.icon}`} />
</span>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Weather/Forecast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ const Forecast = (forecastData: any) => {
</Button>
<div id='hourContainer' className='forecast__hourContainer'>
{data &&
data.forecastday[0].hour.map((value: any, index: any) => {
data.forecastday[0].hour.map((value: any, index: number) => {
return (
<div id={`hour-${index}`} key={index} className='forecast__hourlyForecast'>
<div>{checkCurrentHour(value.time)}</div>
<img src={value.condition.icon} />
<img src={`http://${value.condition.icon}`} />
<div>{Math.round(value.temp_c)}°</div>
</div>
)
Expand Down
10 changes: 5 additions & 5 deletions src/electron/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-var-requires */
import { app, BrowserWindow, ipcMain, nativeTheme } from 'electron'
import { app, BrowserWindow, ipcMain, nativeImage, nativeTheme } from 'electron'
import { changeThemeSource, getvideoSources, saveRecording, openRecording, copyToClipboard } from './helpers'
const path = require('path')
const isDev = require('electron-is-dev')
Expand All @@ -15,11 +15,11 @@ if (require('electron-squirrel-startup')) {
app.quit()
}

const logosPath = path.join(__dirname, '../../src/assets/images/logo/fantom-logo-lg.png')
const logo = nativeImage.createFromPath(path.join(__dirname, '../../src/assets/images/logo/fantom-logo-lg.png'))

const createWindow = (): void => {
if (process.platform === 'darwin') {
app.dock.setIcon(logosPath)
app.dock.setIcon(logo)
}
// Create the browser window.
const mainWindow = new BrowserWindow({
Expand All @@ -32,18 +32,18 @@ const createWindow = (): void => {
titleBarStyle: 'hidden',
titleBarOverlay: true,
trafficLightPosition: { x: 10, y: 10 },
icon: logosPath,
icon: logo,
webPreferences: {
preload: MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY,
nodeIntegration: true,
devTools: isDev,
contextIsolation: true
}
})
mainWindow.setIcon(logo)
mainWindow.loadURL(MAIN_WINDOW_WEBPACK_ENTRY)
// Open the DevTools.
mainWindow.webContents.openDevTools()

mainWindow.once('ready-to-show', () => {
mainWindow.show()
})
Expand Down

0 comments on commit d60bc49

Please sign in to comment.