kingkont 0.7.8 → 0.7.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.html +34 -10
- package/main.js +19 -2
- package/package.json +1 -1
package/index.html
CHANGED
|
@@ -90,16 +90,24 @@
|
|
|
90
90
|
.welcome { display: none; }
|
|
91
91
|
body.no-project .welcome {
|
|
92
92
|
display: flex; position: fixed; inset: 0; z-index: 50;
|
|
93
|
-
|
|
93
|
+
flex-direction: column; align-items: center;
|
|
94
94
|
background: #1a1a1a;
|
|
95
95
|
-webkit-app-region: drag;
|
|
96
|
+
padding-top: 64px;
|
|
97
|
+
overflow: hidden; /* recents скроллятся внутри своего блока */
|
|
96
98
|
}
|
|
97
99
|
body.no-project .sidebar, body.no-project .main, body.no-project .preview-panel { display: none !important; }
|
|
98
100
|
.welcome-inner {
|
|
99
101
|
display: flex; flex-direction: column; align-items: center; gap: 12px;
|
|
100
|
-
max-width:
|
|
102
|
+
width: 100%; max-width: none; padding: 0;
|
|
103
|
+
flex: 1; min-height: 0; /* нужно для child overflow */
|
|
101
104
|
-webkit-app-region: no-drag;
|
|
102
105
|
}
|
|
106
|
+
.welcome-header {
|
|
107
|
+
display: flex; flex-direction: column; align-items: center; gap: 12px;
|
|
108
|
+
flex-shrink: 0; /* всегда сверху, не сжимается под recents */
|
|
109
|
+
padding: 0 32px;
|
|
110
|
+
}
|
|
103
111
|
.welcome-logo {
|
|
104
112
|
width: 96px; height: 96px; object-fit: contain;
|
|
105
113
|
background: #1f1f1f; border-radius: 16px; padding: 8px;
|
|
@@ -114,19 +122,33 @@
|
|
|
114
122
|
border-radius: 6px; cursor: pointer; border: 1px solid #4a6a9a;
|
|
115
123
|
}
|
|
116
124
|
.welcome-open:hover { background: #4a6a9a; }
|
|
117
|
-
.welcome-recent {
|
|
125
|
+
.welcome-recent {
|
|
126
|
+
margin-top: 36px; width: 100%;
|
|
127
|
+
flex: 1; min-height: 0;
|
|
128
|
+
display: flex; flex-direction: column;
|
|
129
|
+
}
|
|
118
130
|
.welcome-recent-title {
|
|
119
131
|
font-size: 11px; color: #666; text-transform: uppercase; letter-spacing: 0.6px;
|
|
120
132
|
margin-bottom: 14px; text-align: center;
|
|
133
|
+
flex-shrink: 0;
|
|
121
134
|
}
|
|
135
|
+
/* Recents в горизонтальную ленту со скроллом. Карточки фиксированной
|
|
136
|
+
ширины чтобы scroll работал предсказуемо. */
|
|
122
137
|
.welcome-recent-grid {
|
|
123
|
-
display:
|
|
124
|
-
|
|
125
|
-
|
|
138
|
+
display: flex; flex-direction: row; gap: 16px;
|
|
139
|
+
overflow-x: auto; overflow-y: hidden;
|
|
140
|
+
padding: 8px 32px 24px;
|
|
141
|
+
scroll-snap-type: x proximity;
|
|
142
|
+
}
|
|
143
|
+
.welcome-recent-grid::-webkit-scrollbar { height: 8px; }
|
|
144
|
+
.welcome-recent-grid::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 4px; }
|
|
145
|
+
.welcome-recent-grid::-webkit-scrollbar-thumb:hover { background: #4a4a4a; }
|
|
126
146
|
.welcome-card {
|
|
127
147
|
background: #232323; border: 1px solid #333; border-radius: 8px;
|
|
128
148
|
overflow: hidden; cursor: pointer; transition: border-color 0.12s, transform 0.12s;
|
|
129
149
|
display: flex; flex-direction: column;
|
|
150
|
+
width: 240px; flex-shrink: 0;
|
|
151
|
+
scroll-snap-align: start;
|
|
130
152
|
}
|
|
131
153
|
.welcome-card:hover { border-color: #4a6a9a; transform: translateY(-2px); }
|
|
132
154
|
.welcome-card-thumb {
|
|
@@ -991,10 +1013,12 @@
|
|
|
991
1013
|
<!-- Welcome-экран: виден только когда body.no-project -->
|
|
992
1014
|
<div class="welcome" id="welcome">
|
|
993
1015
|
<div class="welcome-inner">
|
|
994
|
-
<
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
1016
|
+
<div class="welcome-header">
|
|
1017
|
+
<img class="welcome-logo" src="assets/logo-square.svg" alt="" draggable="false" id="welcomeLogo" title="Дабл-клик — настройки" style="cursor:pointer;">
|
|
1018
|
+
<h1 class="welcome-title">KingKont</h1>
|
|
1019
|
+
<div class="welcome-sub">Видео-редактор</div>
|
|
1020
|
+
<button id="welcomeOpen" class="welcome-open primary">Открыть проект</button>
|
|
1021
|
+
</div>
|
|
998
1022
|
<div class="welcome-recent" id="welcomeRecent" style="display:none;">
|
|
999
1023
|
<div class="welcome-recent-title">Недавние проекты</div>
|
|
1000
1024
|
<div class="welcome-recent-grid" id="welcomeRecentGrid"></div>
|
package/main.js
CHANGED
|
@@ -443,8 +443,25 @@ ipcMain.handle('updates:install', async (e, target = 'latest') => {
|
|
|
443
443
|
});
|
|
444
444
|
|
|
445
445
|
ipcMain.handle('app:relaunch', () => {
|
|
446
|
-
app.relaunch()
|
|
447
|
-
|
|
446
|
+
// app.relaunch() запускает ТЕКУЩИЙ execPath. Если юзер обновился через
|
|
447
|
+
// `npm i -g`, новая kingkont лежит в global-bin, а не в npx-кэше где сидит
|
|
448
|
+
// текущий процесс — relaunch снова поднимет старую версию.
|
|
449
|
+
//
|
|
450
|
+
// Решение: spawn новой kingkont через login shell (PATH резолвит global-bin),
|
|
451
|
+
// detached + ignored stdio чтобы дочерний процесс пережил наш exit.
|
|
452
|
+
const shell = process.env.SHELL || '/bin/bash';
|
|
453
|
+
try {
|
|
454
|
+
const child = spawn(shell, ['-lc', 'kingkont'], {
|
|
455
|
+
detached: true,
|
|
456
|
+
stdio: 'ignore',
|
|
457
|
+
});
|
|
458
|
+
child.unref();
|
|
459
|
+
} catch (e) {
|
|
460
|
+
console.warn('spawn kingkont failed, fallback на app.relaunch():', e?.message);
|
|
461
|
+
app.relaunch();
|
|
462
|
+
}
|
|
463
|
+
// Дать ребёнку секунду чтобы успеть стартовать, потом выходим.
|
|
464
|
+
setTimeout(() => app.exit(0), 800);
|
|
448
465
|
});
|
|
449
466
|
|
|
450
467
|
// Фоновая проверка при старте: если есть свежая — открываем окно автоматом.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kingkont",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.10",
|
|
4
4
|
"description": "KingKont \u00b7 Chatium \u2014 \u043d\u043e\u0434-\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0441\u0446\u0435\u043d \u0441 AI-\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439 (\u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438/\u0432\u0438\u0434\u0435\u043e/\u0433\u043e\u043b\u043e\u0441/SFX/\u043c\u0443\u0437\u044b\u043a\u0430/\u0442\u0435\u043a\u0441\u0442)",
|
|
5
5
|
"main": "main.js",
|
|
6
6
|
"bin": {
|