Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: added screenshots to manifest #626

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ files:
- "!**/node_modules/**"
- "dist-electron"
- "package.json"
- "!dist-electron/screenshots/**/*"
bludnic marked this conversation as resolved.
Show resolved Hide resolved

directories:
output: './release-electron'
Expand Down
Binary file added public/screenshots/android/0-login.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 added public/screenshots/android/1-balances.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 added public/screenshots/android/2-exchanges.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 added public/screenshots/android/3-send_funds.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 added public/screenshots/android/4-partners.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 added public/screenshots/android/5-start_new_chat.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 added public/screenshots/android/6-nodes.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 added public/screenshots/android/7-votes.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 added public/screenshots/android/screenshot-mobile.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 added public/screenshots/ios/iOS1.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 added public/screenshots/ios/iOS10.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 added public/screenshots/ios/iOS11.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 added public/screenshots/ios/iOS12.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 added public/screenshots/ios/iOS2.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 added public/screenshots/ios/iOS3.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 added public/screenshots/ios/iOS4.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 added public/screenshots/ios/iOS5.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 added public/screenshots/ios/iOS6.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 added public/screenshots/ios/iOS7.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 added public/screenshots/ios/iOS8.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 added public/screenshots/ios/iOS9.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 added public/screenshots/pwa/pwa1.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 added public/screenshots/pwa/pwa2.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 added public/screenshots/pwa/pwa3.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 added public/screenshots/pwa/pwa4.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 added public/screenshots/pwa/pwa5.png
Binary file added public/screenshots/pwa/pwa6.png
2 changes: 2 additions & 0 deletions vite-base.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import commonjs from '@rollup/plugin-commonjs'
import { deferScripsPlugin } from './vite-config/plugins/deferScriptsPlugin'
import { preloadCSSPlugin } from './vite-config/plugins/preloadCSSPlugin'
import { excludeBip39Wordlists } from './vite-config/rollup/excludeBip39Wordlists'
import { excludeScreenshotsPlugin} from './vite-config/plugins/excludeScreenshotsPlugin'

export default defineConfig({
plugins: [
Expand All @@ -22,6 +23,7 @@ export default defineConfig({
}),
deferScripsPlugin(),
preloadCSSPlugin()
excludeScreenshotsPlugin()
bludnic marked this conversation as resolved.
Show resolved Hide resolved
],
css: {
postcss: {
Expand Down
221 changes: 220 additions & 1 deletion vite-config/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,224 @@ export const manifest: Partial<ManifestOptions> = {
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'
}
]
}
19 changes: 19 additions & 0 deletions vite-config/plugins/excludeScreenshotsPlugin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import fs from 'node:fs'
import path from 'path'

/**
* Exclude screenshots from Electron bundle
*/
export function excludeScreenshotsPlugin () {
return {
name: 'exclude-screenshots-plugin',
resolveId (source) {
return source === 'virtual-module' ? source : null
},
writeBundle (outputOptions, inputOptions) {
const outDir = outputOptions.dir;
const screenshotsDir = path.resolve(outDir, 'screenshots');
fs.rm(screenshotsDir, { recursive: true }, () => console.log(`Deleted ${screenshotsDir}`))
}
}
}
bludnic marked this conversation as resolved.
Show resolved Hide resolved
Loading