diff --git a/electron-vite.config.ts b/electron-vite.config.ts index ccad64a0d..0bf680b7b 100644 --- a/electron-vite.config.ts +++ b/electron-vite.config.ts @@ -2,6 +2,7 @@ import { mergeConfig } from 'vite' import { defineConfig } from 'vitest/config' import electron from 'vite-plugin-electron' import viteBaseConfig from './vite-base.config' +import { excludeScreenshotsPlugin } from './vite-config/plugins/excludeScreenshotsPlugin' export default mergeConfig( viteBaseConfig, @@ -12,7 +13,8 @@ export default mergeConfig( plugins: [ electron({ entry: 'src/electron/main.js' - }) + }), + excludeScreenshotsPlugin() ] }) ) diff --git a/public/screenshots/android/0-login.png b/public/screenshots/android/0-login.png new file mode 100644 index 000000000..cfa8dafa0 Binary files /dev/null and b/public/screenshots/android/0-login.png differ diff --git a/public/screenshots/android/1-balances.png b/public/screenshots/android/1-balances.png new file mode 100644 index 000000000..031f5959a Binary files /dev/null and b/public/screenshots/android/1-balances.png differ diff --git a/public/screenshots/android/2-exchanges.png b/public/screenshots/android/2-exchanges.png new file mode 100644 index 000000000..ccdcb928e Binary files /dev/null and b/public/screenshots/android/2-exchanges.png differ diff --git a/public/screenshots/android/3-send_funds.png b/public/screenshots/android/3-send_funds.png new file mode 100644 index 000000000..a55df1f8a Binary files /dev/null and b/public/screenshots/android/3-send_funds.png differ diff --git a/public/screenshots/android/4-partners.png b/public/screenshots/android/4-partners.png new file mode 100644 index 000000000..6ac1c6313 Binary files /dev/null and b/public/screenshots/android/4-partners.png differ diff --git a/public/screenshots/android/5-start_new_chat.png b/public/screenshots/android/5-start_new_chat.png new file mode 100644 index 000000000..c4887266e Binary files /dev/null and b/public/screenshots/android/5-start_new_chat.png differ diff --git a/public/screenshots/android/6-nodes.png b/public/screenshots/android/6-nodes.png new file mode 100644 index 000000000..2ec4c870f Binary files /dev/null and b/public/screenshots/android/6-nodes.png differ diff --git a/public/screenshots/android/7-votes.png b/public/screenshots/android/7-votes.png new file mode 100644 index 000000000..79b73d6b0 Binary files /dev/null and b/public/screenshots/android/7-votes.png differ diff --git a/public/screenshots/android/screenshot-mobile.png b/public/screenshots/android/screenshot-mobile.png new file mode 100644 index 000000000..e10f8cc6f Binary files /dev/null and b/public/screenshots/android/screenshot-mobile.png differ diff --git a/public/screenshots/ios/iOS1.png b/public/screenshots/ios/iOS1.png new file mode 100644 index 000000000..a4deaf7c5 Binary files /dev/null and b/public/screenshots/ios/iOS1.png differ diff --git a/public/screenshots/ios/iOS10.png b/public/screenshots/ios/iOS10.png new file mode 100644 index 000000000..bc087e5bb Binary files /dev/null and b/public/screenshots/ios/iOS10.png differ diff --git a/public/screenshots/ios/iOS11.png b/public/screenshots/ios/iOS11.png new file mode 100644 index 000000000..1aea278d2 Binary files /dev/null and b/public/screenshots/ios/iOS11.png differ diff --git a/public/screenshots/ios/iOS12.png b/public/screenshots/ios/iOS12.png new file mode 100644 index 000000000..903f798b7 Binary files /dev/null and b/public/screenshots/ios/iOS12.png differ diff --git a/public/screenshots/ios/iOS2.png b/public/screenshots/ios/iOS2.png new file mode 100644 index 000000000..bb2552b69 Binary files /dev/null and b/public/screenshots/ios/iOS2.png differ diff --git a/public/screenshots/ios/iOS3.png b/public/screenshots/ios/iOS3.png new file mode 100644 index 000000000..67109912c Binary files /dev/null and b/public/screenshots/ios/iOS3.png differ diff --git a/public/screenshots/ios/iOS4.png b/public/screenshots/ios/iOS4.png new file mode 100644 index 000000000..4884e83df Binary files /dev/null and b/public/screenshots/ios/iOS4.png differ diff --git a/public/screenshots/ios/iOS5.png b/public/screenshots/ios/iOS5.png new file mode 100644 index 000000000..8207798ab Binary files /dev/null and b/public/screenshots/ios/iOS5.png differ diff --git a/public/screenshots/ios/iOS6.png b/public/screenshots/ios/iOS6.png new file mode 100644 index 000000000..fbc89ebf7 Binary files /dev/null and b/public/screenshots/ios/iOS6.png differ diff --git a/public/screenshots/ios/iOS7.png b/public/screenshots/ios/iOS7.png new file mode 100644 index 000000000..fafe48150 Binary files /dev/null and b/public/screenshots/ios/iOS7.png differ diff --git a/public/screenshots/ios/iOS8.png b/public/screenshots/ios/iOS8.png new file mode 100644 index 000000000..c44ce4b5b Binary files /dev/null and b/public/screenshots/ios/iOS8.png differ diff --git a/public/screenshots/ios/iOS9.png b/public/screenshots/ios/iOS9.png new file mode 100644 index 000000000..5bf2ef0af Binary files /dev/null and b/public/screenshots/ios/iOS9.png differ diff --git a/public/screenshots/pwa/pwa1.png b/public/screenshots/pwa/pwa1.png new file mode 100644 index 000000000..f64176652 Binary files /dev/null and b/public/screenshots/pwa/pwa1.png differ diff --git a/public/screenshots/pwa/pwa2.png b/public/screenshots/pwa/pwa2.png new file mode 100644 index 000000000..e0ab4bcb6 Binary files /dev/null and b/public/screenshots/pwa/pwa2.png differ diff --git a/public/screenshots/pwa/pwa3.png b/public/screenshots/pwa/pwa3.png new file mode 100644 index 000000000..7e7f3f5e7 Binary files /dev/null and b/public/screenshots/pwa/pwa3.png differ diff --git a/public/screenshots/pwa/pwa4.png b/public/screenshots/pwa/pwa4.png new file mode 100644 index 000000000..89ae5d120 Binary files /dev/null and b/public/screenshots/pwa/pwa4.png differ diff --git a/public/screenshots/pwa/pwa5.png b/public/screenshots/pwa/pwa5.png new file mode 100644 index 000000000..7105fcbf8 Binary files /dev/null and b/public/screenshots/pwa/pwa5.png differ diff --git a/public/screenshots/pwa/pwa6.png b/public/screenshots/pwa/pwa6.png new file mode 100644 index 000000000..543c0c9d8 Binary files /dev/null and b/public/screenshots/pwa/pwa6.png differ diff --git a/vite-config/manifest.ts b/vite-config/manifest.ts index d7481fc2b..adb3a57ba 100644 --- a/vite-config/manifest.ts +++ b/vite-config/manifest.ts @@ -113,5 +113,224 @@ export const manifest: Partial = { scope: 'https://msg.adamant.im', categories: ['finance', 'social', 'crypto', 'security', 'blockchain'], background_color: '#000000', - theme_color: '#4DBA87' + theme_color: '#4DBA87', + + screenshots: [ + { + src: '/screenshots/android/0-login.png', + sizes: '1334x750', + type: 'image/png', + form_factor: 'narrow', + label: 'Login with password', + platform: 'android' + }, + { + src: '/screenshots/android/screenshot-mobile.png', + sizes: '1334x750', + type: 'image/png', + form_factor: 'narrow', + label: 'Login', + platform: 'android' + }, + { + src: '/screenshots/android/1-balances.png', + sizes: '1334x750', + type: 'image/png', + form_factor: 'narrow', + label: 'Account balance', + platform: 'android' + }, + { + src: '/screenshots/android/2-exchanges.png', + sizes: '1334x750', + type: 'image/png', + form_factor: 'narrow', + label: 'Adamant exchanges', + platform: 'android' + }, + { + src: '/screenshots/android/3-send_funds.png', + sizes: '1334x750', + type: 'image/png', + form_factor: 'narrow', + label: 'Send funds', + platform: 'android' + }, + { + src: '/screenshots/android/4-partners.png', + sizes: '1334x750', + type: 'image/png', + form_factor: 'narrow', + label: "Partner's info", + platform: 'android' + }, + { + src: '/screenshots/android/5-start_new_chat.png', + sizes: '1334x750', + type: 'image/png', + form_factor: 'narrow', + label: 'Start new chat', + platform: 'android' + }, + { + src: '/screenshots/android/6-nodes.png', + sizes: '1334x750', + type: 'image/png', + form_factor: 'narrow', + label: 'Nodes list', + platform: 'android' + }, + { + src: '/screenshots/android/7-votes.png', + sizes: '1334x750', + type: 'image/png', + form_factor: 'narrow', + label: 'Votes', + platform: 'android' + }, + { + src: '/screenshots/ios/iOS1.png', + sizes: '1125x2436', + type: 'image/png', + form_factor: 'narrow', + label: 'Chats in light theme', + platform: 'ios' + }, + { + src: '/screenshots/ios/iOS2.png', + sizes: '1125x2436', + type: 'image/png', + form_factor: 'narrow', + label: 'Chats in dark theme', + platform: 'ios' + }, + { + src: '/screenshots/ios/iOS3.png', + sizes: '1125x2436', + type: 'image/png', + form_factor: 'narrow', + label: 'Adamant exchanges in dark theme', + platform: 'ios' + }, + { + src: '/screenshots/ios/iOS4.png', + sizes: '1125x2436', + type: 'image/png', + form_factor: 'narrow', + label: 'Adamant exchanges in light theme', + platform: 'ios' + }, + { + src: '/screenshots/ios/iOS5.png', + sizes: '1125x2436', + type: 'image/png', + form_factor: 'narrow', + label: 'Account balance in light theme', + platform: 'ios' + }, + { + src: '/screenshots/ios/iOS6.png', + sizes: '1125x2436', + type: 'image/png', + form_factor: 'narrow', + label: 'Account balance in dark theme', + platform: 'ios' + }, + { + src: '/screenshots/ios/iOS7.png', + sizes: '1125x2436', + type: 'image/png', + form_factor: 'narrow', + label: 'Send funds in dark theme', + platform: 'ios' + }, + { + src: '/screenshots/ios/iOS8.png', + sizes: '1125x2436', + type: 'image/png', + form_factor: 'narrow', + label: 'Send funds in light theme', + platform: 'ios' + }, + { + src: '/screenshots/ios/iOS9.png', + sizes: '1125x2436', + type: 'image/png', + form_factor: 'narrow', + label: 'Wallet list in light theme', + platform: 'ios' + }, + { + src: '/screenshots/ios/iOS10.png', + sizes: '1125x2436', + type: 'image/png', + form_factor: 'narrow', + label: 'Wallet list in dark theme', + platform: 'ios' + }, + { + src: '/screenshots/ios/iOS11.png', + sizes: '1125x2436', + type: 'image/png', + form_factor: 'narrow', + label: 'List of nodes in dark theme', + platform: 'ios' + }, + { + src: '/screenshots/ios/iOS12.png', + sizes: '1125x2436', + type: 'image/png', + form_factor: 'narrow', + label: 'List of nodes in light theme', + platform: 'ios' + }, + { + src: '/screenshots/pwa/pwa1.png', + sizes: '1280x800', + type: 'image/png', + form_factor: 'wide', + label: 'Login', + platform: 'chromeos' + }, + { + src: '/screenshots/pwa/pwa2.png', + sizes: '2255x1280', + type: 'image/png', + form_factor: 'wide', + label: 'Adamant exchanges', + platform: 'chromeos' + }, + { + src: '/screenshots/pwa/pwa3.png', + sizes: '2255x1280', + type: 'image/png', + form_factor: 'wide', + label: 'Send funds', + platform: 'chromeos' + }, + { + src: '/screenshots/pwa/pwa4.png', + sizes: '2255x1280', + type: 'image/png', + form_factor: 'wide', + label: 'Account balances', + platform: 'chromeos' + }, + { + src: '/screenshots/pwa/pwa5.png', + sizes: '2255x1280', + type: 'image/png', + form_factor: 'wide', + label: 'Wallet list', + platform: 'chromeos' + }, + { + src: '/screenshots/pwa/pwa6.png', + sizes: '2255x1280', + type: 'image/png', + form_factor: 'wide', + label: 'Start a new chat', + platform: 'chromeos' + } + ] } diff --git a/vite-config/plugins/excludeScreenshotsPlugin.ts b/vite-config/plugins/excludeScreenshotsPlugin.ts new file mode 100644 index 000000000..7f0ad3739 --- /dev/null +++ b/vite-config/plugins/excludeScreenshotsPlugin.ts @@ -0,0 +1,20 @@ +import fs from 'node:fs' +import path from 'node:path' +import { Plugin } from 'vite' + +/** + * Exclude screenshots from Electron bundle + */ +export function excludeScreenshotsPlugin(): Plugin { + return { + name: 'exclude-screenshots-plugin', + writeBundle(outputOptions) { + const outDir = outputOptions.dir as string + const screenshotsDir = path.resolve(outDir, 'screenshots') + + fs.rm(screenshotsDir, { recursive: true }, () => + console.log(`Deleted screenshots from ${screenshotsDir}`) + ) + } + } +}