1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-24 15:49:42 +02:00

Chore/general UI cleanup (#764)

* unify look and feel + button validators

* Fixes #741

* add github script to mealei-next

* feat(frontend): 💄 improve user-flow for creating ingredients and units in editor

Creating a unit/food in the recipe editor will not automatically assign that to the auto-complete element on the ingredient. It also no longer needs a dialog and will show at the bottom of the menu at all times.

* fix whitespace issue with slot

* add security check to properties

* fix event refresh on delete

* remove depreciated page

* improve API token flow

* hide recipe data if not advanced user

* misc adds

Co-authored-by: Hayden <hay-kot@pm.me>
This commit is contained in:
Hayden 2021-10-30 15:46:44 -08:00 committed by GitHub
parent 2afaf70a03
commit 909bc85205
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 177 additions and 172 deletions

View file

@ -20,9 +20,7 @@
class="mb-0 pb-0"
:label="$t('settings.token.api-token')"
readonly
:append-outer-icon="$globals.icons.contentCopy"
@click="copyToken"
@click:append-outer="copyToken"
rows="3"
>
</v-textarea>
<v-subheader class="text-center">
@ -34,13 +32,14 @@
</v-subheader>
</template>
</v-card-text>
<v-expand-transition>
<v-card-actions v-show="name != ''">
<v-spacer></v-spacer>
<BaseButton v-if="createdToken" cancel @click="resetCreate()"> Close </BaseButton>
<BaseButton v-else :cancel="false" @click="createToken(name)"> Generate </BaseButton>
</v-card-actions>
</v-expand-transition>
<v-card-actions>
<BaseButton v-if="createdToken" cancel @click="resetCreate()"> Close </BaseButton>
<v-spacer></v-spacer>
<AppButtonCopy v-if="createdToken" :icon="false" color="info" :copy-text="createdToken"> </AppButtonCopy>
<BaseButton v-else key="generate-button" :disabled="name == ''" @click="createToken(name)">
Generate
</BaseButton>
</v-card-actions>
</v-card>
</section>
<BaseCardSectionTitle class="mt-10" title="Active Tokens"> </BaseCardSectionTitle>
@ -117,14 +116,7 @@ export default defineComponent({
return data;
}
function copyToken() {
navigator.clipboard.writeText(createdToken.value).then(
() => console.log("Copied", createdToken.value),
() => console.log("Copied Failed", createdToken.value)
);
}
return { createToken, deleteToken, copyToken, createdToken, loading, name, user, resetCreate };
return { createToken, deleteToken, createdToken, loading, name, user, resetCreate };
},
head() {
return {