Skip to content

Commit

Permalink
🔥 Remove content width settings
Browse files Browse the repository at this point in the history
  • Loading branch information
AuroraHuang22 committed Mar 18, 2024
1 parent 8afd6b2 commit 107b403
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 38 deletions.
7 changes: 0 additions & 7 deletions components/RootLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,10 @@ const uiModule = namespace('ui')
@Component({
head() {
const isDesktopViewMode: boolean =
this.$store.getters['ui/isDesktopViewMode']
const contentWidth = isDesktopViewMode
? 'width=1024, initial-scale=1, minimum-scale=1'
: 'width=device-width'
return {
htmlAttrs: {
class: this.$props.bgClass,
},
meta: [{ hid: 'viewport', name: 'viewport', content: contentWidth }],
}
},
})
Expand Down
32 changes: 1 addition & 31 deletions layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,44 +29,14 @@
<IconArrowLeft class="w-[20px]" />
</template>
</Button>
<Button
:class="['mt-[26px]', 'text-medium-gray']"
preset="outline"
text-preset="h7"
size="mini"
:text="viewModeButtonText"
@click="handleChangeViewModeButtonClick"
/>
</div>
<AppFooter />
</RootLayout>
</template>

<script lang="ts">
import { Vue, Component } from 'vue-property-decorator'
import { namespace } from 'vuex-class'
const uiModule = namespace('ui')
@Component
export default class DefaultLayout extends Vue {
@uiModule.Getter isDesktopViewMode!: boolean
@uiModule.Action enableDesktopViewMode!: () => void
@uiModule.Action enableMobileViewMode!: () => void
get viewModeButtonText() {
if (this.isDesktopViewMode) {
return this.$t('HomePage.button.viewMode.mobile')
}
return this.$t('HomePage.button.viewMode.desktop')
}
handleChangeViewModeButtonClick() {
if (this.isDesktopViewMode) {
this.enableMobileViewMode()
} else {
this.enableDesktopViewMode()
}
}
}
export default class DefaultLayout extends Vue {}
</script>

0 comments on commit 107b403

Please sign in to comment.