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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- (GH #1007) Create new Taginput component to replace Buefy's taginput component
- (GH #1009) Replace buefy toasts with c-toasts from `csc-ui`
- (GH #1014) Replace buefy snackbars with custom c-toasts from `csc-ui`
- (GL #944) Replace buefy b-input with c-text-field from `csc-ui`
- (GL #944) Replace buefy b-button with c-button from `csc-ui`
- (GL #944) Replace buefy b-select with c-select from `csc-ui`
- (GL #944) Replace buefy b-loading with c-loader from `csc-ui` and remove unused b-loading
- (GL #944) Replace buefy b-table with c-data-table from `csc-ui`

### Fixed

Expand Down
21 changes: 2 additions & 19 deletions swift_browser_ui_frontend/src/common/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ const store = new Vuex.Store({
active: {},
uname: "",
multipleProjects: false,
isLoading: false,
isFullPage: true,
objectCache: [], // Only for shared objects
langs: [
{ ph: "In English", value: "en" },
Expand Down Expand Up @@ -59,9 +57,6 @@ const store = new Vuex.Store({
uploadAbort: undefined,
},
mutations: {
loading(state, payload) {
state.isLoading = payload;
},
updateObjects(state, objects) {
// Update object cache with the new object listing.
state.objectCache = [...objects];
Expand All @@ -86,9 +81,6 @@ const store = new Vuex.Store({
// Update the username in store
state.uname = newUname;
},
setLoading(state, newValue) {
state.isLoading = newValue;
},
setSharingClient(state, newClient) {
state.client = newClient;
},
Expand Down Expand Up @@ -248,24 +240,18 @@ const store = new Vuex.Store({
},
actions: {
updateContainers: async function (
{ state, commit, dispatch },
{ state, dispatch },
{ projectID, signal },
) {
const existingContainers = await state.db.containers
.where({ projectID })
.toArray();
if (existingContainers.length === 0) {
commit("loading", true);
}
let containers;
let marker = "";
let newContainers = [];
do {
containers = [];
containers = await getContainers(projectID, marker).catch(() => {
commit("loading", false);
});
commit("loading", false);
containers = await getContainers(projectID, marker).catch(() => {});
if (containers.length > 0) {
containers.forEach(cont => {
cont.tokens = tokenize(cont.name);
Expand Down Expand Up @@ -494,7 +480,6 @@ const store = new Vuex.Store({
{ commit, dispatch },
{ project, owner, container, signal },
) {
commit("loading", true);
let sharedObjects = [];
let marker = "";
let objects = [];
Expand All @@ -507,7 +492,6 @@ const store = new Vuex.Store({
true,
owner,
).catch(() => {
commit("loading", false);
commit("updateObjects", []);
});

Expand All @@ -516,7 +500,6 @@ const store = new Vuex.Store({
marker = objects[objects.length - 1].name;
}
} while (objects.length > 0);
commit("loading", false);
commit("updateObjects", sharedObjects);
dispatch("updateObjectTags", {
projectID: project,
Expand Down
22 changes: 8 additions & 14 deletions swift_browser_ui_frontend/src/components/CopyFolderModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,17 @@
{{ $t("message.replicate.destinationExists") }}
</p>
</c-alert>
<b-field
custom-class="has-text-dark"
<c-text-field
id="new-copy-folderName"
v-csc-model="folderName"
:label="$t('message.replicate.name_newFolder')"
label-for="new-copy-folderName"
>
<b-input
id="new-copy-folderName"
v-model="folderName"
name="foldername"
custom-class="has-text-dark"
:loading="loadingFoldername"
/>
</b-field>
name="foldername"
:loading="loadingFoldername"
/>
<label
class="taginput-label"
label-for="copy-folder-taginput"
>
>
{{ $t('message.tagName') }}
</label>
<TagInput
Expand Down Expand Up @@ -307,4 +301,4 @@ c-card-actions {
c-card-actions > c-button {
margin: 0;
}
</style>
</style>
19 changes: 7 additions & 12 deletions swift_browser_ui_frontend/src/components/CreateFolderModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,14 @@
<p class="info-text is-size-6">
{{ $t("message.container_ops.norename") }}
</p>
<b-field
custom-class="has-text-dark"
<c-text-field
id="folderName"
v-csc-model="folderName"
:label="$t('message.container_ops.folderName')"
label-for="folderName"
>
<b-input
id="folderName"
v-model="folderName"
name="foldername"
aria-required="true"
data-testid="folder-name"
/>
</b-field>
name="foldername"
aria-required="true"
data-testid="folder-name"
/>
<label
class="taginput-label"
label-for="create-folder-taginput"
Expand Down
23 changes: 15 additions & 8 deletions swift_browser_ui_frontend/src/components/ObjectTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,18 @@
id="optionsbar"
justify="space-between"
>
<div class="search">
<b-input
v-model="searchQuery"
:placeholder="$t('message.objects.filterBy')"
type="search"
icon="filter-variant"
<c-text-field
id="search"
v-csc-model="searchQuery"
name="search"
:placeholder="$t('message.objects.filterBy')"
type="search"
>
<i
slot="pre"
class="mdi mdi-filter-variant mdi-24px"
/>
</div>

</c-text-field>
<c-menu
:key="optionsKey"
:items.prop="tableOptions"
Expand Down Expand Up @@ -764,6 +767,10 @@ export default {
<style scoped lang="scss">
@import "@/css/prod.scss";

#search {
flex: 0.4;
}

.back-link {
display: flex;
padding-bottom: .5rem;
Expand Down
5 changes: 2 additions & 3 deletions swift_browser_ui_frontend/src/components/SearchBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@
v-if="searchArray.length > 0 && searchArray[0].length > 1"
class="media empty-search"
>
<b-loading
v-model="isSearching"
:is-full-page="false"
<c-loader
v-show="isSearching"
/>
<div
v-show="!isSearching"
Expand Down
6 changes: 4 additions & 2 deletions swift_browser_ui_frontend/src/components/UploadModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,13 @@
rows="3"
/>
<c-button
type="is-success"
icon-left="lock-plus"
@click="appendPublicKey"
@keyup.enter="appendPublicKey"
>
<i
slot="icon"
class="mdi mdi-lock-plus"
/>
{{ $t("message.encrypt.addkey") }}
</c-button>
<c-data-table
Expand Down
6 changes: 0 additions & 6 deletions swift_browser_ui_frontend/src/entries/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,6 @@ new Vue({
user() {
return this.$store.state.uname;
},
isFullPage() {
return this.$store.state.isFullPage;
},
isLoading() {
return this.$store.state.isLoading;
},
isChunking() {
return this.$store.state.isChunking;
},
Expand Down
2 changes: 1 addition & 1 deletion swift_browser_ui_frontend/src/entries/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ new Vue ({
loginformname: "Openstack account:",
idb: true,
projects: [],
langs: [{ph: "In English", value: "en"}, {ph: "Suomeksi", value: "fi"}],
langs: [{name: "In English", value: "en"}, {name: "Suomeksi", value: "fi"}],
},
created() {
document.title = this.$t("message.program_name");
Expand Down
5 changes: 0 additions & 5 deletions swift_browser_ui_frontend/src/pages/BrowserPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@
<CopyFolderModal />
</c-modal>
<router-view class="content-wrapper" />
<b-loading
:is-full-page="isFullPage"
:active.sync="isLoading"
:can-cancel="false"
/>
<c-toasts id="toasts" />
<!-- TODO: Move folder toast to programmatical modal -->
<c-toasts
Expand Down
47 changes: 18 additions & 29 deletions swift_browser_ui_frontend/src/pages/SelectPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,45 +9,34 @@
v-for="project in projects.filter(pro => pro.tainted)"
:key="project.id"
>
<b-button
tag="a"
expanded
<c-button
:href="'/lock/'.concat(project.id)"
size="is-large"
type="is-primary is-outlined"
size="large"
outlined
fit
>
{{ project.name }}
</b-button>
</c-button>
</p>
<p>
<b-button
tag="a"
expanded
<c-button
href="/lock/none"
size="is-large"
type="is-primary is-outlined"
size="large"
outlined
fit
>
{{ $t("message.select.unrestricted" ) }}
</b-button>
</c-button>
</p>
<p>
<b-field class="locale-changed block center">
<b-select
v-model="$i18n.locale"
placeholder="Language"
icon="earth"
expanded
@input="setCookieLang ()"
>
<option
v-for="lang in langs"
:key="lang.value"
:value="lang.value"
>
{{ lang.ph }}
</option>
</b-select>
</b-field>
<c-select
v-csc-model="$i18n.locale"
class="locale-changed block center"
placeholder="Language"
:items="langs"
fit
@input="setCookieLang ()"
/>
</p>
</div>
</div>
Expand Down
Loading