Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/config/.finnishwords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ haku
hakuindeksi
haluat
haluatko
halutaan
halutako
Halutessasi
haluttu
halutun
hinnoittelulaskuri
Expand All @@ -63,6 +65,8 @@ jaettua
jaettuja
jaetun
jaetut
jakaa
jakaa
jakamaan
jakamasi
jakaminen
Expand All @@ -74,15 +78,20 @@ jakoa
jakopyynnöt
jakopyyntöjä
jakopyyntöjen
jakotunnus
jakotunnusta
jälkeen
jälkeenpäin
jäsenelle
jäseneltä
jäsenet
jäsenille
jäsenten
jne
jo
johtaa
johtua
joltakin
jonka
jos
jota
Expand Down Expand Up @@ -204,6 +213,7 @@ luo
luonnin
luonti
luotu
lupa
määrä
määrästä
mahdollisia
Expand All @@ -230,6 +240,7 @@ muuttaa
muuttaaksesi
näkyvissä
nämä
nappi
nappia
navigointia
näytä
Expand Down Expand Up @@ -268,6 +279,7 @@ omistavan
on
ongelmiin
onnistui
onnistuneesti
onnistunut
onnistuu
operaatio
Expand Down Expand Up @@ -303,6 +315,7 @@ poista
poistaa
poistaminen
poistettava
poistettiin
poistettu
polku
postamista
Expand Down Expand Up @@ -454,6 +467,7 @@ tilapäisesti
toiminto
toiseen
toisen
toisesta
toteuttaa
tueta
tuettu
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- (GH #884) Fixed multiple bugs
- Redirected to AllFolders view whenever the selected project changes
- Modified function and fixed notification for removing a shared permission
- Made modal's scroll position to be always on top when opening a modal
- Add tooltip for Copy Share ID button
- Fine-tuned modals' font sizes and gaps between elements
- (GH #858) Fixed for multiple bugs related to modals and background page's scrolling effect
- (GH #853) Fix Node 18 needing python for npm install
- (GH #827) Fixed for updating folder's items count and size when deleting objects inside it
Expand Down
21 changes: 19 additions & 2 deletions swift_browser_ui_frontend/src/common/lang.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,14 @@ let default_translations = {
share: {
share: "Share",
share_id: "Share ID",
share_id_tooltip:
"When another project wants share a folder " +
"with your project: Select this button and " +
"send Share ID (now copied in your cache) " +
"to the project’s member. " +
"When you want to share a folder with " +
"another project. Ask Share ID from " +
"another project’s member.",
close: "Close",
instructions: "Share ID instructions",
close_instructions: "Close instructions",
Expand All @@ -194,7 +202,8 @@ let default_translations = {
read_perm: "Read",
write_perm: "Read and write",
shared_successfully: "Folder was shared successfully!",
project_id: "Project ID",
remove_permission: "Permission was removed successfully!",
shared_table_title: "Project's folder has been shared with",
field_label: "Project Identifiers to share with",
field_placeholder: "Add Share IDs",
cancel: "Cancel",
Expand Down Expand Up @@ -623,6 +632,12 @@ let default_translations = {
share: {
share: "Jaa",
share_id: "Jaa tunnus",
share_id_tooltip:
"Mikäli toisesta projektista halutaan jakaa kansio projektisi " +
"kanssa: Valitse tämä nappi ja lähetä Jakotunnus toisen " +
"projektin jäsenelle. Halutessasi jakaa kansion toisen " +
"projektin kanssa, pyydä jakotunnusta joltakin kyseisen " +
"projektin jäseneltä.",
close: "Kiinni",
instructions: "Jaa tunnus ohjeet",
close_instructions: "Sulje ohjeet",
Expand All @@ -640,7 +655,9 @@ let default_translations = {
read_perm: "Salli säiliön luku",
write_perm: "Salli säiliöön kirjoitus",
shared_successfully: "Kansion jakaminen onnistui!",
project_id: "Jaa tunnus",
remove_permission: "Lupa poistettiin onnistuneesti!",
shared_table_title: "Projektin kansio on jaettu",
project_id: "Projektin tunnus",
field_label: "Jaa projektitunnisteille",
field_placeholder: "Lisää projektitunnukset",
cancel: "Peru",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,21 @@
/>
{{ $t("message.copy") }} {{ $t("message.share.share_id") }}
</c-button>
<div class="tooltip">
<c-icon-button text>
<i class="mdi mdi-information-outline" />
</c-icon-button>
<span class="tooltip-content">
{{ $t("message.share.share_id_tooltip") }}
</span>
</div>
</div>
<c-toasts
id="copy-toasts"
vertical="center"
data-testid="copy-toasts"
/>

<c-spacer />

<div class="navbar-item">
<c-button
outlined
Expand Down Expand Up @@ -96,10 +102,9 @@ export default {
const item = event.target.value;
if (item.id !== this.active.id) {
const navigationParams = {
name: this.$router.name,
name: "AllFolders",
params: {user: this.uname, project: item.id},
};

// Pushing to router before ´go´ method
// enables navigation with updated item id
this.$router.push(navigationParams);
Expand Down Expand Up @@ -140,6 +145,9 @@ export default {
});
}
},
hoverTooltip: function () {
console.log("HOVER!");
},
},
};
</script>
Expand Down Expand Up @@ -180,4 +188,54 @@ export default {
flex: auto;
}
}

.tooltip {
position: relative;
display: inline-block;
}

.tooltip-content {
visibility: hidden;
text-align: left;
width: 20rem;
background-color: $white;
color: $text;
border: 1px solid $csc-primary;
border-radius: 0.375rem;
padding: 1rem;

/* Position the tooltip */
position: absolute;
z-index: 5;
top: 120%;
left: 50%;
margin-left: -10rem;
}

.tooltip:hover .tooltip-content {
visibility: visible;
}

.tooltip-content::before {
content: " ";
position: absolute;
left: 46%;
bottom: 100%;
width: 0;
height: 0;
border: 0.7rem solid transparent;
border-bottom-color: $csc-primary;
}
.tooltip-content::after {
content: " ";
position: absolute;
left: 50%;
bottom: 100%;
width: 0;
height: 0;
margin-left: -0.75rem;
border: 0.65rem solid transparent;
border-bottom-color: $white;
}

</style>
17 changes: 12 additions & 5 deletions swift_browser_ui_frontend/src/components/CopyFolderModal.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<template>
<c-card class="copy-folder">
<div class="modal-content-wrapper">
<h3 class="title is-3 has-text-dark">
<h4 class="title is-4 has-text-dark">
{{
$t("message.replicate.copy_folder") + selectedFolderName
}}
</h3>
</h4>
<c-card-content>
<c-alert
v-show="folderExists"
Expand All @@ -23,6 +23,7 @@
v-model="folderName"
name="foldername"
custom-class="has-text-dark"
:loading="loadingFoldername"
/>
</b-field>
<b-field
Expand Down Expand Up @@ -81,6 +82,7 @@ export default {
return {
folderExists: false,
folderName: "",
loadingFoldername: true,
tags: [],
taginputConfirmKeys,
folders: [],
Expand All @@ -103,7 +105,9 @@ export default {
selectedFolderName: function () {
if (this.selectedFolderName && this.selectedFolderName.length > 0) {
this.fetchFolders().then(() => {
this.getCopyFolder(this.selectedFolderName);
if(this.folders && this.folders.length > 0) {
this.getCopyFolder(this.selectedFolderName);
}
});
}
},
Expand Down Expand Up @@ -133,7 +137,7 @@ export default {
});
},
getCopyFolder: function (origFolderName) {
if (this.folders.value) {
if (this.folders) {
// Check if current folder is a copy
const reg = new RegExp("\\b(copy)\\s(\\d+)\\b$", "i");
const isCopied = origFolderName.match(reg);
Expand All @@ -147,7 +151,7 @@ export default {
}

const existingCopiedFolders = [];
for (let folder of this.folders.value) {
for (let folder of this.folders) {
// Check if folder is one of the copy versions
// which ends in the form 'copy + number'
const copiedReg = new RegExp(`\\b${copiedFolder}\\s(\\d+)\\b$`, "gi");
Expand All @@ -162,7 +166,10 @@ export default {
const latestVer= existingCopiedFolders[
existingCopiedFolders.length-1].match(reg);
this.folderName = !isCopied ? `${copiedFolder} ${+latestVer[2] + 1}` : origFolderName.replace(/\d+$/, +latestVer[2]+1);
} else {
this.folderName = `${copiedFolder} 1`;
}
this.loadingFoldername = false;
}
},
checkSelectedFolder: function () {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
<template>
<c-card class="add-folder">
<div class="modal-content-wrapper">
<h3 class="title is-3 has-text-dark">
<div
id="createFolder-modal-content"
class="modal-content-wrapper"
>
<h4 class="title is-4 has-text-dark">
{{
create
? $t("message.container_ops.addContainer")
: $t("message.container_ops.editContainer") + folderName
}}
</h3>
</h4>
<c-card-content>
<p class="info-text is-size-6">
{{ $t("message.container_ops.norename") }}
Expand Down
4 changes: 2 additions & 2 deletions swift_browser_ui_frontend/src/components/EditTagsModal.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<c-card class="edit-tags">
<h3 class="title is-3 has-text-dark">
<h4 class="title is-4 has-text-dark">
{{ $t('message.objects.editObject') + object.name }}
</h3>
</h4>
<c-card-content>
<b-field
custom-class="has-text-dark"
Expand Down
Loading