Skip to content

Commit

Permalink
fix color bug
Browse files Browse the repository at this point in the history
  • Loading branch information
as6325400 committed Aug 31, 2024
1 parent 3941d82 commit cbc9bcf
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/functions/course_color.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import store from "../store";
import _ from "lodash";

export function courseChangeColor(course: Course, color: string) {
let temp = _.cloneDeep(store.state.course.classStorage);
let curriculum = store.state.course.activeIndex;
let temp = _.cloneDeep(store.state.course.TotalCourseData[curriculum].classStorage);
for (let i = 0; i < temp.length; i++) {
for (let j = 0; j < temp[i].length; j++) {
if (course.getUuid() == temp[i][j].getUuid()) {
Expand All @@ -15,7 +16,8 @@ export function courseChangeColor(course: Course, color: string) {
}

export function courseTextChangeColor(course: Course, color: string) {
let temp = _.cloneDeep(store.state.course.classStorage);
let curriculum = store.state.course.activeIndex;
let temp = _.cloneDeep(store.state.course.TotalCourseData[curriculum].classStorage);
for (let i = 0; i < temp.length; i++) {
for (let j = 0; j < temp[i].length; j++) {
if (course.getUuid() == temp[i][j].getUuid()) {
Expand Down
36 changes: 33 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1234,10 +1234,10 @@
resolved "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz"
integrity sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==

"@esbuild/win32-x64@0.18.20":
"@esbuild/darwin-arm64@0.18.20":
version "0.18.20"
resolved "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz"
integrity sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==
resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz"
integrity sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==

"@graphql-tools/merge@^8.4.1":
version "8.4.2"
Expand Down Expand Up @@ -2982,6 +2982,13 @@ binary-extensions@^2.0.0:
resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz"
integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==

bindings@^1.5.0:
version "1.5.0"
resolved "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz"
integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==
dependencies:
file-uri-to-path "1.0.0"

bl@^1.0.0:
version "1.2.3"
resolved "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz"
Expand Down Expand Up @@ -4901,6 +4908,11 @@ file-type@^8.1.0:
resolved "https://registry.npmjs.org/file-type/-/file-type-8.1.0.tgz"
integrity sha512-qyQ0pzAy78gVoJsmYeNgl8uH8yKhr1lVhW7JbzJmnlRi0I4R2eEDEJZVKG8agpDnLpacwNbDhLNG/LMdxHD2YQ==

[email protected]:
version "1.0.0"
resolved "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz"
integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==

filelist@^1.0.4:
version "1.0.4"
resolved "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz"
Expand Down Expand Up @@ -5133,6 +5145,19 @@ fs.realpath@^1.0.0:
resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==

fsevents@^1.0.0:
version "1.2.13"
resolved "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz"
integrity sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==
dependencies:
bindings "^1.5.0"
nan "^2.12.1"

fsevents@~2.3.2:
version "2.3.3"
resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz"
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==

fswin@^2.17.1227:
version "2.17.1227"
resolved "https://registry.npmjs.org/fswin/-/fswin-2.17.1227.tgz"
Expand Down Expand Up @@ -7661,6 +7686,11 @@ namify@^0.1.3:
dependencies:
reserved "^0.1.0"

nan@^2.12.1:
version "2.20.0"
resolved "https://registry.npmjs.org/nan/-/nan-2.20.0.tgz"
integrity sha512-bk3gXBZDGILuuo/6sKtr0DQmSThYHLtNCdSdXk9YkxD/jK6X2vmCyyXBBxyqZ4XcnzTyYEAThfX3DCEnLf6igw==

nanoid@^2.1.0:
version "2.1.11"
resolved "https://registry.npmjs.org/nanoid/-/nanoid-2.1.11.tgz"
Expand Down

0 comments on commit cbc9bcf

Please sign in to comment.