Skip to content

Commit

Permalink
Merge branch 'master' into add-username-in-sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
o1egl committed Apr 25, 2024
2 parents 86fef39 + 434e49b commit 6b094e1
Show file tree
Hide file tree
Showing 39 changed files with 93 additions and 679 deletions.
18 changes: 4 additions & 14 deletions .github/workflows/main.yaml
Expand Up @@ -24,21 +24,11 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22.1
go-version: 1.22.2
- run: make lint-backend
lint-commits:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '18'
- run: make lint-commits
lint:
runs-on: ubuntu-latest
needs: [lint-frontend, lint-backend, lint-commits]
needs: [lint-frontend, lint-backend]
steps:
- run: echo "done"

Expand All @@ -57,7 +47,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22.1
go-version: 1.22.2
- run: make test-backend
test:
runs-on: ubuntu-latest
Expand All @@ -76,7 +66,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: 1.22.1
go-version: 1.22.2
- uses: actions/setup-node@v4
with:
node-version: '18'
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/pr-lint.yaml
@@ -0,0 +1,46 @@
name: "Lint PR"

on:
pull_request_target:
types:
- opened
- reopened
- edited
- synchronize

permissions:
pull-requests: write

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
id: lint_pr_title
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: marocchino/sticky-pull-request-comment@v2
# When the previous steps fails, the workflow would stop. By adding this
# condition you can continue the execution with the populated error message.
if: always() && (steps.lint_pr_title.outputs.error_message != null)
with:
header: pr-title-lint-error
message: |
Hey there and thank you for opening this pull request! 👋🏼
We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.
Details:
```
${{ steps.lint_pr_title.outputs.error_message }}
```
# Delete a previous comment when the issue has been resolved
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}
uses: marocchino/sticky-pull-request-comment@v2
with:
header: pr-title-lint-error
delete: true
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -27,7 +27,7 @@ test-backend: ## Run backend tests
$Q $(go) test -v ./...

.PHONY: lint
lint: lint-frontend lint-backend lint-commits ## Run all linters
lint: lint-frontend lint-backend ## Run all linters

.PHONY: lint-frontend
lint-frontend: ## Run frontend linters
Expand Down
4 changes: 2 additions & 2 deletions cmd/users_import.go
Expand Up @@ -60,7 +60,7 @@ list or set it to 0.`,
// User exists in DB.
if err == nil {
if !overwrite {
checkErr(errors.New("user " + strconv.Itoa(int(user.ID)) + " is already registred"))
checkErr(errors.New("user " + strconv.Itoa(int(user.ID)) + " is already registered"))
}

// If the usernames mismatch, check if there is another one in the DB
Expand All @@ -84,6 +84,6 @@ list or set it to 0.`,
}

