Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial Work toward Webpack 5 with Svue #89

Closed
wants to merge 11 commits into from
Next Next commit
remove comment
  • Loading branch information
thadk committed Feb 7, 2022
commit db67a20042d248a052921e5a0182bc1175665565
15 changes: 3 additions & 12 deletions src/pages/app/menus/AddonMenuItem.svelte
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
<script>
import MenuItem from "@/common/MenuItem";
import Tooltip from "@/common/Tooltip";
import { layout, dispatchAddonSelected,openDispatchAddon } from "@/manager/layout";
import {
selectedDocsInProject,
// addSelectedDocsToProject,
// removeSelectedDocsFromProject,
} from "@/manager/addons";
import { layout, openDispatchAddon } from "@/manager/layout";
import { handlePlural } from "@/util/string";

export let addon;

$: scope = "none"
// $layout.selected.length > 0 ? selectedDocsInProject(addon) : "none";


$: caption =
scope == "fully"
? `Remove ${handlePlural(
$layout.selected.length,
"document",
)} from next addon dispatch`
: `Add ${handlePlural($layout.selected.length, "document")} to next addon dispatch`;
: `Add ${handlePlural($layout.selected.length, "document")} to an addon dispatch`;

function handleClick() {
openDispatchAddon(addon)
Expand All @@ -38,8 +32,5 @@
<MenuItem on:click={handleClick}>
<Tooltip delay={500} {caption}>
{addon.name}
<span class="scope">
<!-- {#if scope == "fully"}✓{/if} -->
</span>
</Tooltip>
</MenuItem>