Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
71edc3103d
|
|||
| 30c1faeae4 | |||
|
b90809fca1
|
|||
|
322182245c
|
|||
| 324b761d37 | |||
| 4dab0e2c63 | |||
| b3e08b53fc | |||
| 3ce15ed794 | |||
| bd310d8305 |
8
.gitignore
vendored
8
.gitignore
vendored
@@ -1,7 +1,3 @@
|
|||||||
|
|
||||||
|
.gpg/
|
||||||
node_modules
|
node_modules
|
||||||
dist
|
|
||||||
.DS_Store
|
|
||||||
.vscode
|
|
||||||
.idea
|
|
||||||
*.log
|
|
||||||
dev-dist
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Nonograms
|
# Nonograms
|
||||||
|
|
||||||
## English Description
|
## Description
|
||||||
|
|
||||||
Nonograms is a modern, fast, and accessible logic puzzle game (also known as Picross or Griddlers). Solve pixel-art puzzles by marking cells according to numeric clues for rows and columns. The app features:
|
Nonograms is a modern, fast, and accessible logic puzzle game (also known as Picross or Griddlers). Solve pixel-art puzzles by marking cells according to numeric clues for rows and columns. The app features:
|
||||||
- Clean UX with keyboard and touch support
|
- Clean UX with keyboard and touch support
|
||||||
|
|||||||
92
dev-dist/sw.js
Normal file
92
dev-dist/sw.js
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
/**
|
||||||
|
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// If the loader is already loaded, just stop.
|
||||||
|
if (!self.define) {
|
||||||
|
let registry = {};
|
||||||
|
|
||||||
|
// Used for `eval` and `importScripts` where we can't get script URL by other means.
|
||||||
|
// In both cases, it's safe to use a global var because those functions are synchronous.
|
||||||
|
let nextDefineUri;
|
||||||
|
|
||||||
|
const singleRequire = (uri, parentUri) => {
|
||||||
|
uri = new URL(uri + ".js", parentUri).href;
|
||||||
|
return registry[uri] || (
|
||||||
|
|
||||||
|
new Promise(resolve => {
|
||||||
|
if ("document" in self) {
|
||||||
|
const script = document.createElement("script");
|
||||||
|
script.src = uri;
|
||||||
|
script.onload = resolve;
|
||||||
|
document.head.appendChild(script);
|
||||||
|
} else {
|
||||||
|
nextDefineUri = uri;
|
||||||
|
importScripts(uri);
|
||||||
|
resolve();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
.then(() => {
|
||||||
|
let promise = registry[uri];
|
||||||
|
if (!promise) {
|
||||||
|
throw new Error(`Module ${uri} didn’t register its module`);
|
||||||
|
}
|
||||||
|
return promise;
|
||||||
|
})
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
self.define = (depsNames, factory) => {
|
||||||
|
const uri = nextDefineUri || ("document" in self ? document.currentScript.src : "") || location.href;
|
||||||
|
if (registry[uri]) {
|
||||||
|
// Module is already loading or loaded.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let exports = {};
|
||||||
|
const require = depUri => singleRequire(depUri, uri);
|
||||||
|
const specialDeps = {
|
||||||
|
module: { uri },
|
||||||
|
exports,
|
||||||
|
require
|
||||||
|
};
|
||||||
|
registry[uri] = Promise.all(depsNames.map(
|
||||||
|
depName => specialDeps[depName] || require(depName)
|
||||||
|
)).then(deps => {
|
||||||
|
factory(...deps);
|
||||||
|
return exports;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
|
define(['./workbox-7a5e81cd'], (function (workbox) { 'use strict';
|
||||||
|
|
||||||
|
self.addEventListener('message', event => {
|
||||||
|
if (event.data && event.data.type === 'SKIP_WAITING') {
|
||||||
|
self.skipWaiting();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The precacheAndRoute() method efficiently caches and responds to
|
||||||
|
* requests for URLs in the manifest.
|
||||||
|
* See https://goo.gl/S9QRab
|
||||||
|
*/
|
||||||
|
workbox.precacheAndRoute([{
|
||||||
|
"url": "index.html",
|
||||||
|
"revision": "0.ohmkvc7m8mo"
|
||||||
|
}], {});
|
||||||
|
workbox.cleanupOutdatedCaches();
|
||||||
|
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
|
||||||
|
allowlist: [/^\/$/]
|
||||||
|
}));
|
||||||
|
|
||||||
|
}));
|
||||||
3377
dev-dist/workbox-7a5e81cd.js
Normal file
3377
dev-dist/workbox-7a5e81cd.js
Normal file
File diff suppressed because it is too large
Load Diff
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "vue-nonograms-solid",
|
"name": "vue-nonograms-solid",
|
||||||
"version": "1.9.12",
|
"version": "1.10.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "vue-nonograms-solid",
|
"name": "vue-nonograms-solid",
|
||||||
"version": "1.9.12",
|
"version": "1.10.0",
|
||||||
"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,7 @@
|
|||||||
{
|
{
|
||||||
"name": "vue-nonograms-solid",
|
"name": "vue-nonograms-solid",
|
||||||
"version": "1.9.12",
|
"version": "1.10.0",
|
||||||
|
"homepage": "https://nonograms.7u.pl/",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
BIN
src/assets/.DS_Store
vendored
Normal file
BIN
src/assets/.DS_Store
vendored
Normal file
Binary file not shown.
@@ -272,6 +272,7 @@ watch(() => store.size, async () => {
|
|||||||
min-width: 100%;
|
min-width: 100%;
|
||||||
margin: 0 auto; /* Center the wrapper safely */
|
margin: 0 auto; /* Center the wrapper safely */
|
||||||
align-items: flex-start; /* Prevent cropping when centered */
|
align-items: flex-start; /* Prevent cropping when centered */
|
||||||
|
padding-right: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.game-container {
|
.game-container {
|
||||||
|
|||||||
@@ -32,7 +32,11 @@ defineProps({
|
|||||||
v-for="(group, index) in hints"
|
v-for="(group, index) in hints"
|
||||||
:key="index"
|
:key="index"
|
||||||
class="hint-group"
|
class="hint-group"
|
||||||
:class="{ 'is-active': index === activeIndex }"
|
:class="{
|
||||||
|
'is-active': index === activeIndex,
|
||||||
|
'guide-right': orientation === 'col' && (index + 1) % 5 === 0 && index !== size - 1,
|
||||||
|
'guide-bottom': orientation === 'row' && (index + 1) % 5 === 0 && index !== size - 1
|
||||||
|
}"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
v-for="(num, idx) in group"
|
v-for="(num, idx) in group"
|
||||||
@@ -111,4 +115,12 @@ defineProps({
|
|||||||
border-color: rgba(79, 172, 254, 0.8);
|
border-color: rgba(79, 172, 254, 0.8);
|
||||||
box-shadow: 0 0 12px rgba(79, 172, 254, 0.35);
|
box-shadow: 0 0 12px rgba(79, 172, 254, 0.35);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Guide lines every 5 */
|
||||||
|
.hint-group.guide-right {
|
||||||
|
border-right: 2px solid rgba(0, 242, 255, 0.5);
|
||||||
|
}
|
||||||
|
.hint-group.guide-bottom {
|
||||||
|
border-bottom: 2px solid rgba(0, 242, 255, 0.5);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ export function buildShareCanvas(data, t, formattedTime) {
|
|||||||
const { grid, size, currentDensity, guideUsageCount } = data;
|
const { grid, size, currentDensity, guideUsageCount } = data;
|
||||||
if (!grid || !grid.length) return null;
|
if (!grid || !grid.length) return null;
|
||||||
|
|
||||||
const appUrl = 'https://nonograms.7u.pl/';
|
const appUrl = typeof __APP_HOMEPAGE__ !== 'undefined' ? __APP_HOMEPAGE__ : '';
|
||||||
const maxBoard = 640;
|
const maxBoard = 640;
|
||||||
const cellSize = Math.max(8, Math.floor(maxBoard / size));
|
const cellSize = Math.max(8, Math.floor(maxBoard / size));
|
||||||
const boardSize = cellSize * size;
|
const boardSize = cellSize * size;
|
||||||
@@ -119,7 +119,7 @@ export function buildShareSVG(data, t, formattedTime) {
|
|||||||
const { grid, size, currentDensity, guideUsageCount } = data;
|
const { grid, size, currentDensity, guideUsageCount } = data;
|
||||||
if (!grid || !grid.length) return null;
|
if (!grid || !grid.length) return null;
|
||||||
|
|
||||||
const appUrl = 'https://nonograms.7u.pl/';
|
const appUrl = typeof __APP_HOMEPAGE__ !== 'undefined' ? __APP_HOMEPAGE__ : '';
|
||||||
const maxBoard = 640;
|
const maxBoard = 640;
|
||||||
const cellSize = Math.max(8, Math.floor(maxBoard / size));
|
const cellSize = Math.max(8, Math.floor(maxBoard / size));
|
||||||
const boardSize = cellSize * size;
|
const boardSize = cellSize * size;
|
||||||
@@ -227,7 +227,11 @@ export function buildShareSVG(data, t, formattedTime) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// URL
|
// URL
|
||||||
svgContent += `<text x="${padding}" y="${height - padding + 6}" font-family="Segoe UI, sans-serif" font-weight="500" font-size="14" fill="${urlColor}">${appUrl}</text>`;
|
svgContent += `
|
||||||
|
<a href="${appUrl}" target="_blank">
|
||||||
|
<text x="${padding}" y="${height - padding + 6}" font-family="Segoe UI, sans-serif" font-weight="500" font-size="14" fill="${urlColor}" style="text-decoration: underline; cursor: pointer;">${appUrl}</text>
|
||||||
|
</a>
|
||||||
|
`;
|
||||||
|
|
||||||
svgContent += '</svg>';
|
svgContent += '</svg>';
|
||||||
return svgContent;
|
return svgContent;
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ import path from 'path'
|
|||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
define: {
|
define: {
|
||||||
'__APP_VERSION__': JSON.stringify(process.env.npm_package_version)
|
'__APP_VERSION__': JSON.stringify(process.env.npm_package_version),
|
||||||
|
'__APP_HOMEPAGE__': JSON.stringify(process.env.npm_package_homepage)
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
vue(),
|
vue(),
|
||||||
|
|||||||
Reference in New Issue
Block a user