2021-08-06 08:31:17 +00:00
|
|
|
<!--
|
|
|
|
// Copyright © 2020 Anticrm Platform Contributors.
|
|
|
|
//
|
|
|
|
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License. You may
|
|
|
|
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
//
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
-->
|
|
|
|
<script lang="ts">
|
2022-02-04 09:03:24 +00:00
|
|
|
import type { Ref } from '@anticrm/core'
|
|
|
|
import type { Application } from '@anticrm/workbench'
|
2022-02-08 14:33:56 +00:00
|
|
|
import { createEventDispatcher } from 'svelte'
|
2022-02-04 09:03:24 +00:00
|
|
|
import AppItem from './AppItem.svelte'
|
2022-09-16 02:59:16 +00:00
|
|
|
import { Scroller } from '@anticrm/ui'
|
2021-08-06 08:31:17 +00:00
|
|
|
|
|
|
|
export let active: Ref<Application> | undefined
|
2021-11-29 10:06:53 +00:00
|
|
|
export let apps: Application[] = []
|
2021-08-06 08:31:17 +00:00
|
|
|
|
2022-02-08 14:33:56 +00:00
|
|
|
const dispatch = createEventDispatcher()
|
2021-08-06 08:31:17 +00:00
|
|
|
</script>
|
|
|
|
|
2022-09-16 02:59:16 +00:00
|
|
|
<div class="flex-col align-center py-1">
|
|
|
|
<Scroller invertScroll padding={'.5rem .5rem'}>
|
|
|
|
{#each apps as app}
|
|
|
|
<AppItem
|
|
|
|
selected={app._id === active}
|
|
|
|
icon={app.icon}
|
|
|
|
label={app.label}
|
|
|
|
action={async () => {
|
|
|
|
dispatch('active', app)
|
|
|
|
}}
|
|
|
|
notify={false}
|
|
|
|
/>
|
|
|
|
{/each}
|
|
|
|
</Scroller>
|
2021-08-06 08:31:17 +00:00
|
|
|
</div>
|