Skip to content

Commit

Permalink
Several fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Megageorgio committed Oct 5, 2024
1 parent b1dbaeb commit 1470c04
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 12 deletions.
4 changes: 2 additions & 2 deletions client/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ button:
search: Search
placeholder:
name: Singer name
languages: Voicebank languages
types: Voicebank types
languages: VB languages
types: VB types
tags: Tags
sort:
popular: Popular
Expand Down
4 changes: 2 additions & 2 deletions client/locales/ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ button:
search: Поиск
placeholder:
name: Имя вокалиста
languages: Языки войсбанков
types: Типы войсбанков
languages: Языки
types: Типы
tags: Теги
sort:
popular: Популярные
Expand Down
Binary file added client/public/fonts/OpenSans.ttf
Binary file not shown.
11 changes: 10 additions & 1 deletion client/src/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const page = ref(1)
const loading = ref(false)
const finished = ref(false)
const searchQuery = ref('')
const oldSearchQuery = ref('')
const selectedTags = ref<string[]>([])
const selectedTypes = ref<string[]>([])
const selectedLanguages = ref<string[]>([])
Expand Down Expand Up @@ -83,6 +84,13 @@ function filterResults() {
fetchSingers()
}
function filterResultsFromBlur() {
if (searchQuery.value !== oldSearchQuery.value) {
oldSearchQuery.value = searchQuery.value
filterResults()
}
}
const loadMoreRef = ref<HTMLElement | null>(null)
useIntersectionObserver(
loadMoreRef,
Expand All @@ -109,7 +117,7 @@ onMounted(() => {
<b-form-input
v-model="searchQuery"
style="height: 40px"
:placeholder="`${t('placeholder.name')}`" class="me-2" @blur="filterResults" @keyup.enter="filterResults"
:placeholder="`${t('placeholder.name')}`" class="me-2" @blur="filterResultsFromBlur" @keyup.enter="filterResults"
/>
<Multiselect
v-model="selectedLanguages"
Expand Down Expand Up @@ -211,6 +219,7 @@ onMounted(() => {
transition:
transform 0.3s ease-in-out,
box-shadow 0.3s ease-in-out;
font-weight: normal;
}
.stars-container {
position: absolute; /* Абсолютное позиционирование для блока со звездами */
Expand Down
1 change: 1 addition & 0 deletions client/src/pages/users/[user].vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ onMounted(fetchUser)
transition:
transform 0.3s ease-in-out,
box-shadow 0.3s ease-in-out;
font-weight: normal;
}
.stars-container {
position: absolute;
Expand Down
10 changes: 9 additions & 1 deletion client/src/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ width: 100%;
height: 225px;
}

.multiselect {
box-shadow: 0 0 0 3px #4ea6ea00 !important;
}

.is-selected,
.is-pointed {
background: #4ea6ea !important;
}

@include color-mode(light) {
body {
background: rgb(249, 249, 249);
Expand Down Expand Up @@ -58,7 +67,6 @@ height: 225px;
.multiselect-dropdown {
background-color: #212529;
border-color:rgb(73, 80, 87);
--vf-ring-color: #4ea6ea;
}

}
Expand Down
9 changes: 4 additions & 5 deletions server/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,28 @@
var connectionString = builder.Configuration.GetConnectionString("SQLiteConnection") ?? throw new InvalidOperationException("Connection string 'SQLiteConnection' not found.");
builder.Services.AddDbContext<ApplicationContext>(options =>
options.UseSqlite(connectionString));
//builder.Services.AddLettuceEncrypt();
}
else
{
var connectionString = builder.Configuration.GetConnectionString("MySQLConnection") ?? throw new InvalidOperationException("Connection string 'MySQLConnection' not found.");
var mysqlVersion = builder.Configuration.GetConnectionString("MySQLVersion") ?? throw new InvalidOperationException("'MySQLVersion' not found.");

builder.Services.AddDbContext<ApplicationContext>(options =>
options.UseMySql(connectionString, ServerVersion.Parse(mysqlVersion)));
builder.Services.AddLettuceEncrypt();
}

var MyAllowSpecificOrigins = "_myAllowSpecificOrigins";

var frontendUrl = builder.Configuration.GetValue<string>("FrontendUrl");

builder.Services.AddCors(options =>
{
options.AddPolicy(name: MyAllowSpecificOrigins,
builder =>
{
builder.WithOrigins("https://visingers.github.io");
builder.WithOrigins(frontendUrl);
});
});

builder.Services.AddLettuceEncrypt();
builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
Expand Down
3 changes: 2 additions & 1 deletion server/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
"AcceptTermsOfService": true,
"DomainNames": [],
"EmailAddress": ""
}
},
"FrontendUrl": "https://visingers.github.io"
}

0 comments on commit 1470c04

Please sign in to comment.