mirror of
https://github.com/chinchang/web-maker.git
synced 2025-08-02 19:37:29 +02:00
Merge branch 'manifestv3'
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "web-maker",
|
"name": "web-maker",
|
||||||
"version": "6.3.0",
|
"version": "6.3.1",
|
||||||
"description": "A blazing fast & offline web playground",
|
"description": "A blazing fast & offline web playground",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "concurrently --kill-others \"gulp start-preview-server\" \"npm run -s dev\"",
|
"start": "concurrently --kill-others \"gulp start-preview-server\" \"npm run -s dev\"",
|
||||||
|
@@ -7,6 +7,7 @@ import { alertsService } from '../notifications';
|
|||||||
import { Button } from './common';
|
import { Button } from './common';
|
||||||
import { Icon } from './Icons';
|
import { Icon } from './Icons';
|
||||||
import { Text } from './Text';
|
import { Text } from './Text';
|
||||||
|
import { LoaderWithText } from './Loader';
|
||||||
|
|
||||||
const FREE_PUBLIC_ITEM_COUNT = 1;
|
const FREE_PUBLIC_ITEM_COUNT = 1;
|
||||||
const BASE_URL = location.origin.includes('chrome-extension://')
|
const BASE_URL = location.origin.includes('chrome-extension://')
|
||||||
@@ -34,6 +35,7 @@ export function Share({
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const [val, setVal] = useState(item.isPublic);
|
const [val, setVal] = useState(item.isPublic);
|
||||||
|
const [isSyncing, setIsSyncing] = useState(false);
|
||||||
const onChange = async e => {
|
const onChange = async e => {
|
||||||
const newVal = e.target.checked;
|
const newVal = e.target.checked;
|
||||||
setVal(newVal);
|
setVal(newVal);
|
||||||
@@ -41,6 +43,7 @@ export function Share({
|
|||||||
const token = await window.user.firebaseUser.getIdToken();
|
const token = await window.user.firebaseUser.getIdToken();
|
||||||
let res;
|
let res;
|
||||||
try {
|
try {
|
||||||
|
setIsSyncing(true);
|
||||||
res = await fetch(
|
res = await fetch(
|
||||||
`${TOGGLE_VISIBILITY_API}?token=${token}&itemId=${item.id}`
|
`${TOGGLE_VISIBILITY_API}?token=${token}&itemId=${item.id}`
|
||||||
);
|
);
|
||||||
@@ -50,6 +53,8 @@ export function Share({
|
|||||||
setVal(!newVal);
|
setVal(!newVal);
|
||||||
}, 400);
|
}, 400);
|
||||||
return;
|
return;
|
||||||
|
} finally {
|
||||||
|
setIsSyncing(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (res.status >= 200 && res.status < 400) {
|
if (res.status >= 200 && res.status < 400) {
|
||||||
@@ -95,6 +100,11 @@ export function Share({
|
|||||||
>
|
>
|
||||||
Access
|
Access
|
||||||
</Switch>
|
</Switch>
|
||||||
|
{isSyncing && (
|
||||||
|
<p>
|
||||||
|
<LoaderWithText>Syncing...</LoaderWithText>
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
{item.isPublic && (
|
{item.isPublic && (
|
||||||
<p>
|
<p>
|
||||||
Public at{' '}
|
Public at{' '}
|
||||||
|
@@ -84,7 +84,7 @@ if (module.hot) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const UNSAVED_WARNING_COUNT = 15;
|
const UNSAVED_WARNING_COUNT = 15;
|
||||||
const version = '6.3.0';
|
const version = '6.3.1';
|
||||||
|
|
||||||
// Read forced settings as query parameters
|
// Read forced settings as query parameters
|
||||||
window.forcedSettings = {};
|
window.forcedSettings = {};
|
||||||
|
@@ -3,6 +3,8 @@ import { useState, useEffect } from 'react';
|
|||||||
function useCheckout() {
|
function useCheckout() {
|
||||||
const [hasVendorScriptLoaded, setHasVendorScriptLoaded] = useState();
|
const [hasVendorScriptLoaded, setHasVendorScriptLoaded] = useState();
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (window.IS_EXTENSION) return;
|
||||||
|
|
||||||
const script = document.createElement('script');
|
const script = document.createElement('script');
|
||||||
script.src = 'https://app.lemonsqueezy.com/js/lemon.js';
|
script.src = 'https://app.lemonsqueezy.com/js/lemon.js';
|
||||||
script.async = 'true';
|
script.async = 'true';
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Web Maker",
|
"name": "Web Maker",
|
||||||
"version": "6.3.0",
|
"version": "6.3.1",
|
||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"description": "Blazing fast & offline playground for your web experiments",
|
"description": "Blazing fast & offline playground for your web experiments",
|
||||||
"homepage_url": "https://webmaker.app",
|
"homepage_url": "https://webmaker.app",
|
||||||
|
@@ -35,7 +35,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<h3>
|
<h3>
|
||||||
Settings
|
Settings
|
||||||
<span style="opacity: 0.6; font-size: 0.7em"> v6.3.0</span>
|
<span style="opacity: 0.6; font-size: 0.7em"> v6.3.1</span>
|
||||||
</h3>
|
</h3>
|
||||||
<form name="optionsForm">
|
<form name="optionsForm">
|
||||||
<label>
|
<label>
|
||||||
|
Reference in New Issue
Block a user