Skip to content

Commit

Permalink
Merge branch 'master' into sequester-with-key-rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
touilleMan authored Jan 14, 2025
2 parents 16b84d6 + 5e5e1cc commit 7dee4d7
Show file tree
Hide file tree
Showing 19 changed files with 256 additions and 124 deletions.
40 changes: 11 additions & 29 deletions client/src/components/sidebar/SidebarMenuList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
lines="none"
class="list-sidebar-header title-h5"
:class="isContentVisible ? 'open' : 'close'"
@click="setContentVisible(!isContentVisible)"
@click="emits('update:isContentVisible', !isContentVisible)"
>
<div class="list-sidebar-header-title">
<ion-icon
v-if="icon"
class="list-sidebar-header-title__icon"
:icon="icon"
/>
Expand All @@ -19,7 +20,7 @@
</div>
<ion-icon
class="list-sidebar-toggle-icon"
:icon="isContentVisible ? remove : add"
:icon="isContentVisible ? chevronDown : chevronForward"
/>
</ion-header>
<div
Expand All @@ -34,41 +35,25 @@
<script setup lang="ts">
import { IonList, IonHeader, IonIcon, IonText } from '@ionic/vue';
import { Translatable } from 'megashark-lib';
import { ref } from 'vue';
import { add, remove } from 'ionicons/icons';

const isContentVisible = ref(true);
import { chevronDown, chevronForward } from 'ionicons/icons';

defineProps<{
title: Translatable;
icon: string;
icon?: string;
isContentVisible: boolean;
}>();

defineExpose({
isContentVisible,
setContentVisible,
});

const emits = defineEmits<{
(event: 'visibilityChanged', visibility: boolean): void;
(event: 'update:isContentVisible', visibility: boolean): void;
}>();

function setContentVisible(visible: boolean, blockEvent = false): void {
isContentVisible.value = visible;
if (!blockEvent) {
emits('visibilityChanged', isContentVisible.value);
}
}
</script>

<style scoped lang="scss">
.list-sidebar {
display: flex;
flex-direction: column;
flex: 1;
gap: 0.5rem;
margin-bottom: 1rem;
padding: 0.5rem;
border-radius: var(--parsec-radius-8);

&.list-file {
Expand All @@ -80,11 +65,14 @@ function setContentVisible(visible: boolean, blockEvent = false): void {
align-items: center;
justify-content: space-between;
transition: border 0.2s ease-in-out;
border-radius: var(--parsec-radius-6);
padding: 0.25rem 0.5rem;
opacity: 0.8;
cursor: pointer;

&:hover {
opacity: 1;
background: var(--parsec-color-light-primary-30-opacity15);
}

&.open {
Expand All @@ -107,18 +95,12 @@ function setContentVisible(visible: boolean, blockEvent = false): void {
user-select: none;
}
}

&:active {
.list-sidebar-toggle-icon {
scale: 0.85;
}
}
}

&-toggle-icon {
user-select: none;
padding: 0.125rem;
font-size: 1.25rem;
font-size: 1rem;
border-radius: var(--parsec-radius-6);
color: var(--parsec-color-light-secondary-inversed-contrast);
}
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/sidebar/SidebarWorkspaceItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ onBeforeUnmount(async () => {
.sidebar-item {
--background: none;
border-radius: var(--parsec-radius-8);
border: solid 1px transparent;
--min-height: 0;
--padding-start: 0.75rem;
--padding-end: 0.75rem;
Expand Down Expand Up @@ -93,7 +94,7 @@ onBeforeUnmount(async () => {
}

&:hover {
outline: solid 1px var(--parsec-color-light-primary-30-opacity15);
border-color: var(--parsec-color-light-primary-30-opacity15);
cursor: pointer;

.sidebar-item-workspace__option {
Expand Down
4 changes: 2 additions & 2 deletions client/src/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,9 @@
"passwordChoice": "Password",
"acceptTOS": {
"label": "By using Parsec, I accept the ",
"tos": "Terms and Conditions ",
"tos": "Terms and Conditions",
"tosLink": "https://parsec.cloud/gtcs-parsec/",
"and": "and ",
"and": " and ",
"privacyPolicy": "Privacy Policy",
"privacyPolicyLink": "https://parsec.cloud/en/politique-de-confidentialite/",
"update": {
Expand Down
4 changes: 2 additions & 2 deletions client/src/locales/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,9 @@
"passwordChoice": "Mot de passe",
"acceptTOS": {
"label": "En utilisant Parsec, j'accepte les",
"tos": "Conditions Générales de Vente et d'Utilisation ",
"tos": "Conditions Générales de Vente et d'Utilisation",
"tosLink": "https://parsec.cloud/cgvu-parsec/",
"and": "et la ",
"and": " et la ",
"privacyPolicy": "Politique de Confidentialité",
"privacyPolicyLink": "https://parsec.cloud/fr/politique-de-confidentialite/",
"update": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ async function onFieldUpdated(): Promise<void> {

a {
color: var(--parsec-color-light-primary-500);

&:hover {
text-decoration: underline;
}
}
}
</style>
Loading

0 comments on commit 7dee4d7

Please sign in to comment.