diff --git a/admin-ui/src/components/search/search.vue b/admin-ui/src/components/search/search.vue
index 0fcee2d1a..4cc974fd2 100644
--- a/admin-ui/src/components/search/search.vue
+++ b/admin-ui/src/components/search/search.vue
@@ -454,9 +454,13 @@ const setCurrentFieldsKeys = () => {
}
}
- currentFieldsKeys.value = newCurrentFields.filter(
- (key) => !!allFields.value?.find((f) => f.key === key)
- );
+ currentFieldsKeys.value = [
+ ...new Set(
+ newCurrentFields.filter(
+ (key) => !!allFields.value?.find((f) => f.key === key)
+ )
+ ),
+ ];
};
const changeFields = ({ key }, value) => {
if (value) {
diff --git a/admin-ui/src/components/showcases_table.vue b/admin-ui/src/components/showcases_table.vue
index 10af353f5..e83f2b3ca 100644
--- a/admin-ui/src/components/showcases_table.vue
+++ b/admin-ui/src/components/showcases_table.vue
@@ -18,13 +18,25 @@
+
+
+
+
+
@@ -51,17 +63,18 @@ const headers = ref([
{ text: "Title", value: "title" },
{ text: "Preview", value: "preview" },
{ text: "Enabled", value: "public" },
+ { text: "Sorter", value: "sorter" },
]);
-const changeEnabled = async (item, value) => {
+const updateShowcase = async (item, { key, value }) => {
try {
updatedShowcase.value = item.uuid;
- const data = { ...item, public: value };
+ const data = { ...item, [key]: value };
await api.showcases.update(data);
store.commit("showcases/replaceShowcase", data);
} catch {
store.commit("snackbar/showSnackbarError", {
- message: "Error during update showcase enabled",
+ message: "Error during update showcase",
});
} finally {
updatedShowcase.value = "";
diff --git a/go.mod b/go.mod
index c5669ab52..161b9e13f 100644
--- a/go.mod
+++ b/go.mod
@@ -14,7 +14,7 @@ require (
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1
github.com/rabbitmq/amqp091-go v1.9.0
github.com/rs/cors v1.10.1
- github.com/slntopp/nocloud-proto v0.0.0-20231114150046-4971fd131496
+ github.com/slntopp/nocloud-proto v0.0.0-20231117131026-4eabeef236f4
github.com/spf13/viper v1.17.0
github.com/stoewer/go-strcase v1.3.0
github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75
diff --git a/go.sum b/go.sum
index 9318d136b..7ef85bf4b 100644
--- a/go.sum
+++ b/go.sum
@@ -205,8 +205,8 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
-github.com/slntopp/nocloud-proto v0.0.0-20231114150046-4971fd131496 h1:syITq4mprAvQt8LSw2lOA1/GjLykVjeRgLlLiKtk+lE=
-github.com/slntopp/nocloud-proto v0.0.0-20231114150046-4971fd131496/go.mod h1:CwJXNOt1iMCIskt/QA0Toyu2kdCmzYqEJ47e/G7Rg7E=
+github.com/slntopp/nocloud-proto v0.0.0-20231117131026-4eabeef236f4 h1:ZHKPElCEb0zsQNXZtPv/OT9RRitT2bPKc9k7fsbeZIQ=
+github.com/slntopp/nocloud-proto v0.0.0-20231117131026-4eabeef236f4/go.mod h1:CwJXNOt1iMCIskt/QA0Toyu2kdCmzYqEJ47e/G7Rg7E=
github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=
github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY=