mirror of
https://github.com/HangarMC/Hangar.git
synced 2025-02-17 15:01:42 +08:00
Fixup sign-in and login pages
This commit is contained in:
parent
22aa73ca08
commit
0ac7105e29
@ -26,7 +26,7 @@ const classes = computed<string>(() => "font-bold " + (props.disabled ? "color-g
|
||||
<a v-else-if="href" :href="sanitizeUrl(href)" :class="classes" v-bind="$attrs">
|
||||
<slot></slot>
|
||||
</a>
|
||||
<span v-else :class="classes" v-bind="$attrs">
|
||||
<span v-else :class="classes" v-bind="$attrs" cursor="pointer">
|
||||
<slot></slot>
|
||||
</span>
|
||||
</template>
|
||||
|
@ -148,10 +148,10 @@ useHead(useSeo("Login", null, route, null));
|
||||
:disabled="privileged"
|
||||
/>
|
||||
<InputPassword v-model="password" label="Password" name="password" autocomplete="current-password" :rules="[required()]" />
|
||||
<div class="flex gap-2">
|
||||
<div>
|
||||
<Button :disabled="loading" @click.prevent="loginPassword">Login</Button>
|
||||
<Button v-if="!privileged" button-type="secondary" to="/auth/signup">Signup</Button>
|
||||
</div>
|
||||
<Link v-if="!privileged" button-type="secondary" to="/auth/signup" class="w-max">Don't have an account yet? Create one!</Link>
|
||||
<Link v-if="!privileged" to="/auth/reset" class="w-max">Forgot your password?</Link>
|
||||
</form>
|
||||
|
||||
|
@ -114,8 +114,8 @@ function copy(event: any) {
|
||||
<div class="grid autofix mt-2">
|
||||
<InputCheckbox v-for="perm in possiblePerms" :key="perm" v-model="selectedPerms" :label="perm" :value="perm" />
|
||||
</div>
|
||||
<div v-if="selectedPerms.length === 0" class="text-red font-bold mt-2">{{ i18n.t("apiKeys.permissionRequired") }}</div>
|
||||
</InputGroup>
|
||||
<div v-if="selectedPerms.length === 0" class="text-red font-bold mt-1">{{ i18n.t("apiKeys.permissionRequired") }}</div>
|
||||
</div>
|
||||
<div>
|
||||
<h3 class="text-lg font-bold mb-2">{{ i18n.t("apiKeys.existing") }}</h3>
|
||||
@ -149,9 +149,7 @@ function copy(event: any) {
|
||||
</tr>
|
||||
<tr v-if="apiKeys.length === 0">
|
||||
<td colspan="5">
|
||||
<Alert class="mt-4" type="warning">
|
||||
{{ i18n.t("apiKeys.noKeys") }}
|
||||
</Alert>
|
||||
{{ i18n.t("apiKeys.noKeys") }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -13,6 +13,7 @@ import InputPassword from "~/components/ui/InputPassword.vue";
|
||||
import InputCheckbox from "~/components/ui/InputCheckbox.vue";
|
||||
import { email, required, sameAs } from "~/composables/useValidationHelpers";
|
||||
import { useNotificationStore } from "~/store/notification";
|
||||
import Link from "~/components/design/Link.vue";
|
||||
import InputGroup from "~/components/ui/InputGroup.vue";
|
||||
|
||||
const route = useRoute();
|
||||
@ -48,10 +49,6 @@ async function submit() {
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
async function login() {
|
||||
await router.push("/auth/login");
|
||||
}
|
||||
|
||||
useHead(useSeo("Signup", null, route, null));
|
||||
</script>
|
||||
|
||||
@ -71,10 +68,10 @@ useHead(useSeo("Signup", null, route, null));
|
||||
<InputCheckbox v-model="form.tos" label="I agree to the Terms and Conditions" />
|
||||
</InputGroup>
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<div>
|
||||
<Button type="submit" :disabled="loading" @click.prevent="submit">Sign up</Button>
|
||||
<Button type="button" button-type="secondary" @click="login">Login</Button>
|
||||
</div>
|
||||
<Link to="login">Login with existing account</Link>
|
||||
</form>
|
||||
|
||||
<div v-if="done" class="flex flex-col gap-2">
|
||||
|
Loading…
Reference in New Issue
Block a user