Skip to content

Commit

Permalink
Merge pull request #684 from gitoak/main
Browse files Browse the repository at this point in the history
colorUtils refactor and test coverage + minor fixes
  • Loading branch information
trobonox authored Oct 12, 2024
2 parents 79cee2d + 185dabb commit 9216b92
Show file tree
Hide file tree
Showing 11 changed files with 9,287 additions and 8,731 deletions.
2 changes: 1 addition & 1 deletion components/CustomThemeEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. -->
import type { Theme } from "@/types/kanban-types";

import { useTauriStore } from "@/stores/tauriStore";
import { lightenColor } from "@/utils/colorUtils.js";
import { lightenColor } from "@/utils/colorUtils";
import emitter from "@/utils/emitter";
import { dark } from "@/utils/themes";

Expand Down
2 changes: 1 addition & 1 deletion components/kanban/Card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ limitations under the License.
import type { Card, Tag } from "@/types/kanban-types";

import { useTauriStore } from "@/stores/tauriStore";
import { getContrast } from "@/utils/colorUtils";
import { getContrast } from "~/utils/colorUtils";
import { XMarkIcon } from "@heroicons/vue/24/solid";
import {
PhChecks,
Expand Down
1 change: 1 addition & 0 deletions components/kanban/TagDisplay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const props = defineProps<{
}>();

const getTagTextColor = computed(() => {
if (!props.tag.color) return "text-normal";
return getContrast(props.tag.color);
});
</script>
4 changes: 4 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
import withNuxt from "./.nuxt/eslint.config.mjs";
import tailwind from "eslint-plugin-tailwindcss";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
import tseslint from "typescript-eslint";
import js from "@eslint/js";

export default withNuxt(
...tailwind.configs["flat/recommended"],
eslintPluginPrettierRecommended,
...tseslint.configs.recommended,
js.configs.recommended,
{
files: ["**/*.ts", "**/*.vue"],
rules: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"postcss-custom-properties": "14.0.2",
"prettier": "^3.3.3",
"rollup-plugin-license": "^3.0.1",
"typescript": "=5.5.4",
"typescript": "^5.6.3",
"typescript-eslint": "^8.8.1",
"vitest": "^2.1.2"
},
Expand Down
4 changes: 3 additions & 1 deletion pages/import.vue
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,12 @@ const importFromKanriFull = async () => {
zodParsed = kanriJsonSchema.parse(parsedJson);
} catch (error) {
console.error(error);
//@ts-expect-error we do not know what type of error we will receive
if (
//@ts-expect-error we do not know what type of error we will receive
error.issues[0].code === "invalid_type" &&
//@ts-expect-error we do not know what type of error we will receive
error.issues[0].path[0] === "boards" &&
//@ts-expect-error we do not know what type of error we will receive
error.issues[0].received === "null"
) {
return await message(t("pages.import.importErrorNoBoards"), {
Expand Down
2 changes: 1 addition & 1 deletion pages/kanban/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ import { useTauriStore } from "@/stores/tauriStore";
import { applyDrag } from "@/utils/drag-n-drop";
import emitter from "@/utils/emitter";
import { generateUniqueID } from "@/utils/idGenerator";
import { getAverageColor } from "@/utils/colorUtils";
import { getAverageColor } from "~/utils/colorUtils";

import { PhotoIcon } from "@heroicons/vue/24/outline";
import { EllipsisHorizontalIcon, PlusIcon } from "@heroicons/vue/24/solid";
Expand Down
134 changes: 0 additions & 134 deletions utils/colorUtils.js

This file was deleted.

Loading

0 comments on commit 9216b92

Please sign in to comment.