-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
extracted DialogTeamspaceTypes and DialogTeamspaceCreate together in view TeamspaceCreate
- Loading branch information
Showing
5 changed files
with
121 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<template> | ||
<dialog-view pos="store"> | ||
<div> | ||
<base-button v-for="(spaceTypeInfo, i) in types" | ||
:key="i" | ||
@click.stop="handleTypeSelect(spaceTypeInfo)" | ||
style="min-height: 45px; width: 100%; padding: 4px 0;" | ||
> | ||
<div style="display: flex; line-height: 120%; width: 100%; user-select: none; padding-top: 4px; padding-bottom: 4px;"> | ||
<div style="margin-left: 10px; margin-right: 6px;"> | ||
<div>{{ spaceTypeInfo.type }}</div> | ||
|
||
<div style="margin-top: 2px; font-size: 12px; color: rgb(120, 119, 116);" | ||
>{{ spaceTypeInfo.description }}</div> | ||
</div> | ||
</div> | ||
</base-button> | ||
</div> | ||
</dialog-view> | ||
</template> | ||
|
||
<script setup> | ||
import DialogView from './DialogView.vue'; | ||
import BaseButton from './BaseButton.vue'; | ||
import { useGeneralStore } from '@/stores/general'; | ||
import { defineEmits } from 'vue'; | ||
const emits = defineEmits(["typeSelect"]); | ||
const types = [ | ||
{ type: "Default", description: "Everyone at workspace must me member" }, | ||
{ type: "Open", description: "Anyone can see and join this teamspace" }, | ||
{ type: "Closed", description: "Anyone can see teamspace but not join" } | ||
]; | ||
function handleTypeSelect(type) { | ||
emits("typeSelect", type); | ||
useGeneralStore().hideCurrentComponent(); | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<template> | ||
<dialog-teamspace-create | ||
:type="selectedType" | ||
/> | ||
|
||
<dialog-teamspace-types | ||
@typeSelect="selectedType = $event" | ||
v-if="components?.[components.length-1].name === 'dialog_teamspace_types'" | ||
/> | ||
</template> | ||
|
||
<script setup> | ||
import { ref } from "vue"; | ||
import DialogTeamspaceCreate from "../components/DialogTeamspaceCreate.vue"; | ||
import DialogTeamspaceTypes from "../components/DialogTeamspaceTypes.vue"; | ||
import { useGeneralStore } from "@/stores/general"; | ||
const components = useGeneralStore().components; | ||
const selectedType = ref({ | ||
type: "Open", | ||
description: "Everyone can see and join this teamspace" | ||
}); | ||
</script> |