diff --git a/README.md b/README.md index d7276a48..a7da683e 100644 --- a/README.md +++ b/README.md @@ -184,6 +184,8 @@ Xdebug is pre-configured in the Sail Docker environment for local debugging. ## Deployment +We use Ansible with a `deploy.yaml` script, along with the inventory `production.ini` + `ansible-playbook -i ./ansible/inventory/production.ini deploy.yml` ## License diff --git a/resources/js/Components/Form/TagSelector.vue b/resources/js/Components/Form/TagSelector.vue index 01fc95f3..339a6e90 100644 --- a/resources/js/Components/Form/TagSelector.vue +++ b/resources/js/Components/Form/TagSelector.vue @@ -5,6 +5,7 @@ import { ref, computed, watch, nextTick, onMounted, onBeforeUnmount } from "vue" import { defineModel } from "vue"; import axios from "axios"; import { Icon } from "@iconify/vue"; +import Tag from "@/Components/Tag.vue"; const DEBOUNCE_TIME = 450; // milliseconds @@ -13,6 +14,15 @@ const props = defineProps({ type: String, required: true, }, + mode: { + type: String, + default: 'create', // 'create' or 'search' + validator: (value) => ['create', 'search'].includes(value), + }, + allowEverything: { + type: Boolean, + default: true, + }, }); const model = defineModel(); @@ -90,6 +100,9 @@ const availableTags = computed(() => { }); const canCreateNew = computed(() => { + // In search mode, cannot create new tags + if (props.mode === 'search') return false; + const query = searchQuery.value.trim(); if (!query || isLoading.value) return false; @@ -102,6 +115,20 @@ const canCreateNew = computed(() => { ); }); +const tooltipText = computed(() => { + const parts = []; + + if (props.mode === 'create') { + parts.push("Add multiple tags using commas"); + } + + if (props.allowEverything) { + parts.push("'everything' tag covers all possible tags"); + } + + return parts.join('. '); +}); + // sync model watch( () => model.value, @@ -176,7 +203,8 @@ function onKeydown(event) { canCreateNew.value ) { selectTag(searchQuery.value.trim()); - } else if (searchQuery.value.trim()) { + } else if (props.mode === 'create' && searchQuery.value.trim()) { + // Only allow adding tags in create mode // Handle comma-separated tags if (searchQuery.value.includes(',')) { addMultipleTags(searchQuery.value); @@ -258,20 +286,15 @@ onMounted(async () => {
- - - {{ tag }} - + :tag="tag" + variant="selected" + removable + @remove="removeTag" + class="mr-2 my-1" + />
@@ -289,13 +312,14 @@ onMounted(async () => { :class="{ 'rounded-b-none border-b-0': showDropdown && - (availableTags.length > 0 || canCreateNew || isLoading), + (availableTags.length > 0 || canCreateNew || isLoading || searchQuery.trim()), }" />
@@ -304,7 +328,7 @@ onMounted(async () => {
{