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 all 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
4 changes: 3 additions & 1 deletion electron-vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -12,7 +13,8 @@ export default mergeConfig(
plugins: [
electron({
entry: 'src/electron/main.js'
})
}),
excludeScreenshotsPlugin()
]
})
)
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
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'
}
]
}
20 changes: 20 additions & 0 deletions vite-config/plugins/excludeScreenshotsPlugin.ts
Original file line number Diff line number Diff line change
@@ -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}`)
)
}
}
}