Compare commits
1239 Commits
5b180b3b95
...
a539bedbbd
| Author | SHA1 | Date | |
|---|---|---|---|
| a539bedbbd | |||
| 26a6463c25 | |||
| 6a360256f3 | |||
| 24a2d51868 | |||
| b4d902a1db | |||
| 42b847cc11 | |||
| dd22549b8a | |||
| 41507997fd | |||
| 58b5d9680d | |||
| 9a528e671c | |||
| f211556f20 | |||
| b7eed581cb | |||
| 3e259ce7de | |||
| a4fe460719 | |||
| 0e5b175202 | |||
| 1196038b08 | |||
| 8424543569 | |||
| 9d081114b4 | |||
| 8b15b09246 | |||
| 6a83d22888 | |||
| 05b81dfff7 | |||
| 1bb3e06989 | |||
| b21163455b | |||
| ac76f3dcd3 | |||
| 2e1c1a580c | |||
| 5278c5cd7d | |||
| 7c0bf17101 | |||
| 656a850baa | |||
| 9a50124b10 | |||
| dab6c42e6d | |||
| 12cd409616 | |||
| 37b86a740c | |||
| 73237093d9 | |||
| 9d57c5f2ac | |||
| b7d1b96598 | |||
| ff9ec031bf | |||
| 1a6ce43e47 | |||
| d0ecf32e81 | |||
| 8e420cc40b | |||
| 59ceaa13ae | |||
| b45223799f | |||
| d640044dc3 | |||
| b6ff68e0cd | |||
| f21a16d0ba | |||
| 03778c3e40 | |||
| deb3109f91 | |||
| 1f8fee03fd | |||
| fe0d2a9526 | |||
| 1c30ab5c8d | |||
| 091f21453d | |||
| e94ba62da0 | |||
| f020e295cf | |||
| 5d95db0632 | |||
| eb3328d98e | |||
| 7c880f203e | |||
| 86728afa15 | |||
| e9b63d35bd | |||
| aabc8ecee5 | |||
| 21f770bff8 | |||
| 9e329ffd64 | |||
| 14ef364d5a | |||
| 56c111956c | |||
| f468b734e3 | |||
| 2aef31a423 | |||
| 29a34e5a92 | |||
| a1e6d5d009 | |||
| d119dd2086 | |||
| 66ca26639d | |||
| e8e41fba22 | |||
| e4cf924cd6 | |||
| 0a177f1cae | |||
| 7bdd7344fb | |||
| 9e509fae9e | |||
| cb1f7aa8fd | |||
| 85d4f2afb5 | |||
| 7421fed020 | |||
| cc6869c3d0 | |||
| 42e823b59f | |||
| 4571fb003d | |||
| 386edf80d4 | |||
| 90a7998596 | |||
| ed2da5ba5b | |||
| a9870e7198 | |||
| c27f3b8bf0 | |||
| 101694e4c6 | |||
| 7202f24e42 | |||
| 734139c810 | |||
| 459ceb89ad | |||
| 3b5d584ed8 | |||
| 21aced34a1 | |||
| f8c68a034b | |||
| 7173cc4504 | |||
| 30b67da24d | |||
| 8daf1f0fc6 | |||
| 832a32a490 | |||
| 6848ec97be | |||
| ec2512421f | |||
| 4d73330e2f | |||
| 8d5c57dcd0 | |||
| fefd2f4393 | |||
| b837c6664f | |||
| cbd48f6710 | |||
| 8d8cf0ff11 | |||
| 8459d0d689 | |||
| 5445aab3a8 | |||
| 35c270490f | |||
| 90bb154620 | |||
| 357861d3b6 | |||
| c8f1e53a7a | |||
| 228d85738c | |||
| 178dd49f48 | |||
| a1b8881ff6 | |||
| 3d1f0af17d | |||
| 8cb03fcecf | |||
| 6f098b7906 | |||
| 449df51642 | |||
| 86704d72fe | |||
| 18a243b44a | |||
| 52180fad62 | |||
| 0d9f97f7f2 | |||
| 101796d944 | |||
| 288a5eab06 | |||
| 875328f16c | |||
| cc419fd8d8 | |||
| df0342c3c3 | |||
| fff9c19736 | |||
| 6c456e2da2 | |||
| 9afbe177d7 | |||
| 4f6c072dd6 | |||
| cbb8df4376 | |||
| 616d67d607 | |||
| b01a9106d6 | |||
| 1772e9d53b | |||
| 8530100019 | |||
| 3c1123da19 | |||
| 49a12ee763 | |||
| 824d8edde3 | |||
| d6b8629fe2 | |||
| c78708c4c2 | |||
| 6608a055a4 | |||
| 12ae6dab42 | |||
| 26575e0616 | |||
| afdfd71648 | |||
| d59ea7ac3f | |||
| 460c5d1e79 | |||
| 9c309b8f18 | |||
| a4956b3488 | |||
| 7f50bb9b23 | |||
| 0e3888686c | |||
| 628e4efa9f | |||
| 47653d989e | |||
| 52cd13a50f | |||
| a1280f10b8 | |||
| c47888c96e | |||
| 6b3d03b593 | |||
| 81ce25268b | |||
| 36cd56404b | |||
| a3b1df65db | |||
| 45a9e28e37 | |||
| 65b7d86595 | |||
| 344210ee3c | |||
| 9facff792d | |||
| e36e7ee661 | |||
| 541a3ab4bc | |||
| 5001f7a098 | |||
| 07d7ac0cbd | |||
| 536c817ec5 | |||
| dad4eb36b0 | |||
| 40e55c1446 | |||
| ed1a8f6209 | |||
| 1a125dc530 | |||
| a69a632dfe | |||
| 724d1d0494 | |||
| d40973def8 | |||
| 9e57545ac7 | |||
| d53771e89d | |||
| 1275fc73bc | |||
| 6e09f25dd6 | |||
| f69977de11 | |||
| 34527fc8db | |||
| 0187affedd | |||
| e922eeb9da | |||
| 9ecaa8943f | |||
| 447d157ed6 | |||
| cec9b33cd1 | |||
| 1af71dfb95 | |||
| c639d61eac | |||
| de4bfe2f99 | |||
| a72bc99b36 | |||
| 42205c9bc2 | |||
| aed313eab8 | |||
| 3fae08bc32 | |||
| 8191b0b533 | |||
| 4f707e9db1 | |||
| 51050d8b9c | |||
| a79a6aa154 | |||
| ed55b42586 | |||
| 397170381a | |||
| e12115f68e | |||
| 5b49fdea1e | |||
| 8b9afeed80 | |||
| 90a426aede | |||
| e674eb5e97 | |||
| 325445f6b0 | |||
| 58e8a1839a | |||
| 14e7e051a1 | |||
| 4ea44240bc | |||
| f0ce11cef6 | |||
| 4b2989a3ae | |||
| d1df6d2bae | |||
| e6c24feea9 | |||
| af2c8f160c | |||
| 4dc2409438 | |||
| 76c9999cee | |||
| 1118af8111 | |||
| e0343bdb54 | |||
| 3e8d1ef293 | |||
| 7f3be380d0 | |||
| a856b99a74 | |||
| b662ba971e | |||
| 3b5d009207 | |||
| b7e808adec | |||
| 985954e474 | |||
| d81cd8cd50 | |||
| 5a84b5db02 | |||
| e7a8d95ff9 | |||
| 0d6d663883 | |||
| 58b9632fb1 | |||
| 2060f4a7c4 | |||
| 258ae92be0 | |||
| 67b9850ee7 | |||
| 7bebfafa5a | |||
| ce33c3d8f1 | |||
| 3464119588 | |||
| 90d10fa4cb | |||
| 523ce91120 | |||
| 41b73d9372 | |||
| e5fce2e7d5 | |||
| 144b2e89eb | |||
| 42595ad74b | |||
| 5e318a1c51 | |||
| 779729d8f9 | |||
| f48757b510 | |||
| 73c407669b | |||
| 68014938a7 | |||
| 8a079d8e1e | |||
| aa189e0956 | |||
| beb5488310 | |||
| 8b74c6a575 | |||
| e776dce19a | |||
| ec5dc20fdf | |||
| cac328a39c | |||
| 93d280af5e | |||
| a245ef756b | |||
| 5d4474153c | |||
| 59acfb3966 | |||
| 2b60896072 | |||
| 78f20efe2f | |||
| d96c9339d2 | |||
| c26db47a7f | |||
| c9fd27f883 | |||
| f6ebab9209 | |||
| ac7556dcad | |||
| 455ca46c90 | |||
| 99a274a0b1 | |||
| 382e7e3965 | |||
| bacc3bafa3 | |||
| e0e267b616 | |||
| 8d9fbdb0ec | |||
| b3cde48c5c | |||
| 9dd07a32a7 | |||
| 01f3089c8d | |||
| 8b97b9c2b4 | |||
| 20cf3ca46c | |||
| f1e6288121 | |||
| dbc36a6475 | |||
| 9df94340ce | |||
| 59403c2952 | |||
| ba357fba7b | |||
| 4ce89cbf5a | |||
| 713856eac1 | |||
| 624baf0cc9 | |||
| e5e5acc012 | |||
| f685a45996 | |||
| 66256e7834 | |||
| 821db5c68c | |||
| 98fd0c66da | |||
| 6b6c12e297 | |||
| 9c20c1688f | |||
| 486240f516 | |||
| fb75cd58f0 | |||
| c5ec3bae23 | |||
| a576c7199e | |||
| e5f1a39dbc | |||
| a3cd970e9c | |||
| 1e8344416e | |||
| 610b59a070 | |||
| aaf85e9fd6 | |||
| e6ded61bb0 | |||
| 32d1500dd4 | |||
| d05aa5674d | |||
| 28fa20bffc | |||
| 1b6cb7bd9b | |||
| 125f07e012 | |||
| 349b79fe56 | |||
| 8cb8debca6 | |||
| 5d29272b23 | |||
| 45858d36d3 | |||
| a880a743c5 | |||
| bea6d82298 | |||
| 71dd20e829 | |||
| f8685b4225 | |||
| b0ac09cff2 | |||
| 8c217991bf | |||
| af42da48ee | |||
| 18ab465a40 | |||
| a3ff91df78 | |||
| fb6001548a | |||
| c7bff0d357 | |||
| ba7b437ac4 | |||
| 9d81ab51b3 | |||
| ae4f6bb2f3 | |||
| 5080f9fd73 | |||
| d1d1ec0a86 | |||
| e7ab250e99 | |||
| 9930aae614 | |||
| 013f2dfbf2 | |||
| d3bd8e5cb8 | |||
| 42aa123870 | |||
| 28215ada8b | |||
| c319a68c4c | |||
| 260f46ba10 | |||
| 3e327cc345 | |||
| da5ed7f89f | |||
| 107a67ad2e | |||
| de161e14a6 | |||
| 8261d55a21 | |||
| ed844383c3 | |||
| 14698a1f99 | |||
| eb1b384dd5 | |||
| 3d57dfae5a | |||
| 9e6ebce2da | |||
| 9a601a0ba2 | |||
| 36d6945a02 | |||
| ef6cb89b40 | |||
| f129454b5b | |||
| cd67941391 | |||
| c3db42c8f0 | |||
| d236b9e60c | |||
| bf756f4221 | |||
| 7ee40e3698 | |||
| 109b5b4c39 | |||
| b4b3fe7fee | |||
| 80f15645b1 | |||
| 96809826f8 | |||
| e323dec3c1 | |||
| f0b4d463fd | |||
| 42d0308d1d | |||
| 78618f78f0 | |||
| 344cae7bb3 | |||
| 797698ae3f | |||
| 0058795fb8 | |||
| b90f968aae | |||
| a55d4621f6 | |||
| 1daa4f48c6 | |||
| a535232e3e | |||
| 6667e2ac59 | |||
| 16b7b72987 | |||
| 6df2639c97 | |||
| 97b435005f | |||
| c7e3405e63 | |||
| 7345c784a9 | |||
| 737dde1cb7 | |||
| ccd34fabad | |||
| 3e673de031 | |||
| da5ab820b9 | |||
| f9e937ce42 | |||
| 193d10123b | |||
| 50a36e9c9c | |||
| e8237e7692 | |||
| deca0adb10 | |||
| c1a059e59e | |||
| 730e7fea42 | |||
| 9c8d686600 | |||
| 2e1b8f15e9 | |||
| 1434ce1337 | |||
| 8beb47235a | |||
| 535d23a5d6 | |||
| 78ede2c419 | |||
| 5e21fc8cf9 | |||
| 597e43b008 | |||
| e13763b8ba | |||
| 204589038b | |||
| 60445daef6 | |||
| 87bb4a436f | |||
| 913a890c4d | |||
| 553241432b | |||
| 878e34d67b | |||
| 73beb97d83 | |||
| 76173b54ab | |||
| 74db19885b | |||
| d25cb0ef9e | |||
| 5164485b5f | |||
| edb33c9fd9 | |||
| ea97ffca6e | |||
| fd7bf1cc1a | |||
| e9bcdae593 | |||
| 096b64ce18 | |||
| 031199816d | |||
| 4e177c15fd | |||
| 0b06a3acac | |||
| 0d16827e11 | |||
| 36e7ad53a3 | |||
| f5ef546e2d | |||
| 994ea02dbe | |||
| 2eb9609519 | |||
| b0bfcfc856 | |||
| f8259a1913 | |||
| d98bf4d13a | |||
| 0ca02f01b8 | |||
| 98da6160ad | |||
| 4972194552 | |||
| 3d71cf9504 | |||
| e42d08658e | |||
| 5ded847ea1 | |||
| c01ec22252 | |||
| 594c97e228 | |||
| ab18908bff | |||
| c52561376e | |||
| 0478094a08 | |||
| f1360dc517 | |||
| 6d15ada797 | |||
| 30818725aa | |||
| 017fd1ff38 | |||
| 57c780359c | |||
| cdedd3de1e | |||
| c28bab2726 | |||
| 026b24c225 | |||
| d9de4fdcf9 | |||
| 5fca786254 | |||
| 9dfc651c01 | |||
| 02fdb7ba2f | |||
| 2b23e8e9f9 | |||
| a474719ea6 | |||
| 06b3704c86 | |||
| 13bd5ab566 | |||
| 292641011e | |||
| 6ffe1e8ad1 | |||
| 9e1a32d12b | |||
| e3dbbfd0de | |||
| f1c20a97a3 | |||
| 6cc3bf7a93 | |||
| a2033caf02 | |||
| b4a4ddc66d | |||
| 600b6c3bd1 | |||
| 1c295cae81 | |||
| 1e358d7230 | |||
| e5334996e5 | |||
| d66c385805 | |||
| c1127f4d73 | |||
| 0e3624fbac | |||
| 09821217a2 | |||
| 35ef5dfebd | |||
| 055121edec | |||
| d890b0b254 | |||
| 35e695c983 | |||
| 2cf57ddbe1 | |||
| 3d44f9b4db | |||
| e3fda7adba | |||
| aeb5165b2c | |||
| 84a0c0b2c3 | |||
| db5d91825e | |||
| 065f7a5250 | |||
| 34c6789c76 | |||
| 91c6410a51 | |||
| e249b734cc | |||
| be6f7a6f6c | |||
| 2f7c22148b | |||
| b15f32ad01 | |||
| 1c74e1f284 | |||
| 985c3aff8e | |||
| 0d3b5ec57a | |||
| 23e6ed0c5a | |||
| 6bb3e3f8b0 | |||
| 52c0c00d31 | |||
| 1ffb6ec748 | |||
| 80cdf0384b | |||
| a5df82d213 | |||
| d84667f507 | |||
| 6bd8abb163 | |||
| 06d371316d | |||
| 8d3a71b2d3 | |||
| 1e1be847c0 | |||
| 6e277f0396 | |||
| c8e50e6402 | |||
| 2fba3a40f0 | |||
| d00690d7de | |||
| 791dfa8585 | |||
| 206330d9bf | |||
| cafab04d2d | |||
| ab5ac8a060 | |||
| 342f261cca | |||
| 538d88de46 | |||
| d6885f15c3 | |||
| 755dce2788 | |||
| 814cc7818d | |||
| 29b76be6f0 | |||
| 0a2dd0d5ac | |||
| d3c946dd27 | |||
| cf28705544 | |||
| d7c1ec0782 | |||
| 151e40139d | |||
| d08c0321d2 | |||
| d7900cefe7 | |||
| e54738c538 | |||
| b3cce5f043 | |||
| 7dd99e504a | |||
| c255c29b5f | |||
| c483daecf0 | |||
| aa5c66225f | |||
| cec3323814 | |||
| a63ee23dbb | |||
| 2d91ba6f82 | |||
| 2aa71895b0 | |||
| 201c2eee02 | |||
| 3ab48eb3e2 | |||
| 316aefcfc9 | |||
| 748d69d26c | |||
| c52e360046 | |||
| b656dfb3f2 | |||
| 1a601a4391 | |||
| 2ccfd9fc0f | |||
| 71fd1f54af | |||
| ad9c4db36a | |||
| 9a6107f988 | |||
| c18c2b258a | |||
| c001770ef1 | |||
| e3571fd420 | |||
| a48589bcf9 | |||
| 1a9f413360 | |||
| 042fb516c9 | |||
| 816a14b174 | |||
| c7d82d48f4 | |||
| 7d5280ff2f | |||
| 7839891c31 | |||
| 092e8df0b0 | |||
| ff6f50de08 | |||
| 881f6ad03c | |||
| 5eb1870dcd | |||
| f1c27e0364 | |||
| bb1c61b010 | |||
| bfa54a2d9e | |||
| d4c5069e40 | |||
| 8f6def90b1 | |||
| 237d08eaf8 | |||
| fc94b6fdb1 | |||
| 5efcf5053d | |||
| 4705e7d073 | |||
| 1a244cda2f | |||
| 403d751db4 | |||
| 828fdd18a9 | |||
| ca5cb02868 | |||
| 4941f61962 | |||
| 01a17f3178 | |||
| d9026e7261 | |||
| 3379fd8103 | |||
| e905a5f2ae | |||
| 1b86bee126 | |||
| ac4dfebc4e | |||
| c72987b1c8 | |||
| 3999a2ad9b | |||
| 3404c95320 | |||
| 68b5f0caa3 | |||
| 98ed479930 | |||
| a2fcba4707 | |||
| f0507f5a6b | |||
| ca00196cfe | |||
| 330f3f1898 | |||
| d57b9b84b4 | |||
| 5f441be8a5 | |||
| c38bf23a3b | |||
| 1bce199da5 | |||
| 97d1d9871c | |||
| 94568a11e1 | |||
| 13696f1f82 | |||
| 86e655e94e | |||
| 87829a9467 | |||
| 2855656030 | |||
| a424189a83 | |||
| eff8eaf8a3 | |||
| 2e261ff1aa | |||
| 8e89dcf0b9 | |||
| 00d33e2068 | |||
| c701e04383 | |||
| abeaaa6e87 | |||
| c1bb05e62a | |||
| afc1a3372e | |||
| edbb0ed3a7 | |||
| 5e21efdd6e | |||
| 4fcf05844b | |||
| 0de4e4dd70 | |||
| 3906c15cb2 | |||
| 8c5bca27fb | |||
| 583ce878df | |||
| 75c8c4d9b7 | |||
| ecb5ddfa09 | |||
| 1c6ce0eec7 | |||
| 0d0824111f | |||
| f4e4f4e5dc | |||
| 352a09dd97 | |||
| a098c28efd | |||
| bf113ed28a | |||
| 46f1e821b0 | |||
| 59a130d1ad | |||
| 4c4bc41e78 | |||
| 41d4a3be4e | |||
| c77a1d6fb3 | |||
| c313b1e848 | |||
| b83a71dfa6 | |||
| 0cd906665d | |||
| fb1eeb5e44 | |||
| f501ae7077 | |||
| 6797891cf8 | |||
| 26ac46a380 | |||
| 4eb8557d2c | |||
| c2122bf6c1 | |||
| 02860b72c7 | |||
| 67f56d8520 | |||
| 8d9f9edda7 | |||
| 6b62ab62a4 | |||
| d69e9f6e91 | |||
| 2ba245a20a | |||
| 280154c537 | |||
| 3aebed1a5f | |||
| 781c992de9 | |||
| ec72da29f6 | |||
| 1d963c2fab | |||
| a7379e1a0d | |||
| e382b63e40 | |||
| ee56965ab6 | |||
| 95c9df6261 | |||
| 2cf7ac9359 | |||
| 524eaaff4d | |||
| 14a3c3c278 | |||
| 80778df9ed | |||
| 810e206e83 | |||
| 525f2021e2 | |||
| c0d4ac4b44 | |||
| d5f193d33c | |||
| e2ccddf974 | |||
| 8d25cb3a89 | |||
| c46b5c211c | |||
| 6a4622b368 | |||
| cc2dd069ba | |||
| 14bd7ccf9c | |||
| 40655e4b1c | |||
| d0a802798a | |||
| abaa0ed838 | |||
| 06dca69910 | |||
| 9c26193fa1 | |||
| 361dab832e | |||
| 0f511bf881 | |||
| 54961e19a4 | |||
| 179b4ff166 | |||
| 23a7ead867 | |||
| d0a9cbca64 | |||
| 2bc2654908 | |||
| cc3be616a9 | |||
| 6bb9d50608 | |||
| eb7272ab9a | |||
| f11b739e0a | |||
| ab3152a6eb | |||
| adc86f4970 | |||
| 9fefac7f24 | |||
| aaec14a76c | |||
| a0dfce9b03 | |||
| 9b056c6eea | |||
| 6dbb037474 | |||
| 4878cb18ef | |||
| 79ffeedbfa | |||
| a2fe374b32 | |||
| 48ca4c6e90 | |||
| cf2c2fc7a3 | |||
| b9eb74b47b | |||
| f259bad82a | |||
| f05a76aba5 | |||
| 43e7a22d4c | |||
| 1d65e6d712 | |||
| a82eb42189 | |||
| 773e9947a8 | |||
| df139c6db4 | |||
| c8986317e8 | |||
| eaa319e535 | |||
| 32bf0fb1a8 | |||
| 797f10cc2e | |||
| 1fcad45b97 | |||
| 36ed02cc9a | |||
| d31cbf339c | |||
| 7f8749a4af | |||
| e53d8ccf0b | |||
| 5a49754626 | |||
| 9fd99edc12 | |||
| 5ef4d0e03a | |||
| 71f41a9cc7 | |||
| 9f67d4f95b | |||
| 4205493ace | |||
| 445814aa73 | |||
| d289554c3a | |||
| 01d211317a | |||
| 6157c544e7 | |||
| 26b5cb2856 | |||
| 49bfe0c04f | |||
| 991306365a | |||
| 91ebae3664 | |||
| ceffa9ba0a | |||
| 6647486046 | |||
| 578fdfca1a | |||
| dde9a4d630 | |||
| 2e4f5e95b1 | |||
| 194dbf336f | |||
| cf5cae5dde | |||
| f28e128e14 | |||
| cb2cfcbf77 | |||
| a30b217d1b | |||
| 0a3cbc49d2 | |||
| b30b4a4909 | |||
| cc12b83b46 | |||
| 52a449a782 | |||
| 5396c98f84 | |||
| f31215540e | |||
| ec06e63b21 | |||
| 5e303bc1f8 | |||
| 5bebf61330 | |||
| 38ca777ee4 | |||
| c739c86eb9 | |||
| cb02a19d1d | |||
| 99df9c4570 | |||
| 3eeedc3e3b | |||
| 2a1d3d0224 | |||
| 00f68d8074 | |||
| 4226d81476 | |||
| 95b5672a5e | |||
| a41f76d2fb | |||
| 91b3b0e658 | |||
| 67fea4b6f9 | |||
| 26613a8560 | |||
| 193243605c | |||
| ef7b26dfba | |||
| ea4c977fa9 | |||
| 57ccf25f95 | |||
| dbf638f0af | |||
| 5cc5548765 | |||
| 6855a72c81 | |||
| f8deb4d83b | |||
| a576aadbc2 | |||
| 57c6ea2f4b | |||
| 257bb9a9c6 | |||
| bd8bca0cee | |||
| 0b95e5240c | |||
| a3c0b5e5b0 | |||
| f2efbb23fa | |||
| 967e27d1b9 | |||
| 4b9545d780 | |||
| 3eb6fca935 | |||
| fbfde5d17e | |||
| 57ce95541a | |||
| 2d13ed9a25 | |||
| 950640152d | |||
| fa5fc95356 | |||
| 6d4e3fbf36 | |||
| ced0223d55 | |||
| f8f4a21650 | |||
| 9f53c1e256 | |||
| 205be92f54 | |||
| 562748952b | |||
| 40ca66b930 | |||
| d4e3284cfd | |||
| 5f54c9a04a | |||
| 3166c4279c | |||
| 171c9fbf10 | |||
| 2d5abf1feb | |||
| b84d469960 | |||
| 4c1f4f347e | |||
| 95d359a903 | |||
| 3859516fe6 | |||
| 9ab8a66cb9 | |||
| 9cc35b38c7 | |||
| aaacaa9e2d | |||
| 2bd9ecb4b7 | |||
| 763817a6ee | |||
| 337aa63ec3 | |||
| fd4460a665 | |||
| 0253a5c9d6 | |||
| d4c83d8df5 | |||
| 8d7f1c41d6 | |||
| e51694ed40 | |||
| 884778b7ed | |||
| c893170cd1 | |||
| 819b1789a2 | |||
| f11ea9ebb5 | |||
| e4dcd636a6 | |||
| 3a98d7c78f | |||
| 8bcfd7a9e6 | |||
| c5fa94d5be | |||
| 823f9151bf | |||
| f9f9c51b9d | |||
| 4763b66f6c | |||
| 76c35efd31 | |||
| 47ed7c2133 | |||
| 345e040467 | |||
| 81e81002b0 | |||
| 1ef1ab772c | |||
| 77066e90ca | |||
| baa1f0c779 | |||
| 687e6fe3dc | |||
| 49e40a72e3 | |||
| 7748282bc4 | |||
| d1d6f7ae98 | |||
| c8b8ac8dda | |||
| d78576056c | |||
| 1dcf3b645b | |||
| dceb38b133 | |||
| d8f0be6268 | |||
| b47728d601 | |||
| 162f759113 | |||
| 2ffe1d25d2 | |||
| 08f3afea17 | |||
| 94bc1ac02f | |||
| ab1ea4b6e7 | |||
| 348b529c2f | |||
| 3b2c60abd7 | |||
| b0514db4df | |||
| 737bdb210c | |||
| 819c6ff5bd | |||
| e0f63b04e0 | |||
| b97ff6e981 | |||
| b79e584ac2 | |||
| ffb197404a | |||
| c0a529d37b | |||
| 70179f6220 | |||
| 4d3c853231 | |||
| 61337930d7 | |||
| c5f975db8c | |||
| a832d83674 | |||
| 551ebee2cb | |||
| c1ae1e81b9 | |||
| b7a1962413 | |||
| ccca8a32cb | |||
| 2e32537324 | |||
| 3a89708a96 | |||
| 65f07e3ff2 | |||
| 764a2c8720 | |||
| 11e96eb25c | |||
| eb306f3708 | |||
| 82419c6566 | |||
| 325e947f17 | |||
| f0add60077 | |||
| 123c2c5e36 | |||
| a248d7151e | |||
| d6de3494f5 | |||
| dfb6db5b4a | |||
| ae96c89a66 | |||
| 127f644835 | |||
| 82d176ea1a | |||
| 4d5943325e | |||
| 428468c84d | |||
| 24b3b558df | |||
| e8ea230e88 | |||
| 2ed263c368 | |||
| 70ac7638c7 | |||
| 99118b4eef | |||
| 26803ba029 | |||
| 4fb377892d | |||
| 77bad8ae94 | |||
| 6ada1ff295 | |||
| 0e8857bbbc | |||
| f5023acfb8 | |||
| 83a88dd619 | |||
| 8ba7ab159b | |||
| 93d8a88e7f | |||
| 7d5e330009 | |||
| 03e75e9b7e | |||
| 98123a307d | |||
| bef17c8b37 | |||
| e43bfb8471 | |||
| e93bde7ccb | |||
| aae45d8644 | |||
| c7eeb48398 | |||
| 3e62173553 | |||
| b9c4edcbd3 | |||
| ab4656a044 | |||
| 70a159ff0c | |||
| d240778f15 | |||
| 6f6611764b | |||
| 168628c336 | |||
| 86402dbfa0 | |||
| cb9dd491a6 | |||
| 9548b73166 | |||
| a4925c5e5f | |||
| 984af1e6fc | |||
| 4db387e9bc | |||
| 96488d5141 | |||
| 609d9f0da5 | |||
| bef8a84543 | |||
| 2535369553 | |||
| 365c5e15b7 | |||
| bb0407947d | |||
| cfdc130b0d | |||
| fb26a9265d | |||
| 4730f7ca07 | |||
| 725816b225 | |||
| 3473b9ea6e | |||
| 9944556a64 | |||
| 235d210ce5 | |||
| a65dc1d288 | |||
| 53b3a05dc9 | |||
| 8f897ae4df | |||
| c7b72fc63f | |||
| fe30f44b1a | |||
| 6abff6e706 | |||
| 3bd35d21fe | |||
| ec398915bd | |||
| a5c7ff83cd | |||
| 7d852a5fa9 | |||
| 3aa2e9b240 | |||
| 4c15a0282a | |||
| 83c92c51ff | |||
| e31210d216 | |||
| 4d21ad6a87 | |||
| 41db62c8cb | |||
| 54dd481ce0 | |||
| edfd6a7508 | |||
| 211b9f8777 | |||
| 4772b1a533 | |||
| 599a4bb79c | |||
| 2affdbdb5b | |||
| 863d5ab497 | |||
| 84e133ac10 | |||
| d72f661548 | |||
| 9e2dfdd23f | |||
| 5d6976b061 | |||
| b7f47a2d20 | |||
| 1f44370949 | |||
| 1d4307deb2 | |||
| aa7fcc297c | |||
| 0c9a2452e3 | |||
| 0ca0e9df36 | |||
| 43f95084d6 | |||
| 4089ad5943 | |||
| 76e53bb177 | |||
| 35c88ebc4e | |||
| 1dba713a65 | |||
| 194e5266b2 | |||
| 338018e1cd | |||
| 114c5a7f2e | |||
| 0bc31a9ec4 | |||
| 07d41b3d78 | |||
| 2ff333d211 | |||
| bf21220988 | |||
| 13d82878a0 | |||
| a21b28923f | |||
| d91c87c470 | |||
| cf33222370 | |||
| 653e74f843 | |||
| 47f300b5cc | |||
| 6ea985c377 | |||
| 72480d0eca | |||
| cb6b51c52f | |||
| 220fa0eb54 | |||
| 09cd5bbdb5 | |||
| 0139197429 | |||
| ee63928570 | |||
| 061a8785be | |||
| 441ac67c9d | |||
| ea859d216c | |||
| 980e4b8b69 | |||
| d049746b73 | |||
| 1e03822cd6 | |||
| 125ce72a55 | |||
| 48955b7f29 | |||
| c41964b940 | |||
| 6d98dd602e | |||
| bc8b9f3ab4 | |||
| 2347d477ae | |||
| dc0cda88f3 | |||
| 02b26d62ad | |||
| 84b6c0bfdf | |||
| f3e3b40a3e | |||
| a6fdbc5680 | |||
| e761aea7e7 | |||
| d517f6ba99 | |||
| 27230085df | |||
| 9984e514e0 | |||
| abdebb6deb | |||
| 0d053e8379 | |||
| 354d7e0156 | |||
| b4bdef0908 | |||
| d495f553b3 | |||
| 9503164738 | |||
| 3a20d22b80 | |||
| 0950bb3216 | |||
| c78c4268ca | |||
| 8253b227f2 | |||
| bb8648f1c4 | |||
| d5bdffda70 | |||
| ed52ba94c6 | |||
| abd7eed440 | |||
| 21856d702f | |||
| 850edb0460 | |||
| 596907ab23 | |||
| 0b28eecb3f | |||
| 8bd5471d73 | |||
| 754a4d4808 | |||
| 7c9ccd5485 | |||
| 0f2b5d5325 | |||
| e000828313 | |||
| d42e3f4ba8 | |||
| 77bb30337d | |||
| 1eda35e334 | |||
| b6b2d9af13 | |||
| ef87c5bf57 | |||
| 0e2b8dfa2b | |||
| edf314e964 | |||
| 89d4e97c09 | |||
| 20d7fdb7e3 | |||
| c638b4dfa9 | |||
| 4cac7eba28 | |||
| a7a91af9a0 | |||
| 13599c95e2 | |||
| 779f921e49 | |||
| 33362613a5 | |||
| 0863bea921 | |||
| 78afce38ae | |||
| 9899c18c36 | |||
| fe6f042bdc | |||
| 699b7b0c31 | |||
| edbf735d50 | |||
| ca8d1c837b | |||
| 5a74d235ce | |||
| a9b8e60f3c | |||
| 81a6756c01 | |||
| c67106b9c2 | |||
| 06776628f1 | |||
| 5333b08b4d | |||
| b013f6d5ce | |||
| 3dd703cca9 | |||
| a5b15ba33f | |||
| 162ef35de1 | |||
| f35f06d359 | |||
| 99a603655e | |||
| b4c4cd3ce6 | |||
| 22e4c2afee | |||
| c4629c3755 | |||
| b15d541bae | |||
| 879c1603e2 | |||
| 4923d4bc8a | |||
| 1c67c1a3dd | |||
| b3e05bcc39 | |||
| 89830b2e78 | |||
| d50e535913 | |||
| 3e96ddca3a | |||
| 5979b922e7 | |||
| fd370d81b8 | |||
| f9f4f0f22a | |||
| 9db554760a | |||
| 75e82b7558 | |||
| 0cedc6bd56 | |||
| 2a2f1523c1 | |||
| 93fd9adb54 | |||
| 4185cef43c | |||
| dcdbdc717e | |||
| 5861cc2659 | |||
| 40dcc00e3b | |||
| 0e379c8485 | |||
| cd23e41001 | |||
| 74b867a03b | |||
| f14d8a3d7e | |||
| 4fe1a2278a | |||
| ffc259f5bf | |||
| 24b4a8e6f0 | |||
| cc96dd3d14 | |||
| af08fcfcef | |||
| d204ab1a54 | |||
| 8702240615 | |||
| 7ec70c6cfd | |||
| 2257897092 | |||
| 07258856e4 | |||
| 7e2fecc032 | |||
| 11e3dd1425 | |||
| f2dd1a039e | |||
| 3572377dda | |||
| 72f6d2b514 | |||
| 43f25591ed | |||
| 372aae08db | |||
| 70bec1d806 | |||
| c4b2905823 | |||
| 6801df61f9 | |||
| cc0748d9e4 | |||
| 3c58583b29 | |||
| d0829f8c33 | |||
| 6e1ee7efde | |||
| 92d0de8205 | |||
| ca82c5ad1f | |||
| 30d8171455 | |||
| 62da5899de | |||
| 074af00d8b | |||
| b3ba3d55ee | |||
| 2448be3f33 | |||
| e71145e7a8 | |||
| 760bbee6a2 | |||
| 7cb578b406 | |||
| c6fc182198 | |||
| a7dfb2b0ea | |||
| 0e8aec9713 | |||
| 31b0b2b233 | |||
| c6ee27c50a | |||
| 13aaa35a31 | |||
| 8930745fde | |||
| 5768b5f959 | |||
| 60147d16da | |||
| f14b387627 | |||
| ecd043d94c | |||
| d6eacb4541 | |||
| db000ea5f7 | |||
| f8e1944cf8 | |||
| bf3297a264 | |||
| add869d0e3 | |||
| 9ae4f066ad | |||
| a6f9c176c6 | |||
| fb84cd681f | |||
| 4d264fa4f3 | |||
| 2e8e0799a9 | |||
| b81106a32c | |||
| d5ec3dcf22 | |||
| 15ade6fbed | |||
| eb3c18d475 | |||
| 70ea4ba2d7 | |||
| b289f2f4f9 | |||
| 820bf92eca | |||
| 06e95185ee | |||
| 5e03416752 | |||
| 6192861a4a | |||
| eb2b7e0bf3 | |||
| bd4fc3aa62 | |||
| 0efa05f546 | |||
| abc1ba77b3 | |||
| 18ba00205d | |||
| e5add84869 | |||
| 7f0f73fade | |||
| aee6eb5e70 | |||
| 15a0b705a0 | |||
| 2bd2fdf5ac | |||
| a40665a264 | |||
| 42077ef949 | |||
| 9f15da7f24 | |||
| cb3f35bd21 | |||
| 4c506aab34 | |||
| 02f7c16935 | |||
| 378f286758 | |||
| 2abd177390 | |||
| 1e844a56e5 | |||
| a0546beef3 | |||
| 29cc0fcc1a | |||
| c46175c81a | |||
| 487aa49e60 | |||
| 80ae948e54 | |||
| c3e8d99171 | |||
| 0d219183ad | |||
| 04a802d47b | |||
| 60466877f6 | |||
| e7316d6e11 | |||
| 05a4c7b0bd | |||
| 2d7c08ba5a | |||
| 7a4e945d72 | |||
| fdbd3d08d3 | |||
| f5693fb8de | |||
| 9c39cbd612 | |||
| 479c2e1457 | |||
| d69b17a76d | |||
| 6615e13c9b | |||
| 79ac51f8ff | |||
| 07b97d3bac | |||
| c3a3a74962 | |||
| 99a12afc43 | |||
| 02f418753c | |||
| 55eca1dbaf | |||
| 09f09ad3da | |||
| ddf97f2b6b | |||
| 18585d4858 | |||
| 566070caa1 | |||
| 74645537e6 | |||
| 6becab39fa | |||
| 59bcd94605 | |||
| 790ceb3386 | |||
| 76da58bd21 | |||
| bc3b12850c | |||
| 60c6da953f | |||
| 66a89dee68 | |||
| 1c4423a0b6 | |||
| 53fe412618 | |||
| cb87dd71ff | |||
| d1997624f6 | |||
| bdbf3ee562 | |||
| f6110a802e | |||
| 35c192a1e9 | |||
| 25e9be5219 | |||
| 21014fad4f | |||
| 3a9b0a6a6d | |||
| f20e0d2010 | |||
| c5e6a6d299 | |||
| b510b3cfcd | |||
| 9c67cafd53 | |||
| cea6c2bfc5 | |||
| af9b5655b9 | |||
| dcee3094a1 | |||
| 7fd2d4effd | |||
| b2b164ca46 | |||
| 14b2746754 | |||
| 698f5585e5 | |||
| 14ece8580b | |||
| 85b9cfe067 | |||
| 8ebda93701 | |||
| 8208b5e095 | |||
| 3c9d7f82b9 | |||
| 464a153b48 | |||
| db136fcd5e | |||
| cb0e6267cb | |||
| 7ae3ce111b | |||
| 89cebfe37f | |||
| 8f5a9860a4 | |||
| 972c7365bb | |||
| 550e032aba | |||
| d9e51d9821 | |||
| b9cb27f8a4 | |||
| 3634920fde | |||
| 4806ec0b69 | |||
| 64e23d0029 | |||
| f448132521 | |||
| b41740568b |
15
.gitignore
vendored
@@ -1,3 +1,16 @@
|
||||
node_modules
|
||||
package-lock.json
|
||||
dist
|
||||
dist.DS_Store
|
||||
.git
|
||||
.gitignore
|
||||
.DS_Store
|
||||
*.iml
|
||||
yarn.lock
|
||||
*.lock
|
||||
Makefile
|
||||
*.exe
|
||||
tsconfig.tsbuildinfo
|
||||
*.dll
|
||||
*.pdb
|
||||
*.py[cod]
|
||||
*.dylib
|
||||
|
||||
80
README.md
@@ -1 +1,79 @@
|
||||
# Projekt in auto-git-gui-initial
|
||||
# auto-git-gui
|
||||
|
||||
**Author:** Unknown
|
||||
|
||||
> ⚠️ **This README.md has been automatically generated using AI and might contain hallucinations or inaccuracies. Please proceed with caution!**
|
||||
|
||||
# Repo Monitor
|
||||
|
||||
## Description
|
||||
|
||||
Repo Monitor is a desktop application designed to help developers keep track of their Git repositories. It provides features such as monitoring repository activity, taking snapshots of commits, and managing multiple repositories efficiently.
|
||||
|
||||
## Features
|
||||
|
||||
- **Repository Monitoring**: Automatically monitors selected Git repositories for changes.
|
||||
- **Snapshot Commits**: Save the state of a commit to a file for later reference.
|
||||
- **Checkout Commits**: Switch between different commits in your repository.
|
||||
- **Commit Diff Viewer**: View differences between commits directly within the application.
|
||||
- **Multiple Repositories**: Manage and switch between multiple Git repositories easily.
|
||||
- **Tray Integration**: Access quick actions via system tray menu.
|
||||
- **Cat Assistant**: An interactive cat assistant that provides feedback based on commit activity.
|
||||
|
||||
## Installation
|
||||
|
||||
1. Download the latest release from the [Releases](https://github.com/yourusername/repo-monitor/releases) page.
|
||||
2. Extract the downloaded archive.
|
||||
3. Run the application executable (`RepoMonitor.exe` for Windows, `RepoMonitor.app` for macOS, or `RepoMonitor` for Linux).
|
||||
|
||||
## Usage
|
||||
|
||||
1. **Add a Repository**: Click the "Add Folder" button to add a Git repository to be monitored.
|
||||
2. **Select a Repository**: Click on a repository in the sidebar to view its commits.
|
||||
3. **View Commits**: Navigate through commits using pagination and view commit details, including diffs.
|
||||
4. **Take Snapshots**: Use the snapshot button to save the state of a specific commit.
|
||||
5. **Checkout Commits**: Switch to a different commit by clicking the checkout button.
|
||||
|
||||
## Contributing
|
||||
|
||||
Contributions are welcome! Please read the [CONTRIBUTING.md](CONTRIBUTING.md) file for guidelines on how to contribute to the project.
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
||||
|
||||
## Contact
|
||||
|
||||
For any questions or support, please contact us at [support@repomonitor.com](mailto:support@repomonitor.com).
|
||||
|
||||
---
|
||||
|
||||
**Repo Monitor**
|
||||
*Effortlessly manage your Git repositories.*
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 Your Name
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
528
animeCat.js
@@ -1,5 +1,4 @@
|
||||
// animeCat.js
|
||||
export class AnimeCat {
|
||||
window.AnimeCat = class AnimeCat {
|
||||
/**
|
||||
* @param {HTMLElement} container
|
||||
* @param {Object} [options]
|
||||
@@ -9,76 +8,259 @@ export class AnimeCat {
|
||||
this.images = Object.assign({
|
||||
default: 'default.png',
|
||||
eyesClosed: 'eyes_closed.png',
|
||||
mouthOpen: 'mouth_open.png'
|
||||
blink: 'blink.png',
|
||||
mouthOpen: 'mouth_open.png',
|
||||
joy: 'joy.png',
|
||||
mischievous: 'mischievous.png'
|
||||
}, options.images);
|
||||
this.blinkMin = options.blinkMin ?? 5000;
|
||||
this.blinkMax = options.blinkMax ?? 15000;
|
||||
this.blinkDuration = options.blinkDuration?? 175;
|
||||
this.talkInterval = options.talkInterval ?? 300;
|
||||
|
||||
this.blinkMin = options.blinkMin ?? 5000;
|
||||
this.blinkMax = options.blinkMax ?? 15000;
|
||||
this.blinkDuration = options.blinkDuration ?? 175;
|
||||
this.talkInterval = options.talkInterval ?? 300;
|
||||
this._consolationCount = 0;
|
||||
|
||||
this._isSpeaking = false;
|
||||
this._blinkTimeout = null;
|
||||
this._talkIntervalId = null;
|
||||
this._speechTimeout = null;
|
||||
this._mouthOpen = false;
|
||||
this._pettingActive = false;
|
||||
|
||||
this._createElements();
|
||||
this._bindMouseHold();
|
||||
this._startBlinking();
|
||||
this._startGlowWobble();
|
||||
}
|
||||
|
||||
_createElements() {
|
||||
// Outer Wrapper für Flex-Layout
|
||||
this.wrapper = document.createElement('div');
|
||||
this.wrapper.style.position = 'relative';
|
||||
this.wrapper.style.display = 'inline-block';
|
||||
Object.assign(this.wrapper.style, {
|
||||
position: 'relative',
|
||||
display: 'flex',
|
||||
flexDirection: 'row',
|
||||
alignItems: 'flex-end',
|
||||
minHeight: '80px',
|
||||
minWidth: '180px',
|
||||
zIndex: 1
|
||||
});
|
||||
|
||||
// cat image
|
||||
// Innerer Container für Glow + Katze (Stack!)
|
||||
this.catContainer = document.createElement('div');
|
||||
Object.assign(this.catContainer.style, {
|
||||
position: 'relative',
|
||||
width: '90px',
|
||||
height: '70px',
|
||||
minWidth: '90px',
|
||||
minHeight: '70px',
|
||||
zIndex: 2
|
||||
});
|
||||
|
||||
// Glow (hinter der Katze)
|
||||
this.glow = document.createElement('div');
|
||||
this.glow.id = 'cat-glow';
|
||||
Object.assign(this.glow.style, {
|
||||
position: 'absolute',
|
||||
left: '40%',
|
||||
top: '73%',
|
||||
transform: 'translate(-50%, -50%)',
|
||||
borderRadius: '50%',
|
||||
width: '70px', // ODER: Teste 54, 70, 80 – wie es dir am besten gefällt!
|
||||
height: '52px',
|
||||
pointerEvents: 'none',
|
||||
zIndex: 1,
|
||||
filter: 'blur(4px)', // ruhig auch 14px für weichen Rand!
|
||||
opacity: '0.85', // Wieviel du willst!
|
||||
transition: 'background 0.4s, opacity 0.3s'
|
||||
});
|
||||
this.catContainer.appendChild(this.glow);
|
||||
|
||||
// Cat image (über dem Glow, mittig im catContainer)
|
||||
this.img = document.createElement('img');
|
||||
this.img.src = this.images.default;
|
||||
// disable drag & selection
|
||||
Object.assign(this.img.style, {
|
||||
position: 'absolute',
|
||||
left: '40%',
|
||||
top: '66%',
|
||||
transform: 'translate(-50%, -50%)',
|
||||
width: '62px',
|
||||
height: '50px',
|
||||
zIndex: 2,
|
||||
userSelect: 'none',
|
||||
webkitUserSelect: 'none',
|
||||
MozUserSelect: 'none',
|
||||
msUserSelect: 'none',
|
||||
webkitUserDrag: 'none',
|
||||
pointerEvents: 'auto'
|
||||
});
|
||||
this.img.draggable = false;
|
||||
this.img.style.userSelect = 'none';
|
||||
this.img.style.webkitUserSelect = 'none';
|
||||
this.img.style.MozUserSelect = 'none';
|
||||
this.img.style.msUserSelect = 'none';
|
||||
// some browsers need this to stop the default drag ghost
|
||||
this.img.style.webkitUserDrag = 'none';
|
||||
this.catContainer.appendChild(this.img);
|
||||
|
||||
this.wrapper.appendChild(this.img);
|
||||
|
||||
// speech bubble
|
||||
// Sprechblase (direkt im wrapper)
|
||||
this.bubble = document.createElement('div');
|
||||
Object.assign(this.bubble.style, {
|
||||
position: 'absolute',
|
||||
bottom: '100%',
|
||||
left: '50%',
|
||||
transform: 'translateX(-50%)',
|
||||
padding: '8px 12px',
|
||||
position: 'relative',
|
||||
marginLeft: '4px', // vorher 14px
|
||||
marginBottom: '1px', // vorher 11px
|
||||
padding: '10px 16px',
|
||||
background: 'white',
|
||||
border: '1px solid #ccc',
|
||||
borderRadius: '4px',
|
||||
boxShadow: '0 2px 6px rgba(0,0,0,0.2)',
|
||||
borderRadius: '16px',
|
||||
boxShadow: '0 2px 8px rgba(0,0,0,0.18)',
|
||||
opacity: '0',
|
||||
transition: 'opacity 0.3s',
|
||||
maxWidth: '200px',
|
||||
wordWrap: 'break-word',
|
||||
maxWidth: '240px',
|
||||
wordBreak: 'break-word',
|
||||
fontFamily: 'sans-serif',
|
||||
fontSize: '14px',
|
||||
fontSize: '15px',
|
||||
color: '#333',
|
||||
pointerEvents: 'none'
|
||||
pointerEvents: 'none',
|
||||
minHeight: '30px',
|
||||
zIndex: 10,
|
||||
overflowWrap: 'anywhere',
|
||||
display: 'flex',
|
||||
alignItems: 'center'
|
||||
});
|
||||
this.wrapper.appendChild(this.bubble);
|
||||
|
||||
// Bubble Tail
|
||||
this.bubblePointer = document.createElement('div');
|
||||
Object.assign(this.bubblePointer.style, {
|
||||
position: 'absolute',
|
||||
left: '-13px',
|
||||
bottom: '14px',
|
||||
width: '0',
|
||||
height: '0',
|
||||
borderTop: '8px solid transparent',
|
||||
borderBottom: '8px solid transparent',
|
||||
borderRight: '13px solid #fff',
|
||||
filter: 'drop-shadow(-2px 1px 2px rgba(0,0,0,0.10))',
|
||||
zIndex: 11
|
||||
});
|
||||
this.bubble.appendChild(this.bubblePointer);
|
||||
|
||||
// Zusammenbauen
|
||||
this.wrapper.appendChild(this.catContainer); // LINKS (Stack: Glow, Katze)
|
||||
this.wrapper.appendChild(this.bubble); // RECHTS
|
||||
this.container.appendChild(this.wrapper);
|
||||
|
||||
// Herz-Emitter, bleibt wie gehabt
|
||||
this.heartEmitter = document.createElement('div');
|
||||
Object.assign(this.heartEmitter.style, {
|
||||
position: 'absolute',
|
||||
left: '90px',
|
||||
bottom: '50px',
|
||||
pointerEvents: 'none',
|
||||
width: '1px',
|
||||
height: '1px',
|
||||
zIndex: 20
|
||||
});
|
||||
this.container.appendChild(this.heartEmitter);
|
||||
}
|
||||
|
||||
|
||||
_startGlowWobble() {
|
||||
let t = 0;
|
||||
const loop = () => {
|
||||
// Sanfte Wellen-Animation der Opazität
|
||||
const phase = 0.92 + 0.1 * Math.sin(t);
|
||||
this.glow.style.opacity = phase.toFixed(2);
|
||||
// Wenn du magst: this.glow.style.filter = `blur(${10 + 2*Math.sin(t/2)}px)`;
|
||||
t += 0.03;
|
||||
this._glowWobbleId = requestAnimationFrame(loop);
|
||||
};
|
||||
loop();
|
||||
}
|
||||
stopGlowWobble() {
|
||||
if (this._glowWobbleId) cancelAnimationFrame(this._glowWobbleId);
|
||||
}
|
||||
|
||||
// Hilfsfunktionen zur Farbinterpolation
|
||||
_lerp(a, b, t) { return a + (b - a) * t; }
|
||||
_lerpColor(a, b, t) {
|
||||
return [
|
||||
Math.round(this._lerp(a[0], b[0], t)),
|
||||
Math.round(this._lerp(a[1], b[1], t)),
|
||||
Math.round(this._lerp(a[2], b[2], t)),
|
||||
];
|
||||
}
|
||||
|
||||
// Animiert den Glow je nach Commit-Anzahl
|
||||
animateCatGlow(commitCount) {
|
||||
const glow = this.glow;
|
||||
if (!glow) return;
|
||||
|
||||
// Farbverlauf – nur Farbe wechseln!
|
||||
const stops = [
|
||||
{ c: 0, color: [157, 157, 157] },
|
||||
{ c: 5, color: [255, 255, 255] },
|
||||
{ c: 15, color: [30, 255, 0] },
|
||||
{ c: 50, color: [0, 112, 221] },
|
||||
{ c: 100, color: [163, 53, 238] },
|
||||
{ c: 500, color: [255, 128, 0] }
|
||||
];
|
||||
|
||||
let lower = stops[0], upper = stops[stops.length-1];
|
||||
for (let i=0; i<stops.length-1; ++i) {
|
||||
if (commitCount >= stops[i].c && commitCount < stops[i+1].c) {
|
||||
lower = stops[i]; upper = stops[i+1]; break;
|
||||
}
|
||||
}
|
||||
const range = upper.c - lower.c || 1;
|
||||
const t = Math.min(Math.max((commitCount - lower.c) / range, 0), 1);
|
||||
|
||||
const [r,g,b] = this._lerpColor(lower.color, upper.color, t);
|
||||
this.glow.style.background = `radial-gradient(
|
||||
ellipse at 50% 50%,
|
||||
rgba(${r},${g},${b},0.97) 0%,
|
||||
rgba(${r},${g},${b},0.24) 70%,
|
||||
rgba(0,0,0,0) 100%
|
||||
)`;
|
||||
}
|
||||
|
||||
// Bubble für Animation absolut an Position der Katze anheften
|
||||
_positionBubbleDetached() {
|
||||
// Katzen-Bild in catContainer suchen!
|
||||
const catRect = this.catContainer.getBoundingClientRect();
|
||||
const contRect = this.container.getBoundingClientRect();
|
||||
|
||||
// Position: leicht rechts, minimal nach oben (bei Bedarf feintunen)
|
||||
const left = (catRect.right - contRect.left) + 2; // vorher +12, jetzt +2
|
||||
const bottom = (contRect.bottom - catRect.bottom) - 2; // vorher +8, jetzt -2
|
||||
Object.assign(this.bubble.style, {
|
||||
position: 'absolute',
|
||||
left: `${left}px`,
|
||||
bottom: `${bottom}px`,
|
||||
marginLeft: '0',
|
||||
marginBottom: '0'
|
||||
});
|
||||
// Tail am linken Rand
|
||||
this.bubblePointer.style.left = '-13px';
|
||||
this.bubblePointer.style.bottom = '14px';
|
||||
}
|
||||
|
||||
// Zurück zum Flex-Layout
|
||||
_resetBubbleAttach() {
|
||||
Object.assign(this.bubble.style, {
|
||||
position: 'relative',
|
||||
left: '',
|
||||
bottom: '',
|
||||
marginLeft: '12px',
|
||||
marginBottom:'16px'
|
||||
});
|
||||
this.bubblePointer.style.left = '-13px';
|
||||
this.bubblePointer.style.bottom = '14px';
|
||||
}
|
||||
|
||||
_startBlinking() {
|
||||
const delay = this.blinkMin + Math.random() * (this.blinkMax - this.blinkMin);
|
||||
this._blinkTimeout = setTimeout(() => {
|
||||
if (!this._isSpeaking) {
|
||||
this.img.src = this.images.eyesClosed;
|
||||
this.img.src = this.images.blink;
|
||||
setTimeout(() => {
|
||||
this.img.src = this.images.default;
|
||||
if (!this._pettingActive) {
|
||||
this.img.src = this.images.default;
|
||||
}
|
||||
this._startBlinking();
|
||||
}, this.blinkDuration);
|
||||
} else {
|
||||
@@ -89,29 +271,257 @@ export class AnimeCat {
|
||||
|
||||
_bindMouseHold() {
|
||||
let holdTimer = null;
|
||||
let joyActive = false;
|
||||
let mouseDown = false;
|
||||
let mouseDownAt = null;
|
||||
let lastPos = null;
|
||||
let moveDist = 0;
|
||||
|
||||
const closeEyes = () => {
|
||||
clearTimeout(holdTimer);
|
||||
this.img.src = this.images.eyesClosed;
|
||||
const CAT_TOLERANCE = 15;
|
||||
const MOVE_THRESHOLD = 200;
|
||||
|
||||
const isMouseNearCat = (e) => {
|
||||
const rect = this.img.getBoundingClientRect();
|
||||
return (
|
||||
e.clientX >= rect.left - CAT_TOLERANCE &&
|
||||
e.clientX <= rect.right + CAT_TOLERANCE &&
|
||||
e.clientY >= rect.top - CAT_TOLERANCE &&
|
||||
e.clientY <= rect.bottom + CAT_TOLERANCE
|
||||
);
|
||||
};
|
||||
|
||||
const closeEyes = () => { this.img.src = this.images.eyesClosed; };
|
||||
const reopenEyes = () => {
|
||||
clearTimeout(holdTimer);
|
||||
if (!this._isSpeaking) {
|
||||
this.img.src = this.images.default;
|
||||
}
|
||||
if (!joyActive && !this._isSpeaking && !this._pettingActive) this.img.src = this.images.default;
|
||||
};
|
||||
|
||||
this.img.addEventListener('mousedown', () => {
|
||||
// if currently talking, ignore hold-to-close
|
||||
if (this._isSpeaking) return;
|
||||
this.img.addEventListener('mousedown', (e) => {
|
||||
if (this._isSpeaking || joyActive) return;
|
||||
if (!isMouseNearCat(e)) return;
|
||||
this._pettingActive = true;
|
||||
|
||||
mouseDown = true;
|
||||
mouseDownAt = Date.now();
|
||||
lastPos = { x: e.clientX, y: e.clientY };
|
||||
moveDist = 0;
|
||||
closeEyes();
|
||||
// force reopen after max 5s
|
||||
holdTimer = setTimeout(reopenEyes, 4000);
|
||||
clearTimeout(this._blinkTimeout); // Blinzeln pausieren
|
||||
|
||||
function onMove(ev) {
|
||||
if (!mouseDown) return;
|
||||
if (!isMouseNearCat(ev)) {
|
||||
cleanup();
|
||||
reopenEyes();
|
||||
mouseDown = false;
|
||||
this._startBlinking();
|
||||
return;
|
||||
}
|
||||
if (lastPos) {
|
||||
const dx = ev.clientX - lastPos.x;
|
||||
const dy = ev.clientY - lastPos.y;
|
||||
moveDist += Math.sqrt(dx * dx + dy * dy);
|
||||
lastPos = { x: ev.clientX, y: ev.clientY };
|
||||
}
|
||||
}
|
||||
|
||||
const onMoveBound = onMove.bind(this);
|
||||
|
||||
holdTimer = setTimeout(() => {
|
||||
if (!mouseDown) return; // Schon abgebrochen
|
||||
if (moveDist >= MOVE_THRESHOLD) {
|
||||
cleanup();
|
||||
joyActive = true;
|
||||
this._runJoyAnimation(() => {
|
||||
joyActive = false;
|
||||
reopenEyes();
|
||||
this._startBlinking();
|
||||
});
|
||||
mouseDown = false;
|
||||
} else {
|
||||
this._consolation(mouseDownAt);
|
||||
mouseDown = false;
|
||||
}
|
||||
}, 4000);
|
||||
|
||||
function onUp() {
|
||||
if (!mouseDown) return;
|
||||
cleanup();
|
||||
const heldFor = Date.now() - mouseDownAt;
|
||||
if (heldFor >= 4000) return; // already handled by timer above
|
||||
if (heldFor >= 4000 && moveDist >= MOVE_THRESHOLD) {
|
||||
joyActive = true;
|
||||
this._runJoyAnimation(() => {
|
||||
joyActive = false;
|
||||
reopenEyes();
|
||||
this._startBlinking();
|
||||
});
|
||||
} else if (heldFor > 1000) {
|
||||
this._consolation(mouseDownAt);
|
||||
} else {
|
||||
reopenEyes();
|
||||
this._startBlinking();
|
||||
}
|
||||
mouseDown = false;
|
||||
}
|
||||
|
||||
const onUpBound = onUp.bind(this);
|
||||
|
||||
const cleanup = () => {
|
||||
window.removeEventListener('mousemove', onMoveBound);
|
||||
window.removeEventListener('mouseup', onUpBound);
|
||||
if (holdTimer) clearTimeout(holdTimer);
|
||||
holdTimer = null;
|
||||
this._pettingActive = false;
|
||||
};
|
||||
window.addEventListener('mousemove', onMoveBound);
|
||||
window.addEventListener('mouseup', onUpBound);
|
||||
});
|
||||
}
|
||||
|
||||
_consolation(mouseDownAt) {
|
||||
// Trostpreis: Augen auf, dann mouth_open oder mischievous
|
||||
this._pettingActive = false;
|
||||
this.img.src = this.images.default;
|
||||
const heldFor = Date.now() - mouseDownAt;
|
||||
if (heldFor > 1000) {
|
||||
const mouthOpenTime = Math.max(heldFor - 1000, 1000);
|
||||
let imgToShow = this.images.mouthOpen || this.images.default;
|
||||
if (this._consolationCount >= 3) {
|
||||
if (
|
||||
this._consolationCount === 3 ||
|
||||
Math.random() < 0.2
|
||||
) {
|
||||
imgToShow = this.images.mischievous || imgToShow;
|
||||
}
|
||||
}
|
||||
this.img.src = imgToShow;
|
||||
this._consolationCount++;
|
||||
this._startBlinking();
|
||||
setTimeout(() => {
|
||||
if (!this._isSpeaking && !this._pettingActive) {
|
||||
this.img.src = this.images.default;
|
||||
}
|
||||
}, mouthOpenTime);
|
||||
} else {
|
||||
this._startBlinking();
|
||||
}
|
||||
}
|
||||
|
||||
_runJoyAnimation(onFinish) {
|
||||
const img = this.img;
|
||||
const catBox = this.catContainer;
|
||||
const origCatTransition = catBox.style.transition;
|
||||
const origCatTransform = catBox.style.transform;
|
||||
|
||||
img.src = this.images.joy || this.images.default;
|
||||
|
||||
// 20% Chance auf Salto!
|
||||
const salto = Math.random() < 0.2;
|
||||
|
||||
// Bubble abkoppeln
|
||||
this.container.appendChild(this.bubble);
|
||||
this._positionBubbleDetached();
|
||||
|
||||
// Herz-Emitter anpassen
|
||||
const catRect = this.catContainer.getBoundingClientRect();
|
||||
const contRect = this.container.getBoundingClientRect();
|
||||
const emitterX = catRect.right - contRect.left + 12;
|
||||
const emitterY = contRect.bottom - catRect.bottom + 34;
|
||||
this.heartEmitter.style.left = emitterX + 'px';
|
||||
this.heartEmitter.style.bottom = emitterY + 'px';
|
||||
|
||||
const spawnHearts = () => this._spawnHearts(12);
|
||||
|
||||
if (salto) {
|
||||
// Salto: gesamter Container springt & dreht
|
||||
catBox.style.transition = 'transform 1.2s cubic-bezier(.19,1,.22,1)';
|
||||
catBox.style.transform = 'translateY(-40px) rotate(360deg)';
|
||||
spawnHearts();
|
||||
|
||||
setTimeout(() => {
|
||||
catBox.style.transition = 'transform 0.8s cubic-bezier(.19,1,.22,1)';
|
||||
catBox.style.transform = 'translateY(0) rotate(360deg)';
|
||||
img.src = this.images.mouthOpen || this.images.default;
|
||||
setTimeout(() => {
|
||||
if (!this._pettingActive) img.src = this.images.default;
|
||||
setTimeout(() => {
|
||||
catBox.style.transition = origCatTransition || '';
|
||||
catBox.style.transform = origCatTransform || '';
|
||||
this.wrapper.appendChild(this.bubble);
|
||||
this._resetBubbleAttach();
|
||||
if (typeof onFinish === 'function') onFinish();
|
||||
}, 700);
|
||||
}, 2000);
|
||||
}, 1200);
|
||||
} else {
|
||||
// Normaler Joy-Jump
|
||||
catBox.style.transition = 'transform 0.6s cubic-bezier(.19,1,.22,1)';
|
||||
catBox.style.transform = 'translateY(-40px) rotate(12deg)';
|
||||
setTimeout(() => {
|
||||
spawnHearts();
|
||||
setTimeout(() => {
|
||||
catBox.style.transition = 'transform 0.8s cubic-bezier(.19,1,.22,1)';
|
||||
catBox.style.transform = 'translateY(0) rotate(0deg)';
|
||||
img.src = this.images.mouthOpen || this.images.default;
|
||||
setTimeout(() => {
|
||||
if (!this._pettingActive) img.src = this.images.default;
|
||||
setTimeout(() => {
|
||||
catBox.style.transition = origCatTransition || '';
|
||||
catBox.style.transform = origCatTransform || '';
|
||||
this.wrapper.appendChild(this.bubble);
|
||||
this._resetBubbleAttach();
|
||||
if (typeof onFinish === 'function') onFinish();
|
||||
}, 700);
|
||||
}, 2000);
|
||||
}, 2200);
|
||||
}, 400);
|
||||
}
|
||||
}
|
||||
|
||||
_spawnHearts(count = 10) {
|
||||
for (let i = 0; i < count; ++i) {
|
||||
setTimeout(() => this._makeHeart(), Math.random() * 300);
|
||||
}
|
||||
}
|
||||
|
||||
_makeHeart() {
|
||||
const emoji = Math.random() < 0.7 ? '❤️' : '💕';
|
||||
|
||||
const heart = document.createElement('span');
|
||||
heart.textContent = emoji;
|
||||
heart.style.position = 'absolute';
|
||||
heart.style.left = '0%';
|
||||
heart.style.bottom= '0%';
|
||||
heart.style.fontSize = `${16 + Math.random() * 14}px`;
|
||||
heart.style.pointerEvents = 'none';
|
||||
heart.style.opacity = '0.9';
|
||||
heart.style.zIndex = 100;
|
||||
|
||||
// Start/End-Pos, Flugwinkel
|
||||
const angle = (Math.random() * Math.PI) - (Math.PI/2); // spread -90° to 90°
|
||||
const distance = 60 + Math.random() * 45;
|
||||
const dx = Math.cos(angle) * distance;
|
||||
const dy = Math.sin(angle) * distance;
|
||||
|
||||
heart.animate([
|
||||
{
|
||||
transform: 'translate(-50%, 0) scale(1)',
|
||||
opacity: 0.95
|
||||
},
|
||||
{
|
||||
transform: `translate(calc(-50% + ${dx}px), ${-dy}px) scale(${1.3 + Math.random()*0.4}) rotate(${Math.random()*60-30}deg)`,
|
||||
opacity: 0.3
|
||||
}
|
||||
], {
|
||||
duration: 1100 + Math.random()*800,
|
||||
easing: 'cubic-bezier(.28,1.01,.57,.99)'
|
||||
});
|
||||
|
||||
['mouseup', 'mouseleave'].forEach(evt =>
|
||||
this.img.addEventListener(evt, reopenEyes)
|
||||
);
|
||||
// Remove after animation
|
||||
setTimeout(() => heart.remove(), 1600);
|
||||
|
||||
// Im Herzen-Emitter platzieren!
|
||||
this.heartEmitter.appendChild(heart);
|
||||
}
|
||||
|
||||
/** Call when streaming text begins */
|
||||
@@ -123,7 +533,12 @@ export class AnimeCat {
|
||||
this._mouthOpen = false;
|
||||
this.img.src = this.images.default;
|
||||
this.bubble.style.opacity = '1';
|
||||
this.bubble.textContent = '';
|
||||
this.bubble.style.visibility = 'visible';
|
||||
Array.from(this.bubble.childNodes).forEach(node => {
|
||||
if (node !== this.bubblePointer) node.remove();
|
||||
});
|
||||
this._bubbleTextNode = document.createTextNode('');
|
||||
this.bubble.appendChild(this._bubbleTextNode);
|
||||
|
||||
this._talkIntervalId = setInterval(() => {
|
||||
this._mouthOpen = !this._mouthOpen;
|
||||
@@ -133,26 +548,27 @@ export class AnimeCat {
|
||||
}, this.talkInterval / 2);
|
||||
}
|
||||
|
||||
/** Append a chunk of streamed text */
|
||||
appendSpeech(chunk) {
|
||||
this.bubble.textContent += chunk;
|
||||
if (this._bubbleTextNode)
|
||||
this._bubbleTextNode.textContent += chunk;
|
||||
}
|
||||
|
||||
/** Call when the stream ends */
|
||||
endSpeech() {
|
||||
clearInterval(this._talkIntervalId);
|
||||
this.img.src = this.images.default;
|
||||
if (!this._pettingActive) {
|
||||
this.img.src = this.images.default;
|
||||
}
|
||||
this._speechTimeout = setTimeout(() => {
|
||||
this.bubble.style.opacity = '0';
|
||||
this._isSpeaking = false;
|
||||
}, 3000);
|
||||
}, 6000);
|
||||
}
|
||||
|
||||
/** Clean up timers & DOM */
|
||||
destroy() {
|
||||
clearTimeout(this._blinkTimeout);
|
||||
clearInterval(this._talkIntervalId);
|
||||
clearTimeout(this._speechTimeout);
|
||||
this.wrapper.remove();
|
||||
this.heartEmitter.remove();
|
||||
}
|
||||
}
|
||||
BIN
assets/cat/blink.png
Normal file
|
After Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 108 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 109 KiB |
BIN
assets/cat/mischievous.png
Normal file
|
After Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 110 KiB |
BIN
assets/cat/paw.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
assets/icon/trayicon.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
13
editor-reword.js
Normal file
@@ -0,0 +1,13 @@
|
||||
// editor-reword.js
|
||||
const fs = require('fs');
|
||||
const map = JSON.parse(process.env.REBASE_COMMIT_MAP);
|
||||
const msgFile = process.argv[2];
|
||||
const origMsg = fs.readFileSync(msgFile, 'utf-8');
|
||||
|
||||
// Hash suchen
|
||||
const hashMatch = origMsg.match(/commit\\s+([a-f0-9]{7,40})/i);
|
||||
const hash = hashMatch ? hashMatch[1] : null;
|
||||
if (hash && map[hash]) {
|
||||
fs.writeFileSync(msgFile, map[hash] + '\n');
|
||||
}
|
||||
process.exit(0);
|
||||
136
index.html
@@ -22,11 +22,7 @@
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
#catSlot img {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Außenschale für den Diff: overflow + max-height */
|
||||
@@ -71,7 +67,7 @@
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
@keyframes glow {
|
||||
@keyframes glow {
|
||||
0%, 100% { box-shadow: 0 0 4px gold; }
|
||||
50% { box-shadow: 0 0 12px gold; }
|
||||
}
|
||||
@@ -84,6 +80,20 @@
|
||||
border-style: solid !important;
|
||||
border-color: gold !important;
|
||||
}
|
||||
.needs-relocation {
|
||||
opacity: 0.5;
|
||||
filter: grayscale(1);
|
||||
pointer-events: auto !important; /* Damit Buttons weiter gehen */
|
||||
}
|
||||
.relocation-warning-symbol {
|
||||
color: #e11d48;
|
||||
font-weight: bold;
|
||||
font-size: 1.2em;
|
||||
margin-right: 2px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#currentTitle {
|
||||
/* erlauben, dass der Text umbricht */
|
||||
@@ -140,12 +150,65 @@
|
||||
.diff-container pre {
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
|
||||
.sidebar, .interaction-bar, .content-area button {
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
#folderHierarchyDropdown.open {
|
||||
display: block;
|
||||
}
|
||||
#folderTitleArrow.open {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
.interaction-bar {
|
||||
min-height: 3.5rem; /* = h-16 (56px, wie jetzt schon) */
|
||||
padding-top: 0 !important;
|
||||
padding-bottom: 0 !important;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.interaction-bar .flex {
|
||||
line-height: 1.2; /* wenig Zeilenabstand */
|
||||
height: 100%; /* volle Höhe ausnutzen, vertikal zentrieren */
|
||||
margin-left: 90px;
|
||||
}
|
||||
|
||||
.interaction-bar span {
|
||||
font-size: inherit !important; /* gleiche Größe wie restlicher Text */
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.interaction-bar div > div {
|
||||
margin-bottom: 0.1em; /* nur minimal Abstand */
|
||||
}
|
||||
.interaction-bar div > div:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.commits-glow {
|
||||
text-shadow:
|
||||
1px 1px 2px rgba(0,0,0,0.25),
|
||||
0px 1px 1px color-mix(in srgb, currentColor 40%, black);
|
||||
}
|
||||
|
||||
.paw-queued {
|
||||
position: absolute;
|
||||
top: 33px; /* so weit nach unten */
|
||||
right: 40px; /* nur ganz am Rand, feintune hier! */
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
filter: drop-shadow(0 2px 2px rgba(0,0,0,0.10));
|
||||
pointer-events: none;
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="flex h-screen bg-white">
|
||||
|
||||
<!-- Sidebar -->
|
||||
<aside class="w-64 border-r flex flex-col"
|
||||
<aside class="w-64 border-r flex flex-col sidebar"
|
||||
style="background: var(--bg-sidebar); border-color: var(--border)">
|
||||
<h2 class="px-4 py-3 text-lg font-semibold"
|
||||
style="color: var(--accent)">
|
||||
@@ -169,30 +232,65 @@
|
||||
|
||||
<!-- Main panel: wieder p-4 wie gehabt -->
|
||||
<main class="relative flex flex-col flex-1" style="background: var(--bg-main)">
|
||||
<div class="flex-1 p-4 overflow-y-auto">
|
||||
<h3 id="currentTitle" class="text-xl font-semibold mb-2"
|
||||
style="color: var(--accent)">
|
||||
No folder selected
|
||||
</h3>
|
||||
<div class="border-t mb-4" style="border-color: var(--border)"></div>
|
||||
|
||||
<!-- Content-Area -->
|
||||
<div class="flex-1 p-4 overflow-y-auto content-area">
|
||||
<!-- Title -->
|
||||
<div id="folderTitleDrop"
|
||||
class="relative flex items-baseline space-x-1 cursor-pointer select-none group pb-2">
|
||||
<svg id="folderTitleArrow"
|
||||
class="h-4 w-6 flex-none transition-transform"
|
||||
viewBox="0 0 24 24">
|
||||
<path stroke="currentColor" stroke-width="2" fill="none"
|
||||
stroke-linecap="round" stroke-linejoin="round"
|
||||
d="M9 5l7 7-7 7"/>
|
||||
</svg>
|
||||
<span id="currentTitle" class="font-semibold text-xl truncate"></span>
|
||||
</div>
|
||||
<pre id="folderHierarchyDropdown"
|
||||
class="hidden text-sm font-mono select-text leading-snug mb-2 mt-1 max-h-80 overflow-auto"
|
||||
style="background: none; border: none; color: inherit; padding: 0;"></pre>
|
||||
|
||||
<div class="border-t mb-2" style="border-color: var(--border)"></div>
|
||||
|
||||
<!-- Content List -->
|
||||
<ul id="contentList" class="space-y-1"></ul>
|
||||
</div>
|
||||
|
||||
<div id="catSlot" class="absolute bottom-12 right-2"></div>
|
||||
<!-- Cat -->
|
||||
<!--<div id="cat-glow"></div>
|
||||
<img id="cat-sprite" src="assets/cat/default.png">-->
|
||||
<div id="catSlot" class="absolute bottom-2 left-2"></div>
|
||||
|
||||
<!-- Interaction Bar -->
|
||||
<div class="w-full h-16 flex items-center p-4"
|
||||
<div class="w-full h-16 flex items-center interaction-bar"
|
||||
style="background: var(--bg-sidebar); border-top: 1px solid var(--border)">
|
||||
<button id="commitBtn"
|
||||
<div class="flex flex-col justify-center ml-10 text-[var(--accent)] font-medium text-sm leading-tight h-full">
|
||||
<div><span id="commitsToday" class="font-medium commits-glow"></span> commits today</div>
|
||||
<div><span id="linesUntilRewrite" class="font-bold"></span> lines until rewrite</div>
|
||||
<div><span id="countdown" class="font-medium"></span> until rewrite</div>
|
||||
</div>
|
||||
<!--<button id="commitBtn"
|
||||
class="ml-auto px-4 py-2 border rounded font-semibold"
|
||||
style="background: var(--accent); color: #fff; border-color: var(--border)">
|
||||
Commit
|
||||
</button>
|
||||
</button>-->
|
||||
<button id="readmeBtn"
|
||||
class="ml-4 px-4 py-2 border rounded font-semibold"
|
||||
style="background: var(--accent); color: #fff; border-color: var(--border)">
|
||||
Generate README
|
||||
</button>
|
||||
<button id="pushBtn"
|
||||
class="ml-2 px-4 py-2 border rounded font-semibold"
|
||||
style="background: var(--accent); color: #fff; border-color: var(--border)">
|
||||
Push to Gitea
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<script src="renderer.js"></script>
|
||||
<script src="animeCat.js"></script>
|
||||
<script type="module">
|
||||
import { AnimeCat } from './animeCat.js';
|
||||
/*import { AnimeCat } from './animeCat.js';
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const slot = document.getElementById('catSlot');
|
||||
const cat = new AnimeCat(slot, {
|
||||
@@ -211,7 +309,7 @@
|
||||
cat.endSpeech();
|
||||
}
|
||||
simulateStream("Hi there! I'm your friendly assistant 👋");
|
||||
});
|
||||
});*/
|
||||
</script>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
10
package.json
@@ -10,7 +10,7 @@
|
||||
"dist": "electron-builder"
|
||||
},
|
||||
"build": {
|
||||
"appId": "com.deinname.auto-git",
|
||||
"appId": "com.victorgiers.auto-git",
|
||||
"productName": "Auto-Git",
|
||||
"files": [
|
||||
"**/*"
|
||||
@@ -31,11 +31,17 @@
|
||||
"dependencies": {
|
||||
"chokidar": "^4.0.3",
|
||||
"electron-store": "^8.2.0",
|
||||
"ignore": "^7.0.4",
|
||||
"micromatch": "^4.0.8",
|
||||
"node-fetch": "^3.3.2",
|
||||
"simple-git": "^3.20.0",
|
||||
"suncalc": "^1.9.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^10.4.21",
|
||||
"electron": "^25.0.0",
|
||||
"electron-builder": "^26.0.12"
|
||||
"electron-builder": "^26.0.12",
|
||||
"postcss": "^8.5.3",
|
||||
"tailwindcss": "^4.1.7"
|
||||
}
|
||||
}
|
||||
|
||||
68
preload.js
@@ -4,29 +4,65 @@ contextBridge.exposeInMainWorld('settingsAPI', {
|
||||
getSkyMode: () => ipcRenderer.invoke('get-skymode'),
|
||||
setSkyMode: val => ipcRenderer.invoke('set-skymode', val),
|
||||
getSkipPrompt: () => ipcRenderer.invoke('get-skip-git-prompt'),
|
||||
setSkipPrompt: val => ipcRenderer.invoke('set-skip-git-prompt', val)
|
||||
setSkipPrompt: val => ipcRenderer.invoke('set-skip-git-prompt', val),
|
||||
getIntelligentCommitThreshold: () => ipcRenderer.invoke('get-intelligent-commit-threshold'),
|
||||
setIntelligentCommitThreshold: value => ipcRenderer.invoke('set-intelligent-commit-threshold', value),
|
||||
getMinutesCommitThreshold: () => ipcRenderer.invoke('get-minutes-commit-threshold'),
|
||||
setMinutesCommitThreshold: value => ipcRenderer.invoke('set-minutes-commit-threshold', value),
|
||||
getCommitModel: () => ipcRenderer.invoke('get-commit-model'),
|
||||
setCommitModel: (model) => ipcRenderer.invoke('set-commit-model', model),
|
||||
getReadmeModel: () => ipcRenderer.invoke('get-readme-model'),
|
||||
setReadmeModel: (model) => ipcRenderer.invoke('set-readme-model', model),
|
||||
close: () => ipcRenderer.send('close-settings'),
|
||||
getAutostart: () => ipcRenderer.invoke('get-autostart'),
|
||||
setAutostart: val => ipcRenderer.invoke('set-autostart', val),
|
||||
getCloseToTray: () => ipcRenderer.invoke('get-close-to-tray'),
|
||||
setCloseToTray: val => ipcRenderer.invoke('set-close-to-tray', val),
|
||||
});
|
||||
|
||||
contextBridge.exposeInMainWorld('electronAPI', {
|
||||
getFolders: () => ipcRenderer.invoke('get-folders'),
|
||||
addFolder: () => ipcRenderer.invoke('add-folder'),
|
||||
removeFolder: folder => ipcRenderer.invoke('remove-folder', folder),
|
||||
removeFolder: folderObj=> ipcRenderer.invoke('remove-folder', folderObj),
|
||||
getSelected: () => ipcRenderer.invoke('get-selected'),
|
||||
setSelected: folder => ipcRenderer.invoke('set-selected', folder),
|
||||
listFolder: folder => ipcRenderer.invoke('list-folder', folder),
|
||||
getCommits: folder => ipcRenderer.invoke('get-commits', folder),
|
||||
diffCommit: (folder, hash) => ipcRenderer.invoke('diff-commit', folder, hash),
|
||||
revertCommit: (folder, hash) => ipcRenderer.invoke('revert-commit', folder, hash),
|
||||
snapshotCommit: (folder, hash) => ipcRenderer.invoke('snapshot-commit', folder, hash),
|
||||
checkoutCommit: (folder, hash) => ipcRenderer.invoke('checkout-commit', folder, hash),
|
||||
getCommitCount: folder => ipcRenderer.invoke('get-commit-count', folder),
|
||||
hasDiffs: folder => ipcRenderer.invoke('has-diffs', folder),
|
||||
removeGitFolder: folder => ipcRenderer.invoke('remove-git-folder', folder),
|
||||
getSkipPrompt: () => ipcRenderer.invoke('get-skip-git-prompt'),
|
||||
setSkipPrompt: val => ipcRenderer.invoke('set-skip-git-prompt', val),
|
||||
showFolderContextMenu: folderPath => ipcRenderer.send('show-folder-context-menu', folderPath),
|
||||
commitCurrentFolder: (folder, message) => ipcRenderer.invoke('commit-current-folder', folder, message),
|
||||
setSelected: folderObj=> ipcRenderer.invoke('set-selected', folderObj),
|
||||
getCommits: (folderObj, page, pageSize) => ipcRenderer.invoke('get-commits', folderObj, page, pageSize),
|
||||
getAllCommitHashes: (folderObj) => ipcRenderer.invoke('get-all-commit-hashes', folderObj),
|
||||
diffCommit: (folderObj, hash) => ipcRenderer.invoke('diff-commit', folderObj, hash),
|
||||
revertCommit: (folderObj, hash) => ipcRenderer.invoke('revert-commit', folderObj, hash),
|
||||
snapshotCommit: (folderObj, hash) => ipcRenderer.invoke('snapshot-commit', folderObj, hash),
|
||||
checkoutCommit: (folderObj, hash) => ipcRenderer.invoke('checkout-commit', folderObj, hash),
|
||||
getCommitCount: folderObj=> ipcRenderer.invoke('get-commit-count', folderObj),
|
||||
hasDiffs: folderObj=> ipcRenderer.invoke('has-diffs', folderObj),
|
||||
removeGitFolder:folderObj=> ipcRenderer.invoke('remove-git-folder', folderObj),
|
||||
commitCurrentFolder: (folderObj, message) => ipcRenderer.invoke('commit-current-folder', folderObj, message),
|
||||
showFolderContextMenu: folderPath => ipcRenderer.send('show-folder-context-menu', folderPath),
|
||||
setMonitoring: (folderObj, monitoring) => ipcRenderer.invoke('set-monitoring', folderObj.path, monitoring),
|
||||
getFolderTree: (folderPath) => ipcRenderer.invoke('get-folder-tree', folderPath),
|
||||
showTreeContextMenu: (info) => ipcRenderer.send('show-tree-context-menu', info),
|
||||
getSelectedSync: () => ipcRenderer.sendSync('get-selected-sync'),
|
||||
getIntelligentCommitThreshold: () => ipcRenderer.invoke('get-intelligent-commit-threshold'),
|
||||
setIntelligentCommitThreshold: value => ipcRenderer.invoke('set-minutes-commit-threshold', value),
|
||||
getMinutesCommitThreshold: () => ipcRenderer.invoke('get-minutes-commit-threshold'),
|
||||
setMinutesCommitThreshold: value => ipcRenderer.invoke('set-intelligent-commit-threshold', value),
|
||||
ollamaList: () => ipcRenderer.invoke('ollama-list'),
|
||||
ollamaPull: (model) => ipcRenderer.invoke('ollama-pull', model),
|
||||
onTrayToggleMonitoring: (callback) => ipcRenderer.on('tray-toggle-monitoring', callback),
|
||||
onTrayRemoveFolder: (callback) => ipcRenderer.on('tray-remove-folder', callback),
|
||||
onTrayAddFolder: (callback) => ipcRenderer.on('tray-add-folder', callback),
|
||||
onFoldersLocationUpdated: (callback) => ipcRenderer.on('folders-location-updated', (e, folderObj) => callback(folderObj)),
|
||||
isGitRepo: (path) => ipcRenderer.invoke('is-git-repo', path),
|
||||
relocateFolder: (oldPath, newPath) => ipcRenderer.invoke('relocate-folder', oldPath, newPath),
|
||||
pickFolder: () => ipcRenderer.invoke('pick-folder'),
|
||||
repoHasCommit: (repoPath, commitHash) => ipcRenderer.invoke('repo-has-commit', repoPath, commitHash),
|
||||
addFolderByPath: (folderPath) => ipcRenderer.invoke('add-folder-by-path', folderPath),
|
||||
onCatBegin: (cb) => ipcRenderer.on('cat-begin', cb),
|
||||
onCatChunk: (cb) => ipcRenderer.on('cat-chunk', cb),
|
||||
onCatEnd: (cb) => ipcRenderer.on('cat-end', cb),
|
||||
getDailyCommitStats: () => ipcRenderer.invoke('get-daily-commit-stats'),
|
||||
hasReadme: (folderPath) => ipcRenderer.invoke('has-readme', folderPath),
|
||||
generateReadme: (folderPath) => ipcRenderer.invoke('generate-readme', folderPath),
|
||||
pushToGitea: (folderPath) => ipcRenderer.invoke('push-to-gitea', folderPath),
|
||||
});
|
||||
|
||||
ipcRenderer.on('repo-updated', (_e, folder) => {
|
||||
|
||||
850
renderer.js
@@ -1,25 +1,103 @@
|
||||
// renderer.js
|
||||
|
||||
window.addEventListener('DOMContentLoaded', async () => {
|
||||
// Elemente holen
|
||||
const folderList = document.getElementById('folderList');
|
||||
const addBtn = document.getElementById('addFolderBtn');
|
||||
const titleEl = document.getElementById('currentTitle');
|
||||
const treeviewEl = document.getElementById('folderHierarchyDropdown');
|
||||
const titleArrow = document.getElementById('folderTitleArrow');
|
||||
const contentList = document.getElementById('contentList');
|
||||
const readmeBtn = document.getElementById('readmeBtn');
|
||||
const pushBtn = document.getElementById('pushBtn');
|
||||
const panel = document.querySelector('.flex-1.p-4.overflow-y-auto');
|
||||
const PAGE_SIZE = 50;
|
||||
|
||||
const paginationEl = document.createElement('div');
|
||||
paginationEl.className = 'pagination flex justify-center items-center my-2 space-x-2';
|
||||
contentList.parentElement.insertBefore(paginationEl, contentList);
|
||||
|
||||
let lastFolderPath = null;
|
||||
let lastPage = null;
|
||||
|
||||
const slot = document.getElementById('catSlot');
|
||||
window.cat = new window.AnimeCat(slot, {
|
||||
images: {
|
||||
default: 'assets/cat/default.png',
|
||||
eyesClosed: 'assets/cat/eyes_closed.png',
|
||||
blink: 'assets/cat/blink.png',
|
||||
mouthOpen: 'assets/cat/mouth_open.png',
|
||||
joy: 'assets/cat/joy.png',
|
||||
mischievous: 'assets/cat/mischievous.png'
|
||||
}
|
||||
});
|
||||
|
||||
// Readme-Button nur einmal binden
|
||||
readmeBtn.addEventListener('click', async () => {
|
||||
const selected = await window.electronAPI.getSelected();
|
||||
if (!selected) return alert('No folder selected!');
|
||||
readmeBtn.disabled = true;
|
||||
readmeBtn.textContent = 'Generating...';
|
||||
try {
|
||||
const output = await window.electronAPI.generateReadme(selected.path);
|
||||
alert('README.md was generated!\n\n' + output.slice(0, 500) + '…');
|
||||
} catch (e) {
|
||||
alert('Error generating README:\n' + (e.message || e));
|
||||
}
|
||||
readmeBtn.disabled = false;
|
||||
const hasReadme = await window.electronAPI.hasReadme(selected.path);
|
||||
readmeBtn.textContent = hasReadme ? 'Update README' : 'Generate README';
|
||||
});
|
||||
|
||||
pushBtn.addEventListener('click', async () => {
|
||||
const selected = await window.electronAPI.getSelected();
|
||||
if (!selected || !selected.path) {
|
||||
return alert('No folder selected to push!');
|
||||
}
|
||||
|
||||
pushBtn.disabled = true;
|
||||
pushBtn.textContent = 'Pushing…';
|
||||
|
||||
try {
|
||||
// send the folder‐path to main via a new IPC channel 'push-to-gitea'
|
||||
const result = await window.electronAPI.pushToGitea(selected.path);
|
||||
if (result.success) {
|
||||
alert('✔ Pushed successfully to Gitea: ' + result.repoUrl);
|
||||
} else {
|
||||
alert('❌ Push failed:\n' + result.error);
|
||||
}
|
||||
} catch (err) {
|
||||
alert('❌ Unexpected error:\n' + (err.message || err));
|
||||
} finally {
|
||||
pushBtn.disabled = false;
|
||||
pushBtn.textContent = 'Push to Gitea';
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Drag and Drop
|
||||
document.body.addEventListener('dragover', e => {
|
||||
e.preventDefault();
|
||||
e.dataTransfer.dropEffect = 'copy';
|
||||
});
|
||||
document.body.addEventListener('drop', async e => {
|
||||
e.preventDefault();
|
||||
const files = [...e.dataTransfer.files];
|
||||
if (!files.length) return;
|
||||
for (let f of files) {
|
||||
if (f.type === "") {
|
||||
await window.electronAPI.addFolderByPath(f.path);
|
||||
await renderSidebar();
|
||||
const sel = await window.electronAPI.getSelected();
|
||||
if (sel) await renderContent(sel);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 1) Baby-Blau und Nacht-Blau als RGB-Arrays
|
||||
// Sky-Mode Setup
|
||||
const DAY_COLOR = [173, 216, 230];
|
||||
const NIGHT_COLOR = [0, 0, 50];
|
||||
|
||||
// 2) Linearer Interpolator
|
||||
function lerpColor(c1, c2, t) {
|
||||
return c1.map((v, i) => Math.round(v + t * (c2[i] - v)));
|
||||
}
|
||||
|
||||
// 3) Entscheider für den Zeit-Factor
|
||||
function getTimeFactor() {
|
||||
const now = new Date();
|
||||
const md = now.getHours() * 60 + now.getMinutes();
|
||||
@@ -29,245 +107,486 @@ window.addEventListener('DOMContentLoaded', async () => {
|
||||
if (md < 20 * 60) return 1 - ((md - 16*60) / (4*60));
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 4) setzt die Hintergrundfarbe
|
||||
function updateBackground() {
|
||||
const factor = getTimeFactor();
|
||||
const [r,g,b] = lerpColor(NIGHT_COLOR, DAY_COLOR, factor);
|
||||
panel.style.backgroundColor = `rgb(${r}, ${g}, ${b})`;
|
||||
}
|
||||
|
||||
// 5) applySkyMode-Funktion
|
||||
let skyIntervalId, titleIntervalId;
|
||||
function applySkyMode(enabled) {
|
||||
document.body.classList.toggle('sky-mode', enabled);
|
||||
|
||||
// alte Intervalle löschen
|
||||
clearInterval(skyIntervalId);
|
||||
clearInterval(titleIntervalId);
|
||||
|
||||
if (enabled) {
|
||||
// Hintergrund updaten
|
||||
updateBackground();
|
||||
skyIntervalId = setInterval(updateBackground, 60_000);
|
||||
|
||||
// Titel-Farbe je nach Uhrzeit
|
||||
function updateTitleColor() {
|
||||
const hour = new Date().getHours();
|
||||
if (hour >= 18 || hour < 6) {
|
||||
titleEl.style.color = '#fff';
|
||||
} else {
|
||||
titleEl.style.color = '';
|
||||
}
|
||||
}
|
||||
updateTitleColor();
|
||||
titleIntervalId = setInterval(updateTitleColor, 60_000);
|
||||
function updateAllTextColors() { setTextColor('sky'); }
|
||||
updateAllTextColors();
|
||||
titleIntervalId = setInterval(updateAllTextColors, 60_000);
|
||||
} else {
|
||||
// Sky-Mode aus → zurücksetzen
|
||||
panel.style.backgroundColor = '';
|
||||
titleEl.style.color = '';
|
||||
setTextColor('default');
|
||||
}
|
||||
}
|
||||
|
||||
// 6) initial anwenden und auf Event lauschen
|
||||
const initialSky = await window.settingsAPI.getSkyMode();
|
||||
applySkyMode(initialSky);
|
||||
window.addEventListener('skymode-changed', e => applySkyMode(e.detail));
|
||||
|
||||
// … restliches Rendering wie gehabt …
|
||||
function setTextColor(mode) {
|
||||
let textColor = '#111';
|
||||
if (mode === 'sky') {
|
||||
const hour = new Date().getHours();
|
||||
textColor = (hour >= 18 || hour < 6) ? '#fff' : '#111';
|
||||
}
|
||||
titleEl.style.color = textColor;
|
||||
treeviewEl.style.color = textColor;
|
||||
titleArrow.style.color = textColor;
|
||||
paginationEl.style.color = textColor;
|
||||
if (treeviewEl.querySelectorAll) {
|
||||
treeviewEl.querySelectorAll('.tree-file, .tree-dir').forEach(el => el.style.color = textColor);
|
||||
}
|
||||
}
|
||||
|
||||
function basename(fullPath) {
|
||||
return fullPath.replace(/.*[\\/]/, '');
|
||||
}
|
||||
async function getFolderObjByPath(path) {
|
||||
const folders = await window.electronAPI.getFolders();
|
||||
return folders.find(f => f.path === path) || null;
|
||||
}
|
||||
|
||||
async function renderSidebar() {
|
||||
const folders = await window.electronAPI.getFolders();
|
||||
const selected = await window.electronAPI.getSelected();
|
||||
folderList.innerHTML = '';
|
||||
async function renderSidebar() {
|
||||
const folders = await window.electronAPI.getFolders();
|
||||
const selected = await window.electronAPI.getSelected();
|
||||
folderList.innerHTML = '';
|
||||
|
||||
folders.forEach(folder => {
|
||||
// 1) li anlegen, selected-Klasse statt bg-[#fecdd3]
|
||||
const li = document.createElement('li');
|
||||
li.className = [
|
||||
'flex items-center justify-between px-3 py-2 rounded cursor-pointer',
|
||||
folder === selected ? 'selected' : ''
|
||||
].join(' ');
|
||||
for (const folderObj of folders) {
|
||||
const folder = folderObj.path;
|
||||
const isMonitoring = folderObj.monitoring;
|
||||
const li = document.createElement('li');
|
||||
li.setAttribute('data-folder-id', encodeURIComponent(folder));
|
||||
li.className = [
|
||||
'flex items-center justify-between px-3 py-2 rounded cursor-pointer',
|
||||
selected && folder === selected.path ? 'selected' : '',
|
||||
folderObj.needsRelocation ? 'needs-relocation' : ''
|
||||
].join(' ');
|
||||
|
||||
// 2) inneres Markup, ohne Hard-Coded-Farben
|
||||
li.innerHTML = `
|
||||
<div class="flex items-center space-x-2 overflow-hidden">
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
class="h-5 w-5 flex-shrink-0"
|
||||
fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M3 7a2 2 0 012-2h4l2 2h6a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V7"/>
|
||||
</svg>
|
||||
<span class="truncate text-sm font-medium">${basename(folder)}</span>
|
||||
</div>
|
||||
<button class="remove-btn">
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
class="h-5 w-5"
|
||||
fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M6 18L18 6M6 6l12 12"/>
|
||||
</svg>
|
||||
</button>
|
||||
`;
|
||||
li.innerHTML = `
|
||||
<div class="flex items-center space-x-2 overflow-hidden">
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
class="h-5 w-5 flex-shrink-0"
|
||||
fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M3 7a2 2 0 012-2h4l2 2h6a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V7"/>
|
||||
</svg>
|
||||
<span class="truncate text-sm font-medium">${basename(folder)}</span>
|
||||
</div>
|
||||
<div class="flex items-center space-x-2">
|
||||
${
|
||||
folderObj.needsRelocation
|
||||
? `<span class="relocation-warning-symbol" title="Ordner fehlt / verschoben">!</span>`
|
||||
: ''
|
||||
}
|
||||
<button class="pause-play-btn p-1 rounded${folderObj.needsRelocation ? ' disabled' : ''}"
|
||||
title="${isMonitoring ? 'Monitoring pausieren' : 'Monitoring starten'}"
|
||||
${folderObj.needsRelocation ? 'disabled' : ''}>
|
||||
${isMonitoring
|
||||
? `<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<rect x="6" y="5" width="4" height="14" rx="1" fill="currentColor"/>
|
||||
<rect x="14" y="5" width="4" height="14" rx="1" fill="currentColor"/>
|
||||
</svg>`
|
||||
: `<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<polygon points="7,5 19,12 7,19" fill="currentColor"/>
|
||||
</svg>`
|
||||
}
|
||||
</button>
|
||||
<button class="remove-btn p-1 rounded" title="Ordner entfernen">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M6 18L18 6M6 6l12 12"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
`;
|
||||
|
||||
// rechter Mausklick in der Sidebar
|
||||
li.addEventListener('contextmenu', e => {
|
||||
e.preventDefault();
|
||||
window.electronAPI.showFolderContextMenu(folder);
|
||||
});
|
||||
// Folder-Klick (inkl. Relocation-Logik)
|
||||
li.addEventListener('click', async e => {
|
||||
if (e.target.closest('.pause-play-btn, .remove-btn')) return;
|
||||
|
||||
// 3) Klick auf li (Select)
|
||||
li.addEventListener('click', async e => {
|
||||
if (e.target.closest('.remove-btn')) return;
|
||||
await window.electronAPI.setSelected(folder);
|
||||
await renderSidebar();
|
||||
await renderContent(folder);
|
||||
});
|
||||
if (folderObj.needsRelocation) {
|
||||
const paths = await window.electronAPI.pickFolder();
|
||||
const newPath = paths && paths[0];
|
||||
if (!newPath) return;
|
||||
|
||||
// 4) Remove-Button
|
||||
li.querySelector('.remove-btn').addEventListener('click', async e => {
|
||||
e.stopPropagation();
|
||||
|
||||
// Commit-Count / Diffs / SkipPrompt-Logik wie gehabt
|
||||
const count = await window.electronAPI.getCommitCount(folder);
|
||||
const hasUnstaged= await window.electronAPI.hasDiffs(folder);
|
||||
const skipPrompt = await window.settingsAPI.getSkipPrompt();
|
||||
|
||||
if (count === 1 && !hasUnstaged) {
|
||||
if (skipPrompt) {
|
||||
await window.electronAPI.removeGitFolder(folder);
|
||||
} else {
|
||||
const ok = confirm(
|
||||
'Dieser Ordner hat nur einen Initial-Commit und keine Änderungen.\n' +
|
||||
'Möchtest du das gesamte Git-Repository (den .git-Ordner) löschen?'
|
||||
);
|
||||
if (ok) {
|
||||
await window.electronAPI.removeGitFolder(folder);
|
||||
} else {
|
||||
const isGit = await window.electronAPI.isGitRepo(newPath);
|
||||
if (!isGit) {
|
||||
alert('Das ist kein gültiges Git-Repository.');
|
||||
return;
|
||||
}
|
||||
|
||||
const lastKnownHash = folderObj.lastHeadHash;
|
||||
if (!lastKnownHash) {
|
||||
alert('Kein gespeicherter Hash – Vergleich nicht möglich.');
|
||||
return;
|
||||
}
|
||||
const isMatch = await window.electronAPI.repoHasCommit(newPath, lastKnownHash);
|
||||
if (!isMatch) {
|
||||
alert('Das ist nicht das ursprüngliche Repo (Commit-Hash fehlt).');
|
||||
return;
|
||||
}
|
||||
|
||||
await window.electronAPI.relocateFolder(folderObj.path, newPath);
|
||||
await renderSidebar();
|
||||
|
||||
const newFolderObj = (await window.electronAPI.getFolders())
|
||||
.find(f => f.path === newPath);
|
||||
if (newFolderObj) {
|
||||
await window.electronAPI.setSelected(newFolderObj);
|
||||
await renderContent(newFolderObj);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 5) aus Sidebar/Store entfernen
|
||||
await window.electronAPI.removeFolder(folder);
|
||||
await renderSidebar();
|
||||
|
||||
// 6) neue Selektion
|
||||
const all = await window.electronAPI.getFolders();
|
||||
if (all.length === 0) {
|
||||
titleEl.textContent = 'No folder selected';
|
||||
contentList.innerHTML = '';
|
||||
} else {
|
||||
// entfernten Index vorher merken, dann neuen auswählen
|
||||
const idxOld = folders.indexOf(folder);
|
||||
let idxNew = Math.max(0, idxOld - 1);
|
||||
const pick = all[idxNew];
|
||||
await window.electronAPI.setSelected(pick);
|
||||
await window.electronAPI.setSelected(folderObj);
|
||||
await renderSidebar();
|
||||
await renderContent(pick);
|
||||
await renderContent(folderObj);
|
||||
});
|
||||
|
||||
// Monitoring-Button
|
||||
const pauseBtn = li.querySelector('.pause-play-btn');
|
||||
pauseBtn.addEventListener('click', async e => {
|
||||
e.stopPropagation();
|
||||
await window.electronAPI.setMonitoring(folderObj, !isMonitoring);
|
||||
await renderSidebar();
|
||||
});
|
||||
|
||||
// Remove-Button
|
||||
const removeBtn = li.querySelector('.remove-btn');
|
||||
removeBtn.addEventListener('click', async e => {
|
||||
e.stopPropagation();
|
||||
const count = await window.electronAPI.getCommitCount(folderObj);
|
||||
const hasUnstaged= await window.electronAPI.hasDiffs(folderObj);
|
||||
const skipPrompt = await window.settingsAPI.getSkipPrompt();
|
||||
|
||||
if (count === 1 && !hasUnstaged) {
|
||||
if (skipPrompt) {
|
||||
await window.electronAPI.removeGitFolder(folderObj);
|
||||
} else {
|
||||
const ok = confirm(
|
||||
'Dieser Ordner hat nur einen Initial-Commit und keine Änderungen.\n' +
|
||||
'Möchtest du das gesamte Git-Repository (den .git-Ordner) löschen?'
|
||||
);
|
||||
if (ok) {
|
||||
await window.electronAPI.removeGitFolder(folderObj);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await window.electronAPI.removeFolder(folderObj);
|
||||
await renderSidebar();
|
||||
|
||||
const all = await window.electronAPI.getFolders();
|
||||
if (all.length === 0) {
|
||||
titleEl.textContent = 'No folder selected';
|
||||
contentList.innerHTML = '';
|
||||
} else {
|
||||
const idxOld = folders.findIndex(f => f.path === folderObj.path);
|
||||
let idxNew = Math.max(0, idxOld - 1);
|
||||
const pick = all[idxNew];
|
||||
await window.electronAPI.setSelected(pick);
|
||||
await renderSidebar();
|
||||
await renderContent(pick);
|
||||
}
|
||||
});
|
||||
|
||||
// Kontextmenü
|
||||
li.addEventListener('contextmenu', e => {
|
||||
e.preventDefault();
|
||||
window.electronAPI.showFolderContextMenu(folderObj.path);
|
||||
});
|
||||
|
||||
folderList.appendChild(li);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let countdownInterval = null;
|
||||
function getCommitColor(commitCount) {
|
||||
const stops = [
|
||||
{ c: 0, color: [157, 157, 157] },
|
||||
{ c: 5, color: [255, 255, 255] },
|
||||
{ c: 15, color: [30, 255, 0] },
|
||||
{ c: 50, color: [0, 112, 221] },
|
||||
{ c: 100, color: [163, 53, 238] },
|
||||
{ c: 500, color: [255, 128, 0] }
|
||||
];
|
||||
function lerp(a, b, t) { return a + (b - a) * t; }
|
||||
function lerpColor(a, b, t) {
|
||||
return [
|
||||
Math.round(lerp(a[0], b[0], t)),
|
||||
Math.round(lerp(a[1], b[1], t)),
|
||||
Math.round(lerp(a[2], b[2], t))
|
||||
];
|
||||
}
|
||||
let lower = stops[0], upper = stops[stops.length-1];
|
||||
for (let i = 0; i < stops.length - 1; ++i) {
|
||||
if (commitCount >= stops[i].c && commitCount < stops[i+1].c) {
|
||||
lower = stops[i]; upper = stops[i+1]; break;
|
||||
}
|
||||
}
|
||||
const range = upper.c - lower.c || 1;
|
||||
const t = Math.min(Math.max((commitCount - lower.c) / range, 0), 1);
|
||||
return lerpColor(lower.color, upper.color, t);
|
||||
}
|
||||
|
||||
function formatCountdown(ms) {
|
||||
if (!ms || ms <= 0) return '00:00';
|
||||
const s = Math.floor(ms / 1000);
|
||||
const m = Math.floor(s / 60).toString().padStart(2, '0');
|
||||
const sec = (s % 60).toString().padStart(2, '0');
|
||||
return `${m}:${sec}`;
|
||||
}
|
||||
|
||||
async function updateInteractionBar(folderObj) {
|
||||
const stats = await window.electronAPI.getDailyCommitStats();
|
||||
const today = new Date().toISOString().slice(0, 10);
|
||||
const commitsToday = stats[today] || 0;
|
||||
|
||||
const intelligentCommitThreshold = await window.electronAPI.getIntelligentCommitThreshold?.() || 20;
|
||||
const minutesCommitThreshold = await window.electronAPI.getMinutesCommitThreshold?.() || 5;
|
||||
|
||||
const linesChanged = folderObj?.linesChanged || 0;
|
||||
const linesUntilRewrite = Math.max(0, intelligentCommitThreshold - linesChanged);
|
||||
|
||||
let countdown = "00:00";
|
||||
let msLeft = 0;
|
||||
if (folderObj?.firstCandidateBirthday) {
|
||||
const msThreshold = minutesCommitThreshold * 60 * 1000;
|
||||
const endTime = new Date(folderObj.firstCandidateBirthday).getTime() + msThreshold;
|
||||
msLeft = Math.max(0, endTime - Date.now());
|
||||
countdown = formatCountdown(msLeft);
|
||||
}
|
||||
|
||||
const [r, g, b] = getCommitColor(commitsToday);
|
||||
document.getElementById('commitsToday').textContent = commitsToday;
|
||||
document.getElementById('commitsToday').style.color = `rgb(${r},${g},${b})`;
|
||||
document.getElementById('linesUntilRewrite').textContent = linesUntilRewrite;
|
||||
document.getElementById('countdown').textContent = countdown;
|
||||
|
||||
startLiveCountdown(folderObj, msLeft);
|
||||
}
|
||||
|
||||
async function startLiveCountdown(folderObj, msLeft) {
|
||||
if (countdownInterval) clearInterval(countdownInterval);
|
||||
|
||||
if (!folderObj?.firstCandidateBirthday || msLeft <= 0) {
|
||||
document.getElementById('countdown').textContent = "00:00";
|
||||
return;
|
||||
}
|
||||
|
||||
const minutesCommitThreshold = await window.electronAPI.getMinutesCommitThreshold?.() || 5;
|
||||
const msThreshold = minutesCommitThreshold * 60 * 1000;
|
||||
const endTime = new Date(folderObj.firstCandidateBirthday).getTime() + msThreshold;
|
||||
|
||||
countdownInterval = setInterval(() => {
|
||||
const msL = Math.max(0, endTime - Date.now());
|
||||
document.getElementById('countdown').textContent = formatCountdown(msL);
|
||||
if (msL <= 0) clearInterval(countdownInterval);
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
|
||||
const folderTitleDrop = document.getElementById('folderTitleDrop');
|
||||
const folderTitleArrow = document.getElementById('folderTitleArrow');
|
||||
const folderHierarchyDropdown = document.getElementById('folderHierarchyDropdown');
|
||||
let isDropdownOpen = false;
|
||||
|
||||
folderTitleDrop.addEventListener('click', async () => {
|
||||
if (isDropdownOpen) { closeDropdown(); return; }
|
||||
const selected = await window.electronAPI.getSelected();
|
||||
if (!selected || !selected.path) return;
|
||||
|
||||
folderHierarchyDropdown.textContent = 'Lade Verzeichnis…';
|
||||
folderHierarchyDropdown.classList.remove('hidden');
|
||||
folderTitleArrow.classList.add('open');
|
||||
isDropdownOpen = true;
|
||||
|
||||
const tree = await window.electronAPI.getFolderTree(selected.path);
|
||||
folderHierarchyDropdown.innerHTML = renderFolderTreeAscii(tree, '.', '');
|
||||
setTextColor(document.body.classList.contains('sky-mode') ? 'sky' : 'default');
|
||||
});
|
||||
|
||||
folderHierarchyDropdown.addEventListener('contextmenu', function(e) {
|
||||
const el = e.target.closest('.tree-file, .tree-dir');
|
||||
if (!el) return;
|
||||
e.preventDefault();
|
||||
const relPath = el.getAttribute('data-path');
|
||||
const type = el.getAttribute('data-type');
|
||||
const selected = window.electronAPI.getSelectedSync?.() || (window.currentSelectedFolderObj || {});
|
||||
const absPath = selected.path + '/' + relPath;
|
||||
window.electronAPI.showTreeContextMenu({ absPath, relPath, root: selected.path, type });
|
||||
});
|
||||
|
||||
function closeDropdown() {
|
||||
folderHierarchyDropdown.classList.add('hidden');
|
||||
folderTitleArrow.classList.remove('open');
|
||||
isDropdownOpen = false;
|
||||
}
|
||||
|
||||
function renderFolderTreeAscii(tree, prefix = '', indent = '', relPath = '.') {
|
||||
if (!Array.isArray(tree)) return '';
|
||||
let result = '';
|
||||
const lastIdx = tree.length - 1;
|
||||
tree.forEach((node, i) => {
|
||||
const isLast = i === lastIdx;
|
||||
const pointer = isLast ? '└── ' : '├── ';
|
||||
const thisRelPath = relPath === '.' ? node.name : relPath + '/' + node.name;
|
||||
if (node.type === 'dir') {
|
||||
result += `<span class="tree-dir" data-path="${thisRelPath}" data-type="dir">${indent}${pointer}${node.name}/</span>\n`;
|
||||
const newIndent = indent + (isLast ? ' ' : '│ ');
|
||||
result += renderFolderTreeAscii(node.children, '', newIndent, thisRelPath);
|
||||
} else {
|
||||
result += `<span class="tree-file" data-path="${thisRelPath}" data-type="file">${indent}${pointer}${node.name}</span>\n`;
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
folderList.appendChild(li);
|
||||
});
|
||||
}
|
||||
async function getCommitPageForHash(folderObj, hash, pageSize = PAGE_SIZE) {
|
||||
const { commits } = await window.electronAPI.getCommits(folderObj, 1, 100000);
|
||||
const idx = commits.findIndex(c => c.hash === hash || hash.startsWith(c.hash));
|
||||
if (idx === -1) return 1;
|
||||
return Math.floor(idx / pageSize) + 1;
|
||||
}
|
||||
|
||||
async function renderContent(folder) {
|
||||
const currentFolder = folder;
|
||||
async function renderContent(folderObj, page) {
|
||||
closeDropdown();
|
||||
const folder = folderObj.path;
|
||||
await updateInteractionBar(folderObj);
|
||||
titleEl.textContent = folder;
|
||||
const { head, commits } = await window.electronAPI.getCommits(folder);
|
||||
setTextColor(document.body.classList.contains('sky-mode') ? 'sky' : 'default');
|
||||
|
||||
// Jetzt erst den Readme-Button-Text aktualisieren:
|
||||
const hasReadme = await window.electronAPI.hasReadme(folder);
|
||||
readmeBtn.textContent = hasReadme ? 'Update README' : 'Generate README';
|
||||
|
||||
contentList.innerHTML = commits.map(c => `
|
||||
<li class="w-full p-3 mb-2 bg-white border border-gray-200 rounded shadow-sm
|
||||
${c.hash === head ? 'current-commit' : ''}">
|
||||
<div class="flex justify-between text-sm text-gray-600 mb-1">
|
||||
<span>${c.hash}</span>
|
||||
<span>${new Date(c.date).toLocaleString()}</span>
|
||||
</div>
|
||||
<div class="text-gray-800 mb-2">${c.message}</div>
|
||||
<div class="flex space-x-2 mb-2">
|
||||
<!-- Changes-Button -->
|
||||
<button class="diff-btn flex items-center px-2 py-1 text-xs border rounded hover:bg-gray-100" data-hash="${c.hash}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-1 rotate" viewBox="0 0 24 24"
|
||||
stroke="currentColor" fill="none">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M9 5l7 7-7 7"/>
|
||||
</svg>
|
||||
Changes
|
||||
</button>
|
||||
<!-- Snapshot-Button -->
|
||||
<button class="snapshot-btn flex items-center px-2 py-1 text-xs border rounded hover:bg-gray-100" data-hash="${c.hash}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-1" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0l-4 4m4-4v12"/>
|
||||
</svg>
|
||||
Snapshot
|
||||
</button>
|
||||
<!-- Checkout-Button -->
|
||||
<button
|
||||
class="checkout-btn flex items-center px-2 py-1 text-xs border rounded ${c.hash === head ? 'disabled' : 'hover:bg-gray-100'}"
|
||||
data-hash="${c.hash}"
|
||||
${c.hash === head ? 'disabled' : ''}
|
||||
>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-1" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M15 12H3m12 0l-4-4m4 4l-4 4"/>
|
||||
</svg>
|
||||
Jump Here
|
||||
</button>
|
||||
<!-- Revert-Button -->
|
||||
<!--<button class="revert-btn flex items-center px-2 py-1 text-xs border rounded hover:bg-gray-100" data-hash="${c.hash}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-1" fill="none"
|
||||
viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M15 12H3m12 0l-4-4m4 4l-4 4"/>
|
||||
</svg>
|
||||
Revert
|
||||
</button>-->
|
||||
</div>
|
||||
<div class="diff-container relative">
|
||||
<!-- copy-Button oben rechts -->
|
||||
<button class="copy-diff-btn absolute top-1 right-1 p-1 border rounded hover:bg-gray-100 flex items-center justify-center">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<!-- Copy-Icon: -->
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h6a2 2 0 012 2v2m0 4h2a2 2 0 002-2v-6a2 2 0 00-2-2h-6a2 2 0 00-2 2v2" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M16 16h2a2 2 0 002-2v-2m0 0V8a2 2 0 00-2-2h-2m0 4v6m0 0H8m8 0h2" />
|
||||
</svg>
|
||||
</button>
|
||||
<pre class="m-0"></pre>
|
||||
</div>
|
||||
</li>
|
||||
`).join('');
|
||||
let usePage = page;
|
||||
if (!usePage || folder !== lastFolderPath) {
|
||||
const { head } = await window.electronAPI.getCommits(folderObj, 1, 1);
|
||||
usePage = await getCommitPageForHash(folderObj, head, PAGE_SIZE);
|
||||
}
|
||||
lastFolderPath = folder;
|
||||
lastPage = usePage;
|
||||
|
||||
// Erst mal alle Diff-Buttons prüfen und ggf. deaktivieren
|
||||
const { head, commits, total, page: currentPage, pageSize, pages } =
|
||||
await window.electronAPI.getCommits(folderObj, usePage, PAGE_SIZE);
|
||||
|
||||
if (!commits || !commits.length) {
|
||||
contentList.innerHTML = '<div class="p-6 text-gray-500">No commits found.</div>';
|
||||
paginationEl.innerHTML = '';
|
||||
return;
|
||||
}
|
||||
|
||||
contentList.innerHTML = commits.map(c => {
|
||||
const isQueued = folderObj.llmCandidates && folderObj.llmCandidates.some(fullHash =>
|
||||
fullHash.startsWith(c.hash)
|
||||
);
|
||||
return `
|
||||
<li style="position:relative;" class="w-full p-3 mb-2 bg-white border border-gray-200 rounded shadow-sm
|
||||
${c.hash === head ? 'current-commit' : ''}">
|
||||
<div class="flex justify-between text-sm text-gray-600 mb-1">
|
||||
<span>${c.hash}</span>
|
||||
<span>${new Date(c.date).toLocaleString()}</span>
|
||||
</div>
|
||||
<div class="text-gray-800 mb-2">${c.message}</div>
|
||||
<div class="flex space-x-2 mb-2">
|
||||
<button class="diff-btn flex items-center px-2 py-1 text-xs border rounded hover:bg-gray-100" data-hash="${c.hash}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-1 rotate" viewBox="0 0 24 24"
|
||||
stroke="currentColor" fill="none">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M9 5l7 7-7 7"/>
|
||||
</svg>
|
||||
Changes
|
||||
</button>
|
||||
<button class="snapshot-btn flex items-center px-2 py-1 text-xs border rounded hover:bg-gray-100" data-hash="${c.hash}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-1" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0l-4 4m4-4v12"/>
|
||||
</svg>
|
||||
Snapshot
|
||||
</button>
|
||||
<button
|
||||
class="checkout-btn flex items-center px-2 py-1 text-xs border rounded ${c.hash === head ? 'disabled' : 'hover:bg-gray-100'}"
|
||||
data-hash="${c.hash}"
|
||||
${c.hash === head ? 'disabled' : ''}>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-1" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M15 12H3m12 0l-4-4m4 4l-4 4"/>
|
||||
</svg>
|
||||
Jump Here
|
||||
</button>
|
||||
</div>
|
||||
<div class="diff-container relative">
|
||||
<button class="copy-diff-btn absolute top-1 right-1 p-1 border rounded hover:bg-gray-100 flex items-center justify-center">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h6a2 2 0 012 2v2m0 4h2a2 2 0 002-2v-6a2 2 0 00-2-2h-6a2 2 0 00-2 2v2" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M16 16h2a2 2 0 002-2v-2m0 0V8a2 2 0 00-2-2h-2m0 4v6m0 0H8m8 0h2" />
|
||||
</svg>
|
||||
</button>
|
||||
<pre class="m-0"></pre>
|
||||
</div>
|
||||
${
|
||||
isQueued
|
||||
? `<img src="assets/cat/paw.png"
|
||||
alt="In Rewrite Queue"
|
||||
title="In Rewrite Queue"
|
||||
class="paw-queued"
|
||||
style="pointer-events: none; z-index:10;">`
|
||||
: ''
|
||||
}
|
||||
</li>`;
|
||||
}).join('');
|
||||
|
||||
// Pagination
|
||||
if (pages > 1) {
|
||||
paginationEl.innerHTML = `
|
||||
<button id="page-prev" class="px-2 py-1 border rounded" ${currentPage === 1 ? 'disabled' : ''}>«</button>
|
||||
<span class="mx-2 text-sm">Seite ${currentPage} / ${pages}</span>
|
||||
<button id="page-next" class="px-2 py-1 border rounded" ${currentPage === pages ? 'disabled' : ''}>»</button>
|
||||
`;
|
||||
paginationEl.querySelector('#page-prev').onclick = () => renderContent(folderObj, currentPage - 1);
|
||||
paginationEl.querySelector('#page-next').onclick = () => renderContent(folderObj, currentPage + 1);
|
||||
paginationEl.style.display = 'flex';
|
||||
} else {
|
||||
paginationEl.innerHTML = '';
|
||||
paginationEl.style.display = 'none';
|
||||
}
|
||||
|
||||
// Diff-Buttons überprüfen
|
||||
contentList.querySelectorAll('.diff-btn').forEach(async btn => {
|
||||
const hash = btn.dataset.hash;
|
||||
const diffText = await window.electronAPI.diffCommit(folder, hash);
|
||||
const hash = btn.dataset.hash;
|
||||
const diffText = await window.electronAPI.diffCommit(folderObj, hash);
|
||||
if (!diffText.trim()) {
|
||||
btn.disabled = true;
|
||||
btn.classList.add('disabled');
|
||||
}
|
||||
});
|
||||
|
||||
// Diff-Toggle & Highlighting
|
||||
// Diff-Toggle & Hervorhebung
|
||||
contentList.querySelectorAll('.diff-btn').forEach(btn => {
|
||||
btn.addEventListener('click', async () => {
|
||||
const li = btn.closest('li');
|
||||
const hash = btn.dataset.hash;
|
||||
const svg = btn.querySelector('svg');
|
||||
const li = btn.closest('li');
|
||||
const hash = btn.dataset.hash;
|
||||
const svg = btn.querySelector('svg');
|
||||
const container = li.querySelector('.diff-container');
|
||||
const pre = container.querySelector('pre');
|
||||
const pre = container.querySelector('pre');
|
||||
|
||||
if (!pre.innerHTML.trim()) {
|
||||
// fetch und HTML-Snippet bauen
|
||||
const diff = await window.electronAPI.diffCommit(folder, hash);
|
||||
const diff = await window.electronAPI.diffCommit(folderObj, hash);
|
||||
const escaped = diff
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
@@ -286,7 +605,7 @@ async function renderSidebar() {
|
||||
}
|
||||
|
||||
const isOpen = container.classList.toggle('open');
|
||||
if (isOpen) {
|
||||
if (isOpen) {
|
||||
container.style.maxHeight = container.scrollHeight + 'px';
|
||||
} else {
|
||||
container.style.maxHeight = '0';
|
||||
@@ -300,8 +619,7 @@ async function renderSidebar() {
|
||||
btn.addEventListener('click', async () => {
|
||||
const hash = btn.dataset.hash;
|
||||
try {
|
||||
// verwende jetzt currentFolder statt einer undefinierten Variable
|
||||
const savedPath = await window.electronAPI.snapshotCommit(currentFolder, hash);
|
||||
const savedPath = await window.electronAPI.snapshotCommit(folderObj, hash);
|
||||
if (savedPath) {
|
||||
alert(`Snapshot gespeichert unter:\n${savedPath}`);
|
||||
}
|
||||
@@ -312,37 +630,21 @@ async function renderSidebar() {
|
||||
});
|
||||
});
|
||||
|
||||
// Revert-Button
|
||||
contentList.querySelectorAll('.revert-btn').forEach(btn => {
|
||||
btn.addEventListener('click', async () => {
|
||||
const hash = btn.dataset.hash;
|
||||
if (confirm(`Commit ${hash} wirklich revertieren?`)) {
|
||||
await window.electronAPI.revertCommit(folder, hash);
|
||||
await renderContent(folder);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Checkout-Button
|
||||
contentList.querySelectorAll('.checkout-btn').forEach(btn => {
|
||||
btn.addEventListener('click', async () => {
|
||||
const hash = btn.dataset.hash;
|
||||
//if (!confirm(`Jump here? Ungestagte Änderungen werden verworfen.`)) return;
|
||||
// currentFolder hast du oben in renderContent gespeichert
|
||||
await window.electronAPI.checkoutCommit(currentFolder, hash);
|
||||
await renderContent(currentFolder);
|
||||
await window.electronAPI.checkoutCommit(folderObj, hash);
|
||||
const page = await getCommitPageForHash(folderObj, hash, PAGE_SIZE);
|
||||
await renderContent(folderObj, page);
|
||||
});
|
||||
});
|
||||
const currentEl = contentList.querySelector('li.current-commit');
|
||||
|
||||
// Copy-Diff-Button
|
||||
contentList.querySelectorAll('.diff-container').forEach(container => {
|
||||
const btn = container.querySelector('.copy-diff-btn');
|
||||
const pre = container.querySelector('pre');
|
||||
|
||||
// speicher die ursprüngliche SVG
|
||||
const originalSVG = btn.innerHTML;
|
||||
// erstelle die Checkmark-SVG
|
||||
const checkSVG = `
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
class="h-4 w-4 text-green-600"
|
||||
@@ -351,13 +653,10 @@ async function renderSidebar() {
|
||||
d="M5 13l4 4L19 7"/>
|
||||
</svg>
|
||||
`;
|
||||
|
||||
btn.addEventListener('click', () => {
|
||||
navigator.clipboard.writeText(pre.textContent)
|
||||
.then(() => {
|
||||
// Icon tauschen
|
||||
btn.innerHTML = checkSVG;
|
||||
// nach 1s wieder zurück
|
||||
setTimeout(() => {
|
||||
btn.innerHTML = originalSVG;
|
||||
}, 1000);
|
||||
@@ -368,8 +667,8 @@ async function renderSidebar() {
|
||||
});
|
||||
});
|
||||
|
||||
const currentEl = contentList.querySelector('li.current-commit');
|
||||
if (currentEl) {
|
||||
// weich scrollen und zentriert in den Viewport bringen
|
||||
currentEl.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
}
|
||||
}
|
||||
@@ -378,7 +677,6 @@ async function renderSidebar() {
|
||||
const initial = await window.electronAPI.getSelected();
|
||||
if (initial) await renderContent(initial);
|
||||
|
||||
// Add-Folder
|
||||
addBtn.addEventListener('click', async () => {
|
||||
await window.electronAPI.addFolder();
|
||||
await renderSidebar();
|
||||
@@ -386,10 +684,19 @@ async function renderSidebar() {
|
||||
if (sel) await renderContent(sel);
|
||||
});
|
||||
|
||||
// repo-updated, contextmenus usw.
|
||||
window.addEventListener('repo-updated', e => {
|
||||
if (titleEl.textContent === e.detail) renderContent(e.detail);
|
||||
window.addEventListener('repo-updated', async e => {
|
||||
closeDropdown();
|
||||
const obj = await getFolderObjByPath(e.detail);
|
||||
if (!obj) return;
|
||||
|
||||
const selected = await window.electronAPI.getSelected();
|
||||
if (!selected || selected.path !== obj.path) {
|
||||
await window.electronAPI.setSelected(obj);
|
||||
await renderSidebar();
|
||||
}
|
||||
await renderContent(obj);
|
||||
});
|
||||
|
||||
titleEl.addEventListener('contextmenu', e => {
|
||||
e.preventDefault();
|
||||
if (titleEl.textContent !== 'No folder selected') {
|
||||
@@ -397,40 +704,81 @@ async function renderSidebar() {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
const commitBtn = document.getElementById('commitBtn');
|
||||
commitBtn.addEventListener('click', async () => {
|
||||
// 1) Welcher Ordner ist gerade ausgewählt?
|
||||
const folder = await window.electronAPI.getSelected();
|
||||
if (!folder) {
|
||||
alert('Kein Ordner ausgewählt!');
|
||||
return;
|
||||
window.electronAPI.onTrayToggleMonitoring(async (_e, folderPath) => {
|
||||
const folders = await window.electronAPI.getFolders();
|
||||
const folder = folders.find(f => f.path === folderPath);
|
||||
if (folder) {
|
||||
await window.electronAPI.setMonitoring(folder, !folder.monitoring);
|
||||
await renderSidebar();
|
||||
const selected = await window.electronAPI.getSelected();
|
||||
if (selected && selected.path === folderPath) {
|
||||
await renderContent(folder);
|
||||
}
|
||||
}
|
||||
// 2) Nachricht abfragen
|
||||
const message = 'test'
|
||||
alert('Commit-Button geklickt!');
|
||||
// 3) UI blockieren
|
||||
commitBtn.disabled = true;
|
||||
commitBtn.textContent = 'Committing…';
|
||||
|
||||
// 4) IPC‐Aufruf
|
||||
const result = await window.electronAPI.commitCurrentFolder(folder, message);
|
||||
console.log('[renderer] commit result:', result);
|
||||
|
||||
// 5) Ergebnis anzeigen und Liste neu laden
|
||||
if (result.success) {
|
||||
alert('Commit erfolgreich!');
|
||||
await renderContent(folder);
|
||||
} else {
|
||||
alert('Commit fehlgeschlagen:\n' + result.error);
|
||||
}
|
||||
|
||||
// 6) UI wieder freigeben
|
||||
commitBtn.disabled = false;
|
||||
commitBtn.textContent = 'Commit';
|
||||
});
|
||||
|
||||
window.electronAPI.onTrayRemoveFolder(async (_e, folderPath) => {
|
||||
const folders = await window.electronAPI.getFolders();
|
||||
const folder = folders.find(f => f.path === folderPath);
|
||||
if (folder) {
|
||||
await window.electronAPI.removeFolder(folder);
|
||||
await renderSidebar();
|
||||
const all = await window.electronAPI.getFolders();
|
||||
if (all.length === 0) {
|
||||
titleEl.textContent = 'No folder selected';
|
||||
contentList.innerHTML = '';
|
||||
} else {
|
||||
await window.electronAPI.setSelected(all[0]);
|
||||
await renderContent(all[0]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
window.electronAPI.onTrayAddFolder(async () => {
|
||||
await window.electronAPI.addFolder();
|
||||
await renderSidebar();
|
||||
const sel = await window.electronAPI.getSelected();
|
||||
if (sel) await renderContent(sel);
|
||||
});
|
||||
|
||||
window.electronAPI.onFoldersLocationUpdated(folderObj => {
|
||||
const selector = `[data-folder-id="${encodeURIComponent(folderObj.path)}"]`;
|
||||
const li = document.querySelector(selector);
|
||||
if (li) {
|
||||
if (folderObj.needsRelocation) {
|
||||
li.classList.add('needs-relocation');
|
||||
li.setAttribute('disabled', '');
|
||||
} else {
|
||||
li.classList.remove('needs-relocation');
|
||||
}
|
||||
renderSidebar();
|
||||
}
|
||||
});
|
||||
|
||||
window.electronAPI.onCatBegin(() => window.cat && window.cat.beginSpeech());
|
||||
window.electronAPI.onCatChunk((_e, chunk) => window.cat && window.cat.appendSpeech(chunk));
|
||||
window.electronAPI.onCatEnd(() => window.cat && window.cat.endSpeech());
|
||||
const speakToCat = msg => {
|
||||
window.cat.beginSpeech();
|
||||
let i = 0;
|
||||
function nextChar() {
|
||||
if (i < msg.length) {
|
||||
window.cat.appendSpeech(msg[i++]);
|
||||
setTimeout(nextChar, 50);
|
||||
} else {
|
||||
window.cat.endSpeech();
|
||||
}
|
||||
}
|
||||
nextChar();
|
||||
};
|
||||
|
||||
window.electronAPI.getDailyCommitStats().then(stats => {
|
||||
const today = new Date().toISOString().slice(0, 10);
|
||||
const todayCount = stats[today] || 0;
|
||||
window.updateCatGlow(todayCount);
|
||||
});
|
||||
|
||||
window.updateCatGlow = function(commitCount) {
|
||||
if (window.cat) window.cat.animateCatGlow(commitCount);
|
||||
};
|
||||
});
|
||||
388
settings.html
@@ -4,119 +4,353 @@
|
||||
<meta charset="UTF-8">
|
||||
<title>Einstellungen</title>
|
||||
<style>
|
||||
/* Grund-Reset */
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
||||
:root {
|
||||
/* Default-Modus: Weißes Panel mit Rosa-Akzenten */
|
||||
--bg-main: #ffe4e6; /* Hintergrund Content */
|
||||
--bg-sidebar: #fff1f2; /* Sidebar */
|
||||
--accent: #9f1239; /* Rosa */
|
||||
--border: #fff;
|
||||
}
|
||||
body.sky-mode {
|
||||
/* Sky-Mode: Himmelshintergrund und passende Akzente */
|
||||
--bg-main: rgb(173,216,230); /* sanftes Baby-Blau */
|
||||
--bg-sidebar: rgb(200,220,240); /* etwas dunkleres Blau */
|
||||
--accent: rgb(20,60,100); /* dunkles Marine-Blau als Akzent */
|
||||
--border: rgb(180,200,220);
|
||||
|
||||
background: var(--border);
|
||||
}
|
||||
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden; /* keine Scrollbars */
|
||||
width: 100%; height: 100%;
|
||||
overflow-x: hidden;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||
display: flex;
|
||||
align-items: center; /* vertikal zentrieren */
|
||||
justify-content: center; /* horizontal zentrieren */
|
||||
background: rgba(0,0,0,0.1);/* halbtransparenter Untergrund */
|
||||
font-family: sans-serif;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
transition: background 0.5s ease;
|
||||
}
|
||||
/* Sky-Mode Hintergrund */
|
||||
body {
|
||||
background: var(--bg-main);
|
||||
}
|
||||
|
||||
/* Dialog-Box */
|
||||
.dialog {
|
||||
border: 2px solid #fbcfe8;
|
||||
border-radius: 8px;
|
||||
padding: 1rem;
|
||||
width: 100%; /* 90% der Fensterbreite */
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
background: white;
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
width: 100%;
|
||||
color: var(--accent);
|
||||
background: rgba(255,255,255,0.93);
|
||||
border-radius: 5px;
|
||||
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
|
||||
padding: 1.8rem 1.8rem;
|
||||
display: flex; flex-direction: column; gap: 1.2rem;
|
||||
}
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 1rem;
|
||||
|
||||
/* Optionen */
|
||||
.options { display: flex; flex-direction: column; gap: 1.0rem; }
|
||||
|
||||
label {
|
||||
display: flex; align-items: center; font-size: 0.9rem;
|
||||
color: #1e293b;
|
||||
}
|
||||
.header h1 {
|
||||
font-size: 1.25rem;
|
||||
margin: 0;
|
||||
label.option input[type="checkbox"] {
|
||||
margin-right: 0.8rem;
|
||||
width: 1.3em;
|
||||
height: 1.3em;
|
||||
accent-color: var(--accent);
|
||||
flex-shrink: 0; /* <-- das ist wichtig! */
|
||||
}
|
||||
.close-btn {
|
||||
background: transparent;
|
||||
border: none;
|
||||
font-size: 1.25rem;
|
||||
cursor: pointer;
|
||||
color: #9f1239;
|
||||
.row {
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
}
|
||||
.options {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
.row > span {
|
||||
flex: 1;
|
||||
color: #1e293b;
|
||||
font-weight: 600;
|
||||
}
|
||||
.option {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.row > input,
|
||||
.row > select {
|
||||
/* wenn Du es schmaler willst: */
|
||||
min-width: 80px;
|
||||
max-width: 180px;
|
||||
padding: 0.4em 0.4em;
|
||||
border: 1.2px solid #cbd5e1;
|
||||
border-radius: 6px;
|
||||
background: #f8fafc;
|
||||
color: #334155;
|
||||
font-size: 0.9rem;
|
||||
transition: border-color 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
.option input[type="checkbox"] {
|
||||
margin-left: 1.5rem;
|
||||
margin-right: 0.5rem;
|
||||
.row > input:focus,
|
||||
.row > select:focus {
|
||||
box-shadow: 0 0 0 2px rgba(56,189,248,0.3);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
select, input[type="number"] {
|
||||
min-width: 30px;
|
||||
max-width: 100%;
|
||||
padding: 0.4em 0.6em;
|
||||
border: 1.2px solid #cbd5e1;
|
||||
border-radius: 6px;
|
||||
font-size: 1rem;
|
||||
color: #334155;
|
||||
background: #f8fafc;
|
||||
margin-left: 0.8rem;
|
||||
margin-right: 0.8rem;
|
||||
}
|
||||
/* Buttons */
|
||||
.buttons {
|
||||
margin-top: 1rem;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 0.5rem;
|
||||
gap: 0.5em;
|
||||
}
|
||||
button {
|
||||
padding: 0.4rem 0.8rem;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #ccc;
|
||||
background: white;
|
||||
button{
|
||||
border-radius: 8px;
|
||||
padding: 0.5em 1.2em;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
background: var(--bg-sidebar);
|
||||
color: var(--accent);
|
||||
}
|
||||
button:hover{
|
||||
background: var(--bg-border);
|
||||
}
|
||||
|
||||
/* Infotext */
|
||||
#ollama-model-selectors label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.6em;
|
||||
margin-bottom: 0.3em;
|
||||
}
|
||||
#ollama-model-selectors select {
|
||||
min-width: 100px;
|
||||
max-width: 180px;
|
||||
padding: 0.35em 0.5em;
|
||||
border-radius: 6px;
|
||||
font-size: 1rem;
|
||||
border: 1.2px solid #cbd5e1;
|
||||
background: #f8fafc;
|
||||
color: #334155;
|
||||
}
|
||||
|
||||
.needs-relocation {
|
||||
opacity: 0.4;
|
||||
filter: grayscale(0.8);
|
||||
/* oder: color: #aaa; oder wie du magst */
|
||||
}
|
||||
.warning-icon {
|
||||
margin-left: 8px;
|
||||
color: #eab308; /* schönes gelb/orange */
|
||||
font-size: 1.2em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
button:hover { background: #f3f4f6; }
|
||||
</style>
|
||||
<script>
|
||||
window.addEventListener('DOMContentLoaded', async () => {
|
||||
const cbSky = document.getElementById('skymode');
|
||||
const cbSkip = document.getElementById('skipPrompt');
|
||||
const ok = document.getElementById('okBtn');
|
||||
const cancel = document.getElementById('cancelBtn');
|
||||
const close = document.getElementById('closeBtn');
|
||||
window.addEventListener('DOMContentLoaded', async () => {
|
||||
const isSky = await window.settingsAPI.getSkyMode();
|
||||
document.body.classList.toggle('sky-mode', isSky);
|
||||
|
||||
const [initialSky, initialSkip] = await Promise.all([
|
||||
window.settingsAPI.getSkyMode(),
|
||||
window.settingsAPI.getSkipPrompt()
|
||||
]);
|
||||
// Elemente holen
|
||||
const themeSelect = document.getElementById('themeSelect');
|
||||
const cbSky = document.getElementById('skymode');
|
||||
const cbSkip = document.getElementById('skipPrompt');
|
||||
const thresholdInput = document.getElementById('intelligentCommitThresholdInput');
|
||||
const minutesInput = document.getElementById('intelligentCommitMinutesInput');
|
||||
const ok = document.getElementById('okBtn');
|
||||
const cancel = document.getElementById('cancelBtn');
|
||||
const cbAutostart = document.getElementById('autostart');
|
||||
const cbCloseToTray= document.getElementById('closeToTray');
|
||||
|
||||
cbSky.checked = initialSky;
|
||||
cbSkip.checked = initialSkip;
|
||||
const [initialAutostart, initialCloseToTray] = await Promise.all([
|
||||
window.settingsAPI.getAutostart(),
|
||||
window.settingsAPI.getCloseToTray()
|
||||
]);
|
||||
cbAutostart.checked = initialAutostart;
|
||||
cbCloseToTray.checked = initialCloseToTray;
|
||||
|
||||
ok.addEventListener('click', async () => {
|
||||
await window.settingsAPI.setSkyMode(cbSky.checked);
|
||||
await window.settingsAPI.setSkipPrompt(cbSkip.checked);
|
||||
window.close();
|
||||
});
|
||||
cancel.addEventListener('click', () => window.close());
|
||||
close.addEventListener('click', () => window.close());
|
||||
// Initialwerte parallel laden
|
||||
const [initialSky, initialSkip, initialThreshold, initialMinutes] = await Promise.all([
|
||||
window.settingsAPI.getSkyMode(),
|
||||
window.settingsAPI.getSkipPrompt(),
|
||||
window.electronAPI.getIntelligentCommitThreshold(),
|
||||
window.electronAPI.getMinutesCommitThreshold()
|
||||
]);
|
||||
|
||||
// Inputs setzen
|
||||
cbSky.checked = initialSky;
|
||||
cbSkip.checked = initialSkip;
|
||||
thresholdInput.value = initialThreshold;
|
||||
minutesInput.value = initialMinutes;
|
||||
|
||||
// **Vorschau**: Sky-Mode sofort übernehmen
|
||||
cbSky.addEventListener('change', async () => {
|
||||
await window.settingsAPI.setSkyMode(cbSky.checked);
|
||||
document.body.classList.toggle('sky-mode', cbSky.checked);
|
||||
});
|
||||
</script>
|
||||
// OK: alles final speichern
|
||||
ok.addEventListener('click', async () => {
|
||||
await window.settingsAPI.setSkipPrompt(cbSkip.checked);
|
||||
await window.settingsAPI.setAutostart(cbAutostart.checked);
|
||||
await window.settingsAPI.setCloseToTray(cbCloseToTray.checked);
|
||||
// SkyMode haben wir ja schon beim Change gesetzt
|
||||
|
||||
// Threshold speichern (immer Wert aus Feld nehmen!)
|
||||
let threshold = parseInt(thresholdInput.value, 10);
|
||||
if (isNaN(threshold)) threshold = 10;
|
||||
if (threshold < 1) threshold = 1;
|
||||
if (threshold > 1000) threshold = 1000;
|
||||
await window.settingsAPI.setIntelligentCommitThreshold(threshold);
|
||||
|
||||
let minutes = parseInt(minutesInput.value, 10);
|
||||
if (isNaN(minutes)) minutes = 10;
|
||||
if (minutes < 1) minutes = 1;
|
||||
if (minutes > 1000) minutes = 60;
|
||||
await window.settingsAPI.setMinutesCommitThreshold(minutes);
|
||||
|
||||
// Dropdowns speichern
|
||||
const commitSel = document.getElementById('commitModelSelect');
|
||||
const readmeSel = document.getElementById('readmeModelSelect');
|
||||
if (commitSel) await window.settingsAPI.setCommitModel(commitSel.value);
|
||||
if (readmeSel) await window.settingsAPI.setReadmeModel(readmeSel.value);
|
||||
|
||||
window.settingsAPI.close();
|
||||
});
|
||||
// Cancel / Close: SkyMode zurücksetzen, dann schließen
|
||||
const rollback = async () => {
|
||||
await window.settingsAPI.setSkyMode(initialSky);
|
||||
window.settingsAPI.close();
|
||||
};
|
||||
cancel.addEventListener('click', rollback);
|
||||
|
||||
|
||||
const container = document.getElementById('ollama-model-selectors');
|
||||
const res = await window.electronAPI.ollamaList();
|
||||
|
||||
if (res.status === 'no-cli') {
|
||||
container.innerHTML = `
|
||||
<div style="color:red;font-weight:bold;margin:1em 0;">
|
||||
!! You need to install Ollama to use intelligent message & README generation !!
|
||||
</div>`;
|
||||
return;
|
||||
}
|
||||
|
||||
if (res.status === 'error') {
|
||||
container.innerHTML = `<div style="color:orange">Error fetching models: ${res.msg}</div>`;
|
||||
return;
|
||||
}
|
||||
|
||||
// Liste der Modell-Namen extrahieren
|
||||
const names = res.models.map(m => m.name || m.model).filter(Boolean);
|
||||
const qwen = names.filter(n => /^qwen2\.5-coder(:[\w\-.]+)?$/.test(n));
|
||||
|
||||
if (!qwen.length) {
|
||||
// keine qwen2.5-coder → Pull-Buttons
|
||||
container.innerHTML = `
|
||||
<button id="pullCommitModelBtn" style="margin-bottom:8px;">
|
||||
ollama pull qwen2.5-coder:7b
|
||||
</button><br>
|
||||
<button id="pullReadmeModelBtn">
|
||||
ollama pull qwen2.5-coder:32b
|
||||
</button>`;
|
||||
document.getElementById('pullCommitModelBtn').onclick = async () => {
|
||||
await window.electronAPI.ollamaPull('qwen2.5-coder:7b');
|
||||
location.reload();
|
||||
};
|
||||
document.getElementById('pullReadmeModelBtn').onclick = async () => {
|
||||
await window.electronAPI.ollamaPull('qwen2.5-coder:32b');
|
||||
location.reload();
|
||||
};
|
||||
return;
|
||||
}
|
||||
|
||||
// Dropdowns aufbauen
|
||||
const makeOpts = (arr, sel) =>
|
||||
arr.map(m => `<option ${m===sel?'selected':''}>${m}</option>`).join('');
|
||||
|
||||
// Default-Auswahl aus Settings (oder erstes gefundenes)
|
||||
const commitDefault = qwen.find(m=>m.includes('7b'))||qwen[0];
|
||||
const readmeDefault= qwen.find(m=>m.includes('32b'))||qwen[0];
|
||||
const currentCommit = await window.settingsAPI.getCommitModel?.() || commitDefault;
|
||||
const currentReadme= await window.settingsAPI.getReadmeModel?.() || readmeDefault;
|
||||
|
||||
container.innerHTML = `
|
||||
<div class="row">
|
||||
<label>Model for commit message generation:
|
||||
<select id="commitModelSelect">
|
||||
${makeOpts(qwen, currentCommit)}
|
||||
</select>
|
||||
</label>
|
||||
<label>Model for README generation:
|
||||
<select id="readmeModelSelect">
|
||||
${makeOpts(qwen, currentReadme)}
|
||||
</select>
|
||||
</label>
|
||||
</div>`;
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="dialog">
|
||||
<div class="header">
|
||||
<h1>Einstellungen</h1>
|
||||
<button class="close-btn" id="closeBtn">✕</button>
|
||||
</div>
|
||||
<div class="options">
|
||||
<label class="option">
|
||||
<input type="checkbox" id="skymode" />
|
||||
Sky Mode aktivieren
|
||||
<input type="checkbox" id="autostart" />
|
||||
Launch on System start
|
||||
</label>
|
||||
<label class="option">
|
||||
<input type="checkbox" id="skipPrompt" />
|
||||
<input type="checkbox" id="closeToTray" checked />
|
||||
Close to Tray
|
||||
</label>
|
||||
<label class="option">
|
||||
<input type="checkbox" id="skymode" />
|
||||
Sky Theme
|
||||
</label>
|
||||
<label class="option" style="align-items:center;">
|
||||
Theme:
|
||||
<select id="themeSelect" style="margin-left:1em;">
|
||||
<option value="default">Cits Favorite</option>
|
||||
<option value="sky">Sky</option>
|
||||
<option value="epic">Epic</option>
|
||||
<option value="yinyang" disabled>Yin/Yang (coming soon)</option>
|
||||
</select>
|
||||
</label>
|
||||
<label class="option">
|
||||
<input type="checkbox" id="skipPrompt" class="flex-none" />
|
||||
Skip prompt asking to remove .git folder if it has only one commit and no changes
|
||||
</label>
|
||||
<label class="block mb-2 font-semibold">
|
||||
Rewrite commits after
|
||||
<input type="number" id="intelligentCommitThresholdInput" min="1" max="1000" value="10" step="1" class="border rounded px-2 py-1 w-20 mx-1" class="flex-none">
|
||||
lines of diff or
|
||||
<input type="number" id="intelligentCommitMinutesInput" min="1" max="1000" value="10" step="1" class="border rounded px-2 py-1 w-20 mx-1" class="flex-none">
|
||||
minutes have passed
|
||||
</label>
|
||||
<div class="options">
|
||||
<!-- Hier kommt das Model-Selector-HTML rein -->
|
||||
<div id="ollama-model-selectors"></div>
|
||||
</div>
|
||||
|
||||
<!-- Weitere Optionen in Zukunft hier hinzufügen -->
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<button id="cancelBtn">Abbrechen</button>
|
||||
<button id="okBtn">OK</button>
|
||||
<button id="cancelBtn" class="text-sm font-medium">
|
||||
<svg width="18" height="18" viewBox="0 0 20 20" fill="none" class="icon-left">
|
||||
<path d="M6 6l8 8M6 14L14 6" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
<button id="okBtn" class="text-sm font-medium">
|
||||
<svg width="18" height="18" viewBox="0 0 20 20" fill="none" class="icon-left">
|
||||
<path d="M5 11l4 4L15 7" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||