From 57c3df43ffe81aa1a8a2d95fb9dba1826fe18544 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 12 Jul 2022 10:55:28 +0200 Subject: [PATCH] Remove SCSS variables Signed-off-by: Thomas Citharel --- js/src/App.vue | 4 - js/src/assets/oruga-tailwindcss.css | 19 +- js/src/common.scss | 188 ------------------ .../components/Account/PopoverActorCard.vue | 10 - js/src/components/Activity/activity.scss | 3 - js/src/components/Categories/CategoryCard.vue | 2 + js/src/components/Comment/Comment.vue | 15 +- .../Dashboard/LinkedNumberDashboardTile.vue | 25 +++ .../Dashboard/NumberDashboardTile.vue | 20 ++ .../Discussion/DiscussionComment.vue | 3 - js/src/components/Editor.vue | 22 -- js/src/components/Editor/MentionList.vue | 6 - js/src/components/ErrorComponent.vue | 1 - js/src/components/Event/EventCard.vue | 4 +- .../components/Event/EventMinimalistCard.vue | 31 ++- .../Event/EventParticipationCard.vue | 2 - .../Event/GroupedMultiEventMinimalistCard.vue | 1 - .../Event/RecentEventCardWrapper.vue | 6 +- js/src/components/Footer.vue | 4 +- js/src/components/Group/InvitationCard.vue | 10 - .../{Invitations.vue => InvitationsList.vue} | 4 +- js/src/components/Image/LazyImage.vue | 2 - .../{Logo.vue => MobilizonLogo.vue} | 16 +- js/src/components/NavBar.vue | 115 ++--------- js/src/components/Post/PostListItem.vue | 1 - js/src/components/Resource/FolderItem.vue | 1 - js/src/components/Resource/ResourceItem.vue | 1 - .../components/Resource/ResourceSelector.vue | 1 - .../components/Settings/SettingMenuItem.vue | 1 - .../Settings/SettingMenuSection.vue | 32 +-- js/src/components/User/AuthProvider.vue | 2 + js/src/components/Utils/VerticalDivider.vue | 5 - js/src/components/core/Dialog.vue | 19 +- js/src/components/core/MaterialIcon.vue | 17 +- js/src/composition/apollo/actor.ts | 5 +- js/src/composition/apollo/group.ts | 14 +- js/src/i18n/en_US.json | 7 +- js/src/i18n/fr_FR.json | 5 +- js/src/plugins/dialog.ts | 15 +- js/src/router/settings.ts | 3 +- js/src/styles/vue-skip-to.scss | 5 - js/src/variables.scss | 182 ----------------- .../views/Account/IdentityPickerWrapper.vue | 10 +- js/src/views/Account/Register.vue | 4 - .../views/Account/children/EditIdentity.vue | 15 +- js/src/views/Admin/Dashboard.vue | 175 ---------------- js/src/views/Admin/DashboardView.vue | 151 ++++++++++++++ js/src/views/Admin/Instances.vue | 9 +- js/src/views/Admin/Settings.vue | 187 +++++++++-------- js/src/views/Admin/Users.vue | 1 - js/src/views/Event/Edit.vue | 64 ++---- js/src/views/Event/Event.vue | 1 - js/src/views/Event/MyEvents.vue | 3 - js/src/views/Event/Participants.vue | 7 - js/src/views/Group/Group.vue | 26 +-- js/src/views/Group/GroupSettings.vue | 2 +- js/src/views/Group/MyGroups.vue | 6 +- js/src/views/Group/Settings.vue | 9 - js/src/views/HomeView.vue | 12 +- js/src/views/Interact.vue | 5 - js/src/views/Moderation/Logs.vue | 2 +- js/src/views/Moderation/Report.vue | 4 - js/src/views/Posts/Edit.vue | 2 - js/src/views/Posts/Post.vue | 2 - js/src/views/Settings/AccountSettings.vue | 4 +- js/src/views/Settings/NotificationsView.vue | 2 - js/src/views/SettingsView.vue | 2 +- js/tailwind.config.js | 6 +- js/vite.config.js | 3 - 69 files changed, 478 insertions(+), 1065 deletions(-) delete mode 100644 js/src/common.scss create mode 100644 js/src/components/Dashboard/LinkedNumberDashboardTile.vue create mode 100644 js/src/components/Dashboard/NumberDashboardTile.vue rename js/src/components/Group/{Invitations.vue => InvitationsList.vue} (95%) rename js/src/components/{Logo.vue => MobilizonLogo.vue} (95%) delete mode 100644 js/src/variables.scss delete mode 100644 js/src/views/Admin/Dashboard.vue create mode 100644 js/src/views/Admin/DashboardView.vue diff --git a/js/src/App.vue b/js/src/App.vue index 6bcc887dd..37202e3f8 100644 --- a/js/src/App.vue +++ b/js/src/App.vue @@ -268,10 +268,6 @@ const { isDemoMode } = useIsDemoMode(); diff --git a/js/src/components/Activity/activity.scss b/js/src/components/Activity/activity.scss index e2b98df0a..c12b82a2b 100644 --- a/js/src/components/Activity/activity.scss +++ b/js/src/components/Activity/activity.scss @@ -9,9 +9,6 @@ z-index: 2; flex-shrink: 0; - &.has-text-grey { - border-color: $grey; - } } .subject { diff --git a/js/src/components/Categories/CategoryCard.vue b/js/src/components/Categories/CategoryCard.vue index 49b18659c..02bc38042 100644 --- a/js/src/components/Categories/CategoryCard.vue +++ b/js/src/components/Categories/CategoryCard.vue @@ -26,6 +26,8 @@ class="w-full h-36 w-36 md:h-52 md:w-52 object-cover" :src="`/img/categories/${category.key.toLowerCase()}.jpg`" :srcset="`/img/categories/${category.key.toLowerCase()}-small.jpg `" + width="384" + height="384" alt="" /> diff --git a/js/src/components/Comment/Comment.vue b/js/src/components/Comment/Comment.vue index 4e93b7f01..668c00661 100644 --- a/js/src/components/Comment/Comment.vue +++ b/js/src/components/Comment/Comment.vue @@ -198,6 +198,7 @@ import Alert from "vue-material-design-icons/Alert.vue"; import ChevronUp from "vue-material-design-icons/ChevronUp.vue"; import ChevronDown from "vue-material-design-icons/ChevronDown.vue"; import Reply from "vue-material-design-icons/Reply.vue"; +import type { Locale } from "date-fns"; const Editor = defineAsyncComponent(() => import("@/components/Editor.vue")); @@ -359,7 +360,6 @@ form.reply { } strong.organizer { - background: $background-color; border-radius: 12px; color: white; padding: 0 6px; @@ -400,29 +400,18 @@ a.comment-link { border-radius: 5px; &.announcement { - background: $purple-2; - small { color: hsl(0, 0%, 21%); } } &.selected { - background-color: $violet-1; - color: $white; .reply-btn, small, span, strong, - .icons button { - color: $white; - } a.comment-link:hover { text-decoration: underline; - text-decoration-color: $white; - small { - color: $purple-3; - } } } @@ -484,13 +473,11 @@ a.comment-link { & > p > span { font-weight: bold; - color: $violet-2; } } .level-item.reply-btn { font-weight: bold; - color: $violet-2; } article { diff --git a/js/src/components/Dashboard/LinkedNumberDashboardTile.vue b/js/src/components/Dashboard/LinkedNumberDashboardTile.vue new file mode 100644 index 000000000..76f52b7d5 --- /dev/null +++ b/js/src/components/Dashboard/LinkedNumberDashboardTile.vue @@ -0,0 +1,25 @@ + + diff --git a/js/src/components/Dashboard/NumberDashboardTile.vue b/js/src/components/Dashboard/NumberDashboardTile.vue new file mode 100644 index 000000000..28f2d9127 --- /dev/null +++ b/js/src/components/Dashboard/NumberDashboardTile.vue @@ -0,0 +1,20 @@ + + diff --git a/js/src/components/Discussion/DiscussionComment.vue b/js/src/components/Discussion/DiscussionComment.vue index a931c007a..20467153c 100644 --- a/js/src/components/Discussion/DiscussionComment.vue +++ b/js/src/components/Discussion/DiscussionComment.vue @@ -190,8 +190,6 @@ article.comment { display: block; line-height: 1rem; } - - color: #3c376e; } .icons { @@ -244,7 +242,6 @@ article.comment { a { display: inline-block; padding: 0.3rem; - background: $secondary; color: #111; &:empty { diff --git a/js/src/components/Editor.vue b/js/src/components/Editor.vue index 7a3926629..51d0cf419 100644 --- a/js/src/components/Editor.vue +++ b/js/src/components/Editor.vue @@ -420,9 +420,6 @@ onBeforeUnmount(() => { @use "@/styles/_mixins" as *; @import "./Editor/style.scss"; -$color-black: #000; -$color-white: #eee; - .menubar { margin-bottom: 1rem; transition: visibility 0.2s 0.4s, opacity 0.2s 0.4s; @@ -432,19 +429,10 @@ $color-white: #eee; display: inline-flex; background: transparent; border: 0; - color: $color-black; padding: 0.2rem 0.5rem; // @include margin-right(0.2rem); border-radius: 3px; cursor: pointer; - - &:hover { - background-color: rgba($color-black, 0.05); - } - - &.is-active { - background-color: rgba($color-black, 0.1); - } } } @@ -487,7 +475,6 @@ $color-white: #eee; padding: 12px 6px; &:focus { - border-color: $background-color; outline: none; } } @@ -520,8 +507,6 @@ $color-white: #eee; } blockquote { - border-left: 3px solid rgba($color-black, 0.1); - color: rgba($color-black, 0.8); // @include padding-left(0.8rem); font-style: italic; @@ -562,7 +547,6 @@ $color-white: #eee; .suggestion-list { padding: 0.2rem; - border: 2px solid rgba($color-black, 0.1); font-size: 0.8rem; font-weight: bold; &__no-results { @@ -576,10 +560,6 @@ $color-white: #eee; &:last-child { margin-bottom: 0; } - &.is-selected, - &:hover { - background-color: rgba($color-white, 0.2); - } &.is-empty { opacity: 0.5; } @@ -591,11 +571,9 @@ $color-white: #eee; } } .tippy-box[data-theme~="dark"] { - background-color: $color-black; padding: 0; font-size: 1rem; text-align: inherit; - color: $color-white; border-radius: 5px; } diff --git a/js/src/components/Editor/MentionList.vue b/js/src/components/Editor/MentionList.vue index 5ba9e1f4c..30642051a 100644 --- a/js/src/components/Editor/MentionList.vue +++ b/js/src/components/Editor/MentionList.vue @@ -90,11 +90,5 @@ const selectItem = (index: number): void => { background: transparent; border: none; padding: 0.5rem 0.75rem; - - &.is-selected, - &:hover { - color: $background-color; - background: rgba($background-color, 0.1); - } } diff --git a/js/src/components/ErrorComponent.vue b/js/src/components/ErrorComponent.vue index 46221138c..37fd5fe8f 100644 --- a/js/src/components/ErrorComponent.vue +++ b/js/src/components/ErrorComponent.vue @@ -198,7 +198,6 @@ const sentryProvider = computed((): IAnalyticsConfig | undefined => { diff --git a/js/src/components/Footer.vue b/js/src/components/Footer.vue index 3389512c0..bb5dd4b88 100644 --- a/js/src/components/Footer.vue +++ b/js/src/components/Footer.vue @@ -15,8 +15,8 @@ diff --git a/js/src/components/Group/InvitationCard.vue b/js/src/components/Group/InvitationCard.vue index 7d656b464..73ac7e040 100644 --- a/js/src/components/Group/InvitationCard.vue +++ b/js/src/components/Group/InvitationCard.vue @@ -80,13 +80,3 @@ defineProps<{ member: IMember; }>(); - - diff --git a/js/src/components/Group/Invitations.vue b/js/src/components/Group/InvitationsList.vue similarity index 95% rename from js/src/components/Group/Invitations.vue rename to js/src/components/Group/InvitationsList.vue index 1957983a7..2be46c20d 100644 --- a/js/src/components/Group/Invitations.vue +++ b/js/src/components/Group/InvitationsList.vue @@ -17,8 +17,10 @@ import { IMember } from "@/types/actor/member.model"; import { IGroup, IPerson, usernameWithDomain } from "@/types/actor"; import { useMutation } from "@vue/apollo-composable"; import { ErrorResponse } from "@/types/errors.model"; +import { inject } from "vue"; +import type { Notifier } from "@/plugins/notifier"; -const props = defineProps<{ +defineProps<{ invitations: IMember[]; }>(); diff --git a/js/src/components/Image/LazyImage.vue b/js/src/components/Image/LazyImage.vue index 469678a09..01b121c3a 100644 --- a/js/src/components/Image/LazyImage.vue +++ b/js/src/components/Image/LazyImage.vue @@ -75,11 +75,9 @@ onUnmounted(() => { }); watchEffect(() => { - console.debug("src changed"); // Image is visible (means: has entered the viewport), // so start loading by setting the src attribute if (image.value) { - console.debug("image is ok, setting it"); image.value.src = src.value; image.value.onload = () => { diff --git a/js/src/components/Logo.vue b/js/src/components/MobilizonLogo.vue similarity index 95% rename from js/src/components/Logo.vue rename to js/src/components/MobilizonLogo.vue index 8cd358f96..fc4c3253d 100644 --- a/js/src/components/Logo.vue +++ b/js/src/components/MobilizonLogo.vue @@ -1,5 +1,10 @@ - diff --git a/js/src/components/Post/PostListItem.vue b/js/src/components/Post/PostListItem.vue index 90521821b..e582f4225 100644 --- a/js/src/components/Post/PostListItem.vue +++ b/js/src/components/Post/PostListItem.vue @@ -102,7 +102,6 @@ const isBeforeLastWeek = computed((): boolean => { .title-info-wrapper { .post-minimalist-title { - // color: #3c376e; font-size: 18px; line-height: 24px; font-weight: 700; diff --git a/js/src/components/Resource/FolderItem.vue b/js/src/components/Resource/FolderItem.vue index 916f915f0..82cc0af5a 100644 --- a/js/src/components/Resource/FolderItem.vue +++ b/js/src/components/Resource/FolderItem.vue @@ -166,7 +166,6 @@ a { display: block; font-weight: 500; margin-bottom: 5px; - // color: $primary; overflow: hidden; text-overflow: ellipsis; text-decoration: none; diff --git a/js/src/components/Resource/ResourceItem.vue b/js/src/components/Resource/ResourceItem.vue index a2fc68030..856732910 100644 --- a/js/src/components/Resource/ResourceItem.vue +++ b/js/src/components/Resource/ResourceItem.vue @@ -131,7 +131,6 @@ a { white-space: nowrap; display: inline-block; font-weight: 500; - // color: $primary; overflow: hidden; text-overflow: ellipsis; text-decoration: none; diff --git a/js/src/components/Resource/ResourceSelector.vue b/js/src/components/Resource/ResourceSelector.vue index 11251b95f..4691dd76f 100644 --- a/js/src/components/Resource/ResourceSelector.vue +++ b/js/src/components/Resource/ResourceSelector.vue @@ -171,7 +171,6 @@ const moveDisabled = computed((): boolean | undefined => { } &.is-primary .panel-heading { - background: $primary; color: #fff; } } diff --git a/js/src/components/Settings/SettingMenuItem.vue b/js/src/components/Settings/SettingMenuItem.vue index 731b02a14..6cb113e14 100644 --- a/js/src/components/Settings/SettingMenuItem.vue +++ b/js/src/components/Settings/SettingMenuItem.vue @@ -32,7 +32,6 @@ const isActive = computed((): boolean => { li.setting-menu-item { font-size: 1.05rem; background-color: #fff1de; - color: $background-color; margin: auto; span { diff --git a/js/src/components/Settings/SettingMenuSection.vue b/js/src/components/Settings/SettingMenuSection.vue index 395425fd1..091f45be5 100644 --- a/js/src/components/Settings/SettingMenuSection.vue +++ b/js/src/components/Settings/SettingMenuSection.vue @@ -1,6 +1,11 @@ @@ -310,9 +306,9 @@ InstancePrivacyType.URL " > - {{ $t("URL") }} + {{ t("URL") }}

- {{ $t("Set an URL to a page with your own privacy policy.") }} + {{ t("Set an URL to a page with your own privacy policy.") }}

- {{ $t("Custom") }} + {{ t("Custom") }} @@ -343,7 +339,7 @@
{{ - $t("Save") + t("Save") }} @@ -390,29 +386,30 @@ import { useMutation, useQuery } from "@vue/apollo-composable"; import { ref, computed, watch, inject } from "vue"; import { useI18n } from "vue-i18n"; import { useHead } from "@vueuse/head"; -import { Notifier } from "@/plugins/notifier"; +import type { Notifier } from "@/plugins/notifier"; + +const defaultAdminSettings: IAdminSettings = { + instanceName: "", + instanceDescription: "", + instanceSlogan: "", + instanceLongDescription: "", + contact: "", + instanceTerms: "", + instanceTermsType: InstanceTermsType.DEFAULT, + instanceTermsUrl: null, + instancePrivacyPolicy: "", + instancePrivacyPolicyType: InstancePrivacyType.DEFAULT, + instancePrivacyPolicyUrl: null, + instanceRules: "", + registrationsOpen: false, + instanceLanguages: [], +}; const { result: adminSettingsResult } = useQuery<{ adminSettings: IAdminSettings; }>(ADMIN_SETTINGS); const adminSettings = computed( - () => - adminSettingsResult.value?.adminSettings ?? { - instanceName: "", - instanceDescription: "", - instanceSlogan: "", - instanceLongDescription: "", - contact: "", - instanceTerms: "", - instanceTermsType: InstanceTermsType.DEFAULT, - instanceTermsUrl: null, - instancePrivacyPolicy: "", - instancePrivacyPolicyType: InstanceTermsType.DEFAULT, - instancePrivacyPolicyUrl: null, - instanceRules: "", - registrationsOpen: false, - instanceLanguages: [], - } + () => adminSettingsResult.value?.adminSettings ?? defaultAdminSettings ); const { result: languageResult } = useQuery<{ languages: ILanguage[] }>( @@ -425,10 +422,10 @@ useHead({ title: computed(() => t("Settings")), }); -const settingsToWrite = ref({ ...adminSettings }); +const settingsToWrite = ref(defaultAdminSettings); watch(adminSettings, () => { - // settingsToWrite.value = { ...adminSettings.value }; + settingsToWrite.value = { ...adminSettings.value }; }); const filteredLanguages = ref([]); diff --git a/js/src/views/Admin/Users.vue b/js/src/views/Admin/Users.vue index 527476cba..4c3ccb075 100644 --- a/js/src/views/Admin/Users.vue +++ b/js/src/views/Admin/Users.vue @@ -196,7 +196,6 @@ a.user-profile { text-decoration: none; } a.disabled { - color: $danger; text-decoration: line-through; } diff --git a/js/src/views/Event/Edit.vue b/js/src/views/Event/Edit.vue index d5747331d..ec5dbd70e 100644 --- a/js/src/views/Event/Edit.vue +++ b/js/src/views/Event/Edit.vue @@ -496,7 +496,6 @@ diff --git a/js/src/views/HomeView.vue b/js/src/views/HomeView.vue index 402d5146e..b8a45267b 100644 --- a/js/src/views/HomeView.vue +++ b/js/src/views/HomeView.vue @@ -288,12 +288,12 @@ diff --git a/js/src/views/Interact.vue b/js/src/views/Interact.vue index c91e78151..c18d71f5a 100644 --- a/js/src/views/Interact.vue +++ b/js/src/views/Interact.vue @@ -99,8 +99,3 @@ useHead({ title: computed(() => t("Interact with a remote content")), }); - diff --git a/js/src/views/Moderation/Logs.vue b/js/src/views/Moderation/Logs.vue index c2433824d..142d7ad5f 100644 --- a/js/src/views/Moderation/Logs.vue +++ b/js/src/views/Moderation/Logs.vue @@ -214,7 +214,7 @@ log.object.__typename == 'Group' " tag="span" - path="{moderator} suspended group {profile}" + keypath="{moderator} suspended group {profile}" >