func usernameConflictError(username string, originalID, newID uint) error {
return fmt.Errorf(`can't import user with ID %d and username "%s" because the username is already registred with the user %d`,
return fmt.Errorf(`can't import user with ID %d and username "%s" because the username is already registered with the user %d`,
newID, username, originalID)
}
6 changes: 3 additions & 3 deletions frontend/src/components/prompts/UploadFiles.vue
Expand Up @@ -74,7 +74,6 @@ export default {
"getETA",
]),
...mapWritableState(useFileStore, ["reload"]),
...mapActions(useUploadStore, ["reset"]),
formattedETA() {
if (!this.getETA || this.getETA === Infinity) {
return "--:--:--";
Expand All @@ -92,6 +91,7 @@ export default {
},
},
methods: {
...mapActions(useUploadStore, ["reset"]), // Mapping reset action from upload store

Check warning on line 94 in frontend/src/components/prompts/UploadFiles.vue

View workflow job for this annotation

GitHub Actions / lint-frontend

Delete `·`
toggle: function () {
this.open = !this.open;
},
Expand All @@ -100,8 +100,8 @@ export default {
abortAllUploads();
buttons.done("upload");
this.open = false;
this.reset();
this.reload = true;
this.reset(); // Resetting the upload store state

Check warning on line 103 in frontend/src/components/prompts/UploadFiles.vue

View workflow job for this annotation

GitHub Actions / lint-frontend

Delete `·`
this.reload = true; // Trigger reload in the file store

Check warning on line 104 in frontend/src/components/prompts/UploadFiles.vue

View workflow job for this annotation

GitHub Actions / lint-frontend

Delete `·`
}
},
},
Expand Down
50 changes: 25 additions & 25 deletions frontend/src/components/settings/Languages.vue
@@ -1,7 +1,7 @@
<template>
<select name="selectLanguage" v-on:change="change" :value="locale">
<option v-for="(language, value) in locales" :key="value" :value="value">
{{ $t("languages." + language) }}
{{ language }}
</option>
</select>
</template>
Expand All @@ -15,30 +15,30 @@ export default {
data() {
let dataObj = {};
const locales = {
he: "he",
hu: "hu",
ar: "ar",
de: "de",
el: "el",
en: "en",
es: "es",
fr: "fr",
is: "is",
it: "it",
ja: "ja",
ko: "ko",
"nl-be": "nlBE",
pl: "pl",
"pt-br": "ptBR",
pt: "pt",
ro: "ro",
ru: "ru",
sk: "sk",
"sv-se": "svSE",
tr: "tr",
uk: "uk",
"zh-cn": "zhCN",
"zh-tw": "zhTW",
he: "עברית",
hu: "Magyar",
ar: "العربية",
de: "Deutsch",
el: "Ελληνικά",
en: "English",
es: "Español",
fr: "Français",
is: "Icelandic",
it: "Italiano",
ja: "日本語",
ko: "한국어",
"nl-be": "Dutch (Belgium)",
pl: "Polski",
"pt-br": "Português",
pt: "Português (Brasil)",
ro: "Romanian",
ru: "Русский",
sk: "Slovenčina",
"sv-se": "Swedish (Sweden)",
tr: "Türkçe",
uk: "Українська",
"zh-cn": "中文 (简体)",
"zh-tw": "中文 (繁體)",
};
// Vue3 reactivity breaks with this configuration
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/css/_share.css
Expand Up @@ -68,11 +68,11 @@
border-top: 1px solid var(--borderPrimary);
}

.share__box__items #listing.list .item .name {
#listing.list .item .name {
width: 50%;
}

.share__box__items #listing.list .item .modified {
#listing.list .item .modified {
width: 25%;
}

