aboutsummaryrefslogtreecommitdiffstats
path: root/renderer/src/styles
diff options
context:
space:
mode:
authorbndw <ben@bdw.to>2026-02-28 21:08:40 -0800
committerbndw <ben@bdw.to>2026-02-28 21:08:40 -0800
commit04c63d4ef601876186e5d7fab980d76575c494ec (patch)
tree2620784e148957ae2ee3af0327c2b128983577e7 /renderer/src/styles
parent0da42e4fa414ab3268d4f71896455097239f8590 (diff)
feat: **1. `src/main/db/schema.ts`** — add `settings` table … (+10 more)
- ✅ **1. `src/main/db/schema.ts`** — add `settings` table to `initSchema` - ✅ **2. `src/main/db/settings.ts`** — create file with `getSetting`, `getSettings`, `setSetting`, `deleteSetting` - ✅ **3. `src/main/claude/phases.ts`** — add `customSystemPrompt?` param to `getPhaseConfig`; add `getDefaultSystemPromptTemplate` export - ✅ **4. `src/main/claude/index.ts`** — import `getSetting`; load custom prompt in `sendMessage`; pass to `getPhaseConfig` - ✅ **5. `src/main/ipc/handlers.ts`** — import `settingsDb` + `getDefaultSystemPromptTemplate`; register `settings:get`, `settings:set`, `settings:delete`, `settings:getDefaultPrompts` - ✅ **6. `src/main/preload.ts`** — add `getSettings`, `setSetting`, `deleteSetting`, `getDefaultSystemPrompts` to interface + api object - ✅ **7. `renderer/src/styles/globals.css`** — append all new CSS rules - ✅ **8. `renderer/src/components/settings/SystemPromptsSettings.tsx`** — create file (new directory) - ✅ **9. `renderer/src/components/SettingsPage.tsx`** — create file - ✅ **10. `renderer/src/components/Header.tsx`** — add `onOpenSettings` prop + ⚙ button - ✅ **11. `renderer/src/App.tsx`** — add `showSettings` state; import + render `<SettingsPage>`; pass `onOpenSettings` to Header
Diffstat (limited to 'renderer/src/styles')
-rw-r--r--renderer/src/styles/globals.css213
1 files changed, 213 insertions, 0 deletions
diff --git a/renderer/src/styles/globals.css b/renderer/src/styles/globals.css
index ef0275e..61a37c0 100644
--- a/renderer/src/styles/globals.css
+++ b/renderer/src/styles/globals.css
@@ -692,3 +692,216 @@ html[data-theme="light"] .chat-input input:focus {
692 border-left: 3px solid var(--accent); 692 border-left: 3px solid var(--accent);
693 border-radius: 0 2px 2px 0; 693 border-radius: 0 2px 2px 0;
694} 694}
695
696/* ── Settings Overlay ────────────────────────────────────────── */
697.settings-overlay {
698 position: fixed;
699 inset: 0;
700 background: var(--bg-primary);
701 z-index: 100;
702 display: flex;
703 flex-direction: column;
704}
705
706.settings-header {
707 display: flex;
708 justify-content: space-between;
709 align-items: center;
710 padding: 10px 16px;
711 background: var(--bg-secondary);
712 border-bottom: 1px solid var(--border);
713 -webkit-app-region: drag;
714}
715
716.settings-header-left {
717 display: flex;
718 align-items: center;
719 gap: 10px;
720 -webkit-app-region: no-drag;
721}
722
723.settings-title {
724 font-size: 12px;
725 font-weight: 700;
726 letter-spacing: 0.15em;
727 text-transform: uppercase;
728 color: var(--text-primary);
729}
730
731.settings-close {
732 background: transparent;
733 border: 1px solid var(--border);
734 border-radius: 2px;
735 color: var(--text-primary);
736 cursor: pointer;
737 font-size: 14px;
738 padding: 4px 9px;
739 font-family: inherit;
740 -webkit-app-region: no-drag;
741 transition: background 0.15s;
742}
743
744.settings-close:hover {
745 background: var(--bg-tertiary);
746}
747
748.settings-body {
749 flex: 1;
750 display: flex;
751 overflow: hidden;
752}
753
754/* ── Settings Side Nav ───────────────────────────────────────── */
755.settings-nav {
756 width: 180px;
757 background: var(--bg-secondary);
758 border-right: 1px solid var(--border);
759 padding: 16px 0;
760 flex-shrink: 0;
761}
762
763.settings-nav-item {
764 display: block;
765 width: 100%;
766 text-align: left;
767 padding: 8px 16px;
768 background: none;
769 border: none;
770 border-left: 2px solid transparent;
771 cursor: pointer;
772 font-family: inherit;
773 font-size: 12px;
774 letter-spacing: 0.05em;
775 color: var(--text-secondary);
776 transition: background 0.1s, color 0.1s;
777}
778
779.settings-nav-item:hover {
780 background: var(--bg-tertiary);
781 color: var(--text-primary);
782}
783
784.settings-nav-item.active {
785 color: var(--text-primary);
786 border-left-color: var(--accent);
787 background: var(--bg-tertiary);
788}
789
790/* ── Settings Content Area ───────────────────────────────────── */
791.settings-content {
792 flex: 1;
793 overflow-y: auto;
794 padding: 32px 40px;
795 max-width: 860px;
796}
797
798.settings-section-title {
799 font-size: 13px;
800 font-weight: 700;
801 letter-spacing: 0.1em;
802 text-transform: uppercase;
803 color: var(--text-primary);
804 margin-bottom: 6px;
805}
806
807.settings-section-desc {
808 font-size: 12px;
809 color: var(--text-secondary);
810 line-height: 1.6;
811 margin-bottom: 24px;
812}
813
814/* ── Phase Tab Strip ─────────────────────────────────────────── */
815.settings-tabs {
816 display: flex;
817 border-bottom: 1px solid var(--border);
818 margin-bottom: 16px;
819}
820
821.settings-tab {
822 padding: 6px 16px;
823 background: none;
824 border: none;
825 border-bottom: 2px solid transparent;
826 margin-bottom: -1px;
827 cursor: pointer;
828 font-family: inherit;
829 font-size: 11px;
830 letter-spacing: 0.07em;
831 text-transform: uppercase;
832 color: var(--text-secondary);
833 transition: color 0.1s;
834}
835
836.settings-tab:hover {
837 color: var(--text-primary);
838}
839
840.settings-tab.active {
841 color: var(--accent);
842 border-bottom-color: var(--accent);
843}
844
845/* ── Prompt Textarea ─────────────────────────────────────────── */
846.settings-textarea {
847 width: 100%;
848 min-height: 420px;
849 padding: 14px;
850 background: var(--bg-secondary);
851 border: 1px solid var(--border);
852 border-radius: 2px;
853 color: var(--text-primary);
854 font-family: inherit;
855 font-size: 12px;
856 line-height: 1.7;
857 resize: vertical;
858 transition: border-color 0.15s, box-shadow 0.15s;
859}
860
861.settings-textarea:focus {
862 outline: none;
863 border-color: var(--accent);
864 box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.15);
865}
866
867html[data-theme="light"] .settings-textarea:focus {
868 box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
869}
870
871.settings-textarea.is-custom {
872 border-color: var(--warning);
873}
874
875/* ── Settings Actions Row ────────────────────────────────────── */
876.settings-actions {
877 display: flex;
878 align-items: center;
879 gap: 10px;
880 margin-top: 12px;
881}
882
883.settings-custom-badge {
884 margin-left: auto;
885 font-size: 10px;
886 letter-spacing: 0.08em;
887 text-transform: uppercase;
888 color: var(--warning);
889}
890
891/* ── Header Settings Button ──────────────────────────────────── */
892.settings-btn {
893 padding: 5px 8px;
894 background: transparent;
895 border: 1px solid var(--border);
896 border-radius: 2px;
897 color: var(--text-secondary);
898 cursor: pointer;
899 font-size: 14px;
900 font-family: inherit;
901 transition: background 0.15s, color 0.15s;
902}
903
904.settings-btn:hover {
905 background: var(--bg-tertiary);
906 color: var(--text-primary);
907}