Skip to content

Commit f03129b

Browse files
committed
fix: patch up GUI reset after CLI update
1 parent e9a3005 commit f03129b

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "leafs/cli",
33
"description": "A simple command line tool for installing and interacting with your leaf apps",
44
"homepage": "https://cli.leafphp.dev",
5-
"version": "v2.11.0",
5+
"version": "v2.11.1",
66
"keywords": [
77
"leaf",
88
"php",

src/ui/dist/server.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
$action = $_GET['action'] ?? null;
1616

1717
if ($action === 'getConfig') {
18-
$config = __DIR__ . '/ui.config.json';
18+
$config = dirname(__DIR__, 4) . '/ui.config.json';
1919

2020
if (!file_exists($config)) {
2121
touch($config);
@@ -35,7 +35,7 @@
3535
}
3636

3737
if ($action === 'setConfig') {
38-
$configFile = __DIR__ . '/ui.config.json';
38+
$configFile = dirname(__DIR__, 4) . '/ui.config.json';
3939
$config = file_get_contents($configFile);
4040
$config = json_decode($config, true);
4141
$config = array_merge($config, getData('data')['data'] ?? []);
@@ -63,7 +63,7 @@
6363
$appInfo = getData('data')['data'] ?? '{}';
6464
$appInfo = json_decode($appInfo, true);
6565

66-
$config = __DIR__ . '/ui.config.json';
66+
$config = dirname(__DIR__, 4) . '/ui.config.json';
6767
$applicationConfig = file_get_contents($config);
6868
$applicationConfig = json_decode($applicationConfig, true);
6969

src/ui/server.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
$action = $_GET['action'] ?? null;
1212

1313
if ($action === 'getConfig') {
14-
$config = __DIR__ . '/ui.config.json';
14+
$config = dirname(__DIR__, 4) . '/ui.config.json';
1515

1616
if (!file_exists($config)) {
1717
touch($config);
@@ -31,7 +31,7 @@
3131
}
3232

3333
if ($action === 'setConfig') {
34-
$configFile = __DIR__ . '/ui.config.json';
34+
$configFile = dirname(__DIR__, 4) . '/ui.config.json';
3535
$config = file_get_contents($configFile);
3636
$config = json_decode($config, true);
3737
$config = array_merge($config, getData('data')['data'] ?? []);
@@ -59,7 +59,7 @@
5959
$appInfo = getData('data')['data'] ?? '{}';
6060
$appInfo = json_decode($appInfo, true);
6161

62-
$config = __DIR__ . '/ui.config.json';
62+
$config = dirname(__DIR__, 4) . '/ui.config.json';
6363
$applicationConfig = file_get_contents($config);
6464
$applicationConfig = json_decode($applicationConfig, true);
6565

0 commit comments

Comments
 (0)