kingkont 0.18.4 → 0.18.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kingkont",
3
- "version": "0.18.4",
3
+ "version": "0.18.5",
4
4
  "description": "KingKont · Chatium — нод-редактор сцен с AI-генерацией (картинки/видео/голос/SFX/музыка/текст)",
5
5
  "main": "main.js",
6
6
  "bin": {
package/renderer/board.js CHANGED
@@ -976,6 +976,30 @@ function showCloudCardContextMenu(p, clientX, clientY) {
976
976
  b.addEventListener('click', () => { menu.classList.add('hidden'); fn(); });
977
977
  menu.appendChild(b);
978
978
  };
979
+ add('✏️ Переименовать…', async () => {
980
+ const newName = await askName('Новое имя проекта:', '', p.name || '', { okText: 'Переименовать' });
981
+ if (!newName || newName.trim() === (p.name || '').trim()) return;
982
+ try {
983
+ // POST /api/projects/<id> с {name} → providers.updateProject → Chatium ~update.
984
+ const r = await fetch('/api/projects/' + encodeURIComponent(p.id), {
985
+ method: 'POST',
986
+ headers: { 'Content-Type': 'application/json' },
987
+ body: JSON.stringify({ name: newName.trim() }),
988
+ });
989
+ if (!r.ok) {
990
+ const err = await r.json().catch(() => ({}));
991
+ throw new Error(err.error || 'HTTP ' + r.status);
992
+ }
993
+ // Обновляем кэш локально, чтобы welcome не дёргал сеть для перерисовки.
994
+ try {
995
+ const cached = JSON.parse(localStorage.getItem('cloudProjectsCache') || '[]');
996
+ const i = cached.findIndex(c => c.id === p.id);
997
+ if (i >= 0) { cached[i].name = newName.trim(); cached[i].updatedAt = Date.now(); }
998
+ localStorage.setItem('cloudProjectsCache', JSON.stringify(cached));
999
+ } catch {}
1000
+ await renderWelcomeRecents();
1001
+ } catch (e) { alert('Не удалось переименовать: ' + (e?.message || e)); }
1002
+ });
979
1003
  add('📂 Открыть в Finder', async () => {
980
1004
  if (!window.cloudFs?.openInFinder) {
981
1005
  alert('Доступно только в Electron-приложении');
@@ -163,11 +163,18 @@
163
163
  margin-left: 4px;
164
164
  }
165
165
  .sidebar-header .brand .sub { font-size: 10px; color: #888; letter-spacing: 0.5px; text-transform: uppercase; }
166
- .sidebar-header .brand .sub.has-project { color: #aaccdd; text-transform: none; letter-spacing: 0; font-size: 11px; }
166
+ /* Когда проект открыт название проекта показывается КРУПНО (juser попросил
167
+ «название проекта показывай крупным сверху-слева»). Title «KingKont vX»
168
+ остаётся, но визуально вторичен — sub перебивает по размеру. */
169
+ .sidebar-header .brand .sub.has-project {
170
+ color: #fff; text-transform: none; letter-spacing: 0;
171
+ font-size: 18px; font-weight: 600; line-height: 1.2;
172
+ word-break: break-word;
173
+ }
174
+ /* Имя выбранной сцены спрятано в шапке (юзер: «название выбранной сцены
175
+ скрывай»). Сама подсветка сцены остаётся в sidebar-list. */
167
176
  .sidebar-header .brand .board {
168
- margin-top: 3px; font-size: 13px; font-weight: 600; color: #e0e0e0;
169
- word-break: break-all; line-height: 1.2;
170
- display: flex; align-items: center; gap: 6px;
177
+ display: none !important;
171
178
  }
172
179
  .sidebar-header .brand .board .kind {
173
180
  font-size: 9px; font-weight: 600; letter-spacing: 0.5px;