refactor: Move group actions to header bar

This commit is contained in:
ThatOneCalculator 2022-09-13 19:14:28 -07:00
parent 47509e28b1
commit fa4b8aca63
3 changed files with 24 additions and 25 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "calckey", "name": "calckey",
"version": "12.119.0-calc-rc.2.3", "version": "12.119.0-calc-rc.2.4",
"codename": "aqua", "codename": "aqua",
"repository": { "repository": {
"type": "git", "type": "git",

View file

@ -1,23 +1,7 @@
<template> <template>
<MkStickyContainer> <MkStickyContainer>
<template #header><MkPageHeader/></template> <template #header><MkPageHeader :actions="headerActions"/></template>
<div class="mk-group-page"> <div class="mk-group-page">
<div class="_section">
<div
class="_content"
style="display: flex; gap: var(--margin); flex-wrap: wrap"
>
<MkButton inline @click="invite()">{{ i18n.ts.invite }}</MkButton>
<MkButton inline @click="renameGroup()">{{
i18n.ts.rename
}}</MkButton>
<MkButton inline @click="transfer()">{{ i18n.ts.transfer }}</MkButton>
<MkButton inline @click="deleteGroup()">{{
i18n.ts.delete
}}
</MkButton>
</div>
</div>
<div class="_section members _gap"> <div class="_section members _gap">
<div class="_content"> <div class="_content">
<div class="users"> <div class="users">
@ -143,16 +127,31 @@ definePageMetadata(
icon: "fas fa-users", icon: "fas fa-users",
})), })),
); );
const headerActions = $computed(() => [
{
icon: 'fas fa-plus',
text: i18n.ts.invite,
handler: invite,
}, {
icon: 'fas fa-i-cursor',
text: i18n.ts.rename,
handler: renameGroup,
}, {
icon: 'fas fa-right-left',
text: i18n.ts.transfer,
handler: transfer,
}, {
icon: 'fas fa-trash-alt',
text: i18n.ts.delete,
handler: deleteGroup,
},
]);
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.mk-group-page { .mk-group-page {
> ._section {
> ._content {
padding-top: 1rem;
justify-content: center;
}
}
> .members { > .members {
> ._content { > ._content {
> .users { > .users {

View file

@ -90,7 +90,7 @@ const headerActions = $computed(() => [
icon: 'fas fa-plus', icon: 'fas fa-plus',
text: i18n.ts.createGroup, text: i18n.ts.createGroup,
handler: create, handler: create,
} },
]); ]);
const headerTabs = $computed(() => [{ const headerTabs = $computed(() => [{