diff --git a/theseus_gui/src/App.vue b/theseus_gui/src/App.vue index 2d654cf53..929dc96bc 100644 --- a/theseus_gui/src/App.vue +++ b/theseus_gui/src/App.vue @@ -434,7 +434,7 @@ command_listener(async (e) => { background-color: var(--color-raised-bg); color: var(--color-base); border-radius: 0; - height: 3.25rem; + height: var(--appbar-height); &.close { &:hover, @@ -483,7 +483,7 @@ command_listener(async (e) => { .router-view { width: 100%; - height: calc(100% - 3.125rem); + height: calc(100% - var(--appbar-height)); overflow: auto; overflow-x: hidden; background-color: var(--color-bg); diff --git a/theseus_gui/src/pages/instance/Mods.vue b/theseus_gui/src/pages/instance/Mods.vue index 5ab179c34..6a87e6418 100644 --- a/theseus_gui/src/pages/instance/Mods.vue +++ b/theseus_gui/src/pages/instance/Mods.vue @@ -43,23 +43,27 @@ Update all - + Add content + + + + + +

No projects found

Add a project to get started

-
-
- -
- +
{ } } -// const handleContentOptionClick = async (args) => { -// if (args.option === 'search') { -// await router.push({ -// path: `/browse/${props.instance.metadata.loader === 'vanilla' ? 'datapack' : 'mod'}`, -// query: { i: props.instance.path }, -// }) -// } else if (args.option === 'from_file') { -// const newProject = await open({ multiple: true }) -// if (!newProject) return +const onSearchContent = async () => { + await router.push({ + path: `/browse/${props.instance.metadata.loader === 'vanilla' ? 'datapack' : 'mod'}`, + query: { i: props.instance.path }, + }) +} -// for (const project of newProject) { -// await add_project_from_path(props.instance.path, project, 'mod').catch(handleError) -// } -// initProjects(await get(props.instance.path).catch(handleError)) -// } -// } +const onFileContent = async () => { + const newProject = await open({ multiple: true }) + if (!newProject) return + + for (const project of newProject) { + await add_project_from_path(props.instance.path, project, 'mod').catch(handleError) + } + initProjects(await get(props.instance.path).catch(handleError)) +} watch(selectAll, () => { for (const [key, value] of Array.from(selectionMap.value)) { @@ -961,9 +966,17 @@ onUnmounted(() => { white-space: nowrap; align-items: center; - :deep(.dropdown-row) { - .btn { - height: 2.5rem !important; + :deep { + .popup-container { + .btn { + height: 2.5rem !important; + } + } + + .dropdown-row { + .btn { + height: 2.5rem !important; + } } }