Skip to content

Commit

Permalink
Merge branch 'evan/mod-172-paper-and-purpur-frontend' into evan/mod-1…
Browse files Browse the repository at this point in the history
…73-panel-terminal-perf
  • Loading branch information
ferothefox committed Dec 11, 2024
2 parents fb88bbf + 153533a commit 98188ae
Show file tree
Hide file tree
Showing 123 changed files with 3,530 additions and 15,689 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/2-web-bug.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 🌐 Website bug (modrinth.com)
description: Report an issue on the Modrinth website.
labels: [bug, frontend]
labels: [bug, web]
body:
- type: checkboxes
attributes:
Expand Down Expand Up @@ -49,4 +49,4 @@ body:
label: Additional context
description: Add any other context about the problem here.
validations:
required: false
required: false
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/3-api-bug.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 🛠️ API issue (api.modrinth.com)
description: Report an issue regarding the Modrinth API.
labels: [bug, api]
labels: [bug, backend]
body:
- type: checkboxes
attributes:
Expand Down Expand Up @@ -38,4 +38,4 @@ body:
label: Additional context
description: Add any other context about the problem here.
validations:
required: false
required: false
37 changes: 26 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
SteamIcon,
GitLabIcon,
} from '@/assets/external'
import { login, login_2fa, create_account, login_pass } from '@/helpers/mr_auth.js'
import { login } from '@/helpers/mr_auth.js'
import { handleError, useNotifications } from '@/store/state.js'
import { ref } from 'vue'
import { handleSevereError } from '@/store/error.js'
Expand Down Expand Up @@ -71,8 +71,8 @@ const password = ref('')
const confirmPassword = ref('')
const subscribe = ref(true)
async function signInOauth(provider) {
const creds = await login(provider).catch(handleSevereError)
async function signInOauth() {
const creds = await login().catch(handleSevereError)
if (creds && creds.type === 'two_factor_required') {
twoFactorFlow.value = creds.flow
Expand Down
22 changes: 2 additions & 20 deletions apps/app-frontend/src/helpers/mr_auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,8 @@
*/
import { invoke } from '@tauri-apps/api/core'

export async function login(provider) {
return await invoke('modrinth_auth_login', { provider })
}

export async function login_pass(username, password, challenge) {
return await invoke('plugin:mr-auth|login_pass', { username, password, challenge })
}

export async function login_2fa(code, flow) {
return await invoke('plugin:mr-auth|login_2fa', { code, flow })
}

export async function create_account(username, email, password, challenge, signUpNewsletter) {
return await invoke('plugin:mr-auth|create_account', {
username,
email,
password,
challenge,
signUpNewsletter,
})
export async function login() {
return await invoke('plugin:mr-auth|modrinth_login')
}

export async function logout() {
Expand Down
2 changes: 2 additions & 0 deletions apps/app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
# will have compiled files and executables
/target/

# Generated by tauri, metadata generated at compile time
/gen/
8 changes: 1 addition & 7 deletions apps/app/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,7 @@ fn main() {
.plugin(
"mr-auth",
InlinedPlugin::new()
.commands(&[
"login_pass",
"login_2fa",
"create_account",
"logout",
"get",
])
.commands(&["modrinth_login", "logout", "get"])
.default_permission(
DefaultPermissionRule::AllowAllCommands,
),
Expand Down
1 change: 0 additions & 1 deletion apps/app/gen/schemas/acl-manifests.json

This file was deleted.

1 change: 0 additions & 1 deletion apps/app/gen/schemas/capabilities.json

This file was deleted.

Loading

0 comments on commit 98188ae

Please sign in to comment.