Merge branch 'main' of github.com:rafaelfoster/oikos

This commit is contained in:
Rafael Foster
2026-04-29 05:48:27 -03:00
19 changed files with 125 additions and 34 deletions
+4 -3
View File
@@ -24,6 +24,7 @@ jobs:
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
plugins: 'code-review@claude-code-plugins'
prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
prompt: >
Review this pull request for bugs, logic errors, security issues, and adherence to project
conventions. Focus only on high-confidence issues that genuinely matter. Skip style nitpicks.
Post your findings as inline review comments on the relevant lines.
+5
View File
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.31.2] - 2026-04-29
### Added
- Settings: edit button (pencil icon) on each ICS subscription row — opens a modal to update name, color, and shared visibility via the existing PATCH endpoint (#100)
## [0.31.1] - 2026-04-29
### Fixed
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "oikos",
"version": "0.31.1",
"version": "0.31.2",
"description": "Self-hosted family planner - calendar, tasks, shopping, meal planning, budget and more. Private, open-source, no subscription.",
"main": "server/index.js",
"type": "module",
+3 -2
View File
@@ -732,7 +732,8 @@
"badges": {
"private": "خاص",
"shared": "مشترك"
}
},
"updatedToast": "تم تحديث الاشتراك."
},
"memberPhoneLabel": "رقم الهاتف (اختياري)",
"memberEmailLabel": "البريد الإلكتروني (اختياري)",
@@ -897,4 +898,4 @@
"emptyHint": {
"recipes": "أنشئ وصفات واربطها بمخطط الوجبات."
}
}
}
+3 -2
View File
@@ -757,7 +757,8 @@
"empty": "Noch keine Abonnements.",
"addedToast": "Abonnement hinzugefügt.",
"syncedToast": "Abonnement synchronisiert.",
"deletedToast": "Abonnement gelöscht."
"deletedToast": "Abonnement gelöscht.",
"updatedToast": "Abonnement aktualisiert."
},
"memberPhoneLabel": "Telefonnummer (optional)",
"memberEmailLabel": "E-Mail (optional)",
@@ -935,4 +936,4 @@
"goShop": "Einkaufsliste",
"goNotes": "Notizen"
}
}
}
+3 -2
View File
@@ -732,7 +732,8 @@
"badges": {
"private": "Ιδιωτικό",
"shared": "Κοινόχρηστο"
}
},
"updatedToast": "Η συνδρομή ενημερώθηκε."
},
"memberPhoneLabel": "Αριθμός τηλεφώνου (προαιρετικό)",
"memberEmailLabel": "Email (προαιρετικό)",
@@ -897,4 +898,4 @@
"emptyHint": {
"recipes": "Δημιουργήστε συνταγές και συνδέστε τις με τον προγραμματισμό γευμάτων."
}
}
}
+3 -2
View File
@@ -735,7 +735,8 @@
"badges": {
"private": "Private",
"shared": "Shared"
}
},
"updatedToast": "Subscription updated."
},
"memberPhoneLabel": "Phone number (optional)",
"memberEmailLabel": "Email (optional)",
@@ -919,4 +920,4 @@
"birthdays": "Add birthdays — you will receive a reminder in time.",
"recipes": "Create recipes and link them to your meal planner."
}
}
}
+3 -2
View File
@@ -732,7 +732,8 @@
"badges": {
"private": "Privado",
"shared": "Compartido"
}
},
"updatedToast": "Suscripción actualizada."
},
"memberPhoneLabel": "Número de teléfono (opcional)",
"memberEmailLabel": "Correo electrónico (opcional)",
@@ -897,4 +898,4 @@
"emptyHint": {
"recipes": "Crea recetas y vincúlalas con tu planificador de comidas."
}
}
}
+3 -2
View File
@@ -732,7 +732,8 @@
"badges": {
"private": "Privé",
"shared": "Partagé"
}
},
"updatedToast": "Abonnement mis à jour."
},
"memberPhoneLabel": "Numéro de téléphone (facultatif)",
"memberEmailLabel": "E-mail (facultatif)",
@@ -897,4 +898,4 @@
"emptyHint": {
"recipes": "Créez des recettes et associez-les à votre planification des repas."
}
}
}
+3 -2
View File
@@ -732,7 +732,8 @@
"badges": {
"private": "निजी",
"shared": "साझा"
}
},
"updatedToast": "सदस्यता अपडेट की गई।"
},
"memberPhoneLabel": "फ़ोन नंबर (वैकल्पिक)",
"memberEmailLabel": "ईमेल (वैकल्पिक)",
@@ -897,4 +898,4 @@
"emptyHint": {
"recipes": "रेसिपी बनाएं और उन्हें अपने भोजन योजनाकार से जोड़ें।"
}
}
}
+3 -2
View File
@@ -732,7 +732,8 @@
"badges": {
"private": "Privato",
"shared": "Condiviso"
}
},
"updatedToast": "Abbonamento aggiornato."
},
"memberPhoneLabel": "Numero di telefono (opzionale)",
"memberEmailLabel": "E-mail (opzionale)",
@@ -897,4 +898,4 @@
"emptyHint": {
"recipes": "Crea ricette e collegale al tuo piano pasti."
}
}
}
+3 -2
View File
@@ -732,7 +732,8 @@
"badges": {
"private": "プライベート",
"shared": "共有"
}
},
"updatedToast": "サブスクリプションが更新されました。"
},
"memberPhoneLabel": "電話番号(任意)",
"memberEmailLabel": "メールアドレス(任意)",
@@ -897,4 +898,4 @@
"emptyHint": {
"recipes": "レシピを作成して、食事プランに関連付けましょう。"
}
}
}
+3 -2
View File
@@ -735,7 +735,8 @@
"badges": {
"private": "Privado",
"shared": "Partilhado"
}
},
"updatedToast": "Subscrição atualizada."
},
"memberPhoneLabel": "Telefone (opcional)",
"memberEmailLabel": "E-mail (opcional)",
@@ -901,4 +902,4 @@
"emptyHint": {
"recipes": "Crie receitas e vincule-as ao seu planejador de refeições."
}
}
}
+3 -2
View File
@@ -732,7 +732,8 @@
"badges": {
"private": "Личное",
"shared": "Общее"
}
},
"updatedToast": "Подписка обновлена."
},
"memberPhoneLabel": "Номер телефона (необязательно)",
"memberEmailLabel": "Электронная почта (необязательно)",
@@ -897,4 +898,4 @@
"emptyHint": {
"recipes": "Создавайте рецепты и связывайте их с вашим планом питания."
}
}
}
+3 -2
View File
@@ -732,7 +732,8 @@
"badges": {
"private": "Privat",
"shared": "Delad"
}
},
"updatedToast": "Prenumeration uppdaterad."
},
"memberPhoneLabel": "Telefonnummer (valfritt)",
"memberEmailLabel": "E-post (valfritt)",
@@ -897,4 +898,4 @@
"emptyHint": {
"recipes": "Skapa recept och koppla dem till din måltidsplanering."
}
}
}
+3 -2
View File
@@ -732,7 +732,8 @@
"badges": {
"private": "Özel",
"shared": "Paylaşımlı"
}
},
"updatedToast": "Abonelik güncellendi."
},
"memberPhoneLabel": "Telefon numarası (isteğe bağlı)",
"memberEmailLabel": "E-posta (isteğe bağlı)",
@@ -897,4 +898,4 @@
"emptyHint": {
"recipes": "Tarifler oluşturun ve yemek planlayıcınıza bağlayın."
}
}
}
+3 -2
View File
@@ -732,7 +732,8 @@
"badges": {
"private": "Приватне",
"shared": "Спільне"
}
},
"updatedToast": "Підписку оновлено."
},
"memberPhoneLabel": "Номер телефону (необов'язково)",
"memberEmailLabel": "Електронна пошта (необов'язково)",
@@ -905,4 +906,4 @@
"birthdays": "Додайте дні народження — ви отримаєте нагадування завчасно.",
"recipes": "Створюйте рецепти та пов'язуйте їх із планувальником харчування."
}
}
}
+3 -2
View File
@@ -732,7 +732,8 @@
"badges": {
"private": "私人",
"shared": "共享"
}
},
"updatedToast": "订阅已更新。"
},
"memberPhoneLabel": "电话号码(可选)",
"memberEmailLabel": "电子邮件(可选)",
@@ -897,4 +898,4 @@
"emptyHint": {
"recipes": "创建食谱并将其关联到你的膳食计划。"
}
}
}
+70
View File
@@ -1644,6 +1644,19 @@ function renderIcsList(container, subs, user) {
syncBtn.appendChild(syncIcon);
actions.appendChild(syncBtn);
const editBtn = document.createElement('button');
editBtn.className = 'btn btn--icon btn--ghost';
editBtn.title = t('settings.ics.actions.edit');
editBtn.setAttribute('aria-label', t('settings.ics.actions.edit'));
editBtn.dataset.action = 'ics-edit';
editBtn.dataset.id = sub.id;
const editIcon = document.createElement('i');
editIcon.setAttribute('data-lucide', 'pencil');
editIcon.style.cssText = 'width:14px;height:14px';
editIcon.setAttribute('aria-hidden', 'true');
editBtn.appendChild(editIcon);
actions.appendChild(editBtn);
const delBtn = document.createElement('button');
delBtn.className = 'btn btn--icon btn--danger-outline';
delBtn.title = t('settings.ics.actions.delete');
@@ -1756,6 +1769,63 @@ function bindIcsEvents(container, user, initialSubs) {
}
}
if (action === 'ics-edit') {
const sub = subs.find((s) => s.id === id);
if (!sub) return;
openModal({
title: t('settings.ics.actions.edit'),
size: 'sm',
content: `
<form id="ics-edit-form" class="settings-form">
<div class="form-group">
<label class="form-label" for="ics-edit-name">${t('settings.ics.form.name')}</label>
<input class="form-input" type="text" id="ics-edit-name" value="${esc(sub.name)}" required maxlength="100" />
</div>
<div class="settings-name-color-row">
<div class="form-group settings-color-field">
<label class="form-label" for="ics-edit-color">${t('settings.ics.form.color')}</label>
<input class="settings-color-button" type="color" id="ics-edit-color" value="${esc(sub.color || '#3b82f6')}" />
</div>
<div class="form-group" style="display:flex;align-items:center;gap:var(--space-2);padding-top:var(--space-5)">
<input type="checkbox" id="ics-edit-shared" ${sub.shared ? 'checked' : ''} />
<label class="form-label" for="ics-edit-shared" style="margin:0">${t('settings.ics.form.shared')}</label>
</div>
</div>
<div id="ics-edit-error" class="form-error" hidden></div>
<div class="settings-form-actions">
<button type="button" class="btn btn--secondary" id="ics-edit-cancel">${t('common.cancel')}</button>
<button type="submit" class="btn btn--primary">${t('settings.ics.actions.save')}</button>
</div>
</form>
`,
onSave(panel) {
panel.querySelector('#ics-edit-cancel')?.addEventListener('click', () => closeModal());
panel.querySelector('#ics-edit-form')?.addEventListener('submit', async (e) => {
e.preventDefault();
const submitBtn = panel.querySelector('[type=submit]');
const errEl = panel.querySelector('#ics-edit-error');
const name = panel.querySelector('#ics-edit-name').value.trim();
const color = panel.querySelector('#ics-edit-color').value;
const shared = panel.querySelector('#ics-edit-shared').checked ? 1 : 0;
errEl.hidden = true;
submitBtn.disabled = true;
try {
const res = await api.patch(`/calendar/subscriptions/${id}`, { name, color, shared });
const idx = subs.findIndex((s) => s.id === id);
if (idx >= 0) subs[idx] = res.data;
renderIcsList(container, subs, user);
window.oikos?.showToast(t('settings.ics.updatedToast'), 'success');
closeModal({ force: true });
} catch (err) {
errEl.textContent = err.message ?? t('common.errorGeneric');
errEl.hidden = false;
submitBtn.disabled = false;
}
});
},
});
}
if (action === 'ics-delete') {
const name = target.dataset.name;
if (!await confirmModal(t('settings.ics.confirm_delete'), { danger: true, confirmLabel: t('common.delete') })) return;