Ajustes de layout
This commit is contained in:
19
src/App.vue
19
src/App.vue
@@ -23,23 +23,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="app-toolbar__actions">
|
<div class="app-toolbar__actions">
|
||||||
<Button
|
|
||||||
v-if="quickAction"
|
|
||||||
:icon="quickAction.icon || 'sym_o_add'"
|
|
||||||
:label="quickAction.label"
|
|
||||||
@click="handleQuickAction"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<q-btn
|
|
||||||
flat
|
|
||||||
round
|
|
||||||
dense
|
|
||||||
color="primary"
|
|
||||||
icon="sym_o_notifications"
|
|
||||||
class="app-toolbar__icon"
|
|
||||||
aria-label="Notificações"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Toggle v-model="darkMode" color="primary" @toggle="toggleDarkMode" />
|
<Toggle v-model="darkMode" color="primary" @toggle="toggleDarkMode" />
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
@@ -656,6 +639,7 @@ body.body--dark .app-toolbar__avatar {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
padding: 0 16px 8px;
|
padding: 0 16px 8px;
|
||||||
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-user-menu__info {
|
.app-user-menu__info {
|
||||||
@@ -709,6 +693,7 @@ body.body--dark .app-drawer {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
padding: 0 24px 24px;
|
padding: 0 24px 24px;
|
||||||
|
margin-top: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-drawer__brand {
|
.app-drawer__brand {
|
||||||
|
|||||||
@@ -33,7 +33,9 @@ const getUserRoles = () => {
|
|||||||
const decodedRoles = extractRolesFromToken(token);
|
const decodedRoles = extractRolesFromToken(token);
|
||||||
|
|
||||||
if (decodedRoles.length) {
|
if (decodedRoles.length) {
|
||||||
Cookies.set("user_roles", JSON.stringify(decodedRoles), { sameSite: "lax" });
|
Cookies.set("user_roles", JSON.stringify(decodedRoles), {
|
||||||
|
sameSite: "lax",
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return decodedRoles;
|
return decodedRoles;
|
||||||
@@ -60,7 +62,6 @@ export const routes = [
|
|||||||
showinModal: true,
|
showinModal: true,
|
||||||
menu: MENUS.VIDEOS,
|
menu: MENUS.VIDEOS,
|
||||||
icon: "sym_o_video_library",
|
icon: "sym_o_video_library",
|
||||||
description: "Acompanhe e gerencie os vídeos capturados automaticamente.",
|
|
||||||
quickAction: {
|
quickAction: {
|
||||||
label: "Novo vídeo",
|
label: "Novo vídeo",
|
||||||
to: "/videos/new",
|
to: "/videos/new",
|
||||||
@@ -80,7 +81,6 @@ export const routes = [
|
|||||||
showinModal: false,
|
showinModal: false,
|
||||||
menu: MENUS.VIDEOS,
|
menu: MENUS.VIDEOS,
|
||||||
icon: "sym_o_add_to_queue",
|
icon: "sym_o_add_to_queue",
|
||||||
description: "Cole o link do YouTube e deixe a IA preparar seus cortes.",
|
|
||||||
quickAction: false,
|
quickAction: false,
|
||||||
order: 2,
|
order: 2,
|
||||||
},
|
},
|
||||||
@@ -96,7 +96,6 @@ export const routes = [
|
|||||||
showinModal: true,
|
showinModal: true,
|
||||||
menu: MENUS.USUARIOS,
|
menu: MENUS.USUARIOS,
|
||||||
icon: "sym_o_groups",
|
icon: "sym_o_groups",
|
||||||
description: "Gerencie quem tem acesso ao Clipper IA.",
|
|
||||||
quickAction: false,
|
quickAction: false,
|
||||||
order: 1,
|
order: 1,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -8,17 +8,6 @@
|
|||||||
picos de atenção e gere sugestões de clipes automaticamente.
|
picos de atenção e gere sugestões de clipes automaticamente.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="app-actions-bar">
|
|
||||||
<Button
|
|
||||||
variant="ghost"
|
|
||||||
color="secondary"
|
|
||||||
text-color="primary"
|
|
||||||
icon="sym_o_lightbulb"
|
|
||||||
label="Guia de cortes rápidos"
|
|
||||||
@click="handleGuide"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<div class="video-create__grid">
|
<div class="video-create__grid">
|
||||||
@@ -69,10 +58,11 @@
|
|||||||
|
|
||||||
<ul class="video-create__hints">
|
<ul class="video-create__hints">
|
||||||
<li>Informe apenas o link completo do vídeo no YouTube.</li>
|
<li>Informe apenas o link completo do vídeo no YouTube.</li>
|
||||||
|
<li>Suporte a vídeos até 1 hora e canais com integração liberada.</li>
|
||||||
<li>
|
<li>
|
||||||
Suporte a vídeos até 4 horas e canais com integração liberada.
|
Após a busca, confirme os dados, selecione a qualidade, e envie para
|
||||||
|
processamento.
|
||||||
</li>
|
</li>
|
||||||
<li>Após a busca, confirme os dados e envie para processamento.</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
||||||
@@ -135,12 +125,6 @@
|
|||||||
<h3>Insights do vídeo</h3>
|
<h3>Insights do vídeo</h3>
|
||||||
<span>Resumo dos dados coletados diretamente da plataforma.</span>
|
<span>Resumo dos dados coletados diretamente da plataforma.</span>
|
||||||
</div>
|
</div>
|
||||||
<Button
|
|
||||||
variant="ghost"
|
|
||||||
icon="sym_o_download"
|
|
||||||
label="Exportar dados"
|
|
||||||
@click="handleExport"
|
|
||||||
/>
|
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="video-create__stats">
|
<div class="video-create__stats">
|
||||||
@@ -219,13 +203,14 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="video-create__actions">
|
<div class="video-create__actions">
|
||||||
<Button
|
<Dropdown
|
||||||
variant="ghost"
|
v-model="quality"
|
||||||
color="secondary"
|
class="video-create__quality"
|
||||||
text-color="primary"
|
label="Qualidade"
|
||||||
icon="sym_o_notifications_active"
|
:options="qualityOptions"
|
||||||
label="Ativar alertas do canal"
|
:emit-value="true"
|
||||||
@click="handleChannelAlerts"
|
:map-options="true"
|
||||||
|
:disable="saveLoading"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
@@ -249,6 +234,7 @@ import duration from "dayjs/plugin/duration";
|
|||||||
import Button from "@components/Button";
|
import Button from "@components/Button";
|
||||||
import TextField from "@components/TextField";
|
import TextField from "@components/TextField";
|
||||||
import DisplayValue from "@components/DisplayValue";
|
import DisplayValue from "@components/DisplayValue";
|
||||||
|
import Dropdown from "@components/Dropdown";
|
||||||
|
|
||||||
import { API } from "@config/axios";
|
import { API } from "@config/axios";
|
||||||
import { getErrorMessage } from "@utils/axios";
|
import { getErrorMessage } from "@utils/axios";
|
||||||
@@ -261,16 +247,31 @@ export default {
|
|||||||
Button,
|
Button,
|
||||||
TextField,
|
TextField,
|
||||||
DisplayValue,
|
DisplayValue,
|
||||||
|
Dropdown,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
url: "",
|
url: "",
|
||||||
loading: false,
|
loading: false,
|
||||||
saveLoading: false,
|
saveLoading: false,
|
||||||
|
quality: "automatic",
|
||||||
|
qualityOptions: [
|
||||||
|
{ label: "Automática", value: "automatic" },
|
||||||
|
{ label: "Alta (1080p)", value: "1080p" },
|
||||||
|
{ label: "Média (720p)", value: "720p" },
|
||||||
|
{ label: "Baixa (480p)", value: "480p" },
|
||||||
|
],
|
||||||
video: {},
|
video: {},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
selectedQualityLabel() {
|
||||||
|
const current = this.qualityOptions.find(
|
||||||
|
(option) => option.value === this.quality
|
||||||
|
);
|
||||||
|
|
||||||
|
return current?.label || this.qualityOptions[0]?.label || "Automática";
|
||||||
|
},
|
||||||
videoLoaded() {
|
videoLoaded() {
|
||||||
return Object.keys(this.video).length > 0;
|
return Object.keys(this.video).length > 0;
|
||||||
},
|
},
|
||||||
@@ -398,13 +399,23 @@ export default {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
this.saveLoading = true;
|
this.saveLoading = true;
|
||||||
// Chamada de criação ainda não implementada.
|
|
||||||
await new Promise((resolve) => setTimeout(resolve, 1200));
|
const { duration, id, title } = this.video;
|
||||||
|
|
||||||
|
await API.post("/videos", {
|
||||||
|
url: this.url,
|
||||||
|
qualidade: this.quality,
|
||||||
|
videoid: id,
|
||||||
|
title,
|
||||||
|
duration,
|
||||||
|
});
|
||||||
|
|
||||||
this.$q.notify({
|
this.$q.notify({
|
||||||
type: "positive",
|
type: "positive",
|
||||||
message:
|
message: `Vídeo enviado para processamento`,
|
||||||
"Vídeo enviado para processamento. Você será notificado quando os cortes estiverem prontos!",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.$router.push("/videos");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$q.notify({
|
this.$q.notify({
|
||||||
type: "negative",
|
type: "negative",
|
||||||
@@ -558,7 +569,6 @@ export default {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.video-create__section-head h3 {
|
.video-create__section-head h3 {
|
||||||
@@ -601,6 +611,10 @@ export default {
|
|||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.video-create__quality {
|
||||||
|
min-width: 220px;
|
||||||
|
}
|
||||||
|
|
||||||
.fade-slide-enter-active,
|
.fade-slide-enter-active,
|
||||||
.fade-slide-leave-active {
|
.fade-slide-leave-active {
|
||||||
transition: opacity 0.22s ease, transform 0.22s ease;
|
transition: opacity 0.22s ease, transform 0.22s ease;
|
||||||
|
|||||||
Reference in New Issue
Block a user