Expand Down
26 changes: 0 additions & 26 deletions frontend/src/i18n/ar.json
Expand Up @@ -89,32 +89,6 @@
"f2": "إعادة تسمية الملف",
"help": "مساعدة"
},
"languages": {
"he": "עברית",
"hu": "Magyar",
"ar": "العربية",
"de": "Deutsch",
"el": "Ελληνικά",
"en": "English",
"es": "Español",
"fr": "Français",
"is": "Icelandic",
"it": "Italiano",
"ja": "日本語",
"ko": "한국어",
"nlBE": "Dutch (Belgium)",
"pl": "Polski",
"pt": "Português",
"ptBR": "Português (Brasil)",
"ro": "Romanian",
"ru": "Русский",
"sk": "Slovenčina",
"svSE": "Swedish (Sweden)",
"tr": "Türkçe",
"ua": "Українська",
"zhCN": "中文 (简体)",
"zhTW": "中文 (繁體)"
},
"login": {
"createAnAccount": "إنشاء حساب جديد",
"loginInstead": "هل لديك حساب",
Expand Down
26 changes: 0 additions & 26 deletions frontend/src/i18n/de.json
Expand Up @@ -82,32 +82,6 @@
"f2": "Datei umbenennen",
"help": "Hilfe"
},
"languages": {
"he": "עברית",
"hu": "Magyar",
"ar": "العربية",
"de": "Deutsch",
"el": "Ελληνικά",
"en": "English",
"es": "Español",
"fr": "Français",
"is": "Icelandic",
"it": "Italiano",
"ja": "日本語",
"ko": "한국어",
"nlBE": "Dutch (Belgium)",
"pl": "Polski",
"pt": "Português",
"ptBR": "Português (Brasil)",
"ro": "Romanian",
"ru": "Русский",
"sk": "Slovenčina",
"svSE": "Swedish (Sweden)",
"tr": "Türkçe",
"uk": "Українська",
"zhCN": "中文 (简体)",
"zhTW": "中文 (繁體)"
},
"login": {
"createAnAccount": "Account erstellen",
"loginInstead": "Account besteht bereits",
Expand Down
26 changes: 0 additions & 26 deletions frontend/src/i18n/el.json
Expand Up @@ -85,32 +85,6 @@
"f2": "μετονομασία αρχείου",
"help": "Βοήθεια"
},
"languages": {
"he": "עברית",
"hu": "Magyar",
"ar": "العربية",
"de": "Deutsch",
"en": "English",
"es": "Español",
"el": "Ελληνικά",
"fr": "Français",
"is": "Icelandic",
"it": "Italiano",
"ja": "日本語",
"ko": "한국어",
"nlBE": "Dutch (Belgium)",
"pl": "Polski",
"pt": "Português",
"ptBR": "Português (Brasil)",
"ro": "Romanian",
"ru": "Русский",
"sk": "Slovenčina",
"svSE": "Swedish (Sweden)",
"tr": "Türkçe",
"ua": "Українська",
"zhCN": "中文 (简体)",
"zhTW": "中文 (繁體)"
},
"login": {
"createAnAccount": "Δημιουργία λογαριασμού",
"loginInstead": "Έχετε ήδη λογαριασμό",
Expand Down
26 changes: 0 additions & 26 deletions frontend/src/i18n/en.json
Expand Up @@ -89,32 +89,6 @@
"f2": "rename file",
"help": "Help"
},
"languages": {
"he": "עברית",
"hu": "Magyar",
"ar": "العربية",
"de": "Deutsch",
"el": "Ελληνικά",
"en": "English",
"es": "Español",
"fr": "Français",
"is": "Icelandic",
"it": "Italiano",
"ja": "日本語",
"ko": "한국어",
"nlBE": "Dutch (Belgium)",
"pl": "Polski",
"pt": "Português",
"ptBR": "Português (Brasil)",
"ro": "Romanian",
"ru": "Русский",
"sk": "Slovenčina",
"svSE": "Swedish (Sweden)",
"tr": "Türkçe",
"uk": "Українська",
"zhCN": "中文 (简体)",
"zhTW": "中文 (繁體)"
},
"login": {
"createAnAccount": "Create an account",
"loginInstead": "Already have an account",
Expand Down
25 changes: 0 additions & 25 deletions frontend/src/i18n/es.json
Expand Up @@ -83,31 +83,6 @@
"f2": "renombrar archivo",
"help": "Ayuda"
},
"languages": {
"he": "עברית",
"hu": "Magyar",
"ar": "العربية",
"de": "Deutsch",
"en": "English",
"es": "Español",
"fr": "Français",
"is": "Icelandic",
"it": "Italiano",
"ja": "日本語",
"ko": "한국어",
"nlBE": "Niederländisch (Belgien)",
"pl": "Polski",
"pt": "Português",
"ptBR": "Português (Brasil)",
"ro": "Românesc",
"ru": "Русский",
"sk": "Slovenčina",
"svSE": "Swedish (Sweden)",
"tr": "Türkçe",
"uk": "Українська",
"zhCN": "中文 (简体)",
"zhTW": "中文 (繁體)"
},
"login": {
"createAnAccount": "Crear una cuenta",
"loginInstead": "Usuario ya existente",
Expand Down

0 comments on commit 6b094e1

Please sign in to comment.