Skip to content

Commit

Permalink
chore(lint): autofix vue/block-order
Browse files Browse the repository at this point in the history
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
  • Loading branch information
ShGKme committed Jul 16, 2024
1 parent cb21b90 commit fe1119e
Show file tree
Hide file tree
Showing 11 changed files with 191 additions and 191 deletions.
100 changes: 50 additions & 50 deletions src/authentication/renderer/AuthenticationApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,56 +3,6 @@
- SPDX-License-Identifier: AGPL-3.0-or-later
-->

<template>
<div class="wrapper">
<div class="spacer">
<div class="logo" />
</div>
<div class="login-box">
<form @submit.prevent="login">
<fieldset :disabled="state === 'loading'">
<h2 class="login-box__header">
{{ t('talk_desktop', 'Log in to Nextcloud') }}
</h2>
<NcTextField :label="t('talk_desktop', 'Nextcloud server address')"
label-visible
:value.sync="rawServerUrl"
placeholder="https://try.nextcloud.com"
inputmode="url"
:success="state === 'success'"
:error="state === 'error'"
:helper-text="stateText" />
<NcButton v-if="state !== 'loading'"
class="submit-button"
type="primary"
native-type="submit"
wide>
<template #icon>
<MdiArrowRight :size="20" />
</template>
{{ t('talk_desktop', 'Log in') }}
</NcButton>
<NcButton v-else-if="state ==='loading'"
class="submit-button"
type="primary"
native-type="submit"
wide>
<template #icon>
<NcLoadingIcon appearance="light" />
</template>
{{ t('talk_desktop', 'Logging in …') }}
</NcButton>
</fieldset>
</form>
</div>
<div class="spacer">
<footer class="footer">
Nextcloud Talk Desktop {{ version }}
</footer>
</div>
</div>
</template>

<script setup>
import { computed, ref } from 'vue'
import MdiArrowRight from 'vue-material-design-icons/ArrowRight.vue'
Expand Down Expand Up @@ -188,6 +138,56 @@ async function login() {
}
</script>

<template>
<div class="wrapper">
<div class="spacer">
<div class="logo" />
</div>
<div class="login-box">
<form @submit.prevent="login">
<fieldset :disabled="state === 'loading'">
<h2 class="login-box__header">
{{ t('talk_desktop', 'Log in to Nextcloud') }}
</h2>
<NcTextField :label="t('talk_desktop', 'Nextcloud server address')"
label-visible
:value.sync="rawServerUrl"
placeholder="https://try.nextcloud.com"
inputmode="url"
:success="state === 'success'"
:error="state === 'error'"
:helper-text="stateText" />
<NcButton v-if="state !== 'loading'"
class="submit-button"
type="primary"
native-type="submit"
wide>
<template #icon>
<MdiArrowRight :size="20" />
</template>
{{ t('talk_desktop', 'Log in') }}
</NcButton>
<NcButton v-else-if="state ==='loading'"
class="submit-button"
type="primary"
native-type="submit"
wide>
<template #icon>
<NcLoadingIcon appearance="light" />
</template>
{{ t('talk_desktop', 'Logging in …') }}
</NcButton>
</fieldset>
</form>
</div>
<div class="spacer">
<footer class="footer">
Nextcloud Talk Desktop {{ version }}
</footer>
</div>
</div>
</template>

