Compare commits
16 Commits
934b2a0483
...
v1.12.7
| Author | SHA1 | Date | |
|---|---|---|---|
|
ec20d5ee8f
|
|||
|
b20a829d37
|
|||
|
988c4a899b
|
|||
|
d8faa308e6
|
|||
|
6bddb24bfe
|
|||
|
1c2be3567a
|
|||
|
|
d62cec415b | ||
|
8be28a4472
|
|||
|
48778b3e8a
|
|||
|
8bd5d5c3e6
|
|||
|
cf37ccd843
|
|||
| 9a65dfe55d | |||
| 2a88362d00 | |||
| 8e3ae3e7d6 | |||
| 51bbe0cb52 | |||
| 08292039cf |
18
.gitea/workflows/deploy.yaml
Normal file
18
.gitea/workflows/deploy.yaml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
name: Deploy to Production
|
||||||
|
run-name: Deploy to Production by @${{ github.actor }}
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: self-hosted
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build and deploy with Docker Compose
|
||||||
|
run: |
|
||||||
|
docker compose up -d --build
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,3 +1,3 @@
|
|||||||
|
|
||||||
.gpg/
|
.gpg/
|
||||||
node_modules
|
node_modules
|
||||||
|
.DS_Store
|
||||||
|
|||||||
@@ -8,4 +8,6 @@ Nonograms is a modern, fast, and accessible logic puzzle game (also known as Pic
|
|||||||
- Difficulty simulation and guide to learn solving strategies
|
- Difficulty simulation and guide to learn solving strategies
|
||||||
- Shareable puzzles and persistent progress
|
- Shareable puzzles and persistent progress
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
Play online at https://nonograms.7u.pl or install as a PWA for an app-like experience.
|
Play online at https://nonograms.7u.pl or install as a PWA for an app-like experience.
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
|
|
||||||
const fs = require('fs');
|
|
||||||
|
|
||||||
const fileContent = fs.readFileSync('src/composables/useI18n.js', 'utf8');
|
|
||||||
|
|
||||||
// Extract the messages object
|
|
||||||
const match = fileContent.match(/const messages = ({[\s\S]*?});/);
|
|
||||||
if (!match) {
|
|
||||||
console.error('Could not find messages object');
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// We need to make the string valid JS to eval it.
|
|
||||||
// It seems the content inside `const messages = { ... };` is valid JS object notation.
|
|
||||||
// But we need to be careful about imports or other things if we were to `eval` the whole file.
|
|
||||||
// We'll just `eval` the object part.
|
|
||||||
|
|
||||||
const messagesStr = match[1];
|
|
||||||
const messages = eval(`(${messagesStr})`);
|
|
||||||
|
|
||||||
const enKeys = Object.keys(messages.en);
|
|
||||||
const languages = Object.keys(messages);
|
|
||||||
|
|
||||||
const missing = {};
|
|
||||||
|
|
||||||
languages.forEach(lang => {
|
|
||||||
if (lang === 'en') return;
|
|
||||||
|
|
||||||
const langKeys = Object.keys(messages[lang]);
|
|
||||||
const missingKeys = enKeys.filter(k => !langKeys.includes(k));
|
|
||||||
|
|
||||||
if (missingKeys.length > 0) {
|
|
||||||
missing[lang] = missingKeys;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log(JSON.stringify(missing, null, 2));
|
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/nonograms.svg" />
|
<link rel="icon" type="image/svg+xml" href="/nonograms.svg" />
|
||||||
<link rel="apple-touch-icon" href="/nonograms.svg" />
|
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
||||||
<link rel="mask-icon" href="/nonograms.svg" color="#00f2fe" />
|
<link rel="mask-icon" href="/nonograms.svg" color="#00f2fe" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Nonograms Pro - Vue 3 SOLID</title>
|
<title>Nonograms Pro - Vue 3 SOLID</title>
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "vue-nonograms-solid",
|
"name": "vue-nonograms-solid",
|
||||||
"version": "1.11.3",
|
"version": "1.12.7",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "vue-nonograms-solid",
|
"name": "vue-nonograms-solid",
|
||||||
"version": "1.11.3",
|
"version": "1.12.7",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fireworks-js": "^2.10.8",
|
"fireworks-js": "^2.10.8",
|
||||||
"flag-icons": "^7.5.0",
|
"flag-icons": "^7.5.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "vue-nonograms-solid",
|
"name": "vue-nonograms-solid",
|
||||||
"version": "1.11.3",
|
"version": "1.12.7",
|
||||||
"homepage": "https://nonograms.7u.pl/",
|
"homepage": "https://nonograms.7u.pl/",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
BIN
public/apple-touch-icon.png
Normal file
BIN
public/apple-touch-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
BIN
public/pwa-192x192.png
Normal file
BIN
public/pwa-192x192.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
BIN
public/pwa-512x512.png
Normal file
BIN
public/pwa-512x512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 78 KiB |
BIN
public/screenshot.png
Normal file
BIN
public/screenshot.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
42
scripts/generate-icons.js
Normal file
42
scripts/generate-icons.js
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
import sharp from 'sharp';
|
||||||
|
import path from 'path';
|
||||||
|
import { fileURLToPath } from 'url';
|
||||||
|
|
||||||
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
|
const __dirname = path.dirname(__filename);
|
||||||
|
|
||||||
|
const INPUT_FILE = path.join(__dirname, '../public/nonograms.svg');
|
||||||
|
const OUTPUT_DIR = path.join(__dirname, '../public');
|
||||||
|
|
||||||
|
async function generateIcons() {
|
||||||
|
console.log('Generating icons from ' + INPUT_FILE);
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 192x192
|
||||||
|
await sharp(INPUT_FILE)
|
||||||
|
.resize(192, 192)
|
||||||
|
.png()
|
||||||
|
.toFile(path.join(OUTPUT_DIR, 'pwa-192x192.png'));
|
||||||
|
console.log('Created pwa-192x192.png');
|
||||||
|
|
||||||
|
// 512x512
|
||||||
|
await sharp(INPUT_FILE)
|
||||||
|
.resize(512, 512)
|
||||||
|
.png()
|
||||||
|
.toFile(path.join(OUTPUT_DIR, 'pwa-512x512.png'));
|
||||||
|
console.log('Created pwa-512x512.png');
|
||||||
|
|
||||||
|
// Apple Touch Icon (180x180)
|
||||||
|
await sharp(INPUT_FILE)
|
||||||
|
.resize(180, 180)
|
||||||
|
.png()
|
||||||
|
.toFile(path.join(OUTPUT_DIR, 'apple-touch-icon.png'));
|
||||||
|
console.log('Created apple-touch-icon.png');
|
||||||
|
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Error generating icons:', err);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
generateIcons();
|
||||||
@@ -110,7 +110,8 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
if (typeof window !== 'undefined') {
|
if (typeof window !== 'undefined') {
|
||||||
isCoarsePointer.value = window.matchMedia('(pointer: coarse)').matches;
|
isCoarsePointer.value = window.matchMedia('(pointer: coarse)').matches;
|
||||||
isIos.value = /ipad|iphone|ipod/.test(navigator.userAgent.toLowerCase());
|
const ua = navigator.userAgent.toLowerCase();
|
||||||
|
isIos.value = /ipad|iphone|ipod/.test(ua) || (ua.includes('mac') && navigator.maxTouchPoints > 1);
|
||||||
const storedTheme = typeof localStorage !== 'undefined' ? localStorage.getItem('theme') : null;
|
const storedTheme = typeof localStorage !== 'undefined' ? localStorage.getItem('theme') : null;
|
||||||
if (storedTheme === 'light' || storedTheme === 'dark' || storedTheme === 'system') {
|
if (storedTheme === 'light' || storedTheme === 'dark' || storedTheme === 'system') {
|
||||||
themePreference.value = storedTheme;
|
themePreference.value = storedTheme;
|
||||||
|
|||||||
BIN
src/assets/.DS_Store
vendored
BIN
src/assets/.DS_Store
vendored
Binary file not shown.
@@ -31,14 +31,14 @@ export default defineConfig({
|
|||||||
theme_color: '#00f2fe',
|
theme_color: '#00f2fe',
|
||||||
icons: [
|
icons: [
|
||||||
{
|
{
|
||||||
src: '/pwa-192x192.svg',
|
src: '/pwa-192x192.png',
|
||||||
sizes: '192x192',
|
sizes: '192x192',
|
||||||
type: 'image/svg+xml'
|
type: 'image/png'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
src: '/pwa-512x512.svg',
|
src: '/pwa-512x512.png',
|
||||||
sizes: '512x512',
|
sizes: '512x512',
|
||||||
type: 'image/svg+xml'
|
type: 'image/png'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user