aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/interface_language_switcher/interface_language_switcher.vue28
-rw-r--r--src/components/poll/poll_form.vue30
-rw-r--r--src/components/post_status_form/post_status_form.vue26
-rw-r--r--src/components/settings_modal/tabs/profile_tab.scss9
-rw-r--r--src/components/settings_modal/tabs/profile_tab.vue14
-rw-r--r--src/components/side_drawer/side_drawer.vue2
-rw-r--r--src/components/status/status.js1
-rw-r--r--src/components/user_card/user_card.vue3
8 files changed, 43 insertions, 70 deletions
diff --git a/src/components/interface_language_switcher/interface_language_switcher.vue b/src/components/interface_language_switcher/interface_language_switcher.vue
index 524ec5e9..dc3bd408 100644
--- a/src/components/interface_language_switcher/interface_language_switcher.vue
+++ b/src/components/interface_language_switcher/interface_language_switcher.vue
@@ -12,11 +12,11 @@
v-model="language"
>
<option
- v-for="(langCode, i) in languageCodes"
- :key="langCode"
- :value="langCode"
+ v-for="lang in languages"
+ :key="lang.code"
+ :value="lang.code"
>
- {{ languageNames[i] }}
+ {{ lang.name }}
</option>
</select>
<FAIcon
@@ -29,6 +29,7 @@
<script>
import languagesObject from '../../i18n/messages'
+import localeService from '../../services/locale/locale.service.js'
import ISO6391 from 'iso-639-1'
import _ from 'lodash'
import { library } from '@fortawesome/fontawesome-svg-core'
@@ -42,12 +43,8 @@ library.add(
export default {
computed: {
- languageCodes () {
- return languagesObject.languages
- },
-
- languageNames () {
- return _.map(this.languageCodes, this.getLanguageName)
+ languages () {
+ return _.map(languagesObject.languages, (code) => ({ code: code, name: this.getLanguageName(code) })).sort((a, b) => a.name.localeCompare(b.name))
},
language: {
@@ -61,12 +58,13 @@ export default {
methods: {
getLanguageName (code) {
const specialLanguageNames = {
- 'ja': 'Japanese (日本語)',
- 'ja_easy': 'Japanese (やさしいにほんご)',
- 'zh': 'Simplified Chinese (简体中文)',
- 'zh_Hant': 'Traditional Chinese (繁體中文)'
+ 'ja_easy': 'やさしいにほんご',
+ 'zh': '简体中文',
+ 'zh_Hant': '繁體中文'
}
- return specialLanguageNames[code] || ISO6391.getName(code)
+ const languageName = specialLanguageNames[code] || ISO6391.getNativeName(code)
+ const browserLocale = localeService.internalToBrowserLocale(code)
+ return languageName.charAt(0).toLocaleUpperCase(browserLocale) + languageName.slice(1)
}
}
}
diff --git a/src/components/poll/poll_form.vue b/src/components/poll/poll_form.vue
index 31f204a0..09496105 100644
--- a/src/components/poll/poll_form.vue
+++ b/src/components/poll/poll_form.vue
@@ -21,20 +21,17 @@
@keydown.enter.stop.prevent="nextOption(index)"
>
</div>
- <div
+ <button
v-if="options.length > 2"
- class="icon-container"
+ class="delete-option button-unstyled -hover-highlight"
+ @click="deleteOption(index)"
>
- <FAIcon
- icon="times"
- class="delete"
- @click="deleteOption(index)"
- />
- </div>
+ <FAIcon icon="times" />
+ </button>
</div>
- <a
+ <button
v-if="options.length < maxOptions"
- class="add-option faint"
+ class="add-option faint button-unstyled -hover-highlight"
@click="addOption"
>
<FAIcon
@@ -43,7 +40,7 @@
/>
{{ $t("polls.add_option") }}
- </a>
+ </button>
<div class="poll-type-expiry">
<div
class="poll-type"
@@ -116,7 +113,6 @@
align-self: flex-start;
padding-top: 0.25em;
padding-left: 0.1em;
- cursor: pointer;
}
.poll-option {
@@ -135,19 +131,11 @@
}
}
- .icon-container {
+ .delete-option {
// Hack: Move the icon over the input box
width: 1.5em;
margin-left: -1.5em;
z-index: 1;
-
- .delete {
- cursor: pointer;
-
- &:hover {
- color: inherit;
- }
- }
}
.poll-type-expiry {
diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue
index ed830f57..73f6a4f1 100644
--- a/src/components/post_status_form/post_status_form.vue
+++ b/src/components/post_status_form/post_status_form.vue
@@ -302,11 +302,12 @@
:key="file.url"
class="media-upload-wrapper"
>
- <FAIcon
- class="fa-scale-110 fa-old-padding"
- icon="times"
+ <button
+ class="button-unstyled hider"
@click="removeMediaFile(file)"
- />
+ >
+ <FAIcon icon="times" />
+ </button>
<attachment
:attachment="file"
:set-media="() => $store.dispatch('setMedia', newStatus.files)"
@@ -516,26 +517,11 @@
}
.attachments .media-upload-wrapper {
- padding: 0 0.5em;
+ position: relative;
.attachment {
margin: 0;
padding: 0;
- position: relative;
- }
-
- .fa-scale-110 fa-old-padding {
- position: absolute;
- margin: 10px;
- margin: .75em;
- padding: .5em;
- background: rgba(230,230,230,0.6);
- z-index: 2;
- color: black;
- border-radius: $fallback--attachmentRadius;
- border-radius: var(--attachmentRadius, $fallback--attachmentRadius);
- font-weight: bold;
- cursor: pointer;
}
}
diff --git a/src/components/settings_modal/tabs/profile_tab.scss b/src/components/settings_modal/tabs/profile_tab.scss
index e821f952..111eaed3 100644
--- a/src/components/settings_modal/tabs/profile_tab.scss
+++ b/src/components/settings_modal/tabs/profile_tab.scss
@@ -111,16 +111,17 @@
.profile-fields {
display: flex;
- &>.emoji-input {
+ & > .emoji-input {
flex: 1 1 auto;
- margin: 0 .2em .5em;
+ margin: 0 0.2em 0.5em;
min-width: 0;
}
- &>.icon-container {
+ .delete-field {
width: 20px;
align-self: center;
- margin: 0 .2em .5em;
+ margin: 0 0.2em 0.5em;
+ padding: 0 0.5em;
}
}
}
diff --git a/src/components/settings_modal/tabs/profile_tab.vue b/src/components/settings_modal/tabs/profile_tab.vue
index b7ef21d7..175a0219 100644
--- a/src/components/settings_modal/tabs/profile_tab.vue
+++ b/src/components/settings_modal/tabs/profile_tab.vue
@@ -124,24 +124,24 @@
:placeholder="$t('settings.profile_fields.value')"
>
</EmojiInput>
- <div
- class="icon-container"
+ <button
+ class="delete-field button-unstyled -hover-highlight"
+ @click="deleteField(i)"
>
<FAIcon
v-show="newFields.length > 1"
icon="times"
- @click="deleteField(i)"
/>
- </div>
+ </button>
</div>
- <a
+ <button
v-if="newFields.length < maxFields"
- class="add-field faint"
+ class="add-field faint button-unstyled -hover-highlight"
@click="addField"
>
<FAIcon icon="plus" />
{{ $t("settings.profile_fields.add_field") }}
- </a>
+ </button>
</div>
<p>
<Checkbox v-model="bot">
diff --git a/src/components/side_drawer/side_drawer.vue b/src/components/side_drawer/side_drawer.vue
index 695ae03b..223b1632 100644
--- a/src/components/side_drawer/side_drawer.vue
+++ b/src/components/side_drawer/side_drawer.vue
@@ -109,7 +109,7 @@
v-if="chat"
@click="toggleDrawer"
>
- <router-link :to="{ name: 'chat' }">
+ <router-link :to="{ name: 'chat-panel' }">
<FAIcon
fixed-width
class="fa-scale-110 fa-old-padding"
diff --git a/src/components/status/status.js b/src/components/status/status.js
index f9c710ab..2bf93a9e 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -157,6 +157,7 @@ const Status = {
return muteWordHits(this.status, this.muteWords)
},
muted () {
+ if (this.statusoid.user.id === this.currentUser.id) return false
const { status } = this
const { reblog } = status
const relationship = this.$store.getters.relationship(status.user.id)
diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue
index 16dd5249..773f764a 100644
--- a/src/components/user_card/user_card.vue
+++ b/src/components/user_card/user_card.vue
@@ -83,7 +83,7 @@
v-if="!!visibleRole"
class="alert user-role"
>
- {{ visibleRole }}
+ {{ $t(`user_card.roles.${visibleRole}`) }}
</span>
<span
v-if="user.bot"
@@ -507,7 +507,6 @@
.user-role {
flex: none;
- text-transform: capitalize;
color: $fallback--text;
color: var(--alertNeutralText, $fallback--text);
background-color: $fallback--fg;