<style scoped>
.wrapper {
height: 100vh;
Expand Down
70 changes: 35 additions & 35 deletions src/help/renderer/HelpApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,6 @@
- SPDX-License-Identifier: AGPL-3.0-or-later
-->

<template>
<div class="about">
<h2>{{ t('talk_desktop', 'About') }}</h2>
<p>{{ packageInfo.productName }} - {{ packageInfo.description }}</p>
<ul class="about__list">
<li>
{{ t('talk_desktop', 'Privacy and Legal Policy') }}: <a class="link" href="https://nextcloud.com/privacy/" target="_blank">https://nextcloud.com/privacy/</a>
</li>
<li>
{{ t('talk_desktop', 'License') }}: <a class="link" href="https://www.gnu.org/licenses/agpl-3.0.txt" target="_blank">{{ packageInfo.license }}</a>
</li>
<li>
{{ t('talk_desktop', 'Issues') }}: <a :href="packageInfo.bugs" class="link" target="_blank">{{ packageInfo.bugs }}</a>
</li>
<li>
{{ t('talk_desktop', 'Source Code') }}: <a :href="packageInfo.repository" class="link" target="_blank">{{ packageInfo.repository }}</a>
</li>
</ul>
<NcTextArea :aria-label="t('talk_desktop', 'System report')"
:value="report"
rows="11"
readonly
class="about__report"
@focus="$event.target.setSelectionRange(0, -1)" />
<p>
<NcButton type="secondary" wide @click="close">
<template #icon>
<MdiWindowClose />
</template>
{{ t('talk_desktop', 'Close') }}
</NcButton>
</p>
</div>
</template>

<script setup>
import { onBeforeUnmount, onMounted } from 'vue'

Expand Down Expand Up @@ -94,6 +59,41 @@ onBeforeUnmount(() => {
})
</script>

<template>
<div class="about">
<h2>{{ t('talk_desktop', 'About') }}</h2>
<p>{{ packageInfo.productName }} - {{ packageInfo.description }}</p>
<ul class="about__list">
<li>
{{ t('talk_desktop', 'Privacy and Legal Policy') }}: <a class="link" href="https://nextcloud.com/privacy/" target="_blank">https://nextcloud.com/privacy/</a>
</li>
<li>
{{ t('talk_desktop', 'License') }}: <a class="link" href="https://www.gnu.org/licenses/agpl-3.0.txt" target="_blank">{{ packageInfo.license }}</a>
</li>
<li>
{{ t('talk_desktop', 'Issues') }}: <a :href="packageInfo.bugs" class="link" target="_blank">{{ packageInfo.bugs }}</a>
</li>
<li>
{{ t('talk_desktop', 'Source Code') }}: <a :href="packageInfo.repository" class="link" target="_blank">{{ packageInfo.repository }}</a>
</li>
</ul>
<NcTextArea :aria-label="t('talk_desktop', 'System report')"
:value="report"
rows="11"
readonly
class="about__report"
@focus="$event.target.setSelectionRange(0, -1)" />
<p>
<NcButton type="secondary" wide @click="close">
<template #icon>
<MdiWindowClose />
</template>
{{ t('talk_desktop', 'Close') }}
</NcButton>
</p>
</div>
</template>

<style scoped>
.about {
height: 100%;
Expand Down
22 changes: 11 additions & 11 deletions src/shared/globals/OC/OcDialogsAdapter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,6 @@
- SPDX-License-Identifier: AGPL-3.0-or-later
-->

<template>
<div>
<NcDialog v-for="dialog in dialogs"
:key="dialog.id"
:name="dialog.name"
:message="dialog.message"
:buttons="dialog.buttons"
@update:open="deleteDialog(dialog.id)" />
</div>
</template>

<script setup>
import { del, ref, set } from 'vue'
import { translate as t } from '@nextcloud/l10n'
Expand Down Expand Up @@ -182,3 +171,14 @@ defineExpose({
prompt,
})
</script>

<template>
<div>
<NcDialog v-for="dialog in dialogs"
:key="dialog.id"
:name="dialog.name"
:message="dialog.message"
:buttons="dialog.buttons"
@update:open="deleteDialog(dialog.id)" />
</div>
</template>
50 changes: 25 additions & 25 deletions src/talk/renderer/DesktopHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,6 @@
- SPDX-License-Identifier: AGPL-3.0-or-later
-->

<template>
<header id="header" class="header">
<div class="header__inner">
<div v-if="!OS.isMac"
class="header__title-wrapper"
role="button"
tabindex="0"
@click="pushToRoot">
<span class="header__title">Nextcloud Talk</span>
<span class="header__preview-badge">Preview</span>
</div>

<div class="spacer" />

<div class="header__item" data-theme-dark>
<MainMenu />
</div>

<div class="header__item">
<UserMenu :user="user" @logout="logout" />
</div>
</div>
</header>
</template>

<script setup>
import MainMenu from './components/MainMenu.vue'
import UserMenu from './components/UserMenu.vue'
Expand Down Expand Up @@ -75,6 +50,31 @@ onUnmounted(() => {
})
</script>

<template>
<header id="header" class="header">
<div class="header__inner">
<div v-if="!OS.isMac"
class="header__title-wrapper"
role="button"
tabindex="0"
@click="pushToRoot">
<span class="header__title">Nextcloud Talk</span>
<span class="header__preview-badge">Preview</span>
</div>

<div class="spacer" />

<div class="header__item" data-theme-dark>
<MainMenu />
</div>

<div class="header__item">
<UserMenu :user="user" @logout="logout" />
</div>
</div>
</header>
</template>

<style scoped>
.header {
height: 50px;
Expand Down
52 changes: 26 additions & 26 deletions src/talk/renderer/Viewer/ViewerApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,6 @@
- SPDX-License-Identifier: AGPL-3.0-or-later
-->

<template>
<NcModal v-if="file"
id="viewer"
:show.sync="isOpen"
class="viewer-modal"
:class="{ 'viewer-modal--open': isOpen }"
:name="file.basename"
size="full"
:close-button-contained="false"
dark
@close="close">
<component :is="viewComponent"
v-if="viewComponent"
:file="file" />

<template #actions>
<NcActionLink :href="link">
<template #icon>
<MdiOpenInNew />
</template>
{{ t('talk_desktop', 'Open in a Web-Browser') }}
</NcActionLink>
</template>
</NcModal>
</template>

<script setup>
import { computed, ref } from 'vue'
import NcModal from '@nextcloud/vue/dist/Components/NcModal.js'
Expand Down Expand Up @@ -74,6 +48,32 @@ defineExpose({
})
</script>

<template>
<NcModal v-if="file"
id="viewer"
:show.sync="isOpen"
class="viewer-modal"
:class="{ 'viewer-modal--open': isOpen }"
:name="file.basename"
size="full"
:close-button-contained="false"
dark
@close="close">
<component :is="viewComponent"
v-if="viewComponent"
:file="file" />

<template #actions>
<NcActionLink :href="link">
<template #icon>
<MdiOpenInNew />
</template>
{{ t('talk_desktop', 'Open in a Web-Browser') }}
</NcActionLink>
</template>
</NcModal>
</template>

<style>
.header {
transition: background-color 250ms; /* Same as NcModal transition timing */
Expand Down
12 changes: 6 additions & 6 deletions src/talk/renderer/Viewer/ViewerHandlerImages.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
- SPDX-License-Identifier: AGPL-3.0-or-later
-->

<template>
<div class="media-wrapper">
<img :src="src" :alt="file.basename">
</div>
</template>

<script setup>
import { computed } from 'vue'
import { generateUrl } from '@nextcloud/router'
Expand Down Expand Up @@ -37,6 +31,12 @@ const src = computed(() => {
})
</script>

<template>
<div class="media-wrapper">
<img :src="src" :alt="file.basename">
</div>
</template>

<style scoped>
.media-wrapper {
display: flex;
Expand Down
Loading

0 comments on commit fe1119e

Please sign in to comment.